@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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { paths } from "./api";
|
|
2
|
+
export type GetOrderAndTxsResponse = paths["/orders/{orderId}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
3
|
+
export type GetQuoteRequest = paths["/orders/quote"]["post"]["requestBody"]["content"]["application/json"];
|
|
4
|
+
export type GetQuoteResponse = paths["/orders/quote"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
5
|
+
export type GetCoinbaseOnrampOptionsResponse = paths["/onramp/coinbase/options"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
6
|
+
export type GetOrderHistoryResponse = paths["/orders"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
7
|
+
export type GetTokenListResponse = paths["/chains/{chainId}/tokens"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
8
|
+
export type CreateOrderResponse = paths["/orders"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
9
|
+
export type GetStripeSupportedResponse = paths["/onramp/stripe/supported"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
10
|
+
export type GetStripeClientSecret = paths["/stripe/clientSecret"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from "viem";
|
|
2
|
-
import {
|
|
2
|
+
import { components } from "../../anyspend/types/api";
|
|
3
3
|
export declare enum ChainType {
|
|
4
4
|
EVM = "evm",
|
|
5
5
|
SOLANA = "solana"
|
|
@@ -11,8 +11,8 @@ export interface IBaseChain {
|
|
|
11
11
|
logoUrl: string;
|
|
12
12
|
nativeRequired: bigint;
|
|
13
13
|
canDepositNative: boolean;
|
|
14
|
-
defaultToken: Token;
|
|
15
|
-
nativeToken: Token;
|
|
14
|
+
defaultToken: components["schemas"]["Token"];
|
|
15
|
+
nativeToken: components["schemas"]["Token"];
|
|
16
16
|
}
|
|
17
17
|
export interface IEVMChain extends IBaseChain {
|
|
18
18
|
type: ChainType.EVM;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ChainType, IBaseChain, IEVMChain, ISolanaChain, Token } from "../../anyspend/types";
|
|
2
1
|
import { Account, Chain, PublicClient, Transport, WalletClient } from "viem";
|
|
2
|
+
import { ChainType, IBaseChain, IEVMChain, ISolanaChain } from "../types/chain";
|
|
3
|
+
import { components } from "../../anyspend/types/api";
|
|
3
4
|
export declare const EVM_MAINNET: Record<number, IEVMChain>;
|
|
4
5
|
export declare const EVM_TESTNET: Record<number, IEVMChain>;
|
|
5
6
|
export declare const SOLANA_MAINNET: ISolanaChain;
|
|
@@ -15,11 +16,11 @@ export declare function getNativeRequired(chainId: number): bigint;
|
|
|
15
16
|
export declare function canDepositNative(chainId: number): boolean;
|
|
16
17
|
export declare function isMainnet(chainId: number): boolean;
|
|
17
18
|
export declare function isTestnet(chainId: number): boolean;
|
|
18
|
-
export declare function getDefaultToken(chainId: number): Token;
|
|
19
|
+
export declare function getDefaultToken(chainId: number): components["schemas"]["Token"];
|
|
19
20
|
export declare function getChainName(chainId: number): string;
|
|
20
21
|
export declare function getPaymentUrl(address: string, amount: bigint, currency: string): string;
|
|
21
22
|
export declare function getExplorerTxUrl(chainId: number, txHash: string): string;
|
|
22
23
|
export declare function getExplorerAddressUrl(chainId: number, address: string): string;
|
|
23
24
|
export declare function getMulticall3Address(chainId: number): string;
|
|
24
|
-
export declare function getNativeToken(chainId: number): Token;
|
|
25
|
+
export declare function getNativeToken(chainId: number): components["schemas"]["Token"];
|
|
25
26
|
export declare function isEvmChain(chainId: number): boolean;
|
|
@@ -21,12 +21,12 @@ exports.getExplorerAddressUrl = getExplorerAddressUrl;
|
|
|
21
21
|
exports.getMulticall3Address = getMulticall3Address;
|
|
22
22
|
exports.getNativeToken = getNativeToken;
|
|
23
23
|
exports.isEvmChain = isEvmChain;
|
|
24
|
-
const types_1 = require("../../anyspend/types");
|
|
25
24
|
const invariant_1 = __importDefault(require("invariant"));
|
|
26
25
|
const viem_1 = require("viem");
|
|
27
26
|
const chains_1 = require("viem/chains");
|
|
28
27
|
const constants_1 = require("../../anyspend/constants");
|
|
29
28
|
const token_1 = require("./token");
|
|
29
|
+
const chain_1 = require("../types/chain");
|
|
30
30
|
function getCustomEvmChain(chain, rpcUrl) {
|
|
31
31
|
return (0, viem_1.defineChain)({ ...chain, rpcUrls: { default: { http: [rpcUrl] } } });
|
|
32
32
|
}
|
|
@@ -41,7 +41,7 @@ exports.EVM_MAINNET = {
|
|
|
41
41
|
[chains_1.mainnet.id]: {
|
|
42
42
|
id: chains_1.mainnet.id,
|
|
43
43
|
name: chains_1.mainnet.name,
|
|
44
|
-
type:
|
|
44
|
+
type: chain_1.ChainType.EVM,
|
|
45
45
|
logoUrl: "https://assets.relay.link/icons/square/1/light.png",
|
|
46
46
|
nativeRequired: (0, viem_1.parseEther)("0.001"),
|
|
47
47
|
canDepositNative: true,
|
|
@@ -55,7 +55,7 @@ exports.EVM_MAINNET = {
|
|
|
55
55
|
[chains_1.arbitrum.id]: {
|
|
56
56
|
id: chains_1.arbitrum.id,
|
|
57
57
|
name: "Arbitrum",
|
|
58
|
-
type:
|
|
58
|
+
type: chain_1.ChainType.EVM,
|
|
59
59
|
logoUrl: "https://assets.relay.link/icons/square/42161/light.png",
|
|
60
60
|
nativeRequired: (0, viem_1.parseEther)("0.0001"),
|
|
61
61
|
canDepositNative: true,
|
|
@@ -70,7 +70,7 @@ exports.EVM_MAINNET = {
|
|
|
70
70
|
id: chains_1.base.id,
|
|
71
71
|
name: chains_1.base.name,
|
|
72
72
|
logoUrl: "https://assets.relay.link/icons/square/8453/light.png",
|
|
73
|
-
type:
|
|
73
|
+
type: chain_1.ChainType.EVM,
|
|
74
74
|
nativeRequired: (0, viem_1.parseEther)("0.0001"),
|
|
75
75
|
canDepositNative: true,
|
|
76
76
|
defaultToken: (0, token_1.getEthToken)(chains_1.base.id),
|
|
@@ -84,7 +84,7 @@ exports.EVM_MAINNET = {
|
|
|
84
84
|
id: chains_1.optimism.id,
|
|
85
85
|
name: chains_1.optimism.name,
|
|
86
86
|
logoUrl: "https://assets.relay.link/icons/square/10/light.png",
|
|
87
|
-
type:
|
|
87
|
+
type: chain_1.ChainType.EVM,
|
|
88
88
|
nativeRequired: (0, viem_1.parseEther)("0.0001"),
|
|
89
89
|
canDepositNative: true,
|
|
90
90
|
defaultToken: (0, token_1.getEthToken)(chains_1.optimism.id),
|
|
@@ -98,7 +98,7 @@ exports.EVM_MAINNET = {
|
|
|
98
98
|
id: chains_1.polygon.id,
|
|
99
99
|
name: chains_1.polygon.name,
|
|
100
100
|
logoUrl: "https://assets.relay.link/icons/square/137/light.png",
|
|
101
|
-
type:
|
|
101
|
+
type: chain_1.ChainType.EVM,
|
|
102
102
|
nativeRequired: (0, viem_1.parseEther)("0.1"),
|
|
103
103
|
canDepositNative: true,
|
|
104
104
|
defaultToken: (0, token_1.getPolToken)(),
|
|
@@ -112,7 +112,7 @@ exports.EVM_MAINNET = {
|
|
|
112
112
|
id: chains_1.avalanche.id,
|
|
113
113
|
name: chains_1.avalanche.name,
|
|
114
114
|
logoUrl: "https://assets.relay.link/icons/square/43114/light.png",
|
|
115
|
-
type:
|
|
115
|
+
type: chain_1.ChainType.EVM,
|
|
116
116
|
nativeRequired: (0, viem_1.parseEther)("0.005"),
|
|
117
117
|
canDepositNative: true,
|
|
118
118
|
defaultToken: (0, token_1.getAvaxToken)(),
|
|
@@ -126,7 +126,7 @@ exports.EVM_MAINNET = {
|
|
|
126
126
|
id: chains_1.bsc.id,
|
|
127
127
|
name: chains_1.bsc.name,
|
|
128
128
|
logoUrl: "https://avatars.githubusercontent.com/u/45615063?s=280&v=4",
|
|
129
|
-
type:
|
|
129
|
+
type: chain_1.ChainType.EVM,
|
|
130
130
|
nativeRequired: (0, viem_1.parseEther)("0.00001"),
|
|
131
131
|
canDepositNative: false,
|
|
132
132
|
defaultToken: (0, token_1.getBnbToken)(),
|
|
@@ -140,7 +140,7 @@ exports.EVM_MAINNET = {
|
|
|
140
140
|
id: chains_1.b3.id,
|
|
141
141
|
name: chains_1.b3.name,
|
|
142
142
|
logoUrl: "https://assets.relay.link/icons/square/8333/light.png",
|
|
143
|
-
type:
|
|
143
|
+
type: chain_1.ChainType.EVM,
|
|
144
144
|
nativeRequired: (0, viem_1.parseEther)("0.0001"),
|
|
145
145
|
canDepositNative: true,
|
|
146
146
|
defaultToken: (0, token_1.getEthToken)(chains_1.b3.id),
|
|
@@ -156,7 +156,7 @@ exports.EVM_TESTNET = {
|
|
|
156
156
|
id: chains_1.sepolia.id,
|
|
157
157
|
name: chains_1.sepolia.name,
|
|
158
158
|
logoUrl: "https://assets.relay.link/icons/square/1/light.png",
|
|
159
|
-
type:
|
|
159
|
+
type: chain_1.ChainType.EVM,
|
|
160
160
|
nativeRequired: (0, viem_1.parseEther)("0.00001"),
|
|
161
161
|
canDepositNative: true,
|
|
162
162
|
defaultToken: (0, token_1.getEthToken)(chains_1.sepolia.id),
|
|
@@ -168,7 +168,7 @@ exports.EVM_TESTNET = {
|
|
|
168
168
|
id: chains_1.baseSepolia.id,
|
|
169
169
|
name: chains_1.baseSepolia.name,
|
|
170
170
|
logoUrl: "https://assets.relay.link/icons/square/8453/light.png",
|
|
171
|
-
type:
|
|
171
|
+
type: chain_1.ChainType.EVM,
|
|
172
172
|
nativeRequired: (0, viem_1.parseEther)("0.00001"),
|
|
173
173
|
canDepositNative: true,
|
|
174
174
|
defaultToken: (0, token_1.getEthToken)(chains_1.baseSepolia.id),
|
|
@@ -180,7 +180,7 @@ exports.EVM_TESTNET = {
|
|
|
180
180
|
id: chains_1.b3Sepolia.id,
|
|
181
181
|
name: chains_1.b3Sepolia.name,
|
|
182
182
|
logoUrl: "https://assets.relay.link/icons/square/8333/light.png",
|
|
183
|
-
type:
|
|
183
|
+
type: chain_1.ChainType.EVM,
|
|
184
184
|
nativeRequired: (0, viem_1.parseEther)("0.00001"),
|
|
185
185
|
canDepositNative: true,
|
|
186
186
|
defaultToken: (0, token_1.getEthToken)(chains_1.b3Sepolia.id),
|
|
@@ -201,7 +201,7 @@ exports.SOLANA_MAINNET = {
|
|
|
201
201
|
id: constants_1.RELAY_SOLANA_MAINNET_CHAIN_ID,
|
|
202
202
|
name: "Solana",
|
|
203
203
|
logoUrl: "https://assets.relay.link/icons/square/792703809/light.png",
|
|
204
|
-
type:
|
|
204
|
+
type: chain_1.ChainType.SOLANA,
|
|
205
205
|
nativeRequired: BigInt(10000000), // 0.01 SOL
|
|
206
206
|
canDepositNative: true,
|
|
207
207
|
defaultToken: (0, token_1.getSolanaToken)(),
|
|
@@ -283,7 +283,7 @@ function getExplorerAddressUrl(chainId, address) {
|
|
|
283
283
|
}
|
|
284
284
|
function getMulticall3Address(chainId) {
|
|
285
285
|
const chainType = getChainType(chainId);
|
|
286
|
-
(0, invariant_1.default)(chainType ===
|
|
286
|
+
(0, invariant_1.default)(chainType === chain_1.ChainType.EVM, "chainType must be EVM");
|
|
287
287
|
const multicall3 = exports.EVM_CHAINS[chainId].viem.contracts?.multicall3;
|
|
288
288
|
(0, invariant_1.default)(multicall3, `multicall3 of chain ${chainId} undefined`);
|
|
289
289
|
return multicall3.address;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getStatusDisplay: (order: Order) => {
|
|
1
|
+
import { components } from "../../anyspend/types/api";
|
|
2
|
+
export declare const getStatusDisplay: (order: components["schemas"]["Order"]) => {
|
|
3
3
|
text: string;
|
|
4
4
|
status: "processing" | "success" | "failure";
|
|
5
5
|
};
|
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getErrorDisplay = exports.getStatusDisplay = void 0;
|
|
4
|
-
const types_1 = require("../../anyspend/types");
|
|
5
4
|
const getStatusDisplay = (order) => {
|
|
6
5
|
switch (order.status) {
|
|
7
|
-
case
|
|
6
|
+
case "scanning_deposit_transaction":
|
|
8
7
|
return {
|
|
9
8
|
text: order.onrampMetadata ? "Awaiting Payment" : "Awaiting Deposit",
|
|
10
9
|
status: "processing",
|
|
11
10
|
};
|
|
12
|
-
case
|
|
11
|
+
case "waiting_stripe_payment":
|
|
13
12
|
return {
|
|
14
13
|
text: "Awaiting Payment",
|
|
15
14
|
status: "processing",
|
|
16
15
|
};
|
|
17
|
-
case
|
|
16
|
+
case "expired":
|
|
18
17
|
return { text: "Order Expired", status: "failure" };
|
|
19
|
-
case
|
|
18
|
+
case "sending_token_from_vault":
|
|
20
19
|
return { text: "Sending Token", status: "processing" };
|
|
21
|
-
case
|
|
20
|
+
case "relay":
|
|
22
21
|
return { text: "Executing Order", status: "processing" };
|
|
23
|
-
case
|
|
24
|
-
const text = order.type ===
|
|
22
|
+
case "executed": {
|
|
23
|
+
const text = order.type === "swap"
|
|
25
24
|
? "Swap Complete"
|
|
26
|
-
: order.type ===
|
|
25
|
+
: order.type === "mint_nft"
|
|
27
26
|
? "NFT Minted"
|
|
28
|
-
: order.type ===
|
|
27
|
+
: order.type === "join_tournament"
|
|
29
28
|
? "Tournament Joined"
|
|
30
|
-
: order.type ===
|
|
29
|
+
: order.type === "fund_tournament"
|
|
31
30
|
? "Tournament Funded"
|
|
32
31
|
: "Order Complete";
|
|
33
32
|
return { text, status: "success" };
|
|
34
33
|
}
|
|
35
|
-
case
|
|
34
|
+
case "refunding":
|
|
36
35
|
return { text: "Order Refunding", status: "processing" };
|
|
37
|
-
case
|
|
36
|
+
case "refunded":
|
|
38
37
|
return { text: "Order Refunded", status: "failure" };
|
|
39
|
-
case
|
|
38
|
+
case "failure":
|
|
40
39
|
return { text: "Order Failure", status: "failure" };
|
|
41
40
|
default:
|
|
42
41
|
throw new Error("Invalid order status");
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../anyspend/types/api";
|
|
2
2
|
export type OrderParams = {
|
|
3
|
-
orderType:
|
|
4
|
-
srcToken: Token;
|
|
5
|
-
dstToken: Token;
|
|
3
|
+
orderType: components["schemas"]["Order"]["type"];
|
|
4
|
+
srcToken: components["schemas"]["Token"];
|
|
5
|
+
dstToken: components["schemas"]["Token"];
|
|
6
6
|
expectedDstAmount?: string;
|
|
7
|
-
nft?:
|
|
7
|
+
nft?: components["schemas"]["NFT"] & {
|
|
8
8
|
price: string;
|
|
9
9
|
};
|
|
10
|
-
tournament?: Tournament & {
|
|
10
|
+
tournament?: components["schemas"]["Tournament"] & {
|
|
11
11
|
contractAddress: string;
|
|
12
12
|
entryPriceOrFundAmount: string;
|
|
13
13
|
};
|
|
14
14
|
payload?: any;
|
|
15
15
|
};
|
|
16
|
-
export declare const buildPayload: (orderType:
|
|
17
|
-
export declare const buildMetadata: (orderType:
|
|
16
|
+
export declare const buildPayload: (orderType: components["schemas"]["Order"]["type"], params: OrderParams) => any;
|
|
17
|
+
export declare const buildMetadata: (orderType: components["schemas"]["Order"]["type"], params: OrderParams) => {
|
|
18
18
|
srcToken: {
|
|
19
|
-
symbol: string;
|
|
20
19
|
chainId: number;
|
|
21
20
|
address: string;
|
|
21
|
+
symbol: string;
|
|
22
22
|
name: string;
|
|
23
23
|
decimals: number;
|
|
24
24
|
metadata: {
|
|
25
|
-
logoURI?: string
|
|
25
|
+
logoURI?: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
dstToken: {
|
|
29
|
-
symbol: string;
|
|
30
29
|
chainId: number;
|
|
31
30
|
address: string;
|
|
31
|
+
symbol: string;
|
|
32
32
|
name: string;
|
|
33
33
|
decimals: number;
|
|
34
34
|
metadata: {
|
|
35
|
-
logoURI?: string
|
|
35
|
+
logoURI?: string;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
} | {
|
|
39
39
|
nft: (({
|
|
40
|
-
|
|
41
|
-
type: NftType.ERC721;
|
|
40
|
+
type: "erc721";
|
|
42
41
|
contractAddress: string;
|
|
42
|
+
name: string;
|
|
43
43
|
description: string;
|
|
44
44
|
imageUrl: string;
|
|
45
45
|
} | {
|
|
46
|
-
|
|
47
|
-
type: NftType.ERC1155;
|
|
46
|
+
type: "erc1155";
|
|
48
47
|
contractAddress: string;
|
|
48
|
+
name: string;
|
|
49
49
|
description: string;
|
|
50
50
|
imageUrl: string;
|
|
51
51
|
tokenId: number;
|
|
@@ -53,75 +53,75 @@ export declare const buildMetadata: (orderType: OrderType, params: OrderParams)
|
|
|
53
53
|
price: string;
|
|
54
54
|
}) | undefined;
|
|
55
55
|
srcToken: {
|
|
56
|
-
symbol: string;
|
|
57
56
|
chainId: number;
|
|
58
57
|
address: string;
|
|
58
|
+
symbol: string;
|
|
59
59
|
name: string;
|
|
60
60
|
decimals: number;
|
|
61
61
|
metadata: {
|
|
62
|
-
logoURI?: string
|
|
62
|
+
logoURI?: string;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
dstToken: {
|
|
66
|
-
symbol: string;
|
|
67
66
|
chainId: number;
|
|
68
67
|
address: string;
|
|
68
|
+
symbol: string;
|
|
69
69
|
name: string;
|
|
70
70
|
decimals: number;
|
|
71
71
|
metadata: {
|
|
72
|
-
logoURI?: string
|
|
72
|
+
logoURI?: string;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
} | {
|
|
76
76
|
tournament: ({
|
|
77
|
+
slug: string;
|
|
77
78
|
name: string;
|
|
78
79
|
description: string;
|
|
79
80
|
imageUrl: string;
|
|
80
|
-
slug: string;
|
|
81
81
|
} & {
|
|
82
82
|
contractAddress: string;
|
|
83
83
|
entryPriceOrFundAmount: string;
|
|
84
84
|
}) | undefined;
|
|
85
85
|
srcToken: {
|
|
86
|
-
symbol: string;
|
|
87
86
|
chainId: number;
|
|
88
87
|
address: string;
|
|
88
|
+
symbol: string;
|
|
89
89
|
name: string;
|
|
90
90
|
decimals: number;
|
|
91
91
|
metadata: {
|
|
92
|
-
logoURI?: string
|
|
92
|
+
logoURI?: string;
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
dstToken: {
|
|
96
|
-
symbol: string;
|
|
97
96
|
chainId: number;
|
|
98
97
|
address: string;
|
|
98
|
+
symbol: string;
|
|
99
99
|
name: string;
|
|
100
100
|
decimals: number;
|
|
101
101
|
metadata: {
|
|
102
|
-
logoURI?: string
|
|
102
|
+
logoURI?: string;
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
} | {
|
|
106
106
|
action: any;
|
|
107
107
|
srcToken: {
|
|
108
|
-
symbol: string;
|
|
109
108
|
chainId: number;
|
|
110
109
|
address: string;
|
|
110
|
+
symbol: string;
|
|
111
111
|
name: string;
|
|
112
112
|
decimals: number;
|
|
113
113
|
metadata: {
|
|
114
|
-
logoURI?: string
|
|
114
|
+
logoURI?: string;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
117
|
dstToken: {
|
|
118
|
-
symbol: string;
|
|
119
118
|
chainId: number;
|
|
120
119
|
address: string;
|
|
120
|
+
symbol: string;
|
|
121
121
|
name: string;
|
|
122
122
|
decimals: number;
|
|
123
123
|
metadata: {
|
|
124
|
-
logoURI?: string
|
|
124
|
+
logoURI?: string;
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildMetadata = exports.buildPayload = void 0;
|
|
4
|
-
const types_1 = require("../../anyspend/types");
|
|
5
4
|
const utils_1 = require("../../anyspend/utils");
|
|
6
5
|
const buildPayload = (orderType, params) => {
|
|
7
6
|
const { nft, tournament, payload, expectedDstAmount } = params;
|
|
8
7
|
switch (orderType) {
|
|
9
|
-
case
|
|
8
|
+
case "swap":
|
|
10
9
|
return {
|
|
11
10
|
expectedDstAmount,
|
|
12
11
|
actualDstAmount: null,
|
|
13
12
|
};
|
|
14
|
-
case
|
|
15
|
-
if (nft?.type ===
|
|
13
|
+
case "mint_nft":
|
|
14
|
+
if (nft?.type === "erc1155") {
|
|
16
15
|
return {
|
|
17
16
|
contractAddress: (0, utils_1.normalizeAddress)(nft.contractAddress),
|
|
18
17
|
nftPrice: nft?.price || "",
|
|
@@ -20,7 +19,7 @@ const buildPayload = (orderType, params) => {
|
|
|
20
19
|
contractType: nft?.type,
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
|
-
else if (nft?.type ===
|
|
22
|
+
else if (nft?.type === "erc721") {
|
|
24
23
|
return {
|
|
25
24
|
contractAddress: (0, utils_1.normalizeAddress)(nft.contractAddress),
|
|
26
25
|
nftPrice: nft?.price || "",
|
|
@@ -30,17 +29,17 @@ const buildPayload = (orderType, params) => {
|
|
|
30
29
|
else {
|
|
31
30
|
throw new Error(`Invalid nft payload: ${JSON.stringify(nft)}`);
|
|
32
31
|
}
|
|
33
|
-
case
|
|
32
|
+
case "join_tournament":
|
|
34
33
|
return {
|
|
35
34
|
contractAddress: tournament?.contractAddress,
|
|
36
35
|
entryPrice: tournament?.entryPriceOrFundAmount,
|
|
37
36
|
};
|
|
38
|
-
case
|
|
37
|
+
case "fund_tournament":
|
|
39
38
|
return {
|
|
40
39
|
contractAddress: tournament?.contractAddress,
|
|
41
40
|
fundAmount: tournament?.entryPriceOrFundAmount,
|
|
42
41
|
};
|
|
43
|
-
case
|
|
42
|
+
case "custom":
|
|
44
43
|
return { ...payload };
|
|
45
44
|
default:
|
|
46
45
|
throw new Error(`Invalid order type: ${orderType}`);
|
|
@@ -54,14 +53,14 @@ const buildMetadata = (orderType, params) => {
|
|
|
54
53
|
dstToken,
|
|
55
54
|
};
|
|
56
55
|
switch (orderType) {
|
|
57
|
-
case
|
|
56
|
+
case "swap":
|
|
58
57
|
return { ...baseMetadata };
|
|
59
|
-
case
|
|
58
|
+
case "mint_nft":
|
|
60
59
|
return { ...baseMetadata, nft };
|
|
61
|
-
case
|
|
62
|
-
case
|
|
60
|
+
case "join_tournament":
|
|
61
|
+
case "fund_tournament":
|
|
63
62
|
return { ...baseMetadata, tournament };
|
|
64
|
-
case
|
|
63
|
+
case "custom":
|
|
65
64
|
return { ...baseMetadata, action: payload.action };
|
|
66
65
|
default:
|
|
67
66
|
throw new Error(`Invalid order type: ${orderType}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../anyspend/types/api";
|
|
2
2
|
export declare function isNativeToken(address: string): boolean;
|
|
3
|
-
export declare function getSolanaToken(): Token;
|
|
4
|
-
export declare function getEthToken(chainId: number): Token;
|
|
5
|
-
export declare function getPolToken(): Token;
|
|
6
|
-
export declare function getBnbToken(): Token;
|
|
7
|
-
export declare function getAvaxToken(): Token;
|
|
3
|
+
export declare function getSolanaToken(): components["schemas"]["Token"];
|
|
4
|
+
export declare function getEthToken(chainId: number): components["schemas"]["Token"];
|
|
5
|
+
export declare function getPolToken(): components["schemas"]["Token"];
|
|
6
|
+
export declare function getBnbToken(): components["schemas"]["Token"];
|
|
7
|
+
export declare function getAvaxToken(): components["schemas"]["Token"];
|
|
@@ -24,7 +24,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
24
24
|
ref?: React.Ref<HTMLInputElement>;
|
|
25
25
|
} & {
|
|
26
26
|
asChild?: boolean;
|
|
27
|
-
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "
|
|
27
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
28
28
|
value?: string;
|
|
29
29
|
onValueChange?: (search: string) => void;
|
|
30
30
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -33,7 +33,7 @@ function useAccountWallet() {
|
|
|
33
33
|
? in_app_1.socialIcons[lastAuthProvider]
|
|
34
34
|
: "https://gradvatar.com/0x0000000000000000000000000000000000000000"; // show smart wallet of eoa wallet is gradvatar
|
|
35
35
|
const { data: profileData } = (0, useBsmntProfile_1.useBsmntProfile)({ address: account?.address });
|
|
36
|
-
const ensName = profileData?.username?.
|
|
36
|
+
const ensName = profileData?.username?.replace(/\.b3\.fun/g, "");
|
|
37
37
|
const avatarUrl = profileData?.avatar;
|
|
38
38
|
const res = (0, react_2.useMemo)(() => ({
|
|
39
39
|
wallet: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../anyspend/types/api";
|
|
2
2
|
export type TransactionType = "send" | "swap" | "bridge";
|
|
3
3
|
export interface SprinterOption {
|
|
4
4
|
chainId: number;
|
|
@@ -18,7 +18,7 @@ export interface TransactionPathResult extends TransactionPath {
|
|
|
18
18
|
}
|
|
19
19
|
interface UseBestTransactionPathProps {
|
|
20
20
|
amount: bigint;
|
|
21
|
-
token: Token;
|
|
21
|
+
token: components["schemas"]["Token"];
|
|
22
22
|
address?: string;
|
|
23
23
|
transactionType?: TransactionType;
|
|
24
24
|
}
|
|
@@ -16,7 +16,7 @@ function useOnchainName(address) {
|
|
|
16
16
|
return null;
|
|
17
17
|
try {
|
|
18
18
|
const response = await (0, fetchBsmntProfile_1.fetchBsmntProfile)(undefined, address);
|
|
19
|
-
return response?.username?.
|
|
19
|
+
return response?.username?.replace(/\.b3\.fun/g, "") || null;
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
22
|
return null;
|
|
@@ -31,7 +31,7 @@ function useOnchainName(address) {
|
|
|
31
31
|
return null;
|
|
32
32
|
try {
|
|
33
33
|
const response = await (0, b3Ens_1.getB3NameByAddress)(address);
|
|
34
|
-
return response?.name?.
|
|
34
|
+
return response?.name?.replace(/\.b3\.fun/g, "") || null;
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
return null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../anyspend/types/api";
|
|
2
2
|
interface UseTokenFromUrlOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Default token to use when URL params are not available
|
|
5
5
|
*/
|
|
6
|
-
defaultToken: Token;
|
|
6
|
+
defaultToken: components["schemas"]["Token"];
|
|
7
7
|
/**
|
|
8
8
|
* The URL parameter prefix to look for (e.g., "from" or "to")
|
|
9
9
|
*/
|
|
@@ -13,9 +13,9 @@ interface UseTokenFromUrlOptions {
|
|
|
13
13
|
* Hook to parse token data from URL parameters and fetch additional token info.
|
|
14
14
|
* Looks for parameters: [prefix]Currency
|
|
15
15
|
*/
|
|
16
|
-
export declare function useTokenFromUrl({ defaultToken, prefix }: UseTokenFromUrlOptions): Token;
|
|
17
|
-
export declare function useTokenFromAddress({ address, chainId }: {
|
|
16
|
+
export declare function useTokenFromUrl({ defaultToken, prefix }: UseTokenFromUrlOptions): components["schemas"]["Token"];
|
|
17
|
+
export declare function useTokenFromAddress({ address, chainId, }: {
|
|
18
18
|
address: string;
|
|
19
19
|
chainId: number;
|
|
20
|
-
}): Token | undefined;
|
|
20
|
+
}): components["schemas"]["Token"] | undefined;
|
|
21
21
|
export {};
|
|
@@ -67,7 +67,7 @@ function useTokenFromUrl({ defaultToken, prefix }) {
|
|
|
67
67
|
},
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function useTokenFromAddress({ address, chainId }) {
|
|
70
|
+
function useTokenFromAddress({ address, chainId, }) {
|
|
71
71
|
const { data: tokenInfo, isError } = (0, react_query_1.useQuery)({
|
|
72
72
|
queryKey: ["tokenInfo", address, chainId],
|
|
73
73
|
queryFn: () => fetchTokenInfo((0, supported_1.getCoingeckoChainInfo)(chainId).coingecko_id, address),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Token, Tournament } from "../../../anyspend";
|
|
2
|
-
import { NftContract } from "../../../anyspend/types";
|
|
3
1
|
import { GenerateSigMintResponse } from "../../../anyspend/types/signatureMint";
|
|
2
|
+
import { components } from "../../../anyspend/types/api";
|
|
4
3
|
import { AllowedStrategy } from "../../../global-account/react";
|
|
5
4
|
import { PermissionsConfig } from "../../../global-account/types/permissions";
|
|
6
5
|
import { Address, Chain } from "thirdweb";
|
|
@@ -122,7 +121,7 @@ export interface AnySpendNftProps extends BaseModalProps {
|
|
|
122
121
|
/** Modal type identifier */
|
|
123
122
|
type: "anySpendNft";
|
|
124
123
|
/** NFT contract information */
|
|
125
|
-
nftContract: NftContract;
|
|
124
|
+
nftContract: components["schemas"]["NftContract"];
|
|
126
125
|
/** Recipient address to receive the NFT */
|
|
127
126
|
recipientAddress?: string;
|
|
128
127
|
/** Callback function called when the NFT is successfully transferred */
|
|
@@ -141,9 +140,9 @@ export interface AnySpendJoinTournamentProps extends BaseModalProps {
|
|
|
141
140
|
/** Tournament contract address */
|
|
142
141
|
tournamentContractAddress: string;
|
|
143
142
|
/** Tournament metadata */
|
|
144
|
-
tournamentMetadata: Tournament;
|
|
143
|
+
tournamentMetadata: components["schemas"]["Tournament"];
|
|
145
144
|
/** Tournament entry token */
|
|
146
|
-
tournamentEntryToken: Token;
|
|
145
|
+
tournamentEntryToken: components["schemas"]["Token"];
|
|
147
146
|
/** Tournament entry fee */
|
|
148
147
|
tournamentEntryFee: string;
|
|
149
148
|
/** Callback function called when the tournament is successfully joined */
|
|
@@ -160,9 +159,9 @@ export interface AnySpendFundTournamentProps extends BaseModalProps {
|
|
|
160
159
|
/** Tournament contract address */
|
|
161
160
|
tournamentContractAddress: string;
|
|
162
161
|
/** Tournament metadata */
|
|
163
|
-
tournamentMetadata: Tournament;
|
|
162
|
+
tournamentMetadata: components["schemas"]["Tournament"];
|
|
164
163
|
/** Tournament fund token */
|
|
165
|
-
tournamentFundToken: Token;
|
|
164
|
+
tournamentFundToken: components["schemas"]["Token"];
|
|
166
165
|
/** Tournament fund amount */
|
|
167
166
|
tournamentFundAmount: string;
|
|
168
167
|
/** Callback function called when the tournament is successfully joined */
|
|
@@ -14,12 +14,12 @@ export declare const supportedChainNetworks: {
|
|
|
14
14
|
testnetConfigID?: number | undefined;
|
|
15
15
|
badge?: string | undefined;
|
|
16
16
|
enabledFeatures?: string[] | undefined;
|
|
17
|
-
name: string;
|
|
18
|
-
id: number;
|
|
19
17
|
blockExplorers: {
|
|
20
18
|
default: string;
|
|
21
19
|
explorerTitle: string;
|
|
22
20
|
};
|
|
21
|
+
id: number;
|
|
22
|
+
name: string;
|
|
23
23
|
nativeCurrency: {
|
|
24
24
|
symbol: string;
|
|
25
25
|
name: string;
|