@b3dotfun/sdk 0.0.8-alpha.8 → 0.0.9-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/cjs/anyspend/constants/index.d.ts +16 -5
- package/dist/cjs/anyspend/constants/index.js +3 -4
- package/dist/cjs/anyspend/index.d.ts +0 -5
- package/dist/cjs/anyspend/index.js +0 -6
- package/dist/cjs/anyspend/index.native.d.ts +0 -1
- package/dist/cjs/anyspend/index.native.js +0 -2
- package/dist/cjs/anyspend/react/components/AnySpend.js +12 -12
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -3
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +3 -6
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +5 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +30 -30
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +5 -5
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +2 -3
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -4
- package/dist/cjs/anyspend/react/components/common/AnySpendNFTButton.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +45 -47
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.js +10 -12
- package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderToken.d.ts +3 -3
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.d.ts +3 -3
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +6 -5
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +8 -9
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.js +1 -2
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +9 -9
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +3 -2
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +3 -4
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +12 -644
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +72 -434
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.d.ts +7 -15
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +4 -21
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.d.ts +4 -4
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +38 -27
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.d.ts +16 -13
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +6 -6
- package/dist/cjs/anyspend/services/anyspend.d.ts +10 -321
- package/dist/cjs/anyspend/services/anyspend.js +7 -11
- package/dist/cjs/anyspend/types/api.d.ts +978 -797
- package/dist/cjs/anyspend/types/api_req_res.d.ts +10 -0
- package/dist/cjs/anyspend/types/chain.d.ts +3 -3
- package/dist/cjs/anyspend/utils/chain.d.ts +4 -3
- package/dist/cjs/anyspend/utils/chain.js +14 -14
- package/dist/cjs/anyspend/utils/format.d.ts +2 -2
- package/dist/cjs/anyspend/utils/format.js +13 -14
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +29 -29
- package/dist/cjs/anyspend/utils/orderPayload.js +12 -13
- package/dist/cjs/anyspend/utils/token.d.ts +6 -6
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +2 -2
- package/dist/cjs/global-account/react/hooks/useTokenBalance.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.d.ts +5 -5
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +1 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +6 -7
- package/dist/cjs/shared/constants/chains/supported.d.ts +2 -2
- package/dist/cjs/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +249 -249
- package/dist/cjs/shared/utils/payment.utils.d.ts +3 -3
- package/dist/cjs/shared/utils/payment.utils.js +6 -7
- package/dist/esm/anyspend/constants/index.d.ts +16 -5
- package/dist/esm/anyspend/constants/index.js +3 -4
- package/dist/esm/anyspend/index.d.ts +0 -5
- package/dist/esm/anyspend/index.js +0 -6
- package/dist/esm/anyspend/index.native.d.ts +0 -1
- package/dist/esm/anyspend/index.native.js +0 -2
- package/dist/esm/anyspend/react/components/AnySpend.js +13 -13
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -3
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +4 -7
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +5 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +29 -29
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +3 -3
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +3 -3
- package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +5 -5
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +2 -3
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +3 -5
- package/dist/esm/anyspend/react/components/common/AnySpendNFTButton.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +6 -6
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +46 -48
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.js +11 -13
- package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderToken.d.ts +3 -3
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.d.ts +3 -3
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +6 -5
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +8 -9
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/PaymentVendorUI.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/PaymentVendorUI.js +1 -2
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +2 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +2 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +10 -10
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +3 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +4 -5
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +12 -644
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +72 -434
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.d.ts +7 -15
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +4 -21
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.d.ts +4 -4
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +38 -27
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +1 -1
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.d.ts +16 -13
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +6 -6
- package/dist/esm/anyspend/services/anyspend.d.ts +10 -321
- package/dist/esm/anyspend/services/anyspend.js +7 -11
- package/dist/esm/anyspend/types/api.d.ts +978 -797
- package/dist/esm/anyspend/types/api_req_res.d.ts +10 -0
- package/dist/esm/anyspend/types/chain.d.ts +3 -3
- package/dist/esm/anyspend/utils/chain.d.ts +4 -3
- package/dist/esm/anyspend/utils/chain.js +1 -1
- package/dist/esm/anyspend/utils/format.d.ts +2 -2
- package/dist/esm/anyspend/utils/format.js +13 -14
- package/dist/esm/anyspend/utils/orderPayload.d.ts +29 -29
- package/dist/esm/anyspend/utils/orderPayload.js +12 -13
- package/dist/esm/anyspend/utils/token.d.ts +6 -6
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useOnchainName.js +2 -2
- package/dist/esm/global-account/react/hooks/useTokenBalance.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.d.ts +5 -5
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +1 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +6 -7
- package/dist/esm/shared/constants/chains/supported.d.ts +2 -2
- package/dist/esm/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +249 -249
- package/dist/esm/shared/utils/payment.utils.d.ts +3 -3
- package/dist/esm/shared/utils/payment.utils.js +6 -7
- package/dist/types/anyspend/constants/index.d.ts +16 -5
- package/dist/types/anyspend/index.d.ts +0 -5
- package/dist/types/anyspend/index.native.d.ts +0 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +5 -4
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +2 -2
- package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +5 -5
- package/dist/types/anyspend/react/components/common/AnySpendNFTButton.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +6 -6
- package/dist/types/anyspend/react/components/common/OrderHistoryItem.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +3 -3
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +3 -3
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +6 -5
- package/dist/types/anyspend/react/components/common/PaymentOneClick.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/PaymentStripeWeb2.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/PaymentVendorUI.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +2 -2
- package/dist/types/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +2 -2
- package/dist/types/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +3 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +2 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +6 -6
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +12 -644
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +72 -434
- package/dist/types/anyspend/react/hooks/useAnyspendQuote.d.ts +7 -15
- package/dist/types/anyspend/react/hooks/useAnyspendTokens.d.ts +4 -4
- package/dist/types/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +38 -27
- package/dist/types/anyspend/react/hooks/useGeoOnrampOptions.d.ts +16 -13
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +6 -6
- package/dist/types/anyspend/services/anyspend.d.ts +10 -321
- package/dist/types/anyspend/types/api.d.ts +978 -797
- package/dist/types/anyspend/types/api_req_res.d.ts +10 -0
- package/dist/types/anyspend/types/chain.d.ts +3 -3
- package/dist/types/anyspend/utils/chain.d.ts +4 -3
- package/dist/types/anyspend/utils/format.d.ts +2 -2
- package/dist/types/anyspend/utils/orderPayload.d.ts +29 -29
- package/dist/types/anyspend/utils/token.d.ts +6 -6
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useTokenBalance.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useTokenFromUrl.d.ts +5 -5
- package/dist/types/global-account/react/stores/useModalStore.d.ts +6 -7
- package/dist/types/shared/constants/chains/supported.d.ts +2 -2
- package/dist/types/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +249 -249
- package/dist/types/shared/utils/payment.utils.d.ts +3 -3
- package/package.json +1 -1
- package/src/anyspend/README.md +32 -32
- package/src/anyspend/constants/index.ts +7 -7
- package/src/anyspend/index.native.ts +0 -3
- package/src/anyspend/index.ts +0 -7
- package/src/anyspend/react/components/AnySpend.tsx +18 -15
- package/src/anyspend/react/components/AnySpendBondKit.tsx +2 -3
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +4 -7
- package/src/anyspend/react/components/AnySpendCustom.tsx +77 -88
- package/src/anyspend/react/components/AnySpendNFT.tsx +7 -6
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +3 -3
- package/src/anyspend/react/components/AnySpendTournament.tsx +8 -7
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +3 -6
- package/src/anyspend/react/components/common/AnySpendNFTButton.tsx +2 -2
- package/src/anyspend/react/components/common/OrderDetails.tsx +58 -70
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +13 -14
- package/src/anyspend/react/components/common/OrderStatus.tsx +4 -3
- package/src/anyspend/react/components/common/OrderToken.tsx +4 -3
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +4 -3
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +19 -15
- package/src/anyspend/react/components/common/PaymentOneClick.tsx +2 -2
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +4 -3
- package/src/anyspend/react/components/common/PaymentVendorUI.tsx +3 -3
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +12 -11
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +15 -16
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +6 -6
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +1 -1
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +10 -6
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +15 -18
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +1 -1
- package/src/anyspend/services/anyspend.ts +38 -30
- package/src/anyspend/types/api.ts +1000 -810
- package/src/anyspend/types/api_req_res.ts +16 -0
- package/src/anyspend/types/chain.ts +3 -3
- package/src/anyspend/utils/chain.ts +4 -3
- package/src/anyspend/utils/format.ts +17 -15
- package/src/anyspend/utils/orderPayload.ts +20 -20
- package/src/anyspend/utils/token.ts +6 -6
- package/src/global-account/react/hooks/useAccountWallet.tsx +1 -1
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +3 -2
- package/src/global-account/react/hooks/useOnchainName.tsx +2 -2
- package/src/global-account/react/hooks/useTokenBalance.tsx +3 -2
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +10 -4
- package/src/global-account/react/stores/useModalStore.ts +6 -7
- package/src/shared/utils/payment.utils.ts +9 -9
- package/dist/cjs/anyspend/types/bondKit.d.ts +0 -12
- package/dist/cjs/anyspend/types/custom.d.ts +0 -130
- package/dist/cjs/anyspend/types/custom.js +0 -19
- package/dist/cjs/anyspend/types/globalWallet.d.ts +0 -18
- package/dist/cjs/anyspend/types/globalWallet.js +0 -10
- package/dist/cjs/anyspend/types/index.d.ts +0 -13
- package/dist/cjs/anyspend/types/index.js +0 -29
- package/dist/cjs/anyspend/types/metadata.d.ts +0 -26
- package/dist/cjs/anyspend/types/metadata.js +0 -16
- package/dist/cjs/anyspend/types/nft.d.ts +0 -274
- package/dist/cjs/anyspend/types/nft.js +0 -38
- package/dist/cjs/anyspend/types/onramp.d.ts +0 -28
- package/dist/cjs/anyspend/types/onramp.js +0 -18
- package/dist/cjs/anyspend/types/order.d.ts +0 -1629
- package/dist/cjs/anyspend/types/order.js +0 -81
- package/dist/cjs/anyspend/types/relay.d.ts +0 -10
- package/dist/cjs/anyspend/types/relay.js +0 -12
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +0 -4026
- package/dist/cjs/anyspend/types/req-res/createOrder.js +0 -61
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +0 -120
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +0 -31
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -5167
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +0 -24
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.d.ts +0 -28
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +0 -11
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +0 -2117
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +0 -11
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +0 -290
- package/dist/cjs/anyspend/types/req-res/getQuote.js +0 -51
- package/dist/cjs/anyspend/types/req-res/getTokenList.d.ts +0 -63
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +0 -18
- package/dist/cjs/anyspend/types/req-res/index.d.ts +0 -7
- package/dist/cjs/anyspend/types/req-res/index.js +0 -23
- package/dist/cjs/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/cjs/anyspend/types/req-res/stripe.js +0 -1
- package/dist/cjs/anyspend/types/swap.d.ts +0 -119
- package/dist/cjs/anyspend/types/swap.js +0 -13
- package/dist/cjs/anyspend/types/token.d.ts +0 -34
- package/dist/cjs/anyspend/types/token.js +0 -14
- package/dist/cjs/anyspend/types/tournament.d.ts +0 -174
- package/dist/cjs/anyspend/types/tournament.js +0 -24
- package/dist/cjs/anyspend/types/transaction.d.ts +0 -84
- package/dist/cjs/anyspend/types/transaction.js +0 -34
- package/dist/esm/anyspend/types/bondKit.d.ts +0 -12
- package/dist/esm/anyspend/types/custom.d.ts +0 -130
- package/dist/esm/anyspend/types/custom.js +0 -13
- package/dist/esm/anyspend/types/globalWallet.d.ts +0 -18
- package/dist/esm/anyspend/types/globalWallet.js +0 -7
- package/dist/esm/anyspend/types/index.d.ts +0 -13
- package/dist/esm/anyspend/types/index.js +0 -13
- package/dist/esm/anyspend/types/metadata.d.ts +0 -26
- package/dist/esm/anyspend/types/metadata.js +0 -11
- package/dist/esm/anyspend/types/nft.d.ts +0 -274
- package/dist/esm/anyspend/types/nft.js +0 -35
- package/dist/esm/anyspend/types/onramp.d.ts +0 -28
- package/dist/esm/anyspend/types/onramp.js +0 -15
- package/dist/esm/anyspend/types/order.d.ts +0 -1629
- package/dist/esm/anyspend/types/order.js +0 -78
- package/dist/esm/anyspend/types/relay.d.ts +0 -10
- package/dist/esm/anyspend/types/relay.js +0 -9
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +0 -4026
- package/dist/esm/anyspend/types/req-res/createOrder.js +0 -58
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +0 -120
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +0 -28
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -5167
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +0 -21
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.d.ts +0 -28
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +0 -8
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +0 -2117
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +0 -8
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +0 -290
- package/dist/esm/anyspend/types/req-res/getQuote.js +0 -48
- package/dist/esm/anyspend/types/req-res/getTokenList.d.ts +0 -63
- package/dist/esm/anyspend/types/req-res/getTokenList.js +0 -15
- package/dist/esm/anyspend/types/req-res/index.d.ts +0 -7
- package/dist/esm/anyspend/types/req-res/index.js +0 -7
- package/dist/esm/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/esm/anyspend/types/req-res/stripe.js +0 -1
- package/dist/esm/anyspend/types/swap.d.ts +0 -119
- package/dist/esm/anyspend/types/swap.js +0 -10
- package/dist/esm/anyspend/types/token.d.ts +0 -34
- package/dist/esm/anyspend/types/token.js +0 -11
- package/dist/esm/anyspend/types/tournament.d.ts +0 -174
- package/dist/esm/anyspend/types/tournament.js +0 -21
- package/dist/esm/anyspend/types/transaction.d.ts +0 -84
- package/dist/esm/anyspend/types/transaction.js +0 -31
- package/dist/types/anyspend/types/bondKit.d.ts +0 -12
- package/dist/types/anyspend/types/custom.d.ts +0 -130
- package/dist/types/anyspend/types/globalWallet.d.ts +0 -18
- package/dist/types/anyspend/types/index.d.ts +0 -13
- package/dist/types/anyspend/types/metadata.d.ts +0 -26
- package/dist/types/anyspend/types/nft.d.ts +0 -274
- package/dist/types/anyspend/types/onramp.d.ts +0 -28
- package/dist/types/anyspend/types/order.d.ts +0 -1629
- package/dist/types/anyspend/types/relay.d.ts +0 -10
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +0 -4026
- package/dist/types/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +0 -120
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -5167
- package/dist/types/anyspend/types/req-res/getOrderByCreator.d.ts +0 -28
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +0 -2117
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +0 -290
- package/dist/types/anyspend/types/req-res/getTokenList.d.ts +0 -63
- package/dist/types/anyspend/types/req-res/index.d.ts +0 -7
- package/dist/types/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/types/anyspend/types/swap.d.ts +0 -119
- package/dist/types/anyspend/types/token.d.ts +0 -34
- package/dist/types/anyspend/types/tournament.d.ts +0 -174
- package/dist/types/anyspend/types/transaction.d.ts +0 -84
- package/src/anyspend/types/bondKit.ts +0 -12
- package/src/anyspend/types/custom.ts +0 -17
- package/src/anyspend/types/globalWallet.ts +0 -9
- package/src/anyspend/types/index.ts +0 -14
- package/src/anyspend/types/metadata.ts +0 -41
- package/src/anyspend/types/nft.ts +0 -53
- package/src/anyspend/types/onramp.ts +0 -16
- package/src/anyspend/types/order.ts +0 -88
- package/src/anyspend/types/relay.ts +0 -13
- package/src/anyspend/types/req-res/createOrder.ts +0 -67
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +0 -34
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +0 -26
- package/src/anyspend/types/req-res/getOrderByCreator.ts +0 -9
- package/src/anyspend/types/req-res/getOrderHistory.ts +0 -9
- package/src/anyspend/types/req-res/getQuote.ts +0 -65
- package/src/anyspend/types/req-res/getTokenList.ts +0 -18
- package/src/anyspend/types/req-res/index.ts +0 -7
- package/src/anyspend/types/req-res/stripe.ts +0 -0
- package/src/anyspend/types/swap.ts +0 -12
- package/src/anyspend/types/token.ts +0 -13
- package/src/anyspend/types/tournament.ts +0 -26
- package/src/anyspend/types/transaction.ts +0 -39
- /package/dist/cjs/anyspend/types/{bondKit.js → api_req_res.js} +0 -0
- /package/dist/esm/anyspend/types/{bondKit.js → api_req_res.js} +0 -0
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
eqci,
|
|
4
|
-
getDefaultToken,
|
|
5
|
-
GetQuoteRequest,
|
|
6
|
-
GetQuoteResponse,
|
|
7
|
-
isCustomTxMetadata,
|
|
8
|
-
isNftMetadata,
|
|
9
|
-
isTournamentMetadata,
|
|
10
|
-
Nft,
|
|
11
|
-
NftType,
|
|
12
|
-
OnrampVendor,
|
|
13
|
-
OrderStatus,
|
|
14
|
-
OrderType,
|
|
15
|
-
RELAY_ETH_ADDRESS,
|
|
16
|
-
Token,
|
|
17
|
-
USDC_BASE,
|
|
18
|
-
} from "@b3dotfun/sdk/anyspend";
|
|
1
|
+
import { eqci, getDefaultToken } from "@b3dotfun/sdk/anyspend";
|
|
2
|
+
import { RELAY_ETH_ADDRESS, USDC_BASE } from "@b3dotfun/sdk/anyspend/constants";
|
|
19
3
|
import {
|
|
20
4
|
CreateOrderParams,
|
|
21
5
|
useAnyspendCreateOnrampOrder,
|
|
@@ -25,6 +9,8 @@ import {
|
|
|
25
9
|
useAnyspendTokenList,
|
|
26
10
|
useGeoOnrampOptions,
|
|
27
11
|
} from "@b3dotfun/sdk/anyspend/react";
|
|
12
|
+
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
13
|
+
import { GetQuoteRequest, GetQuoteResponse } from "@b3dotfun/sdk/anyspend/types/api_req_res";
|
|
28
14
|
import {
|
|
29
15
|
Badge,
|
|
30
16
|
Button,
|
|
@@ -46,7 +32,6 @@ import {
|
|
|
46
32
|
useAccountWallet,
|
|
47
33
|
useBsmntProfile,
|
|
48
34
|
useHasMounted,
|
|
49
|
-
useModalStore,
|
|
50
35
|
useRouter,
|
|
51
36
|
useSearchParamsSSR,
|
|
52
37
|
useTokenBalancesByChain,
|
|
@@ -87,22 +72,22 @@ function generateGetRelayQuoteRequest({
|
|
|
87
72
|
encodedData,
|
|
88
73
|
spenderAddress,
|
|
89
74
|
}: {
|
|
90
|
-
orderType:
|
|
75
|
+
orderType: components["schemas"]["Order"]["type"];
|
|
91
76
|
srcChainId: number;
|
|
92
|
-
srcToken: Token;
|
|
77
|
+
srcToken: components["schemas"]["Token"];
|
|
93
78
|
dstChainId: number;
|
|
94
|
-
dstToken: Token;
|
|
79
|
+
dstToken: components["schemas"]["Token"];
|
|
95
80
|
dstAmount: string;
|
|
96
81
|
contractAddress: string;
|
|
97
82
|
tokenId?: number | null;
|
|
98
|
-
contractType?:
|
|
83
|
+
contractType?: components["schemas"]["NftContract"]["type"];
|
|
99
84
|
encodedData: string;
|
|
100
85
|
spenderAddress?: string;
|
|
101
86
|
}): GetQuoteRequest {
|
|
102
87
|
switch (orderType) {
|
|
103
|
-
case
|
|
88
|
+
case "mint_nft": {
|
|
104
89
|
return {
|
|
105
|
-
type:
|
|
90
|
+
type: "mint_nft",
|
|
106
91
|
srcChain: srcChainId,
|
|
107
92
|
srcTokenAddress: srcToken.address,
|
|
108
93
|
dstChain: dstChainId,
|
|
@@ -113,9 +98,9 @@ function generateGetRelayQuoteRequest({
|
|
|
113
98
|
contractType: contractType!,
|
|
114
99
|
};
|
|
115
100
|
}
|
|
116
|
-
case
|
|
101
|
+
case "join_tournament": {
|
|
117
102
|
return {
|
|
118
|
-
type:
|
|
103
|
+
type: "join_tournament",
|
|
119
104
|
srcChain: srcChainId,
|
|
120
105
|
srcTokenAddress: srcToken.address,
|
|
121
106
|
dstChain: dstChainId,
|
|
@@ -124,9 +109,9 @@ function generateGetRelayQuoteRequest({
|
|
|
124
109
|
contractAddress: contractAddress,
|
|
125
110
|
};
|
|
126
111
|
}
|
|
127
|
-
case
|
|
112
|
+
case "fund_tournament": {
|
|
128
113
|
return {
|
|
129
|
-
type:
|
|
114
|
+
type: "fund_tournament",
|
|
130
115
|
srcChain: srcChainId,
|
|
131
116
|
srcTokenAddress: srcToken.address,
|
|
132
117
|
dstChain: dstChainId,
|
|
@@ -135,9 +120,9 @@ function generateGetRelayQuoteRequest({
|
|
|
135
120
|
contractAddress: contractAddress,
|
|
136
121
|
};
|
|
137
122
|
}
|
|
138
|
-
case
|
|
123
|
+
case "custom": {
|
|
139
124
|
return {
|
|
140
|
-
type:
|
|
125
|
+
type: "custom",
|
|
141
126
|
srcChain: srcChainId,
|
|
142
127
|
srcTokenAddress: srcToken.address,
|
|
143
128
|
dstChain: dstChainId,
|
|
@@ -178,13 +163,13 @@ export function AnySpendCustom({
|
|
|
178
163
|
mode?: "modal" | "page";
|
|
179
164
|
recipientAddress?: string;
|
|
180
165
|
spenderAddress?: string;
|
|
181
|
-
orderType:
|
|
166
|
+
orderType: components["schemas"]["Order"]["type"];
|
|
182
167
|
dstChainId: number;
|
|
183
|
-
dstToken: Token;
|
|
168
|
+
dstToken: components["schemas"]["Token"];
|
|
184
169
|
dstAmount: string;
|
|
185
170
|
contractAddress: string;
|
|
186
171
|
encodedData: string;
|
|
187
|
-
metadata:
|
|
172
|
+
metadata: any;
|
|
188
173
|
header: ({
|
|
189
174
|
anyspendPrice,
|
|
190
175
|
isLoadingAnyspendPrice,
|
|
@@ -195,8 +180,6 @@ export function AnySpendCustom({
|
|
|
195
180
|
onSuccess?: (txHash?: string) => void;
|
|
196
181
|
showRecipient?: boolean;
|
|
197
182
|
}) {
|
|
198
|
-
const { setB3ModalOpen, setB3ModalContentType } = useModalStore();
|
|
199
|
-
|
|
200
183
|
const hasMounted = useHasMounted();
|
|
201
184
|
|
|
202
185
|
const searchParams = useSearchParamsSSR();
|
|
@@ -219,7 +202,7 @@ export function AnySpendCustom({
|
|
|
219
202
|
// Update recipient logic to use custom recipient
|
|
220
203
|
const recipientAddress = customRecipientAddress || currentWallet.address;
|
|
221
204
|
const recipientPropsProfile = useBsmntProfile({ address: recipientAddress });
|
|
222
|
-
const recipientEnsName = recipientPropsProfile.data?.username?.
|
|
205
|
+
const recipientEnsName = recipientPropsProfile.data?.username?.replace(/\.b3\.fun/g, "");
|
|
223
206
|
const recipientImageUrl = recipientPropsProfile.data?.avatar || currentWallet.wallet.meta?.icon;
|
|
224
207
|
|
|
225
208
|
const [orderId, setOrderId] = useState<string | undefined>(loadOrder);
|
|
@@ -273,7 +256,7 @@ export function AnySpendCustom({
|
|
|
273
256
|
}, [currentWallet?.wallet?.address, nativeTokens, fungibleTokens, tokenList, srcChainId]);
|
|
274
257
|
|
|
275
258
|
// Set the selected token with preference for tokens user owns
|
|
276
|
-
const [srcToken, setSrcToken] = useState<Token>(getDefaultToken(srcChainId));
|
|
259
|
+
const [srcToken, setSrcToken] = useState<components["schemas"]["Token"]>(getDefaultToken(srcChainId));
|
|
277
260
|
const [dirtySelectSrcToken, setDirtySelectSrcToken] = useState(false);
|
|
278
261
|
|
|
279
262
|
// Update token when chain changes or token balances are loaded
|
|
@@ -297,8 +280,8 @@ export function AnySpendCustom({
|
|
|
297
280
|
dstToken: dstToken,
|
|
298
281
|
dstAmount: dstAmount,
|
|
299
282
|
contractAddress: contractAddress,
|
|
300
|
-
tokenId:
|
|
301
|
-
contractType:
|
|
283
|
+
tokenId: metadata.type === "mint_nft" ? metadata.nftContract.tokenId : undefined,
|
|
284
|
+
contractType: metadata.type === "mint_nft" ? metadata.nftContract.type : undefined,
|
|
302
285
|
encodedData: encodedData,
|
|
303
286
|
spenderAddress: spenderAddress,
|
|
304
287
|
});
|
|
@@ -362,7 +345,7 @@ export function AnySpendCustom({
|
|
|
362
345
|
}, [anyspendQuote?.data]);
|
|
363
346
|
|
|
364
347
|
useEffect(() => {
|
|
365
|
-
if (oat?.data?.order.status ===
|
|
348
|
+
if (oat?.data?.order.status === "executed") {
|
|
366
349
|
console.log("Calling onSuccess");
|
|
367
350
|
const txHash = oat?.data?.executeTx?.txHash;
|
|
368
351
|
onSuccess?.(txHash);
|
|
@@ -393,7 +376,7 @@ export function AnySpendCustom({
|
|
|
393
376
|
|
|
394
377
|
const handleCreateOrder = async (
|
|
395
378
|
recipientAddress: string,
|
|
396
|
-
onramp?: { paymentMethod: string; vendor:
|
|
379
|
+
onramp?: { paymentMethod: string; vendor: components["schemas"]["OnrampMetadata"]["vendor"] },
|
|
397
380
|
) => {
|
|
398
381
|
try {
|
|
399
382
|
invariant(anyspendQuote, "Relay price is not found");
|
|
@@ -409,44 +392,47 @@ export function AnySpendCustom({
|
|
|
409
392
|
srcAmount: srcAmount.toString(),
|
|
410
393
|
recipientAddress,
|
|
411
394
|
creatorAddress: currentWallet?.wallet?.address,
|
|
412
|
-
nft:
|
|
413
|
-
|
|
414
|
-
?
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
395
|
+
nft:
|
|
396
|
+
metadata.type === "mint_nft"
|
|
397
|
+
? metadata.nftContract.type === "erc1155"
|
|
398
|
+
? {
|
|
399
|
+
type: "erc1155",
|
|
400
|
+
contractAddress: metadata.nftContract.contractAddress,
|
|
401
|
+
tokenId: metadata.nftContract.tokenId!,
|
|
402
|
+
name: metadata.nftContract.name,
|
|
403
|
+
description: metadata.nftContract.description,
|
|
404
|
+
imageUrl: metadata.nftContract.imageUrl,
|
|
405
|
+
price: dstAmount,
|
|
406
|
+
}
|
|
407
|
+
: {
|
|
408
|
+
type: "erc721",
|
|
409
|
+
contractAddress: metadata.nftContract.contractAddress,
|
|
410
|
+
contractType: metadata.nftContract.type,
|
|
411
|
+
price: dstAmount,
|
|
412
|
+
name: metadata.nftContract.name,
|
|
413
|
+
description: metadata.nftContract.description,
|
|
414
|
+
imageUrl: metadata.nftContract.imageUrl,
|
|
415
|
+
}
|
|
416
|
+
: undefined,
|
|
417
|
+
tournament:
|
|
418
|
+
metadata.type === "join_tournament" || metadata.type === "fund_tournament"
|
|
419
|
+
? {
|
|
420
|
+
...metadata.tournament,
|
|
421
|
+
contractAddress: contractAddress,
|
|
422
|
+
entryPriceOrFundAmount: dstAmount,
|
|
423
|
+
}
|
|
424
|
+
: undefined,
|
|
440
425
|
// only populate payload for custom tx
|
|
441
|
-
payload:
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
426
|
+
payload:
|
|
427
|
+
metadata.type === "custom"
|
|
428
|
+
? {
|
|
429
|
+
amount: dstAmount,
|
|
430
|
+
data: encodedData,
|
|
431
|
+
spenderAddress: spenderAddress,
|
|
432
|
+
to: contractAddress,
|
|
433
|
+
action: metadata.action,
|
|
434
|
+
}
|
|
435
|
+
: undefined,
|
|
450
436
|
} as CreateOrderParams;
|
|
451
437
|
|
|
452
438
|
if (onramp) {
|
|
@@ -477,7 +463,10 @@ export function AnySpendCustom({
|
|
|
477
463
|
}
|
|
478
464
|
};
|
|
479
465
|
|
|
480
|
-
const handleConfirmOrder = async (onramp?: {
|
|
466
|
+
const handleConfirmOrder = async (onramp?: {
|
|
467
|
+
paymentMethod: string;
|
|
468
|
+
vendor: components["schemas"]["OnrampMetadata"]["vendor"];
|
|
469
|
+
}) => {
|
|
481
470
|
// if (!isAuthenticated) {
|
|
482
471
|
// // Copied from https://github.com/b3-fun/b3-mono/blob/main/apps/anyspend-web/components/User/index.tsx#L85
|
|
483
472
|
// setB3ModalContentType({
|
|
@@ -518,11 +507,11 @@ export function AnySpendCustom({
|
|
|
518
507
|
className="flex w-full items-center justify-between gap-4"
|
|
519
508
|
>
|
|
520
509
|
<div className="text-b3-react-foreground">
|
|
521
|
-
{orderType ===
|
|
510
|
+
{orderType === "swap"
|
|
522
511
|
? "Recipient"
|
|
523
|
-
: orderType ===
|
|
512
|
+
: orderType === "mint_nft"
|
|
524
513
|
? "Receive NFT at"
|
|
525
|
-
: orderType ===
|
|
514
|
+
: orderType === "join_tournament"
|
|
526
515
|
? "Join for"
|
|
527
516
|
: "Recipient"}
|
|
528
517
|
</div>
|
|
@@ -832,10 +821,10 @@ export function AnySpendCustom({
|
|
|
832
821
|
onBack={() => setActiveTab("crypto")}
|
|
833
822
|
orderType={orderType}
|
|
834
823
|
nft={
|
|
835
|
-
|
|
836
|
-
? metadata.nftContract.type ===
|
|
824
|
+
metadata.type === "mint_nft"
|
|
825
|
+
? metadata.nftContract.type === "erc1155"
|
|
837
826
|
? {
|
|
838
|
-
type:
|
|
827
|
+
type: "erc1155",
|
|
839
828
|
contractAddress: metadata.nftContract.contractAddress,
|
|
840
829
|
tokenId: metadata.nftContract.tokenId!,
|
|
841
830
|
imageUrl: metadata.nftContract.imageUrl,
|
|
@@ -844,7 +833,7 @@ export function AnySpendCustom({
|
|
|
844
833
|
price: dstAmount,
|
|
845
834
|
}
|
|
846
835
|
: {
|
|
847
|
-
type:
|
|
836
|
+
type: "erc721",
|
|
848
837
|
contractAddress: metadata.nftContract.contractAddress,
|
|
849
838
|
name: metadata.nftContract.name,
|
|
850
839
|
description: metadata.nftContract.description,
|
|
@@ -854,7 +843,7 @@ export function AnySpendCustom({
|
|
|
854
843
|
: undefined
|
|
855
844
|
}
|
|
856
845
|
payload={
|
|
857
|
-
|
|
846
|
+
metadata.type === "custom"
|
|
858
847
|
? {
|
|
859
848
|
...metadata,
|
|
860
849
|
amount: dstAmount,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ALL_CHAINS, getChainName, getExplorerAddressUrl
|
|
2
|
-
import { NftContract } from "@b3dotfun/sdk/anyspend/types";
|
|
1
|
+
import { ALL_CHAINS, getChainName, getExplorerAddressUrl } from "@b3dotfun/sdk/anyspend";
|
|
3
2
|
import { GlareCard, Popover, PopoverContent, PopoverTrigger } from "@b3dotfun/sdk/global-account/react";
|
|
4
3
|
import { cn } from "@b3dotfun/sdk/shared/utils";
|
|
5
4
|
import { getIpfsUrl } from "@b3dotfun/sdk/shared/utils/ipfs";
|
|
@@ -9,6 +8,8 @@ import { MoreVertical } from "lucide-react";
|
|
|
9
8
|
import { useState } from "react";
|
|
10
9
|
import { b3 } from "viem/chains";
|
|
11
10
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
11
|
+
import { GetQuoteResponse } from "../../types/api_req_res";
|
|
12
|
+
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
12
13
|
|
|
13
14
|
export function AnySpendNFT({
|
|
14
15
|
isMainnet = true,
|
|
@@ -22,7 +23,7 @@ export function AnySpendNFT({
|
|
|
22
23
|
loadOrder?: string;
|
|
23
24
|
mode?: "modal" | "page";
|
|
24
25
|
recipientAddress?: string;
|
|
25
|
-
nftContract: NftContract;
|
|
26
|
+
nftContract: components["schemas"]["NftContract"];
|
|
26
27
|
onSuccess?: (txHash?: string) => void;
|
|
27
28
|
}) {
|
|
28
29
|
const header = ({
|
|
@@ -73,14 +74,14 @@ export function AnySpendNFT({
|
|
|
73
74
|
loadOrder={loadOrder}
|
|
74
75
|
mode={mode}
|
|
75
76
|
recipientAddress={recipientAddress}
|
|
76
|
-
orderType={
|
|
77
|
+
orderType={"mint_nft"}
|
|
77
78
|
dstChainId={nftContract.chainId}
|
|
78
79
|
dstToken={nftContract.currency}
|
|
79
80
|
dstAmount={nftContract.price}
|
|
80
81
|
contractAddress={nftContract.contractAddress}
|
|
81
82
|
encodedData="0x"
|
|
82
83
|
metadata={{
|
|
83
|
-
type:
|
|
84
|
+
type: "mint_nft",
|
|
84
85
|
nftContract: nftContract,
|
|
85
86
|
}}
|
|
86
87
|
header={header}
|
|
@@ -89,7 +90,7 @@ export function AnySpendNFT({
|
|
|
89
90
|
);
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
function DropdownMenu({ nftContract }: { nftContract: NftContract }) {
|
|
93
|
+
function DropdownMenu({ nftContract }: { nftContract: components["schemas"]["NftContract"] }) {
|
|
93
94
|
const [open, setOpen] = useState(false);
|
|
94
95
|
const chain = ALL_CHAINS[nftContract.chainId];
|
|
95
96
|
const nftUrl = getExplorerAddressUrl(nftContract.chainId, nftContract.contractAddress);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ABI_ERC20_STAKING, B3_TOKEN
|
|
1
|
+
import { ABI_ERC20_STAKING, B3_TOKEN } from "@b3dotfun/sdk/anyspend";
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
GlareCardRounded,
|
|
@@ -476,14 +476,14 @@ export function AnySpendStakeB3({
|
|
|
476
476
|
loadOrder={loadOrder}
|
|
477
477
|
mode={mode}
|
|
478
478
|
recipientAddress={recipientAddress}
|
|
479
|
-
orderType={
|
|
479
|
+
orderType={"custom"}
|
|
480
480
|
dstChainId={base.id}
|
|
481
481
|
dstToken={B3_TOKEN}
|
|
482
482
|
dstAmount={userStakeAmount}
|
|
483
483
|
contractAddress={ERC20Staking}
|
|
484
484
|
encodedData={encodedData}
|
|
485
485
|
metadata={{
|
|
486
|
-
type:
|
|
486
|
+
type: "custom",
|
|
487
487
|
action: "stake B3",
|
|
488
488
|
}}
|
|
489
489
|
header={header}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { GetQuoteResponse, OrderType, Token, Tournament } from "@b3dotfun/sdk/anyspend";
|
|
2
1
|
import { cn } from "@b3dotfun/sdk/shared/utils";
|
|
3
2
|
import { formatDisplayNumber, formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
|
|
4
3
|
import { AnimatePresence } from "framer-motion";
|
|
5
4
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
5
|
+
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
6
|
+
import { GetQuoteResponse } from "@b3dotfun/sdk/anyspend/types/api_req_res";
|
|
6
7
|
|
|
7
8
|
type AnySpendTournamentProps =
|
|
8
9
|
| {
|
|
@@ -13,8 +14,8 @@ type AnySpendTournamentProps =
|
|
|
13
14
|
loadOrder?: string;
|
|
14
15
|
tournamentChainId: number;
|
|
15
16
|
tournamentContractAddress: string;
|
|
16
|
-
tournamentMetadata: Tournament;
|
|
17
|
-
tournamentEntryToken: Token;
|
|
17
|
+
tournamentMetadata: components["schemas"]["Tournament"];
|
|
18
|
+
tournamentEntryToken: components["schemas"]["Token"];
|
|
18
19
|
tournamentEntryFee: string;
|
|
19
20
|
onSuccess?: () => void;
|
|
20
21
|
}
|
|
@@ -25,8 +26,8 @@ type AnySpendTournamentProps =
|
|
|
25
26
|
loadOrder?: string;
|
|
26
27
|
tournamentChainId: number;
|
|
27
28
|
tournamentContractAddress: string;
|
|
28
|
-
tournamentMetadata: Tournament;
|
|
29
|
-
tournamentFundToken: Token;
|
|
29
|
+
tournamentMetadata: components["schemas"]["Tournament"];
|
|
30
|
+
tournamentFundToken: components["schemas"]["Token"];
|
|
30
31
|
tournamentFundAmount: string;
|
|
31
32
|
onSuccess?: () => void;
|
|
32
33
|
};
|
|
@@ -94,14 +95,14 @@ export function AnySpendTournament(props: AnySpendTournamentProps) {
|
|
|
94
95
|
loadOrder={loadOrder}
|
|
95
96
|
mode={mode}
|
|
96
97
|
recipientAddress={action === "join" ? props.joinFor : undefined}
|
|
97
|
-
orderType={action === "join" ?
|
|
98
|
+
orderType={action === "join" ? "join_tournament" : "fund_tournament"}
|
|
98
99
|
dstChainId={tournamentChainId}
|
|
99
100
|
dstToken={dstToken}
|
|
100
101
|
dstAmount={dstAmount}
|
|
101
102
|
contractAddress={tournamentContractAddress}
|
|
102
103
|
encodedData="0x"
|
|
103
104
|
metadata={{
|
|
104
|
-
type: action === "join" ?
|
|
105
|
+
type: action === "join" ? "join_tournament" : "fund_tournament",
|
|
105
106
|
tournament: tournamentMetadata,
|
|
106
107
|
}}
|
|
107
108
|
header={header}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StyleRoot, useHasMounted, useTokenData } from "@b3dotfun/sdk/global-account/react";
|
|
1
|
+
import { StyleRoot, useTokenData } from "@b3dotfun/sdk/global-account/react";
|
|
3
2
|
import invariant from "@b3dotfun/sdk/shared/utils/debug";
|
|
4
3
|
import { useMemo } from "react";
|
|
5
4
|
import { encodeFunctionData, parseEther } from "viem";
|
|
@@ -55,8 +54,6 @@ export function AnyspendSignatureMint({
|
|
|
55
54
|
imageUrl?: string;
|
|
56
55
|
onSuccess?: (txHash?: string) => void;
|
|
57
56
|
}) {
|
|
58
|
-
const hasMounted = useHasMounted();
|
|
59
|
-
|
|
60
57
|
// Get token data
|
|
61
58
|
const {
|
|
62
59
|
data: tokenData,
|
|
@@ -141,14 +138,14 @@ export function AnyspendSignatureMint({
|
|
|
141
138
|
loadOrder={loadOrder}
|
|
142
139
|
mode={mode}
|
|
143
140
|
recipientAddress={signatureData.payload.to}
|
|
144
|
-
orderType={
|
|
141
|
+
orderType={"custom"}
|
|
145
142
|
dstChainId={signatureData.collection.chainId}
|
|
146
143
|
dstToken={dstToken}
|
|
147
144
|
dstAmount={price.toString()}
|
|
148
145
|
contractAddress={signatureData.collection.address!}
|
|
149
146
|
encodedData={encodedData}
|
|
150
147
|
metadata={{
|
|
151
|
-
type:
|
|
148
|
+
type: "custom",
|
|
152
149
|
action: "Signature Mint",
|
|
153
150
|
}}
|
|
154
151
|
header={header}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DEFAULT_NFT_CONTRACT } from "@b3dotfun/sdk/anyspend/constants";
|
|
2
|
+
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
3
|
import { Button, useModalStore } from "@b3dotfun/sdk/global-account/react";
|
|
3
|
-
import { NftContract } from "@b3dotfun/sdk/anyspend/types";
|
|
4
4
|
|
|
5
5
|
type AnySpendNFTButtonProps = {
|
|
6
|
-
nftContract?: NftContract;
|
|
6
|
+
nftContract?: components["schemas"]["NftContract"];
|
|
7
7
|
recipientAddress?: string;
|
|
8
8
|
};
|
|
9
9
|
|