@one_deploy/sdk 1.0.7 → 1.2.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 +339 -0
- package/dist/ForexPoolDataGenerator--__twRwl.d.mts +76 -0
- package/dist/ForexPoolDataGenerator-eUgwsU_B.d.ts +76 -0
- package/dist/OneForexTradeHistory-TlKxjbFF.d.ts +250 -0
- package/dist/OneForexTradeHistory-iDySMcw0.d.mts +250 -0
- package/dist/components/index.d.mts +539 -0
- package/dist/components/index.d.ts +539 -0
- package/dist/components/index.js +7295 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +7243 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/config/index.d.mts +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/console-BfTMA7ah.d.mts +504 -0
- package/dist/console-BfTMA7ah.d.ts +504 -0
- package/dist/hooks/index.d.mts +323 -1
- package/dist/hooks/index.d.ts +323 -1
- package/dist/hooks/index.js +3223 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +3204 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +18 -352
- package/dist/index.d.ts +18 -352
- package/dist/index.js +8646 -574
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8449 -432
- package/dist/index.mjs.map +1 -1
- package/dist/providers/index.d.mts +31 -31
- package/dist/providers/index.d.ts +31 -31
- package/dist/providers/index.js +140 -153
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/index.mjs +100 -109
- package/dist/providers/index.mjs.map +1 -1
- package/dist/react-native.d.mts +8 -144
- package/dist/react-native.d.ts +8 -144
- package/dist/react-native.js +2640 -689
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +2610 -691
- package/dist/react-native.mjs.map +1 -1
- package/dist/services/index.d.mts +85 -4
- package/dist/services/index.d.ts +85 -4
- package/dist/services/index.js +1621 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +1619 -1
- package/dist/services/index.mjs.map +1 -1
- package/dist/types/index.d.mts +203 -1
- package/dist/types/index.d.ts +203 -1
- package/dist/types/index.js +275 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +251 -0
- package/dist/types/index.mjs.map +1 -1
- package/dist/useForexTrading-BleeSor8.d.mts +80 -0
- package/dist/useForexTrading-ZgW_G40Q.d.ts +80 -0
- package/package.json +9 -2
- package/src/components/OneConnectButton.tsx +24 -1
- package/src/components/OneNFTGallery.tsx +13 -7
- package/src/components/OneOfframpWidget.tsx +4 -3
- package/src/components/OnePayWidget.tsx +10 -1
- package/src/components/OneSendWidget.tsx +3 -3
- package/src/components/OneSwapWidget.tsx +4 -4
- package/src/components/OneTransactionButton.tsx +28 -3
- package/src/components/OneWalletBalance.tsx +1 -1
- package/src/components/ai/OneChainSelector.tsx +63 -336
- package/src/components/ai/OneForexCapitalSplit.tsx +112 -0
- package/src/components/ai/OneForexConsoleView.tsx +90 -0
- package/src/components/ai/OneForexPairSelector.tsx +101 -0
- package/src/components/ai/OneForexPoolCard.tsx +105 -0
- package/src/components/ai/OneForexTradeHistory.tsx +107 -0
- package/src/components/ai/OnePairSelector.tsx +77 -434
- package/src/components/ai/console/OneAIQuantConsole.tsx +423 -0
- package/src/components/ai/console/OneAgentCard.tsx +383 -0
- package/src/components/ai/console/OneAgentConsole.tsx +469 -0
- package/src/components/ai/console/OneDecisionTimeline.tsx +433 -0
- package/src/components/ai/console/OneMetricsDashboard.tsx +493 -0
- package/src/components/ai/console/OnePositionCard.tsx +406 -0
- package/src/components/ai/console/OnePositionDetail.tsx +600 -0
- package/src/components/ai/console/OneRiskIndicator.tsx +464 -0
- package/src/components/ai/console/OneTradingConsole.tsx +660 -0
- package/src/components/ai/console/index.ts +17 -0
- package/src/components/ai/index.ts +10 -0
- package/src/hooks/index.ts +46 -0
- package/src/hooks/useAIDecisions.ts +280 -0
- package/src/hooks/useAIPositions.ts +349 -0
- package/src/hooks/useAIQuantConsole.ts +283 -0
- package/src/hooks/useAIRiskStatus.ts +276 -0
- package/src/hooks/useAITrading.ts +190 -0
- package/src/hooks/useBotSimulation.ts +201 -0
- package/src/hooks/useForexTrading.ts +430 -0
- package/src/hooks/useTradingConsole.ts +243 -0
- package/src/index.ts +123 -5
- package/src/providers/OneProvider.tsx +181 -5
- package/src/providers/index.ts +22 -8
- package/src/react-native.ts +41 -0
- package/src/services/forex/BotSimulationEngine.ts +968 -0
- package/src/services/forex/ForexPoolDataGenerator.ts +542 -0
- package/src/services/forex/ForexSimulationEngine.ts +482 -0
- package/src/services/forex/index.ts +21 -0
- package/src/services/index.ts +16 -0
- package/src/types/aiTrading.ts +151 -0
- package/src/types/console.ts +380 -0
- package/src/types/forex.ts +282 -0
- package/src/types/index.ts +106 -0
- package/dist/price-CgqXPnT3.d.ts +0 -13
- package/dist/price-ClbLHHjv.d.mts +0 -13
- package/dist/supabase-BT0c7q9e.d.mts +0 -82
- package/dist/supabase-BT0c7q9e.d.ts +0 -82
package/dist/index.d.mts
CHANGED
|
@@ -1,356 +1,22 @@
|
|
|
1
1
|
export { CHAIN_CONFIGS, CHAIN_IDS, COINGECKO_IDS, DEFAULT_CHAIN_ID, OneConfig, SUPPORTED_CHAINS, TOKEN_NAMES, fetchChains, getChainById, getChainByName, getChainConfig, getChains, getConfig, getEngineUrl, getRecommendedChains, getSmartWalletChains, initOneSDK, isInitialized } from './config/index.mjs';
|
|
2
|
-
export { AIMarketData, AINavSnapshot, AIOrder, AIOrderStatus, AIPortfolioSummary, AIRedemptionResult, AIStrategy, AITradeAllocation, AITradeExecution, AdminListOptions, AdminProject, AdminUser, ApiResponse, AssetAllocation, BillCategory, BillPayment, BillProvider, BridgeQuote, BridgeRoute, BridgeTransaction, Card, CardStatus, CardTier, CardTransaction, ChainConfig, Contract, ContractDeployParams, ContractReadParams, ContractType, ContractWriteParams, CreateAIOrderRequest, CreateWebhookInput, GasEstimate, GasPrice, KycLevel, KycStatus, LimitOrder, MembershipTier, NFT, NFTAttribute, NFTCollection, NFTTransfer, Notification, NotificationSettings, OfframpRequest, OnChainBalance, PaginatedResult, Permission, PermissionScope, PortfolioAnalytics, PortfolioHistory, Position, RateLimitInfo, Referral, ReferralInfo, RiskLevel, SDKEvent, SDKEventType, Session, StakingPool, StakingPosition, StrategyCategory, SystemLog, SystemStats, Token, TokenPrice, TradeAction, TradingCondition, Transaction, TransactionStatus, TransactionType, UpdateWebhookInput, User, UserProfile, UserSettings, WalletBalance, WalletExport, WalletImportRequest, Webhook, WebhookDelivery, WebhookEventType } from './types/index.mjs';
|
|
2
|
+
export { AIAgent, AIAgentCycleParams, AIAgentPerformance, AIAgentSubscriptionParams, AIAgentTier, AIAgentTrade, AIMarketData, AINavSnapshot, AIOrder, AIOrderCreateInput, AIOrderStatus, AIOrderSummary, AIPenaltyCalculation, AIPerformanceChart, AIPortfolioSummary, AIRedemptionResult, AIStrategy, AIStrategyConfig, AITradeAllocation, AITradeExecution, AITradeLog, AdminListOptions, AdminProject, AdminUser, ApiResponse, AssetAllocation, BillCategory, BillPayment, BillProvider, BridgeQuote, BridgeRoute, BridgeTransaction, Card, CardStatus, CardTier, CardTransaction, ChainConfig, Contract, ContractDeployParams, ContractReadParams, ContractType, ContractWriteParams, CreateAIOrderRequest, CreateWebhookInput, FeeType, GasEstimate, GasPrice, KycLevel, KycStatus, LimitOrder, MembershipTier, NFT, NFTAttribute, NFTCollection, NFTTransfer, Notification, NotificationSettings, ORDER_STATUS_CONFIG, OfframpRequest, OnChainBalance, OrderEventType, OrderStatus, PENALTY_TIERS, PaginatedResult, Permission, PermissionScope, PortfolioAnalytics, PortfolioHistory, Position, RISK_LEVELS, RateLimitInfo, Referral, ReferralInfo, RiskLevel, SDKEvent, SDKEventType, STRATEGY_CATEGORIES, Session, StakingPool, StakingPosition, StrategyCategory, SystemLog, SystemStats, Token, TokenPrice, TradeAction, TradeStatus, TradingCondition, Transaction, TransactionStatus, TransactionType, UpdateWebhookInput, User, UserProfile, UserSettings, WalletBalance, WalletExport, WalletImportRequest, Webhook, WebhookDelivery, WebhookEventType, calculateEarlyWithdrawalPenalty } from './types/index.mjs';
|
|
3
3
|
export { E as EngineAuthResponse, b as EngineTransactionRequest, d as EngineTransactionResponse, a as EngineWalletBalance, O as OneEngineClient, g as OnrampQuote, f as OnrampSession, e as OnrampSessionRequest, h as OnrampTransaction, j as SwapExecuteRequest, i as SwapQuote, S as SwapQuoteRequest, k as SwapResult, c as createOneEngineClient } from './engine-BeVuHpVx.mjs';
|
|
4
|
-
export {
|
|
5
|
-
export { P as PriceService, p as priceService } from './
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
import { Chain } from 'thirdweb/chains';
|
|
13
|
-
export { arbitrum, base, ethereum, optimism, polygon } from 'thirdweb/chains';
|
|
14
|
-
export { UseAIMarketDataResult, UseAIOrdersOptions, UseAIOrdersResult, UseAIPortfolioResult, UseAIStrategiesOptions, UseAIStrategiesResult, UseAIStrategyResult, UseAITradingResult, clearAITradingAccessToken, setAITradingAccessToken, useAIMarketData, useAIOrders, useAIPortfolio, useAIStrategies, useAIStrategy, useAITrading, useTokenPrice, useTokenPrices, useWalletBalance } from './hooks/index.mjs';
|
|
4
|
+
export { DisplayCategory, SupabaseService, UsageActivity, UsageCategory, UsageRecord, UsageResponse, UsageService, UsageSummary, createSupabaseClient, createUsageService, getUsageService } from './services/index.mjs';
|
|
5
|
+
export { F as ForexPoolDataGenerator, a as PairState, P as PriceService, f as forexSimulationEngine, p as priceService } from './ForexPoolDataGenerator--__twRwl.mjs';
|
|
6
|
+
export { M as AGENT_STATUS_COLORS, G as AIDecision, A as AILogType, D as AIPosition, U as AIQuantConsoleOptions, y as AI_LOG_COLORS, V as AgentConsoleOptions, L as AgentStatus, a as BotLogEntry, B as BotLogType, c as BotState, N as CombinedLogEntry, K as ConsoleMetrics, Y as DEFAULT_CONSOLE_METRICS, W as DEFAULT_CONSOLE_OPTIONS, X as DEFAULT_RISK_STATUS, E as DecisionAction, v as FOREX_AGENT, F as FOREX_CAPITAL_SPLIT, h as FOREX_CURRENCY_PAIRS, f as FOREX_CYCLE_OPTIONS, z as FOREX_LOG_COLORS, k as FOREX_POOL_DEFAULTS, u as ForexAgent, g as ForexCurrencyPair, e as ForexCycleOption, p as ForexInvestment, t as ForexLogEntry, s as ForexLogType, j as ForexPool, n as ForexPoolDailySnapshot, m as ForexPoolTransaction, l as ForexPoolTransactionType, i as ForexPoolType, o as ForexPosition, r as ForexTradeRecord, q as ForexTradeStatus, I as IndicatorSnapshot, P as PositionSide, C as PositionStatus, H as RISK_LEVEL_COLORS, R as RiskStatus, S as StrategyPersonality, J as TRADING_STATUS_COLORS, Q as TradingConsoleOptions, O as TradingConsoleState, T as TradingStatus, b as botSimulationEngine, w as calculateForexNetProfit, Z as calculateRiskLevel, d as computePoolAllocations, x as estimateForexProfit, _ as formatPnl } from './console-BfTMA7ah.mjs';
|
|
7
|
+
export { OneContext, OneProvider, ThirdwebWalletConfig as OneThirdwebConfig, OneProvider as OneThirdwebProvider, ThirdwebAuthOptions, ThirdwebWalletConfig, useOne, useOneAuth, useOneEngine, useOneOnramp, useOneSwap, useOneTrading, useOneWallet, useThirdwebClient } from './providers/index.mjs';
|
|
8
|
+
export { NFTItem, OfframpQuote, OfframpTransaction, OneAIQuantConsole, OneAIQuantConsoleProps, OneAgentCard, OneAgentCardProps, OneAgentConsole, OneAgentConsoleProps, OneApproveButton, OneApproveButtonProps, OneBalanceDisplay, OneBuyBTCWidget, OneBuyETHWidget, OneBuyUSDCWidget, OneBuyUSDTWidget, OneConnectButton, OneConnectButtonFull, OneConnectButtonProps, OneConnectButtonSimple, OneCrossChainSwap, OneCryptoOnlyPayWidget, OneDecisionTimeline, OneDecisionTimelineProps, OneDirectPayWidget, OneFiatOnlyPayWidget, OneFundWalletWidget, OneMetricsDashboard, OneMetricsDashboardProps, OneNFTGallery, OneNFTGalleryProps, OneOfframpWidget, OneOfframpWidgetProps, OneOnrampWidget, OneOnrampWidgetProps, OnePayWidget, OnePayWidgetProps, OnePositionCard, OnePositionCardProps, OnePositionDetail, OnePositionDetailProps, OneReceiveWidget, OneReceiveWidgetProps, OneRiskIndicator, OneRiskIndicatorProps, OneSameChainSwap, OneSellETHWidget, OneSellUSDCWidget, OneSellUSDTWidget, OneSendETHButton, OneSendETHButtonProps, OneSendETHWidget, OneSendUSDCWidget, OneSendWidget, OneSendWidgetProps, OneSwapWidget, OneSwapWidgetProps, OneTradingConsole, OneTradingConsoleProps, OneTransactionButton, OneTransactionButtonProps, OneWalletBalance, OneWalletBalanceProps, PayMode, SwapRoute, SwapStep, SwapToken, TokenBalance } from './components/index.mjs';
|
|
9
|
+
export { O as OneChainSelector, i as OneChainSelectorProps, b as OneCycleSelector, k as OneCycleSelectorProps, e as OneForexCapitalSplit, n as OneForexCapitalSplitProps, f as OneForexConsoleView, o as OneForexConsoleViewProps, g as OneForexPairSelector, p as OneForexPairSelectorProps, d as OneForexPoolCard, m as OneForexPoolCardProps, h as OneForexTradeHistory, q as OneForexTradeHistoryProps, c as OnePairSelector, l as OnePairSelectorProps, a as OneTierSelector, j as OneTierSelectorProps } from './OneForexTradeHistory-iDySMcw0.mjs';
|
|
10
|
+
export { AIAgent as AIAgentHook, AIAgentParams, UseAIAgentResult, UseAIAgentSubscriptionResult, UseAIAgentsResult, UseAIDecisionsOptions, UseAIDecisionsResult, UseAIMarketDataResult, UseAIOrdersOptions, UseAIOrdersResult, UseAIPortfolioResult, UseAIPositionsOptions, UseAIPositionsResult, UseAIQuantConsoleResult, UseAIRiskStatusOptions, UseAIRiskStatusResult, UseAIStrategiesOptions, UseAIStrategiesResult, UseAIStrategyResult, UseAITradingResult, UseBotSimulationOptions, UseBotSimulationResult, UseTradingConsoleResult, clearAITradingAccessToken, clearConsoleAccessToken, setAITradingAccessToken, setConsoleAccessToken, setConsoleEngineUrl, useAIAgent, useAIAgentSubscription, useAIAgents, useAIDecisions, useAIMarketData, useAIOrders, useAIPortfolio, useAIPositions, useAIQuantConsole, useAIRiskStatus, useAIStrategies, useAIStrategy, useAITrading, useBotSimulation, useTokenPrice, useTokenPrices, useTradingConsole, useWalletBalance } from './hooks/index.mjs';
|
|
11
|
+
export { g as UseForexInvestmentsResult, i as UseForexPoolDataResult, U as UseForexPoolsResult, h as UseForexSimulationResult, j as UseForexTradingResult, e as clearForexAccessToken, s as setForexAccessToken, f as setForexEngineUrl, a as useForexInvestments, c as useForexPoolData, u as useForexPools, b as useForexSimulation, d as useForexTrading } from './useForexTrading-BleeSor8.mjs';
|
|
15
12
|
export { OneSDKError, capitalize, checksumAddress, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTokenAmount, formatUSD, isOneSDKError, isValidAddress, isValidEmail, isValidPhone, omit, pick, retry, shortenAddress, sleep, slugify, truncate } from './utils/index.mjs';
|
|
13
|
+
export { inAppWallet, smartWallet } from 'thirdweb/wallets';
|
|
14
|
+
export { Chain, arbitrum, base, ethereum, optimism, polygon } from 'thirdweb/chains';
|
|
15
|
+
export { ThirdwebClient } from 'thirdweb';
|
|
16
|
+
import '@supabase/realtime-js';
|
|
17
|
+
import '@supabase/postgrest-js';
|
|
18
|
+
import '@supabase/auth-js';
|
|
16
19
|
import '@supabase/supabase-js';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
theme?: 'light' | 'dark';
|
|
21
|
-
className?: string;
|
|
22
|
-
style?: React.CSSProperties;
|
|
23
|
-
chain?: Parameters<typeof smartWallet>[0]['chain'];
|
|
24
|
-
sponsorGas?: boolean;
|
|
25
|
-
authOptions?: {
|
|
26
|
-
email?: boolean;
|
|
27
|
-
google?: boolean;
|
|
28
|
-
apple?: boolean;
|
|
29
|
-
discord?: boolean;
|
|
30
|
-
passkey?: boolean;
|
|
31
|
-
};
|
|
32
|
-
onConnect?: (address: string) => void;
|
|
33
|
-
onDisconnect?: () => void;
|
|
34
|
-
accountAbstraction?: {
|
|
35
|
-
chain: Parameters<typeof smartWallet>[0]['chain'];
|
|
36
|
-
sponsorGas?: boolean;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
declare function OneConnectButton({ label, theme, className, style, chain, sponsorGas, authOptions, onConnect, onDisconnect, accountAbstraction, }: OneConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
40
|
-
declare function OneConnectButtonSimple(props: Omit<OneConnectButtonProps, 'authOptions'>): react_jsx_runtime.JSX.Element;
|
|
41
|
-
declare function OneConnectButtonFull(props: Omit<OneConnectButtonProps, 'authOptions'>): react_jsx_runtime.JSX.Element;
|
|
42
|
-
|
|
43
|
-
type PayMode = 'fund_wallet' | 'direct_payment' | 'transaction';
|
|
44
|
-
interface OnePayWidgetProps {
|
|
45
|
-
mode?: PayMode;
|
|
46
|
-
recipientAddress?: string;
|
|
47
|
-
amount?: string;
|
|
48
|
-
tokenAddress?: string;
|
|
49
|
-
chainId?: number;
|
|
50
|
-
transaction?: any;
|
|
51
|
-
theme?: 'light' | 'dark';
|
|
52
|
-
className?: string;
|
|
53
|
-
style?: React.CSSProperties;
|
|
54
|
-
buyWithCrypto?: boolean;
|
|
55
|
-
buyWithFiat?: boolean;
|
|
56
|
-
supportedTokens?: {
|
|
57
|
-
[chainId: number]: string[];
|
|
58
|
-
};
|
|
59
|
-
onSuccess?: (result: any) => void;
|
|
60
|
-
onError?: (error: Error) => void;
|
|
61
|
-
onCancel?: () => void;
|
|
62
|
-
}
|
|
63
|
-
declare function OnePayWidget({ mode, recipientAddress, amount, tokenAddress, chainId, transaction, theme, className, style, buyWithCrypto, buyWithFiat, supportedTokens, onSuccess, onError, onCancel, }: OnePayWidgetProps): react_jsx_runtime.JSX.Element;
|
|
64
|
-
declare function OneFundWalletWidget(props: Omit<OnePayWidgetProps, 'mode'>): react_jsx_runtime.JSX.Element;
|
|
65
|
-
declare function OneDirectPayWidget(props: Omit<OnePayWidgetProps, 'mode'> & {
|
|
66
|
-
recipientAddress: string;
|
|
67
|
-
amount: string;
|
|
68
|
-
}): react_jsx_runtime.JSX.Element;
|
|
69
|
-
declare function OneCryptoOnlyPayWidget(props: Omit<OnePayWidgetProps, 'buyWithFiat'>): react_jsx_runtime.JSX.Element;
|
|
70
|
-
declare function OneFiatOnlyPayWidget(props: Omit<OnePayWidgetProps, 'buyWithCrypto'>): react_jsx_runtime.JSX.Element;
|
|
71
|
-
|
|
72
|
-
interface OneTransactionButtonProps {
|
|
73
|
-
to: string;
|
|
74
|
-
value?: bigint;
|
|
75
|
-
data?: `0x${string}`;
|
|
76
|
-
chain: Chain;
|
|
77
|
-
transaction?: PreparedTransaction;
|
|
78
|
-
label?: string;
|
|
79
|
-
loadingLabel?: string;
|
|
80
|
-
theme?: 'light' | 'dark';
|
|
81
|
-
className?: string;
|
|
82
|
-
style?: React.CSSProperties;
|
|
83
|
-
disabled?: boolean;
|
|
84
|
-
onSuccess?: (result: {
|
|
85
|
-
transactionHash: string;
|
|
86
|
-
}) => void;
|
|
87
|
-
onError?: (error: Error) => void;
|
|
88
|
-
onSubmitted?: (txHash: string) => void;
|
|
89
|
-
}
|
|
90
|
-
declare function OneTransactionButton({ to, value, data, chain, transaction: preparedTx, label, loadingLabel, theme, className, style, disabled, onSuccess, onError, onSubmitted, }: OneTransactionButtonProps): react_jsx_runtime.JSX.Element;
|
|
91
|
-
interface OneSendETHButtonProps extends Omit<OneTransactionButtonProps, 'data'> {
|
|
92
|
-
amount: string;
|
|
93
|
-
}
|
|
94
|
-
declare function OneSendETHButton({ amount, ...props }: OneSendETHButtonProps): react_jsx_runtime.JSX.Element;
|
|
95
|
-
interface OneApproveButtonProps extends Omit<OneTransactionButtonProps, 'to' | 'data' | 'value'> {
|
|
96
|
-
tokenAddress: string;
|
|
97
|
-
spenderAddress: string;
|
|
98
|
-
amount?: bigint;
|
|
99
|
-
}
|
|
100
|
-
declare function OneApproveButton({ tokenAddress, spenderAddress, amount, chain, ...props }: OneApproveButtonProps): react_jsx_runtime.JSX.Element;
|
|
101
|
-
|
|
102
|
-
interface OneSendWidgetProps {
|
|
103
|
-
defaultRecipient?: string;
|
|
104
|
-
defaultAmount?: string;
|
|
105
|
-
defaultChain?: Chain;
|
|
106
|
-
tokenAddress?: string;
|
|
107
|
-
tokenSymbol?: string;
|
|
108
|
-
tokenDecimals?: number;
|
|
109
|
-
theme?: 'light' | 'dark';
|
|
110
|
-
className?: string;
|
|
111
|
-
style?: React.CSSProperties;
|
|
112
|
-
onSuccess?: (txHash: string) => void;
|
|
113
|
-
onError?: (error: Error) => void;
|
|
114
|
-
onCancel?: () => void;
|
|
115
|
-
}
|
|
116
|
-
declare function OneSendWidget({ defaultRecipient, defaultAmount, defaultChain, tokenAddress, tokenSymbol, tokenDecimals, theme, className, style, onSuccess, onError, onCancel, }: OneSendWidgetProps): react_jsx_runtime.JSX.Element;
|
|
117
|
-
declare function OneSendETHWidget(props: Omit<OneSendWidgetProps, 'tokenAddress' | 'tokenSymbol' | 'tokenDecimals'>): react_jsx_runtime.JSX.Element;
|
|
118
|
-
declare function OneSendUSDCWidget(props: Omit<OneSendWidgetProps, 'tokenSymbol' | 'tokenDecimals'> & {
|
|
119
|
-
tokenAddress: string;
|
|
120
|
-
}): react_jsx_runtime.JSX.Element;
|
|
121
|
-
|
|
122
|
-
interface OneOnrampWidgetProps {
|
|
123
|
-
defaultFiat?: string;
|
|
124
|
-
defaultCrypto?: string;
|
|
125
|
-
defaultAmount?: number;
|
|
126
|
-
defaultNetwork?: string;
|
|
127
|
-
supportedFiats?: string[];
|
|
128
|
-
supportedCryptos?: string[];
|
|
129
|
-
supportedNetworks?: string[];
|
|
130
|
-
email?: string;
|
|
131
|
-
country?: string;
|
|
132
|
-
theme?: 'light' | 'dark';
|
|
133
|
-
accentColor?: string;
|
|
134
|
-
className?: string;
|
|
135
|
-
style?: React.CSSProperties;
|
|
136
|
-
mode?: 'form' | 'embed' | 'popup';
|
|
137
|
-
embedHeight?: number;
|
|
138
|
-
onSuccess?: (transaction: OnrampTransaction) => void;
|
|
139
|
-
onError?: (error: Error) => void;
|
|
140
|
-
onClose?: () => void;
|
|
141
|
-
onQuoteUpdate?: (quote: OnrampQuote) => void;
|
|
142
|
-
}
|
|
143
|
-
interface OnrampQuote {
|
|
144
|
-
fiatCurrency: string;
|
|
145
|
-
fiatAmount: number;
|
|
146
|
-
cryptoCurrency: string;
|
|
147
|
-
cryptoAmount: number;
|
|
148
|
-
network: string;
|
|
149
|
-
rate: number;
|
|
150
|
-
fees: {
|
|
151
|
-
network: number;
|
|
152
|
-
provider: number;
|
|
153
|
-
total: number;
|
|
154
|
-
};
|
|
155
|
-
estimatedTime: string;
|
|
156
|
-
}
|
|
157
|
-
interface OnrampTransaction {
|
|
158
|
-
id: string;
|
|
159
|
-
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
160
|
-
fiatCurrency: string;
|
|
161
|
-
fiatAmount: number;
|
|
162
|
-
cryptoCurrency: string;
|
|
163
|
-
cryptoAmount?: number;
|
|
164
|
-
walletAddress: string;
|
|
165
|
-
txHash?: string;
|
|
166
|
-
provider: string;
|
|
167
|
-
}
|
|
168
|
-
declare function OneOnrampWidget({ defaultFiat, defaultCrypto, defaultAmount, defaultNetwork, supportedFiats, supportedCryptos, supportedNetworks, email, country, theme, accentColor, className, style, mode, embedHeight, onSuccess, onError, onClose, onQuoteUpdate, }: OneOnrampWidgetProps): react_jsx_runtime.JSX.Element;
|
|
169
|
-
declare function OneBuyUSDTWidget(props: Omit<OneOnrampWidgetProps, 'defaultCrypto'>): react_jsx_runtime.JSX.Element;
|
|
170
|
-
declare function OneBuyUSDCWidget(props: Omit<OneOnrampWidgetProps, 'defaultCrypto'>): react_jsx_runtime.JSX.Element;
|
|
171
|
-
declare function OneBuyETHWidget(props: Omit<OneOnrampWidgetProps, 'defaultCrypto'>): react_jsx_runtime.JSX.Element;
|
|
172
|
-
declare function OneBuyBTCWidget(props: Omit<OneOnrampWidgetProps, 'defaultCrypto'>): react_jsx_runtime.JSX.Element;
|
|
173
|
-
|
|
174
|
-
interface OneOfframpWidgetProps {
|
|
175
|
-
defaultFiat?: string;
|
|
176
|
-
defaultCrypto?: string;
|
|
177
|
-
defaultAmount?: string;
|
|
178
|
-
defaultNetwork?: string;
|
|
179
|
-
supportedFiats?: string[];
|
|
180
|
-
supportedCryptos?: string[];
|
|
181
|
-
supportedNetworks?: string[];
|
|
182
|
-
email?: string;
|
|
183
|
-
country?: string;
|
|
184
|
-
theme?: 'light' | 'dark';
|
|
185
|
-
accentColor?: string;
|
|
186
|
-
className?: string;
|
|
187
|
-
style?: React.CSSProperties;
|
|
188
|
-
mode?: 'form' | 'embed' | 'popup';
|
|
189
|
-
embedHeight?: number;
|
|
190
|
-
onSuccess?: (transaction: OfframpTransaction) => void;
|
|
191
|
-
onError?: (error: Error) => void;
|
|
192
|
-
onClose?: () => void;
|
|
193
|
-
onQuoteUpdate?: (quote: OfframpQuote) => void;
|
|
194
|
-
}
|
|
195
|
-
interface OfframpQuote {
|
|
196
|
-
cryptoCurrency: string;
|
|
197
|
-
cryptoAmount: number;
|
|
198
|
-
fiatCurrency: string;
|
|
199
|
-
fiatAmount: number;
|
|
200
|
-
network: string;
|
|
201
|
-
rate: number;
|
|
202
|
-
fees: {
|
|
203
|
-
network: number;
|
|
204
|
-
provider: number;
|
|
205
|
-
total: number;
|
|
206
|
-
};
|
|
207
|
-
estimatedTime: string;
|
|
208
|
-
}
|
|
209
|
-
interface OfframpTransaction {
|
|
210
|
-
id: string;
|
|
211
|
-
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
212
|
-
cryptoCurrency: string;
|
|
213
|
-
cryptoAmount: number;
|
|
214
|
-
fiatCurrency: string;
|
|
215
|
-
fiatAmount?: number;
|
|
216
|
-
walletAddress: string;
|
|
217
|
-
txHash?: string;
|
|
218
|
-
provider: string;
|
|
219
|
-
}
|
|
220
|
-
declare function OneOfframpWidget({ defaultFiat, defaultCrypto, defaultAmount, defaultNetwork, supportedFiats, supportedCryptos, supportedNetworks, email, country, theme, accentColor, // Red for sell
|
|
221
|
-
className, style, mode, embedHeight, onSuccess, onError, onClose, onQuoteUpdate, }: OneOfframpWidgetProps): react_jsx_runtime.JSX.Element;
|
|
222
|
-
declare function OneSellUSDTWidget(props: Omit<OneOfframpWidgetProps, 'defaultCrypto'>): react_jsx_runtime.JSX.Element;
|
|
223
|
-
declare function OneSellUSDCWidget(props: Omit<OneOfframpWidgetProps, 'defaultCrypto'>): react_jsx_runtime.JSX.Element;
|
|
224
|
-
declare function OneSellETHWidget(props: Omit<OneOfframpWidgetProps, 'defaultCrypto'>): react_jsx_runtime.JSX.Element;
|
|
225
|
-
|
|
226
|
-
interface SwapToken {
|
|
227
|
-
address: string;
|
|
228
|
-
symbol: string;
|
|
229
|
-
name: string;
|
|
230
|
-
decimals: number;
|
|
231
|
-
logoURI?: string;
|
|
232
|
-
chainId: number;
|
|
233
|
-
}
|
|
234
|
-
interface SwapRoute {
|
|
235
|
-
provider: string;
|
|
236
|
-
fromChain: number;
|
|
237
|
-
toChain: number;
|
|
238
|
-
fromToken: SwapToken;
|
|
239
|
-
toToken: SwapToken;
|
|
240
|
-
fromAmount: string;
|
|
241
|
-
toAmount: string;
|
|
242
|
-
estimatedGas: string;
|
|
243
|
-
priceImpact: string;
|
|
244
|
-
executionTime: string;
|
|
245
|
-
steps: SwapStep[];
|
|
246
|
-
}
|
|
247
|
-
interface SwapStep {
|
|
248
|
-
type: 'swap' | 'bridge' | 'approve';
|
|
249
|
-
protocol: string;
|
|
250
|
-
fromToken: string;
|
|
251
|
-
toToken: string;
|
|
252
|
-
fromChain: number;
|
|
253
|
-
toChain: number;
|
|
254
|
-
}
|
|
255
|
-
interface OneSwapWidgetProps {
|
|
256
|
-
defaultFromToken?: SwapToken;
|
|
257
|
-
defaultToToken?: SwapToken;
|
|
258
|
-
defaultFromChain?: Chain;
|
|
259
|
-
defaultToChain?: Chain;
|
|
260
|
-
supportedChains?: Chain[];
|
|
261
|
-
tokens?: SwapToken[];
|
|
262
|
-
mode?: 'same-chain' | 'cross-chain' | 'auto';
|
|
263
|
-
theme?: 'light' | 'dark';
|
|
264
|
-
accentColor?: string;
|
|
265
|
-
className?: string;
|
|
266
|
-
style?: React.CSSProperties;
|
|
267
|
-
quoteEndpoint?: string;
|
|
268
|
-
executeEndpoint?: string;
|
|
269
|
-
onSwapSuccess?: (txHash: string, route?: SwapRoute) => void;
|
|
270
|
-
onSwapError?: (error: Error) => void;
|
|
271
|
-
onQuoteReceived?: (route: SwapRoute) => void;
|
|
272
|
-
onChainChange?: (fromChain: number, toChain: number) => void;
|
|
273
|
-
}
|
|
274
|
-
declare function OneSwapWidget({ defaultFromToken, defaultToToken, defaultFromChain, defaultToChain, supportedChains, tokens, mode, theme, accentColor, className, style, quoteEndpoint, executeEndpoint, onSwapSuccess, onSwapError, onQuoteReceived, onChainChange, }: OneSwapWidgetProps): react_jsx_runtime.JSX.Element;
|
|
275
|
-
declare function OneSameChainSwap(props: Omit<OneSwapWidgetProps, 'mode'>): react_jsx_runtime.JSX.Element;
|
|
276
|
-
declare function OneCrossChainSwap(props: Omit<OneSwapWidgetProps, 'mode'>): react_jsx_runtime.JSX.Element;
|
|
277
|
-
|
|
278
|
-
interface TokenBalance {
|
|
279
|
-
symbol: string;
|
|
280
|
-
name: string;
|
|
281
|
-
balance: string;
|
|
282
|
-
balanceFormatted: string;
|
|
283
|
-
balanceUsd: number;
|
|
284
|
-
price: number;
|
|
285
|
-
priceChange24h: number;
|
|
286
|
-
chainId: number;
|
|
287
|
-
chain: string;
|
|
288
|
-
contractAddress?: string;
|
|
289
|
-
logoURI?: string;
|
|
290
|
-
}
|
|
291
|
-
interface OneWalletBalanceProps {
|
|
292
|
-
showTotalBalance?: boolean;
|
|
293
|
-
showTokenList?: boolean;
|
|
294
|
-
showChainFilter?: boolean;
|
|
295
|
-
showPriceChange?: boolean;
|
|
296
|
-
chains?: Chain[];
|
|
297
|
-
balanceEndpoint?: string;
|
|
298
|
-
theme?: 'light' | 'dark';
|
|
299
|
-
className?: string;
|
|
300
|
-
style?: React.CSSProperties;
|
|
301
|
-
compact?: boolean;
|
|
302
|
-
onTokenClick?: (token: TokenBalance) => void;
|
|
303
|
-
onRefresh?: () => void;
|
|
304
|
-
}
|
|
305
|
-
declare function OneWalletBalance({ showTotalBalance, showTokenList, showChainFilter, showPriceChange, chains, balanceEndpoint, theme, className, style, compact, onTokenClick, onRefresh, }: OneWalletBalanceProps): react_jsx_runtime.JSX.Element;
|
|
306
|
-
declare function OneBalanceDisplay({ theme, className, style, }: Pick<OneWalletBalanceProps, 'theme' | 'className' | 'style'>): react_jsx_runtime.JSX.Element;
|
|
307
|
-
|
|
308
|
-
interface NFTItem {
|
|
309
|
-
id: string;
|
|
310
|
-
tokenId: string;
|
|
311
|
-
contractAddress: string;
|
|
312
|
-
name: string;
|
|
313
|
-
description?: string;
|
|
314
|
-
image?: string;
|
|
315
|
-
animationUrl?: string;
|
|
316
|
-
attributes?: Array<{
|
|
317
|
-
trait_type: string;
|
|
318
|
-
value: string | number;
|
|
319
|
-
}>;
|
|
320
|
-
chain: string;
|
|
321
|
-
chainId: number;
|
|
322
|
-
collection?: {
|
|
323
|
-
name: string;
|
|
324
|
-
image?: string;
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
interface OneNFTGalleryProps {
|
|
328
|
-
nfts?: NFTItem[];
|
|
329
|
-
fetchEndpoint?: string;
|
|
330
|
-
columns?: 2 | 3 | 4;
|
|
331
|
-
showCollection?: boolean;
|
|
332
|
-
showChain?: boolean;
|
|
333
|
-
theme?: 'light' | 'dark';
|
|
334
|
-
className?: string;
|
|
335
|
-
style?: React.CSSProperties;
|
|
336
|
-
onNFTClick?: (nft: NFTItem) => void;
|
|
337
|
-
onTransfer?: (nft: NFTItem) => void;
|
|
338
|
-
}
|
|
339
|
-
declare function OneNFTGallery({ nfts: propNfts, fetchEndpoint, columns, showCollection, showChain, theme, className, style, onNFTClick, onTransfer, }: OneNFTGalleryProps): react_jsx_runtime.JSX.Element;
|
|
340
|
-
|
|
341
|
-
interface OneReceiveWidgetProps {
|
|
342
|
-
chains?: Chain[];
|
|
343
|
-
defaultChain?: Chain;
|
|
344
|
-
showChainSelector?: boolean;
|
|
345
|
-
showCopyButton?: boolean;
|
|
346
|
-
showQRCode?: boolean;
|
|
347
|
-
theme?: 'light' | 'dark';
|
|
348
|
-
className?: string;
|
|
349
|
-
style?: React.CSSProperties;
|
|
350
|
-
qrSize?: number;
|
|
351
|
-
onCopy?: (address: string) => void;
|
|
352
|
-
onChainChange?: (chain: Chain) => void;
|
|
353
|
-
}
|
|
354
|
-
declare function OneReceiveWidget({ chains, defaultChain, showChainSelector, showCopyButton, showQRCode, theme, className, style, qrSize, onCopy, onChainChange, }: OneReceiveWidgetProps): react_jsx_runtime.JSX.Element;
|
|
355
|
-
|
|
356
|
-
export { type NFTItem, type OfframpQuote, type OfframpTransaction, OneApproveButton, type OneApproveButtonProps, OneBalanceDisplay, OneBuyBTCWidget, OneBuyETHWidget, OneBuyUSDCWidget, OneBuyUSDTWidget, OneConnectButton, OneConnectButtonFull, type OneConnectButtonProps, OneConnectButtonSimple, OneCrossChainSwap, OneCryptoOnlyPayWidget, OneDirectPayWidget, OneFiatOnlyPayWidget, OneFundWalletWidget, OneNFTGallery, type OneNFTGalleryProps, OneOfframpWidget, type OneOfframpWidgetProps, OneOnrampWidget, type OneOnrampWidgetProps, OnePayWidget, type OnePayWidgetProps, OneReceiveWidget, type OneReceiveWidgetProps, OneSameChainSwap, OneSellETHWidget, OneSellUSDCWidget, OneSellUSDTWidget, OneSendETHButton, type OneSendETHButtonProps, OneSendETHWidget, OneSendUSDCWidget, OneSendWidget, type OneSendWidgetProps, OneSwapWidget, type OneSwapWidgetProps, OneTransactionButton, type OneTransactionButtonProps, OneWalletBalance, type OneWalletBalanceProps, type PayMode, type SwapRoute, type SwapStep, type SwapToken, type TokenBalance };
|
|
20
|
+
import 'react/jsx-runtime';
|
|
21
|
+
import 'react';
|
|
22
|
+
import 'react-native';
|