thirdweb 5.100.2 → 5.101.1-nightly-5277eddb70b3cf7b3dccbb4570c677f49b8dc854-20250524000345
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 +121 -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/bridge/types/Errors.js.map +1 -1
- package/dist/cjs/react/web/utils/errors.js +7 -10
- package/dist/cjs/react/web/utils/errors.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/bridge/Webhook.js +118 -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/bridge/types/Errors.js.map +1 -1
- package/dist/esm/react/web/utils/errors.js +7 -10
- package/dist/esm/react/web/utils/errors.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/bridge/Webhook.d.ts +114 -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/bridge/types/Errors.d.ts +1 -1
- package/dist/types/bridge/types/Errors.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/utils/errors.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/version.d.ts.map +1 -1
- package/dist/types/wallets/in-app/native/helpers/storage/local.d.ts +1 -1
- package/package.json +4 -3
- package/src/bridge/Webhook.test.ts +605 -0
- package/src/bridge/Webhook.ts +155 -0
- package/src/bridge/index.ts +4 -1
- package/src/bridge/types/Errors.ts +1 -0
- package/src/react/web/utils/errors.ts +7 -13
- package/src/version.ts +1 -1
@@ -0,0 +1,121 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.parse = parse;
|
4
|
+
const v4_mini_1 = require("zod/v4-mini");
|
5
|
+
const address_js_1 = require("../utils/address.js");
|
6
|
+
const hex_js_1 = require("../utils/encoding/hex.js");
|
7
|
+
const hexSchema = v4_mini_1.z
|
8
|
+
.string()
|
9
|
+
.check(v4_mini_1.z.refine(hex_js_1.isHex, { message: "Invalid hex string" }));
|
10
|
+
const addressSchema = v4_mini_1.z
|
11
|
+
.string()
|
12
|
+
.check(v4_mini_1.z.refine(address_js_1.isAddress, { message: "Invalid address" }));
|
13
|
+
const webhookSchema = v4_mini_1.z.union([
|
14
|
+
v4_mini_1.z.object({
|
15
|
+
version: v4_mini_1.z.literal(1),
|
16
|
+
data: v4_mini_1.z.object({}),
|
17
|
+
}),
|
18
|
+
v4_mini_1.z.object({
|
19
|
+
version: v4_mini_1.z.literal(2),
|
20
|
+
data: v4_mini_1.z.object({
|
21
|
+
paymentId: v4_mini_1.z.string(),
|
22
|
+
// only exists when the payment was triggered from a developer specified payment link
|
23
|
+
paymentLinkId: v4_mini_1.z.optional(v4_mini_1.z.string()),
|
24
|
+
clientId: v4_mini_1.z.string(),
|
25
|
+
action: v4_mini_1.z.enum(["TRANSFER", "BUY", "SELL"]),
|
26
|
+
status: v4_mini_1.z.enum(["PENDING", "FAILED", "COMPLETED"]),
|
27
|
+
originToken: v4_mini_1.z.object({
|
28
|
+
chainId: v4_mini_1.z.coerce.number(),
|
29
|
+
address: addressSchema,
|
30
|
+
name: v4_mini_1.z.string(),
|
31
|
+
symbol: v4_mini_1.z.string(),
|
32
|
+
decimals: v4_mini_1.z.coerce.number(),
|
33
|
+
priceUsd: v4_mini_1.z.coerce.number(),
|
34
|
+
iconUri: v4_mini_1.z.optional(v4_mini_1.z.string()),
|
35
|
+
}),
|
36
|
+
originAmount: v4_mini_1.z.string(),
|
37
|
+
destinationToken: v4_mini_1.z.object({
|
38
|
+
chainId: v4_mini_1.z.coerce.number(),
|
39
|
+
address: addressSchema,
|
40
|
+
name: v4_mini_1.z.string(),
|
41
|
+
symbol: v4_mini_1.z.string(),
|
42
|
+
decimals: v4_mini_1.z.coerce.number(),
|
43
|
+
priceUsd: v4_mini_1.z.coerce.number(),
|
44
|
+
iconUri: v4_mini_1.z.optional(v4_mini_1.z.string()),
|
45
|
+
}),
|
46
|
+
destinationAmount: v4_mini_1.z.string(),
|
47
|
+
sender: addressSchema,
|
48
|
+
receiver: addressSchema,
|
49
|
+
type: v4_mini_1.z.string(),
|
50
|
+
transactions: v4_mini_1.z.array(hexSchema),
|
51
|
+
developerFeeBps: v4_mini_1.z.coerce.number(),
|
52
|
+
developerFeeRecipient: addressSchema,
|
53
|
+
purchaseData: v4_mini_1.z.record(v4_mini_1.z.string(), v4_mini_1.z.unknown()),
|
54
|
+
}),
|
55
|
+
}),
|
56
|
+
]);
|
57
|
+
/**
|
58
|
+
* Parses an incoming webhook from thirdweb.
|
59
|
+
*
|
60
|
+
* @param payload - The raw text body received from thirdweb.
|
61
|
+
* @param headers - The webhook headers received from thirdweb.
|
62
|
+
* @param secret - The webhook secret to verify the payload with.
|
63
|
+
*/
|
64
|
+
async function parse(
|
65
|
+
/**
|
66
|
+
* Raw text body received from thirdweb.
|
67
|
+
*/
|
68
|
+
payload,
|
69
|
+
/**
|
70
|
+
* The webhook headers received from thirdweb.
|
71
|
+
*/
|
72
|
+
headers,
|
73
|
+
/**
|
74
|
+
* The webhook secret to verify the payload with.
|
75
|
+
*/
|
76
|
+
secret,
|
77
|
+
/**
|
78
|
+
* The tolerance in seconds for the timestamp verification.
|
79
|
+
*/
|
80
|
+
tolerance = 300) {
|
81
|
+
// Get the signature and timestamp from headers
|
82
|
+
const receivedSignature = headers["x-payload-signature"] || headers["x-pay-signature"];
|
83
|
+
const receivedTimestamp = headers["x-timestamp"] || headers["x-pay-timestamp"];
|
84
|
+
if (!receivedSignature || !receivedTimestamp) {
|
85
|
+
throw new Error("Missing required webhook headers: signature or timestamp");
|
86
|
+
}
|
87
|
+
// Verify timestamp
|
88
|
+
const now = Math.floor(Date.now() / 1000);
|
89
|
+
const timestamp = Number.parseInt(receivedTimestamp, 10);
|
90
|
+
const diff = Math.abs(now - timestamp);
|
91
|
+
if (diff > tolerance) {
|
92
|
+
throw new Error(`Webhook timestamp is too old. Difference: ${diff}s, tolerance: ${tolerance}s`);
|
93
|
+
}
|
94
|
+
// Generate signature using the same method as the sender
|
95
|
+
const encoder = new TextEncoder();
|
96
|
+
const key = await crypto.subtle.importKey("raw", encoder.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
|
97
|
+
const signature = await crypto.subtle.sign("HMAC", key, encoder.encode(`${receivedTimestamp}.${payload}`));
|
98
|
+
// Convert the signature to hex string
|
99
|
+
const computedSignature = Array.from(new Uint8Array(signature))
|
100
|
+
.map((b) => b.toString(16).padStart(2, "0"))
|
101
|
+
.join("");
|
102
|
+
// Compare signatures
|
103
|
+
if (computedSignature !== receivedSignature) {
|
104
|
+
throw new Error("Invalid webhook signature");
|
105
|
+
}
|
106
|
+
// Parse the payload as JSON
|
107
|
+
let payloadObject;
|
108
|
+
try {
|
109
|
+
payloadObject = JSON.parse(payload);
|
110
|
+
}
|
111
|
+
catch {
|
112
|
+
throw new Error("Invalid webhook payload: not valid JSON");
|
113
|
+
}
|
114
|
+
const parsedPayload = webhookSchema.parse(payloadObject);
|
115
|
+
// v1 is no longer supported
|
116
|
+
if (parsedPayload.version === 1) {
|
117
|
+
throw new Error("Invalid webhook payload: version 1 is no longer supported, please upgrade to webhook version 2.");
|
118
|
+
}
|
119
|
+
return parsedPayload;
|
120
|
+
}
|
121
|
+
//# sourceMappingURL=Webhook.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Webhook.js","sourceRoot":"","sources":["../../../src/bridge/Webhook.ts"],"names":[],"mappings":";;AAoEA,sBAsFC;AA1JD,yCAAgC;AAChC,oDAAgD;AAChD,qDAAiD;AAEjD,MAAM,SAAS,GAAG,WAAC;KAChB,MAAM,EAAE;KACR,KAAK,CAAC,WAAC,CAAC,MAAM,CAAC,cAAK,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC;AAC7D,MAAM,aAAa,GAAG,WAAC;KACpB,MAAM,EAAE;KACR,KAAK,CAAC,WAAC,CAAC,MAAM,CAAC,sBAAS,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC;AAE9D,MAAM,aAAa,GAAG,WAAC,CAAC,KAAK,CAAC;IAC5B,WAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,WAAC,C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ACjD,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAEzD,4BAA4B;IAC5B,IAAI,aAAa,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;IACJ,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/dist/cjs/bridge/index.js
CHANGED
@@ -1,14 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.chains = exports.routes = exports.status = exports.Onramp = exports.Transfer = exports.Sell = exports.Buy = void 0;
|
3
|
+
exports.parse = exports.chains = exports.routes = exports.status = exports.Webhook = exports.Onramp = exports.Transfer = exports.Sell = exports.Buy = void 0;
|
4
4
|
exports.Buy = require("./Buy.js");
|
5
5
|
exports.Sell = require("./Sell.js");
|
6
6
|
exports.Transfer = require("./Transfer.js");
|
7
7
|
exports.Onramp = require("./Onramp.js");
|
8
|
+
exports.Webhook = require("./Webhook.js");
|
8
9
|
var Status_js_1 = require("./Status.js");
|
9
10
|
Object.defineProperty(exports, "status", { enumerable: true, get: function () { return Status_js_1.status; } });
|
10
11
|
var Routes_js_1 = require("./Routes.js");
|
11
12
|
Object.defineProperty(exports, "routes", { enumerable: true, get: function () { return Routes_js_1.routes; } });
|
12
13
|
var Chains_js_1 = require("./Chains.js");
|
13
14
|
Object.defineProperty(exports, "chains", { enumerable: true, get: function () { return Chains_js_1.chains; } });
|
15
|
+
var Webhook_js_1 = require("./Webhook.js");
|
16
|
+
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return Webhook_js_1.parse; } });
|
14
17
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":";;;AAAA,kCAAgC;AAChC,oCAAkC;AAClC,4CAA0C;AAC1C,wCAAsC;AACtC,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,yCAAqC;AAA5B,mGAAA,MAAM,OAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":";;;AAAA,kCAAgC;AAChC,oCAAkC;AAClC,4CAA0C;AAC1C,wCAAsC;AACtC,0CAAwC;AACxC,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,2CAAqC;AAA5B,mGAAA,KAAK,OAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../../src/bridge/types/Errors.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../../src/bridge/types/Errors.ts"],"names":[],"mappings":";;;AAQA,MAAa,QAAS,SAAQ,KAAK;IAKjC,YAAY,IAKX;QACC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAVtB;;;;;WAAgB;QAChB;;;;;WAAuB;QACvB;;;;;WAAmB;QASjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACpC,CAAC;CACF;AAhBD,4BAgBC"}
|
@@ -5,22 +5,19 @@ const Errors_js_1 = require("../../../bridge/types/Errors.js");
|
|
5
5
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
6
6
|
function getErrorMessage(err) {
|
7
7
|
if (err instanceof Errors_js_1.ApiError) {
|
8
|
+
if (err.code === "INTERNAL_SERVER_ERROR") {
|
9
|
+
return {
|
10
|
+
code: "INTERNAL_SERVER_ERROR",
|
11
|
+
title: "Failed to Find Quote",
|
12
|
+
message: "An unknown error occurred. Please try again.",
|
13
|
+
};
|
14
|
+
}
|
8
15
|
return {
|
9
16
|
code: err.code,
|
10
17
|
title: "Failed to Find Quote",
|
11
18
|
message: getErrorMessageFromBridgeApiError(err),
|
12
19
|
};
|
13
20
|
}
|
14
|
-
if (typeof err.error === "object" && err.error.code) {
|
15
|
-
if (err.error.code === "MINIMUM_PURCHASE_AMOUNT") {
|
16
|
-
return {
|
17
|
-
code: "MINIMUM_PURCHASE_AMOUNT",
|
18
|
-
title: "Amount Too Low",
|
19
|
-
message: "The requested amount is less than the minimum purchase. Try another provider or amount.",
|
20
|
-
};
|
21
|
-
}
|
22
|
-
}
|
23
|
-
console.error(err);
|
24
21
|
return {
|
25
22
|
code: "UNABLE_TO_GET_PRICE_QUOTE",
|
26
23
|
title: "Failed to Find Quote",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/react/web/utils/errors.ts"],"names":[],"mappings":";;AASA,
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/react/web/utils/errors.ts"],"names":[],"mappings":";;AASA,0CAuBC;AAhCD,+DAA2D;AAQ3D,4DAA4D;AAC5D,SAAgB,eAAe,CAAC,GAAQ;IACtC,IAAI,GAAG,YAAY,oBAAQ,EAAE,CAAC;QAC5B,IAAI,GAAG,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;YACzC,OAAO;gBACL,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,sBAAsB;gBAC7B,OAAO,EAAE,8CAA8C;aACxD,CAAC;QACJ,CAAC;QACD,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,iCAAiC,CAAC,GAAG,CAAC;SAChD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,sBAAsB;QAC7B,OAAO,EACL,GAAG,CAAC,OAAO;YACX,qFAAqF;KACxF,CAAC;AACJ,CAAC;AAED,SAAS,iCAAiC,CAAC,GAAa;IACtD,IAAI,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;IACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/cjs/version.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.version = void 0;
|
4
|
-
exports.version = "5.
|
4
|
+
exports.version = "5.101.1-nightly-5277eddb70b3cf7b3dccbb4570c677f49b8dc854-20250524000345";
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/dist/cjs/version.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,yEAAyE,CAAC"}
|
@@ -0,0 +1,118 @@
|
|
1
|
+
import { z } from "zod/v4-mini";
|
2
|
+
import { isAddress } from "../utils/address.js";
|
3
|
+
import { isHex } from "../utils/encoding/hex.js";
|
4
|
+
const hexSchema = z
|
5
|
+
.string()
|
6
|
+
.check(z.refine(isHex, { message: "Invalid hex string" }));
|
7
|
+
const addressSchema = z
|
8
|
+
.string()
|
9
|
+
.check(z.refine(isAddress, { message: "Invalid address" }));
|
10
|
+
const webhookSchema = z.union([
|
11
|
+
z.object({
|
12
|
+
version: z.literal(1),
|
13
|
+
data: z.object({}),
|
14
|
+
}),
|
15
|
+
z.object({
|
16
|
+
version: z.literal(2),
|
17
|
+
data: z.object({
|
18
|
+
paymentId: z.string(),
|
19
|
+
// only exists when the payment was triggered from a developer specified payment link
|
20
|
+
paymentLinkId: z.optional(z.string()),
|
21
|
+
clientId: z.string(),
|
22
|
+
action: z.enum(["TRANSFER", "BUY", "SELL"]),
|
23
|
+
status: z.enum(["PENDING", "FAILED", "COMPLETED"]),
|
24
|
+
originToken: z.object({
|
25
|
+
chainId: z.coerce.number(),
|
26
|
+
address: addressSchema,
|
27
|
+
name: z.string(),
|
28
|
+
symbol: z.string(),
|
29
|
+
decimals: z.coerce.number(),
|
30
|
+
priceUsd: z.coerce.number(),
|
31
|
+
iconUri: z.optional(z.string()),
|
32
|
+
}),
|
33
|
+
originAmount: z.string(),
|
34
|
+
destinationToken: z.object({
|
35
|
+
chainId: z.coerce.number(),
|
36
|
+
address: addressSchema,
|
37
|
+
name: z.string(),
|
38
|
+
symbol: z.string(),
|
39
|
+
decimals: z.coerce.number(),
|
40
|
+
priceUsd: z.coerce.number(),
|
41
|
+
iconUri: z.optional(z.string()),
|
42
|
+
}),
|
43
|
+
destinationAmount: z.string(),
|
44
|
+
sender: addressSchema,
|
45
|
+
receiver: addressSchema,
|
46
|
+
type: z.string(),
|
47
|
+
transactions: z.array(hexSchema),
|
48
|
+
developerFeeBps: z.coerce.number(),
|
49
|
+
developerFeeRecipient: addressSchema,
|
50
|
+
purchaseData: z.record(z.string(), z.unknown()),
|
51
|
+
}),
|
52
|
+
}),
|
53
|
+
]);
|
54
|
+
/**
|
55
|
+
* Parses an incoming webhook from thirdweb.
|
56
|
+
*
|
57
|
+
* @param payload - The raw text body received from thirdweb.
|
58
|
+
* @param headers - The webhook headers received from thirdweb.
|
59
|
+
* @param secret - The webhook secret to verify the payload with.
|
60
|
+
*/
|
61
|
+
export async function parse(
|
62
|
+
/**
|
63
|
+
* Raw text body received from thirdweb.
|
64
|
+
*/
|
65
|
+
payload,
|
66
|
+
/**
|
67
|
+
* The webhook headers received from thirdweb.
|
68
|
+
*/
|
69
|
+
headers,
|
70
|
+
/**
|
71
|
+
* The webhook secret to verify the payload with.
|
72
|
+
*/
|
73
|
+
secret,
|
74
|
+
/**
|
75
|
+
* The tolerance in seconds for the timestamp verification.
|
76
|
+
*/
|
77
|
+
tolerance = 300) {
|
78
|
+
// Get the signature and timestamp from headers
|
79
|
+
const receivedSignature = headers["x-payload-signature"] || headers["x-pay-signature"];
|
80
|
+
const receivedTimestamp = headers["x-timestamp"] || headers["x-pay-timestamp"];
|
81
|
+
if (!receivedSignature || !receivedTimestamp) {
|
82
|
+
throw new Error("Missing required webhook headers: signature or timestamp");
|
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
|
+
if (diff > tolerance) {
|
89
|
+
throw new Error(`Webhook timestamp is too old. Difference: ${diff}s, tolerance: ${tolerance}s`);
|
90
|
+
}
|
91
|
+
// Generate signature using the same method as the sender
|
92
|
+
const encoder = new TextEncoder();
|
93
|
+
const key = await crypto.subtle.importKey("raw", encoder.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
|
94
|
+
const signature = await crypto.subtle.sign("HMAC", key, encoder.encode(`${receivedTimestamp}.${payload}`));
|
95
|
+
// Convert the signature to hex string
|
96
|
+
const computedSignature = Array.from(new Uint8Array(signature))
|
97
|
+
.map((b) => b.toString(16).padStart(2, "0"))
|
98
|
+
.join("");
|
99
|
+
// Compare signatures
|
100
|
+
if (computedSignature !== receivedSignature) {
|
101
|
+
throw new Error("Invalid webhook signature");
|
102
|
+
}
|
103
|
+
// Parse the payload as JSON
|
104
|
+
let payloadObject;
|
105
|
+
try {
|
106
|
+
payloadObject = JSON.parse(payload);
|
107
|
+
}
|
108
|
+
catch {
|
109
|
+
throw new Error("Invalid webhook payload: not valid JSON");
|
110
|
+
}
|
111
|
+
const parsedPayload = webhookSchema.parse(payloadObject);
|
112
|
+
// v1 is no longer supported
|
113
|
+
if (parsedPayload.version === 1) {
|
114
|
+
throw new Error("Invalid webhook payload: version 1 is no longer supported, please upgrade to webhook version 2.");
|
115
|
+
}
|
116
|
+
return parsedPayload;
|
117
|
+
}
|
118
|
+
//# sourceMappingURL=Webhook.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Webhook.js","sourceRoot":"","sources":["../../../src/bridge/Webhook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,MAAM,SAAS,GAAG,CAAC;KAChB,MAAM,EAAE;KACR,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC;AAC7D,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,EAAE;KACR,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC;AAE9D,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC;IAC5B,CAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACrB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;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,CAAC;IAC7D,CAAC;IAED,MAAM,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAEzD,4BAA4B;IAC5B,IAAI,aAAa,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;IACJ,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/dist/esm/bridge/index.js
CHANGED
@@ -2,7 +2,9 @@ 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
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../../src/bridge/types/Errors.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../../src/bridge/types/Errors.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,QAAS,SAAQ,KAAK;IAKjC,YAAY,IAKX;QACC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAVtB;;;;;WAAgB;QAChB;;;;;WAAuB;QACvB;;;;;WAAmB;QASjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACpC,CAAC;CACF"}
|
@@ -2,22 +2,19 @@ import { ApiError } from "../../../bridge/types/Errors.js";
|
|
2
2
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
3
3
|
export function getErrorMessage(err) {
|
4
4
|
if (err instanceof ApiError) {
|
5
|
+
if (err.code === "INTERNAL_SERVER_ERROR") {
|
6
|
+
return {
|
7
|
+
code: "INTERNAL_SERVER_ERROR",
|
8
|
+
title: "Failed to Find Quote",
|
9
|
+
message: "An unknown error occurred. Please try again.",
|
10
|
+
};
|
11
|
+
}
|
5
12
|
return {
|
6
13
|
code: err.code,
|
7
14
|
title: "Failed to Find Quote",
|
8
15
|
message: getErrorMessageFromBridgeApiError(err),
|
9
16
|
};
|
10
17
|
}
|
11
|
-
if (typeof err.error === "object" && err.error.code) {
|
12
|
-
if (err.error.code === "MINIMUM_PURCHASE_AMOUNT") {
|
13
|
-
return {
|
14
|
-
code: "MINIMUM_PURCHASE_AMOUNT",
|
15
|
-
title: "Amount Too Low",
|
16
|
-
message: "The requested amount is less than the minimum purchase. Try another provider or amount.",
|
17
|
-
};
|
18
|
-
}
|
19
|
-
}
|
20
|
-
console.error(err);
|
21
18
|
return {
|
22
19
|
code: "UNABLE_TO_GET_PRICE_QUOTE",
|
23
20
|
title: "Failed to Find Quote",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/react/web/utils/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAQ3D,4DAA4D;AAC5D,MAAM,UAAU,eAAe,CAAC,GAAQ;IACtC,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;QAC5B,
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/react/web/utils/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAQ3D,4DAA4D;AAC5D,MAAM,UAAU,eAAe,CAAC,GAAQ;IACtC,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;QAC5B,IAAI,GAAG,CAAC,IAAI,KAAK,uBAAuB,EAAE,CAAC;YACzC,OAAO;gBACL,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,sBAAsB;gBAC7B,OAAO,EAAE,8CAA8C;aACxD,CAAC;QACJ,CAAC;QACD,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,iCAAiC,CAAC,GAAG,CAAC;SAChD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,sBAAsB;QAC7B,OAAO,EACL,GAAG,CAAC,OAAO;YACX,qFAAqF;KACxF,CAAC;AACJ,CAAC;AAED,SAAS,iCAAiC,CAAC,GAAa;IACtD,IAAI,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;IACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/esm/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const version = "5.
|
1
|
+
export const version = "5.101.1-nightly-5277eddb70b3cf7b3dccbb4570c677f49b8dc854-20250524000345";
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/esm/version.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,yEAAyE,CAAC"}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
import { z } from "zod/v4-mini";
|
2
|
+
declare const webhookSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
3
|
+
version: z.ZodMiniLiteral<1>;
|
4
|
+
data: z.ZodMiniObject<{}, z.core.$strip>;
|
5
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
6
|
+
version: z.ZodMiniLiteral<2>;
|
7
|
+
data: z.ZodMiniObject<{
|
8
|
+
paymentId: z.ZodMiniString<string>;
|
9
|
+
paymentLinkId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
10
|
+
clientId: z.ZodMiniString<string>;
|
11
|
+
action: z.ZodMiniEnum<{
|
12
|
+
TRANSFER: "TRANSFER";
|
13
|
+
BUY: "BUY";
|
14
|
+
SELL: "SELL";
|
15
|
+
}>;
|
16
|
+
status: z.ZodMiniEnum<{
|
17
|
+
COMPLETED: "COMPLETED";
|
18
|
+
PENDING: "PENDING";
|
19
|
+
FAILED: "FAILED";
|
20
|
+
}>;
|
21
|
+
originToken: z.ZodMiniObject<{
|
22
|
+
chainId: z.ZodMiniNumber<unknown>;
|
23
|
+
address: z.ZodMiniString<string>;
|
24
|
+
name: z.ZodMiniString<string>;
|
25
|
+
symbol: z.ZodMiniString<string>;
|
26
|
+
decimals: z.ZodMiniNumber<unknown>;
|
27
|
+
priceUsd: z.ZodMiniNumber<unknown>;
|
28
|
+
iconUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
29
|
+
}, z.core.$strip>;
|
30
|
+
originAmount: z.ZodMiniString<string>;
|
31
|
+
destinationToken: z.ZodMiniObject<{
|
32
|
+
chainId: z.ZodMiniNumber<unknown>;
|
33
|
+
address: z.ZodMiniString<string>;
|
34
|
+
name: z.ZodMiniString<string>;
|
35
|
+
symbol: z.ZodMiniString<string>;
|
36
|
+
decimals: z.ZodMiniNumber<unknown>;
|
37
|
+
priceUsd: z.ZodMiniNumber<unknown>;
|
38
|
+
iconUri: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
39
|
+
}, z.core.$strip>;
|
40
|
+
destinationAmount: z.ZodMiniString<string>;
|
41
|
+
sender: z.ZodMiniString<string>;
|
42
|
+
receiver: z.ZodMiniString<string>;
|
43
|
+
type: z.ZodMiniString<string>;
|
44
|
+
transactions: z.ZodMiniArray<z.ZodMiniString<string>>;
|
45
|
+
developerFeeBps: z.ZodMiniNumber<unknown>;
|
46
|
+
developerFeeRecipient: z.ZodMiniString<string>;
|
47
|
+
purchaseData: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
|
48
|
+
}, z.core.$strip>;
|
49
|
+
}, z.core.$strip>]>;
|
50
|
+
export type WebhookPayload = Exclude<z.infer<typeof webhookSchema>, {
|
51
|
+
version: 1;
|
52
|
+
}>;
|
53
|
+
/**
|
54
|
+
* Parses an incoming webhook from thirdweb.
|
55
|
+
*
|
56
|
+
* @param payload - The raw text body received from thirdweb.
|
57
|
+
* @param headers - The webhook headers received from thirdweb.
|
58
|
+
* @param secret - The webhook secret to verify the payload with.
|
59
|
+
*/
|
60
|
+
export declare function parse(
|
61
|
+
/**
|
62
|
+
* Raw text body received from thirdweb.
|
63
|
+
*/
|
64
|
+
payload: string,
|
65
|
+
/**
|
66
|
+
* The webhook headers received from thirdweb.
|
67
|
+
*/
|
68
|
+
headers: Record<string, string>,
|
69
|
+
/**
|
70
|
+
* The webhook secret to verify the payload with.
|
71
|
+
*/
|
72
|
+
secret: string,
|
73
|
+
/**
|
74
|
+
* The tolerance in seconds for the timestamp verification.
|
75
|
+
*/
|
76
|
+
tolerance?: number): Promise<{
|
77
|
+
version: 2;
|
78
|
+
data: {
|
79
|
+
paymentId: string;
|
80
|
+
clientId: string;
|
81
|
+
action: "TRANSFER" | "BUY" | "SELL";
|
82
|
+
status: "COMPLETED" | "PENDING" | "FAILED";
|
83
|
+
originToken: {
|
84
|
+
chainId: number;
|
85
|
+
address: string;
|
86
|
+
name: string;
|
87
|
+
symbol: string;
|
88
|
+
decimals: number;
|
89
|
+
priceUsd: number;
|
90
|
+
iconUri?: string | undefined;
|
91
|
+
};
|
92
|
+
originAmount: string;
|
93
|
+
destinationToken: {
|
94
|
+
chainId: number;
|
95
|
+
address: string;
|
96
|
+
name: string;
|
97
|
+
symbol: string;
|
98
|
+
decimals: number;
|
99
|
+
priceUsd: number;
|
100
|
+
iconUri?: string | undefined;
|
101
|
+
};
|
102
|
+
destinationAmount: string;
|
103
|
+
sender: string;
|
104
|
+
receiver: string;
|
105
|
+
type: string;
|
106
|
+
transactions: string[];
|
107
|
+
developerFeeBps: number;
|
108
|
+
developerFeeRecipient: string;
|
109
|
+
purchaseData: Record<string, unknown>;
|
110
|
+
paymentLinkId?: string | undefined;
|
111
|
+
};
|
112
|
+
}>;
|
113
|
+
export {};
|
114
|
+
//# sourceMappingURL=Webhook.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Webhook.d.ts","sourceRoot":"","sources":["../../../src/bridge/Webhook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAWhC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2CjB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,EAC7B;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CACf,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,KAAK;AACzB;;GAEG;AACH,OAAO,EAAE,MAAM;AAEf;;GAEG;AACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,EAAE,MAAM;AAEd;;GAEG;AACH,SAAS,SAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEhB"}
|
@@ -2,14 +2,17 @@ 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
|
export type { Chain } from "./types/Chain.js";
|
9
11
|
export type { Quote, PreparedQuote } from "./types/Quote.js";
|
10
12
|
export type { Route, RouteQuoteStep, RouteStep, RouteTransaction, } from "./types/Route.js";
|
11
13
|
export type { Status } from "./types/Status.js";
|
12
14
|
export type { Token } from "./types/Token.js";
|
13
|
-
export type { Action } from "./types/BridgeAction.js";
|
14
15
|
export type { ApiError } from "./types/Errors.js";
|
16
|
+
export type { Action } from "./types/BridgeAction.js";
|
17
|
+
export type { WebhookPayload } from "./Webhook.js";
|
15
18
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,KAAK,EACL,cAAc,EACd,SAAS,EACT,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,YAAY,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,KAAK,EACL,cAAc,EACd,SAAS,EACT,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
type ErrorCode = "INVALID_INPUT" | "ROUTE_NOT_FOUND" | "AMOUNT_TOO_LOW" | "AMOUNT_TOO_HIGH" | "UNKNOWN_ERROR";
|
1
|
+
type ErrorCode = "INVALID_INPUT" | "ROUTE_NOT_FOUND" | "AMOUNT_TOO_LOW" | "AMOUNT_TOO_HIGH" | "INTERNAL_SERVER_ERROR" | "UNKNOWN_ERROR";
|
2
2
|
export declare class ApiError extends Error {
|
3
3
|
code: ErrorCode;
|
4
4
|
correlationId?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/bridge/types/Errors.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GACV,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,eAAe,CAAC;AAEpB,qBAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;gBAEP,IAAI,EAAE;QAChB,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;CAMF"}
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/bridge/types/Errors.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GACV,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,uBAAuB,GACvB,eAAe,CAAC;AAEpB,qBAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;gBAEP,IAAI,EAAE;QAChB,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;CAMF"}
|
@@ -36,7 +36,7 @@ export type AccountProviderProps = {
|
|
36
36
|
* @wallet
|
37
37
|
* @beta
|
38
38
|
*/
|
39
|
-
export declare function AccountProvider(props: React.PropsWithChildren<AccountProviderProps>): import("react/jsx-runtime
|
39
|
+
export declare function AccountProvider(props: React.PropsWithChildren<AccountProviderProps>): import("react/jsx-runtime").JSX.Element;
|
40
40
|
/**
|
41
41
|
* @internal
|
42
42
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../src/react/core/account/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;CACxB,CAAC;AAMF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../src/react/core/account/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;CACxB,CAAC;AAMF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,2CAYrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,yBAQhC"}
|
@@ -5,7 +5,7 @@ import { type Theme } from "./index.js";
|
|
5
5
|
export declare function CustomThemeProvider(props: {
|
6
6
|
children: React.ReactNode;
|
7
7
|
theme: "light" | "dark" | Theme | undefined;
|
8
|
-
}): import("react/jsx-runtime
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
9
9
|
export declare function parseTheme(theme: "light" | "dark" | Theme | undefined): Theme;
|
10
10
|
/**
|
11
11
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CustomThemeProvider.d.ts","sourceRoot":"","sources":["../../../../../src/react/core/design-system/CustomThemeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAA+B,MAAM,YAAY,CAAC;AAIrE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;CAC7C,
|
1
|
+
{"version":3,"file":"CustomThemeProvider.d.ts","sourceRoot":"","sources":["../../../../../src/react/core/design-system/CustomThemeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAA+B,MAAM,YAAY,CAAC;AAIrE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;CAC7C,2CASA;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,CAc7E;AAUD;;;GAGG;AACH,wBAAgB,cAAc,UAE7B"}
|
@@ -5,5 +5,5 @@ import type { ConnectionManager } from "../../../wallets/manager/index.js";
|
|
5
5
|
export declare function ThirdwebProviderCore(props: {
|
6
6
|
manager: ConnectionManager;
|
7
7
|
children: React.ReactNode;
|
8
|
-
}): import("react/jsx-runtime
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
9
9
|
//# sourceMappingURL=thirdweb-provider.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"thirdweb-provider.d.ts","sourceRoot":"","sources":["../../../../../src/react/core/providers/thirdweb-provider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAM3E;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,
|
1
|
+
{"version":3,"file":"thirdweb-provider.d.ts","sourceRoot":"","sources":["../../../../../src/react/core/providers/thirdweb-provider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAM3E;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAgEA"}
|
@@ -32,7 +32,7 @@ export declare const WalletProviderContext: React.Context<WalletProviderProps |
|
|
32
32
|
* @component
|
33
33
|
* @wallet
|
34
34
|
*/
|
35
|
-
export declare function WalletProvider(props: React.PropsWithChildren<WalletProviderProps>): import("react/jsx-runtime
|
35
|
+
export declare function WalletProvider(props: React.PropsWithChildren<WalletProviderProps>): import("react/jsx-runtime").JSX.Element;
|
36
36
|
/**
|
37
37
|
* @internal
|
38
38
|
*/
|