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.
Files changed (356) hide show
  1. package/dist/cjs/bridge/Webhook.js +105 -0
  2. package/dist/cjs/bridge/Webhook.js.map +1 -0
  3. package/dist/cjs/bridge/index.js +4 -1
  4. package/dist/cjs/bridge/index.js.map +1 -1
  5. package/dist/cjs/version.js +1 -1
  6. package/dist/esm/bridge/Webhook.js +102 -0
  7. package/dist/esm/bridge/Webhook.js.map +1 -0
  8. package/dist/esm/bridge/index.js +2 -0
  9. package/dist/esm/bridge/index.js.map +1 -1
  10. package/dist/esm/version.js +1 -1
  11. package/dist/types/bridge/Webhook.d.ts +82 -0
  12. package/dist/types/bridge/Webhook.d.ts.map +1 -0
  13. package/dist/types/bridge/index.d.ts +4 -1
  14. package/dist/types/bridge/index.d.ts.map +1 -1
  15. package/dist/types/react/core/account/provider.d.ts +1 -1
  16. package/dist/types/react/core/account/provider.d.ts.map +1 -1
  17. package/dist/types/react/core/design-system/CustomThemeProvider.d.ts +1 -1
  18. package/dist/types/react/core/design-system/CustomThemeProvider.d.ts.map +1 -1
  19. package/dist/types/react/core/providers/thirdweb-provider.d.ts +1 -1
  20. package/dist/types/react/core/providers/thirdweb-provider.d.ts.map +1 -1
  21. package/dist/types/react/core/wallet/provider.d.ts +1 -1
  22. package/dist/types/react/core/wallet/provider.d.ts.map +1 -1
  23. package/dist/types/react/native/providers/thirdweb-provider.d.ts +1 -1
  24. package/dist/types/react/native/providers/thirdweb-provider.d.ts.map +1 -1
  25. package/dist/types/react/native/ui/AutoConnect/AutoConnect.d.ts +1 -1
  26. package/dist/types/react/native/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
  27. package/dist/types/react/native/ui/components/Address.d.ts +1 -1
  28. package/dist/types/react/native/ui/components/Address.d.ts.map +1 -1
  29. package/dist/types/react/native/ui/components/ChainIcon.d.ts +1 -1
  30. package/dist/types/react/native/ui/components/ChainIcon.d.ts.map +1 -1
  31. package/dist/types/react/native/ui/components/Header.d.ts +1 -1
  32. package/dist/types/react/native/ui/components/Header.d.ts.map +1 -1
  33. package/dist/types/react/native/ui/components/RNImage.d.ts +1 -1
  34. package/dist/types/react/native/ui/components/RNImage.d.ts.map +1 -1
  35. package/dist/types/react/native/ui/components/TokenIcon.d.ts +1 -1
  36. package/dist/types/react/native/ui/components/TokenIcon.d.ts.map +1 -1
  37. package/dist/types/react/native/ui/components/WalletImage.d.ts +1 -1
  38. package/dist/types/react/native/ui/components/WalletImage.d.ts.map +1 -1
  39. package/dist/types/react/native/ui/components/button.d.ts +2 -2
  40. package/dist/types/react/native/ui/components/button.d.ts.map +1 -1
  41. package/dist/types/react/native/ui/components/input.d.ts +2 -2
  42. package/dist/types/react/native/ui/components/input.d.ts.map +1 -1
  43. package/dist/types/react/native/ui/components/spacer.d.ts +1 -1
  44. package/dist/types/react/native/ui/components/spacer.d.ts.map +1 -1
  45. package/dist/types/react/native/ui/components/text.d.ts +1 -1
  46. package/dist/types/react/native/ui/components/text.d.ts.map +1 -1
  47. package/dist/types/react/native/ui/components/view.d.ts +1 -1
  48. package/dist/types/react/native/ui/components/view.d.ts.map +1 -1
  49. package/dist/types/react/native/ui/connect/ConnectButton.d.ts +1 -1
  50. package/dist/types/react/native/ui/connect/ConnectButton.d.ts.map +1 -1
  51. package/dist/types/react/native/ui/connect/ConnectModal.d.ts +2 -2
  52. package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
  53. package/dist/types/react/native/ui/connect/ConnectedButton.d.ts +1 -1
  54. package/dist/types/react/native/ui/connect/ConnectedButton.d.ts.map +1 -1
  55. package/dist/types/react/native/ui/connect/ConnectedModal.d.ts +1 -1
  56. package/dist/types/react/native/ui/connect/ConnectedModal.d.ts.map +1 -1
  57. package/dist/types/react/native/ui/connect/ErrorView.d.ts +1 -1
  58. package/dist/types/react/native/ui/connect/ErrorView.d.ts.map +1 -1
  59. package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts +2 -2
  60. package/dist/types/react/native/ui/connect/ExternalWalletsList.d.ts.map +1 -1
  61. package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts +3 -3
  62. package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts.map +1 -1
  63. package/dist/types/react/native/ui/connect/LoadingView.d.ts +1 -1
  64. package/dist/types/react/native/ui/connect/LoadingView.d.ts.map +1 -1
  65. package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts +1 -1
  66. package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts.map +1 -1
  67. package/dist/types/react/native/ui/connect/SendScreen.d.ts +1 -1
  68. package/dist/types/react/native/ui/connect/SendScreen.d.ts.map +1 -1
  69. package/dist/types/react/native/ui/connect/SuccessView.d.ts +1 -1
  70. package/dist/types/react/native/ui/connect/SuccessView.d.ts.map +1 -1
  71. package/dist/types/react/native/ui/connect/TokenListScreen.d.ts +2 -2
  72. package/dist/types/react/native/ui/connect/TokenListScreen.d.ts.map +1 -1
  73. package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts +1 -1
  74. package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts.map +1 -1
  75. package/dist/types/react/native/ui/prebuilt/Account/address.d.ts +1 -1
  76. package/dist/types/react/native/ui/prebuilt/Account/address.d.ts.map +1 -1
  77. package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts +1 -1
  78. package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts.map +1 -1
  79. package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts +1 -1
  80. package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts.map +1 -1
  81. package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts +2 -2
  82. package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts.map +1 -1
  83. package/dist/types/react/native/ui/prebuilt/Account/name.d.ts +1 -1
  84. package/dist/types/react/native/ui/prebuilt/Account/name.d.ts.map +1 -1
  85. package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts +2 -2
  86. package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts.map +1 -1
  87. package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts +1 -1
  88. package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts.map +1 -1
  89. package/dist/types/react/native/ui/transaction/TransactionButton.d.ts +1 -1
  90. package/dist/types/react/native/ui/transaction/TransactionButton.d.ts.map +1 -1
  91. package/dist/types/react/web/providers/thirdweb-provider.d.ts +1 -1
  92. package/dist/types/react/web/providers/thirdweb-provider.d.ts.map +1 -1
  93. package/dist/types/react/web/providers/wallet-ui-states-provider.d.ts +1 -1
  94. package/dist/types/react/web/providers/wallet-ui-states-provider.d.ts.map +1 -1
  95. package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts +1 -1
  96. package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
  97. package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts +1 -1
  98. package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts.map +1 -1
  99. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +1 -1
  100. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
  101. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts +5 -5
  102. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  103. package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts +1 -1
  104. package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts.map +1 -1
  105. package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts +1 -1
  106. package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts.map +1 -1
  107. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +1 -1
  108. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
  109. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModal.d.ts +1 -1
  110. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModal.d.ts.map +1 -1
  111. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts +1 -1
  112. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts.map +1 -1
  113. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalSkeleton.d.ts +2 -2
  114. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalSkeleton.d.ts.map +1 -1
  115. package/dist/types/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.d.ts +1 -1
  116. package/dist/types/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.d.ts.map +1 -1
  117. package/dist/types/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.d.ts +1 -1
  118. package/dist/types/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.d.ts.map +1 -1
  119. package/dist/types/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.d.ts +1 -1
  120. package/dist/types/react/web/ui/ConnectWallet/Modal/SmartWalletConnectUI.d.ts.map +1 -1
  121. package/dist/types/react/web/ui/ConnectWallet/Modal/TOS.d.ts +1 -1
  122. package/dist/types/react/web/ui/ConnectWallet/Modal/TOS.d.ts.map +1 -1
  123. package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts +1 -1
  124. package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts.map +1 -1
  125. package/dist/types/react/web/ui/ConnectWallet/PoweredByTW.d.ts +1 -1
  126. package/dist/types/react/web/ui/ConnectWallet/PoweredByTW.d.ts.map +1 -1
  127. package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts +1 -1
  128. package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts.map +1 -1
  129. package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts +1 -1
  130. package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts.map +1 -1
  131. package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts +1 -1
  132. package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts.map +1 -1
  133. package/dist/types/react/web/ui/ConnectWallet/WalletTypeRowButton.d.ts +1 -1
  134. package/dist/types/react/web/ui/ConnectWallet/WalletTypeRowButton.d.ts.map +1 -1
  135. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts +1 -1
  136. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
  137. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts +1 -1
  138. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts.map +1 -1
  139. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.d.ts +1 -1
  140. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.d.ts.map +1 -1
  141. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.d.ts +1 -1
  142. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.d.ts.map +1 -1
  143. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.d.ts +1 -1
  144. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.d.ts.map +1 -1
  145. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts +1 -1
  146. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts.map +1 -1
  147. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts +1 -1
  148. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts.map +1 -1
  149. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/Stepper.d.ts +2 -2
  150. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/Stepper.d.ts.map +1 -1
  151. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts +1 -1
  152. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts.map +1 -1
  153. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts +1 -1
  154. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts.map +1 -1
  155. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts +1 -1
  156. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts.map +1 -1
  157. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts +1 -1
  158. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
  159. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts +1 -1
  160. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts.map +1 -1
  161. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.d.ts +1 -1
  162. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.d.ts.map +1 -1
  163. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts +1 -1
  164. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts.map +1 -1
  165. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts +1 -1
  166. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts.map +1 -1
  167. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts +1 -1
  168. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts.map +1 -1
  169. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts +1 -1
  170. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +1 -1
  171. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.d.ts +1 -1
  172. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.d.ts.map +1 -1
  173. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.d.ts +2 -2
  174. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.d.ts.map +1 -1
  175. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.d.ts +1 -1
  176. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.d.ts.map +1 -1
  177. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts +1 -1
  178. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts.map +1 -1
  179. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts +1 -1
  180. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts.map +1 -1
  181. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts +1 -1
  182. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts.map +1 -1
  183. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts +1 -1
  184. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts.map +1 -1
  185. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts +1 -1
  186. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts.map +1 -1
  187. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts +1 -1
  188. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts.map +1 -1
  189. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts +1 -1
  190. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts.map +1 -1
  191. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts +1 -1
  192. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts.map +1 -1
  193. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts +1 -1
  194. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts.map +1 -1
  195. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts +1 -1
  196. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -1
  197. package/dist/types/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.d.ts +1 -1
  198. package/dist/types/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.d.ts.map +1 -1
  199. package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts +1 -1
  200. package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts.map +1 -1
  201. package/dist/types/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.d.ts +1 -1
  202. package/dist/types/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.d.ts.map +1 -1
  203. package/dist/types/react/web/ui/ConnectWallet/screens/ManageWalletScreen.d.ts +1 -1
  204. package/dist/types/react/web/ui/ConnectWallet/screens/ManageWalletScreen.d.ts.map +1 -1
  205. package/dist/types/react/web/ui/ConnectWallet/screens/PrivateKey.d.ts +1 -1
  206. package/dist/types/react/web/ui/ConnectWallet/screens/PrivateKey.d.ts.map +1 -1
  207. package/dist/types/react/web/ui/ConnectWallet/screens/ReceiveFunds.d.ts +1 -1
  208. package/dist/types/react/web/ui/ConnectWallet/screens/ReceiveFunds.d.ts.map +1 -1
  209. package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts +2 -2
  210. package/dist/types/react/web/ui/ConnectWallet/screens/SendFunds.d.ts.map +1 -1
  211. package/dist/types/react/web/ui/ConnectWallet/screens/StartScreen.d.ts +1 -1
  212. package/dist/types/react/web/ui/ConnectWallet/screens/StartScreen.d.ts.map +1 -1
  213. package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts +1 -1
  214. package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
  215. package/dist/types/react/web/ui/ConnectWallet/screens/ViewAssets.d.ts +1 -1
  216. package/dist/types/react/web/ui/ConnectWallet/screens/ViewAssets.d.ts.map +1 -1
  217. package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts +2 -2
  218. package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts.map +1 -1
  219. package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts +2 -2
  220. package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts.map +1 -1
  221. package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectDisconnectScreen.d.ts +1 -1
  222. package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectDisconnectScreen.d.ts.map +1 -1
  223. package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.d.ts +1 -1
  224. package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.d.ts.map +1 -1
  225. package/dist/types/react/web/ui/ConnectWallet/screens/WalletLogoSpinner.d.ts +1 -1
  226. package/dist/types/react/web/ui/ConnectWallet/screens/WalletLogoSpinner.d.ts.map +1 -1
  227. package/dist/types/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.d.ts +1 -1
  228. package/dist/types/react/web/ui/ConnectWallet/screens/WalletSwitcherConnectionScreen.d.ts.map +1 -1
  229. package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts +1 -1
  230. package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts.map +1 -1
  231. package/dist/types/react/web/ui/PayEmbed.d.ts +1 -1
  232. package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
  233. package/dist/types/react/web/ui/SiteEmbed.d.ts +1 -1
  234. package/dist/types/react/web/ui/SiteEmbed.d.ts.map +1 -1
  235. package/dist/types/react/web/ui/SiteLink.d.ts +1 -1
  236. package/dist/types/react/web/ui/SiteLink.d.ts.map +1 -1
  237. package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts +1 -1
  238. package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts.map +1 -1
  239. package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts +1 -1
  240. package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts.map +1 -1
  241. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +1 -1
  242. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
  243. package/dist/types/react/web/ui/TransactionButton/index.d.ts +1 -1
  244. package/dist/types/react/web/ui/TransactionButton/index.d.ts.map +1 -1
  245. package/dist/types/react/web/ui/components/OTPInput.d.ts +1 -1
  246. package/dist/types/react/web/ui/components/OTPInput.d.ts.map +1 -1
  247. package/dist/types/react/web/ui/components/QRCode.d.ts +1 -1
  248. package/dist/types/react/web/ui/components/QRCode.d.ts.map +1 -1
  249. package/dist/types/react/web/ui/components/StepBar.d.ts +1 -1
  250. package/dist/types/react/web/ui/components/StepBar.d.ts.map +1 -1
  251. package/dist/types/react/web/ui/components/SwitchNetwork.d.ts +1 -1
  252. package/dist/types/react/web/ui/components/SwitchNetwork.d.ts.map +1 -1
  253. package/dist/types/react/web/ui/components/Tabs.d.ts +1 -1
  254. package/dist/types/react/web/ui/components/Tabs.d.ts.map +1 -1
  255. package/dist/types/react/web/ui/components/TextDivider.d.ts +1 -1
  256. package/dist/types/react/web/ui/components/TextDivider.d.ts.map +1 -1
  257. package/dist/types/react/web/ui/components/TokenIcon.d.ts +1 -1
  258. package/dist/types/react/web/ui/components/TokenIcon.d.ts.map +1 -1
  259. package/dist/types/react/web/ui/components/WalletImage.d.ts +1 -1
  260. package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
  261. package/dist/types/react/web/ui/components/basic.d.ts +2 -2
  262. package/dist/types/react/web/ui/components/basic.d.ts.map +1 -1
  263. package/dist/types/react/web/ui/components/token/TokenRow.d.ts +1 -1
  264. package/dist/types/react/web/ui/components/token/TokenRow.d.ts.map +1 -1
  265. package/dist/types/react/web/ui/components/token/TokenSymbol.d.ts +1 -1
  266. package/dist/types/react/web/ui/components/token/TokenSymbol.d.ts.map +1 -1
  267. package/dist/types/react/web/ui/prebuilt/Account/address.d.ts +1 -1
  268. package/dist/types/react/web/ui/prebuilt/Account/address.d.ts.map +1 -1
  269. package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts +1 -1
  270. package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts.map +1 -1
  271. package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts +1 -1
  272. package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts.map +1 -1
  273. package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts +1 -1
  274. package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts.map +1 -1
  275. package/dist/types/react/web/ui/prebuilt/Account/name.d.ts +1 -1
  276. package/dist/types/react/web/ui/prebuilt/Account/name.d.ts.map +1 -1
  277. package/dist/types/react/web/ui/prebuilt/Chain/icon.d.ts +1 -1
  278. package/dist/types/react/web/ui/prebuilt/Chain/icon.d.ts.map +1 -1
  279. package/dist/types/react/web/ui/prebuilt/Chain/name.d.ts +1 -1
  280. package/dist/types/react/web/ui/prebuilt/Chain/name.d.ts.map +1 -1
  281. package/dist/types/react/web/ui/prebuilt/Chain/provider.d.ts +1 -1
  282. package/dist/types/react/web/ui/prebuilt/Chain/provider.d.ts.map +1 -1
  283. package/dist/types/react/web/ui/prebuilt/NFT/description.d.ts +1 -1
  284. package/dist/types/react/web/ui/prebuilt/NFT/description.d.ts.map +1 -1
  285. package/dist/types/react/web/ui/prebuilt/NFT/media.d.ts +1 -1
  286. package/dist/types/react/web/ui/prebuilt/NFT/media.d.ts.map +1 -1
  287. package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts +1 -1
  288. package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts.map +1 -1
  289. package/dist/types/react/web/ui/prebuilt/NFT/provider.d.ts +1 -1
  290. package/dist/types/react/web/ui/prebuilt/NFT/provider.d.ts.map +1 -1
  291. package/dist/types/react/web/ui/prebuilt/Token/icon.d.ts +1 -1
  292. package/dist/types/react/web/ui/prebuilt/Token/icon.d.ts.map +1 -1
  293. package/dist/types/react/web/ui/prebuilt/Token/name.d.ts +1 -1
  294. package/dist/types/react/web/ui/prebuilt/Token/name.d.ts.map +1 -1
  295. package/dist/types/react/web/ui/prebuilt/Token/provider.d.ts +1 -1
  296. package/dist/types/react/web/ui/prebuilt/Token/provider.d.ts.map +1 -1
  297. package/dist/types/react/web/ui/prebuilt/Token/symbol.d.ts +1 -1
  298. package/dist/types/react/web/ui/prebuilt/Token/symbol.d.ts.map +1 -1
  299. package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts +2 -2
  300. package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts.map +1 -1
  301. package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts +1 -1
  302. package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts.map +1 -1
  303. package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts +1 -1
  304. package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts.map +1 -1
  305. package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts +1 -1
  306. package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts.map +1 -1
  307. package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts +1 -1
  308. package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts.map +1 -1
  309. package/dist/types/react/web/wallets/ecosystem/EcosystemWalletConnectUI.d.ts +1 -1
  310. package/dist/types/react/web/wallets/ecosystem/EcosystemWalletConnectUI.d.ts.map +1 -1
  311. package/dist/types/react/web/wallets/ecosystem/EcosystemWalletFormUI.d.ts +1 -1
  312. package/dist/types/react/web/wallets/ecosystem/EcosystemWalletFormUI.d.ts.map +1 -1
  313. package/dist/types/react/web/wallets/ecosystem/EcosystemWalletHeader.d.ts +1 -1
  314. package/dist/types/react/web/wallets/ecosystem/EcosystemWalletHeader.d.ts.map +1 -1
  315. package/dist/types/react/web/wallets/in-app/CountrySelector.d.ts +1 -1
  316. package/dist/types/react/web/wallets/in-app/CountrySelector.d.ts.map +1 -1
  317. package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts +1 -1
  318. package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts.map +1 -1
  319. package/dist/types/react/web/wallets/in-app/InAppWalletFormUI.d.ts +1 -1
  320. package/dist/types/react/web/wallets/in-app/InAppWalletFormUI.d.ts.map +1 -1
  321. package/dist/types/react/web/wallets/in-app/InAppWalletSelectionUI.d.ts +1 -1
  322. package/dist/types/react/web/wallets/in-app/InAppWalletSelectionUI.d.ts.map +1 -1
  323. package/dist/types/react/web/wallets/in-app/InputSelectionUI.d.ts +1 -1
  324. package/dist/types/react/web/wallets/in-app/InputSelectionUI.d.ts.map +1 -1
  325. package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts +1 -1
  326. package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts.map +1 -1
  327. package/dist/types/react/web/wallets/shared/CoinbaseSDKConnection.d.ts +1 -1
  328. package/dist/types/react/web/wallets/shared/CoinbaseSDKConnection.d.ts.map +1 -1
  329. package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts +1 -1
  330. package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
  331. package/dist/types/react/web/wallets/shared/ErrorState.d.ts +1 -1
  332. package/dist/types/react/web/wallets/shared/ErrorState.d.ts.map +1 -1
  333. package/dist/types/react/web/wallets/shared/GuestLogin.d.ts +1 -1
  334. package/dist/types/react/web/wallets/shared/GuestLogin.d.ts.map +1 -1
  335. package/dist/types/react/web/wallets/shared/LoadingScreen.d.ts +1 -1
  336. package/dist/types/react/web/wallets/shared/LoadingScreen.d.ts.map +1 -1
  337. package/dist/types/react/web/wallets/shared/LoadingState.d.ts +1 -1
  338. package/dist/types/react/web/wallets/shared/LoadingState.d.ts.map +1 -1
  339. package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts +1 -1
  340. package/dist/types/react/web/wallets/shared/OTPLoginUI.d.ts.map +1 -1
  341. package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts +1 -1
  342. package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts.map +1 -1
  343. package/dist/types/react/web/wallets/shared/SocialLogin.d.ts +1 -1
  344. package/dist/types/react/web/wallets/shared/SocialLogin.d.ts.map +1 -1
  345. package/dist/types/transaction/actions/to-serializable-transaction.d.ts +2 -2
  346. package/dist/types/utils/abi/decodeFunctionData.d.ts +1 -1
  347. package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -1
  348. package/dist/types/utils/abi/decodeFunctionResult.d.ts +1 -1
  349. package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -1
  350. package/dist/types/version.d.ts +1 -1
  351. package/dist/types/wallets/in-app/native/helpers/storage/local.d.ts +1 -1
  352. package/package.json +6 -5
  353. package/src/bridge/Webhook.test.ts +589 -0
  354. package/src/bridge/Webhook.ts +139 -0
  355. package/src/bridge/index.ts +4 -1
  356. 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
+ }
@@ -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.100.2";
1
+ export const version = "5.101.0";