thirdweb 5.100.2 → 5.101.0
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/bridge/Webhook.js +105 -0
- package/dist/cjs/bridge/Webhook.js.map +1 -0
- package/dist/cjs/bridge/index.js +4 -1
- package/dist/cjs/bridge/index.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/bridge/Webhook.js +102 -0
- package/dist/esm/bridge/Webhook.js.map +1 -0
- package/dist/esm/bridge/index.js +2 -0
- package/dist/esm/bridge/index.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/bridge/Webhook.d.ts +82 -0
- package/dist/types/bridge/Webhook.d.ts.map +1 -0
- package/dist/types/bridge/index.d.ts +4 -1
- package/dist/types/bridge/index.d.ts.map +1 -1
- package/dist/types/react/core/account/provider.d.ts +1 -1
- package/dist/types/react/core/account/provider.d.ts.map +1 -1
- package/dist/types/react/core/design-system/CustomThemeProvider.d.ts +1 -1
- package/dist/types/react/core/design-system/CustomThemeProvider.d.ts.map +1 -1
- package/dist/types/react/core/providers/thirdweb-provider.d.ts +1 -1
- package/dist/types/react/core/providers/thirdweb-provider.d.ts.map +1 -1
- package/dist/types/react/core/wallet/provider.d.ts +1 -1
- package/dist/types/react/core/wallet/provider.d.ts.map +1 -1
- package/dist/types/react/native/providers/thirdweb-provider.d.ts +1 -1
- package/dist/types/react/native/providers/thirdweb-provider.d.ts.map +1 -1
- package/dist/types/react/native/ui/AutoConnect/AutoConnect.d.ts +1 -1
- package/dist/types/react/native/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/Address.d.ts +1 -1
- package/dist/types/react/native/ui/components/Address.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/ChainIcon.d.ts +1 -1
- package/dist/types/react/native/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/Header.d.ts +1 -1
- package/dist/types/react/native/ui/components/Header.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/RNImage.d.ts +1 -1
- package/dist/types/react/native/ui/components/RNImage.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/TokenIcon.d.ts +1 -1
- package/dist/types/react/native/ui/components/TokenIcon.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/WalletImage.d.ts +1 -1
- package/dist/types/react/native/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/button.d.ts +2 -2
- package/dist/types/react/native/ui/components/button.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/input.d.ts +2 -2
- package/dist/types/react/native/ui/components/input.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/spacer.d.ts +1 -1
- package/dist/types/react/native/ui/components/spacer.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/text.d.ts +1 -1
- package/dist/types/react/native/ui/components/text.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/view.d.ts +1 -1
- package/dist/types/react/native/ui/components/view.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectButton.d.ts +1 -1
- package/dist/types/react/native/ui/connect/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts +2 -2
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectedButton.d.ts +1 -1
- package/dist/types/react/native/ui/connect/ConnectedButton.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectedModal.d.ts +1 -1
- package/dist/types/react/native/ui/connect/ConnectedModal.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ErrorView.d.ts +1 -1
- package/dist/types/react/native/ui/connect/ErrorView.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts +2 -2
- package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts +3 -3
- package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/LoadingView.d.ts +1 -1
- package/dist/types/react/native/ui/connect/LoadingView.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts +1 -1
- package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/SendScreen.d.ts +1 -1
- package/dist/types/react/native/ui/connect/SendScreen.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/SuccessView.d.ts +1 -1
- package/dist/types/react/native/ui/connect/SuccessView.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/TokenListScreen.d.ts +2 -2
- package/dist/types/react/native/ui/connect/TokenListScreen.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts +1 -1
- package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts.map +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/address.d.ts +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/address.d.ts.map +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts.map +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts.map +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts +2 -2
- package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts.map +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/name.d.ts +1 -1
- package/dist/types/react/native/ui/prebuilt/Account/name.d.ts.map +1 -1
- package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts +2 -2
- package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts.map +1 -1
- package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts +1 -1
- package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts.map +1 -1
- package/dist/types/react/native/ui/transaction/TransactionButton.d.ts +1 -1
- package/dist/types/react/native/ui/transaction/TransactionButton.d.ts.map +1 -1
- package/dist/types/react/web/providers/thirdweb-provider.d.ts +1 -1
- package/dist/types/react/web/providers/thirdweb-provider.d.ts.map +1 -1
- package/dist/types/react/web/providers/wallet-ui-states-provider.d.ts +1 -1
- package/dist/types/react/web/providers/wallet-ui-states-provider.d.ts.map +1 -1
- package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts +1 -1
- package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts +5 -5
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModal.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModal.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalSkeleton.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalSkeleton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/TOS.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/TOS.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/PoweredByTW.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/PoweredByTW.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletTypeRowButton.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletTypeRowButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts +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/DirectPaymentModeScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/Stepper.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/Stepper.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts +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/TransferConfirmationScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ManageWalletScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ManageWalletScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/PrivateKey.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/PrivateKey.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ReceiveFunds.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ReceiveFunds.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/StartScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/StartScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewAssets.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewAssets.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectDisconnectScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectDisconnectScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletLogoSpinner.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletLogoSpinner.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts.map +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/SiteEmbed.d.ts +1 -1
- package/dist/types/react/web/ui/SiteEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/SiteLink.d.ts +1 -1
- package/dist/types/react/web/ui/SiteLink.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts +1 -1
- package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts +1 -1
- package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +1 -1
- package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/index.d.ts +1 -1
- package/dist/types/react/web/ui/TransactionButton/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/OTPInput.d.ts +1 -1
- package/dist/types/react/web/ui/components/OTPInput.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/QRCode.d.ts +1 -1
- package/dist/types/react/web/ui/components/QRCode.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/StepBar.d.ts +1 -1
- package/dist/types/react/web/ui/components/StepBar.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/SwitchNetwork.d.ts +1 -1
- package/dist/types/react/web/ui/components/SwitchNetwork.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/Tabs.d.ts +1 -1
- package/dist/types/react/web/ui/components/Tabs.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/TextDivider.d.ts +1 -1
- package/dist/types/react/web/ui/components/TextDivider.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/TokenIcon.d.ts +1 -1
- package/dist/types/react/web/ui/components/TokenIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/WalletImage.d.ts +1 -1
- package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/basic.d.ts +2 -2
- package/dist/types/react/web/ui/components/basic.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/token/TokenRow.d.ts +1 -1
- package/dist/types/react/web/ui/components/token/TokenRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/token/TokenSymbol.d.ts +1 -1
- package/dist/types/react/web/ui/components/token/TokenSymbol.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/address.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/address.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/name.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/name.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Chain/icon.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Chain/icon.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Chain/name.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Chain/name.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Chain/provider.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Chain/provider.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/description.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/description.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/media.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/media.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/provider.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/provider.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/icon.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/icon.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/name.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/name.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/provider.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/provider.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/symbol.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/symbol.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts +2 -2
- package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts.map +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletConnectUI.d.ts +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletFormUI.d.ts +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletFormUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletHeader.d.ts +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletHeader.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/CountrySelector.d.ts +1 -1
- package/dist/types/react/web/wallets/in-app/CountrySelector.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletFormUI.d.ts +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletFormUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletSelectionUI.d.ts +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletSelectionUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InputSelectionUI.d.ts +1 -1
- package/dist/types/react/web/wallets/in-app/InputSelectionUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts +1 -1
- package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/CoinbaseSDKConnection.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/CoinbaseSDKConnection.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ErrorState.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/ErrorState.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/GuestLogin.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/GuestLogin.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/LoadingScreen.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/LoadingScreen.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/LoadingState.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/LoadingState.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/SocialLogin.d.ts +1 -1
- package/dist/types/react/web/wallets/shared/SocialLogin.d.ts.map +1 -1
- package/dist/types/transaction/actions/to-serializable-transaction.d.ts +2 -2
- package/dist/types/utils/abi/decodeFunctionData.d.ts +1 -1
- package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -1
- package/dist/types/utils/abi/decodeFunctionResult.d.ts +1 -1
- package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/in-app/native/helpers/storage/local.d.ts +1 -1
- package/package.json +6 -5
- package/src/bridge/Webhook.test.ts +589 -0
- package/src/bridge/Webhook.ts +139 -0
- package/src/bridge/index.ts +4 -1
- package/src/version.ts +1 -1
@@ -0,0 +1,139 @@
|
|
1
|
+
import { z } from "zod/v4-mini";
|
2
|
+
import { isAddress } from "../utils/address.js";
|
3
|
+
import { isHex } from "../utils/encoding/hex.js";
|
4
|
+
|
5
|
+
const hexSchema = z
|
6
|
+
.string()
|
7
|
+
.check(z.refine(isHex, { message: "Invalid hex string" }));
|
8
|
+
const addressSchema = z
|
9
|
+
.string()
|
10
|
+
.check(z.refine(isAddress, { message: "Invalid address" }));
|
11
|
+
|
12
|
+
const webhookSchema = z.union([
|
13
|
+
z.object({
|
14
|
+
version: z.literal(1),
|
15
|
+
data: z.object({}),
|
16
|
+
}),
|
17
|
+
z.object({
|
18
|
+
version: z.literal(2),
|
19
|
+
data: z.object({
|
20
|
+
paymentId: z.string(),
|
21
|
+
// only exists when the payment was triggered from a developer specified payment link
|
22
|
+
paymentLinkId: z.optional(z.string()),
|
23
|
+
clientId: z.string(),
|
24
|
+
action: z.enum(["TRANSFER", "BUY", "SELL"]),
|
25
|
+
status: z.enum(["PENDING", "FAILED", "COMPLETED"]),
|
26
|
+
originToken: addressSchema,
|
27
|
+
originAmount: z.string(),
|
28
|
+
destinationToken: addressSchema,
|
29
|
+
destinationAmount: z.string(),
|
30
|
+
sender: addressSchema,
|
31
|
+
receiver: addressSchema,
|
32
|
+
type: z.string(),
|
33
|
+
transactions: z.array(hexSchema),
|
34
|
+
developerFeeBps: z.coerce.number(),
|
35
|
+
developerFeeRecipient: addressSchema,
|
36
|
+
purchaseData: z.record(z.string(), z.unknown()),
|
37
|
+
}),
|
38
|
+
}),
|
39
|
+
]);
|
40
|
+
|
41
|
+
export type WebhookPayload = Exclude<
|
42
|
+
z.infer<typeof webhookSchema>,
|
43
|
+
{ version: 1 }
|
44
|
+
>;
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Parses an incoming webhook from thirdweb.
|
48
|
+
*
|
49
|
+
* @param payload - The raw text body received from thirdweb.
|
50
|
+
* @param headers - The webhook headers received from thirdweb.
|
51
|
+
* @param secret - The webhook secret to verify the payload with.
|
52
|
+
*/
|
53
|
+
export async function parse(
|
54
|
+
/**
|
55
|
+
* Raw text body received from thirdweb.
|
56
|
+
*/
|
57
|
+
payload: string,
|
58
|
+
|
59
|
+
/**
|
60
|
+
* The webhook headers received from thirdweb.
|
61
|
+
*/
|
62
|
+
headers: Record<string, string>,
|
63
|
+
|
64
|
+
/**
|
65
|
+
* The webhook secret to verify the payload with.
|
66
|
+
*/
|
67
|
+
secret: string,
|
68
|
+
|
69
|
+
/**
|
70
|
+
* The tolerance in seconds for the timestamp verification.
|
71
|
+
*/
|
72
|
+
tolerance = 300, // Default to 5 minutes if not specified
|
73
|
+
) {
|
74
|
+
// Get the signature and timestamp from headers
|
75
|
+
const receivedSignature =
|
76
|
+
headers["x-payload-signature"] || headers["x-pay-signature"];
|
77
|
+
const receivedTimestamp =
|
78
|
+
headers["x-timestamp"] || headers["x-pay-timestamp"];
|
79
|
+
|
80
|
+
if (!receivedSignature || !receivedTimestamp) {
|
81
|
+
throw new Error("Missing required webhook headers: signature or timestamp");
|
82
|
+
}
|
83
|
+
|
84
|
+
// Verify timestamp
|
85
|
+
const now = Math.floor(Date.now() / 1000);
|
86
|
+
const timestamp = Number.parseInt(receivedTimestamp, 10);
|
87
|
+
const diff = Math.abs(now - timestamp);
|
88
|
+
|
89
|
+
if (diff > tolerance) {
|
90
|
+
throw new Error(
|
91
|
+
`Webhook timestamp is too old. Difference: ${diff}s, tolerance: ${tolerance}s`,
|
92
|
+
);
|
93
|
+
}
|
94
|
+
|
95
|
+
// Generate signature using the same method as the sender
|
96
|
+
const encoder = new TextEncoder();
|
97
|
+
const key = await crypto.subtle.importKey(
|
98
|
+
"raw",
|
99
|
+
encoder.encode(secret),
|
100
|
+
{ name: "HMAC", hash: "SHA-256" },
|
101
|
+
false,
|
102
|
+
["sign"],
|
103
|
+
);
|
104
|
+
|
105
|
+
const signature = await crypto.subtle.sign(
|
106
|
+
"HMAC",
|
107
|
+
key,
|
108
|
+
encoder.encode(`${receivedTimestamp}.${payload}`),
|
109
|
+
);
|
110
|
+
|
111
|
+
// Convert the signature to hex string
|
112
|
+
const computedSignature = Array.from(new Uint8Array(signature))
|
113
|
+
.map((b) => b.toString(16).padStart(2, "0"))
|
114
|
+
.join("");
|
115
|
+
|
116
|
+
// Compare signatures
|
117
|
+
if (computedSignature !== receivedSignature) {
|
118
|
+
throw new Error("Invalid webhook signature");
|
119
|
+
}
|
120
|
+
|
121
|
+
// Parse the payload as JSON
|
122
|
+
let payloadObject: unknown;
|
123
|
+
try {
|
124
|
+
payloadObject = JSON.parse(payload) as unknown;
|
125
|
+
} catch {
|
126
|
+
throw new Error("Invalid webhook payload: not valid JSON");
|
127
|
+
}
|
128
|
+
|
129
|
+
const parsedPayload = webhookSchema.parse(payloadObject);
|
130
|
+
|
131
|
+
// v1 is no longer supported
|
132
|
+
if (parsedPayload.version === 1) {
|
133
|
+
throw new Error(
|
134
|
+
"Invalid webhook payload: version 1 is no longer supported, please upgrade to webhook version 2.",
|
135
|
+
);
|
136
|
+
}
|
137
|
+
|
138
|
+
return parsedPayload;
|
139
|
+
}
|
package/src/bridge/index.ts
CHANGED
@@ -2,9 +2,11 @@ export * as Buy from "./Buy.js";
|
|
2
2
|
export * as Sell from "./Sell.js";
|
3
3
|
export * as Transfer from "./Transfer.js";
|
4
4
|
export * as Onramp from "./Onramp.js";
|
5
|
+
export * as Webhook from "./Webhook.js";
|
5
6
|
export { status } from "./Status.js";
|
6
7
|
export { routes } from "./Routes.js";
|
7
8
|
export { chains } from "./Chains.js";
|
9
|
+
export { parse } from "./Webhook.js";
|
8
10
|
|
9
11
|
export type { Chain } from "./types/Chain.js";
|
10
12
|
export type { Quote, PreparedQuote } from "./types/Quote.js";
|
@@ -16,5 +18,6 @@ export type {
|
|
16
18
|
} from "./types/Route.js";
|
17
19
|
export type { Status } from "./types/Status.js";
|
18
20
|
export type { Token } from "./types/Token.js";
|
19
|
-
export type { Action } from "./types/BridgeAction.js";
|
20
21
|
export type { ApiError } from "./types/Errors.js";
|
22
|
+
export type { Action } from "./types/BridgeAction.js";
|
23
|
+
export type { WebhookPayload } from "./Webhook.js";
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.
|
1
|
+
export const version = "5.101.0";
|