@orbs-network/spot-react 1.1.22 → 1.1.23
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 +125 -32
- package/dist/spot-react/package.json.d.ts +2 -3
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +15 -4
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-spot.d.ts +2 -8
- package/dist/spot-react/src/hooks/use-spot.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -1
- package/dist/spot-react/src/index.d.ts +5 -2
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react/src/spot-context.d.ts.map +1 -1
- package/dist/spot-react/src/store.d.ts.map +1 -1
- package/dist/spot-react/src/types.d.ts +30 -35
- package/dist/spot-react/src/types.d.ts.map +1 -1
- package/dist/spot-react/src/utils.d.ts.map +1 -1
- package/dist/spot-react.js +6168 -53
- package/dist/spot-react.umd.cjs +10 -55
- package/package.json +2 -3
- package/dist/ccip-CcfZKtLa.js +0 -149
- package/dist/index-Ccepzg_Y.js +0 -37250
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts +0 -2
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install @orbs-network/spot-react
|
|
|
13
13
|
These must be installed in your application:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install @tanstack/react-query bignumber.js react-error-boundary
|
|
16
|
+
npm install @tanstack/react-query bignumber.js react-error-boundary zustand react react-dom
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
| Package | Version |
|
|
@@ -21,7 +21,6 @@ npm install @tanstack/react-query bignumber.js react-error-boundary viem zustand
|
|
|
21
21
|
| `@tanstack/react-query`| `^5.90.12` |
|
|
22
22
|
| `bignumber.js` | `^9.3.1` |
|
|
23
23
|
| `react-error-boundary` | `^6.0.0` |
|
|
24
|
-
| `viem` | `^2.43.3` |
|
|
25
24
|
| `zustand` | `^5.0.9` |
|
|
26
25
|
| `react` | `^18 \|\| ^19` |
|
|
27
26
|
| `react-dom` | `^18 \|\| ^19` |
|
|
@@ -34,28 +33,29 @@ import {
|
|
|
34
33
|
useSpot,
|
|
35
34
|
Module,
|
|
36
35
|
Partners,
|
|
36
|
+
type WalletInteractions,
|
|
37
37
|
} from "@orbs-network/spot-react";
|
|
38
38
|
|
|
39
39
|
function App() {
|
|
40
40
|
return (
|
|
41
41
|
<SpotProvider
|
|
42
|
-
chainId={137}
|
|
43
|
-
|
|
44
|
-
account={walletAddress}
|
|
45
|
-
partner={Partners.Quick}
|
|
46
|
-
module={Module.TWAP}
|
|
47
|
-
typedInputAmount={inputAmount}
|
|
48
|
-
priceProtection={0.5}
|
|
49
|
-
minChunkSizeUsd={5}
|
|
50
|
-
srcToken={srcToken}
|
|
42
|
+
chainId={137} // Polygon
|
|
43
|
+
walletInteractions={walletInteractions} // Wallet interaction handlers
|
|
44
|
+
account={walletAddress} // Connected wallet address
|
|
45
|
+
partner={Partners.Quick} // DEX partner
|
|
46
|
+
module={Module.TWAP} // Order type
|
|
47
|
+
typedInputAmount={inputAmount} // User-typed amount (string)
|
|
48
|
+
priceProtection={0.5} // Slippage tolerance %
|
|
49
|
+
minChunkSizeUsd={5} // Min chunk size in USD
|
|
50
|
+
srcToken={srcToken} // { address, symbol, decimals, logoUrl }
|
|
51
51
|
dstToken={dstToken}
|
|
52
|
-
srcBalance={srcBalanceWei}
|
|
52
|
+
srcBalance={srcBalanceWei} // Balance in wei (string)
|
|
53
53
|
dstBalance={dstBalanceWei}
|
|
54
|
-
srcUsd1Token={srcUsdPrice}
|
|
54
|
+
srcUsd1Token={srcUsdPrice} // USD price of 1 token (string)
|
|
55
55
|
dstUsd1Token={dstUsdPrice}
|
|
56
|
-
marketReferencePrice={marketPrice}
|
|
57
|
-
callbacks={callbacks}
|
|
58
|
-
fees={0.25}
|
|
56
|
+
marketReferencePrice={marketPrice} // { value?: string, isLoading?: boolean }
|
|
57
|
+
callbacks={callbacks} // Lifecycle event handlers
|
|
58
|
+
fees={0.25} // Fee percentage
|
|
59
59
|
>
|
|
60
60
|
<SwapForm />
|
|
61
61
|
</SpotProvider>
|
|
@@ -63,6 +63,90 @@ function App() {
|
|
|
63
63
|
}
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
+
## WalletInteractions
|
|
67
|
+
|
|
68
|
+
The host app provides wallet interaction handlers via the `walletInteractions` prop. This keeps spot-react wallet-agnostic — it works with viem, ethers, web3.js, or any wallet library.
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
const walletInteractions: WalletInteractions = {
|
|
72
|
+
// Wrap native token (e.g. ETH -> WETH). Wait for receipt, return tx hash.
|
|
73
|
+
wrapNativeToken: async (amountWei) => { ... },
|
|
74
|
+
|
|
75
|
+
// Approve ERC-20 token spending. Wait for receipt, return tx hash.
|
|
76
|
+
approveToken: async ({ token, amount, spender }) => { ... },
|
|
77
|
+
|
|
78
|
+
// Cancel an order on-chain. Wait for receipt, return tx hash.
|
|
79
|
+
cancelOrder: async ({ order, contractAddress, args }) => { ... },
|
|
80
|
+
|
|
81
|
+
// Sign EIP-712 typed data for order creation. Return signature hex.
|
|
82
|
+
signOrder: async ({ domain, types, primaryType, message, account }) => { ... },
|
|
83
|
+
|
|
84
|
+
// Read ERC-20 allowance. Return allowance as string.
|
|
85
|
+
getAllowance: async ({ tokenAddress, spenderAddress }) => { ... },
|
|
86
|
+
};
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Each write method (`wrapNativeToken`, `approveToken`, `cancelOrder`) should wait for tx confirmation and throw if the transaction reverts.
|
|
90
|
+
|
|
91
|
+
### Example with viem/wagmi
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { erc20Abi } from "viem";
|
|
95
|
+
|
|
96
|
+
const walletInteractions: WalletInteractions = {
|
|
97
|
+
wrapNativeToken: async (amountWei) => {
|
|
98
|
+
const hash = await walletClient.writeContract({
|
|
99
|
+
abi: [{ name: "deposit", type: "function", stateMutability: "payable", inputs: [], outputs: [] }],
|
|
100
|
+
functionName: "deposit",
|
|
101
|
+
address: wTokenAddress,
|
|
102
|
+
args: [],
|
|
103
|
+
value: BigInt(amountWei),
|
|
104
|
+
chain: walletClient.chain,
|
|
105
|
+
account: walletClient.account!,
|
|
106
|
+
});
|
|
107
|
+
await publicClient.waitForTransactionReceipt({ hash, confirmations: 2 });
|
|
108
|
+
return hash;
|
|
109
|
+
},
|
|
110
|
+
approveToken: async ({ token, spender }) => {
|
|
111
|
+
const maxUint256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
|
112
|
+
const hash = await walletClient.writeContract({
|
|
113
|
+
abi: erc20Abi,
|
|
114
|
+
functionName: "approve",
|
|
115
|
+
address: token as `0x${string}`,
|
|
116
|
+
args: [spender as `0x${string}`, maxUint256],
|
|
117
|
+
chain: walletClient.chain,
|
|
118
|
+
account: walletClient.account!,
|
|
119
|
+
});
|
|
120
|
+
await publicClient.waitForTransactionReceipt({ hash, confirmations: 2 });
|
|
121
|
+
return hash;
|
|
122
|
+
},
|
|
123
|
+
cancelOrder: async ({ order, contractAddress, args }) => {
|
|
124
|
+
const hash = await walletClient.writeContract({
|
|
125
|
+
abi: cancelAbi, // TWAP_ABI for v1, REPERMIT_ABI for v2
|
|
126
|
+
functionName: "cancel",
|
|
127
|
+
address: contractAddress as `0x${string}`,
|
|
128
|
+
args: args as any,
|
|
129
|
+
chain: walletClient.chain,
|
|
130
|
+
account: walletClient.account!,
|
|
131
|
+
});
|
|
132
|
+
await publicClient.waitForTransactionReceipt({ hash, confirmations: 2 });
|
|
133
|
+
return hash;
|
|
134
|
+
},
|
|
135
|
+
signOrder: async ({ domain, types, primaryType, message, account }) => {
|
|
136
|
+
return walletClient.signTypedData({ domain, types, primaryType, message, account });
|
|
137
|
+
},
|
|
138
|
+
getAllowance: async ({ tokenAddress, spenderAddress }) => {
|
|
139
|
+
const result = await publicClient.readContract({
|
|
140
|
+
address: tokenAddress as `0x${string}`,
|
|
141
|
+
abi: erc20Abi,
|
|
142
|
+
functionName: "allowance",
|
|
143
|
+
args: [walletClient.account!.address, spenderAddress as `0x${string}`],
|
|
144
|
+
});
|
|
145
|
+
return String(result);
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
```
|
|
149
|
+
|
|
66
150
|
## SpotProvider Props
|
|
67
151
|
|
|
68
152
|
| Prop | Type | Required | Description |
|
|
@@ -73,19 +157,19 @@ function App() {
|
|
|
73
157
|
| `priceProtection` | `number` | Yes | Slippage tolerance percentage |
|
|
74
158
|
| `minChunkSizeUsd` | `number` | Yes | Minimum trade chunk size in USD |
|
|
75
159
|
| `marketReferencePrice` | `MarketReferencePrice` | Yes | `{ value?: string, isLoading?: boolean, noLiquidity?: boolean }` |
|
|
160
|
+
| `walletInteractions` | `WalletInteractions` | Yes | Wallet interaction handlers |
|
|
76
161
|
| `chainId` | `number` | No | Connected chain ID |
|
|
77
|
-
| `provider` | `Provider` | No | EIP-1193 wallet provider |
|
|
78
162
|
| `account` | `string` | No | Connected wallet address |
|
|
79
|
-
| `srcToken` | `Token` | No |
|
|
80
|
-
| `dstToken` | `Token` | No |
|
|
163
|
+
| `srcToken` | `Token` | No | `{ address, symbol, decimals, logoUrl }` |
|
|
164
|
+
| `dstToken` | `Token` | No | `{ address, symbol, decimals, logoUrl }` |
|
|
81
165
|
| `srcBalance` | `string` | No | Source balance in wei |
|
|
82
166
|
| `dstBalance` | `string` | No | Destination balance in wei |
|
|
83
167
|
| `srcUsd1Token` | `string` | No | USD price of 1 source token |
|
|
84
168
|
| `dstUsd1Token` | `string` | No | USD price of 1 destination token |
|
|
85
169
|
| `callbacks` | `Callbacks` | No | Lifecycle event handlers |
|
|
86
|
-
| `fees` | `number` | No | Fee percentage |
|
|
170
|
+
| `fees` | `number` | No | Fee percentage (e.g. 0.25) |
|
|
87
171
|
| `isDev` | `boolean` | No | Enable dev mode |
|
|
88
|
-
| `overrides` | `Overrides` | No |
|
|
172
|
+
| `overrides` | `Overrides` | No | Initial state overrides |
|
|
89
173
|
|
|
90
174
|
## useSpot() Hook
|
|
91
175
|
|
|
@@ -114,7 +198,6 @@ const spot = useSpot();
|
|
|
114
198
|
| `spot.derivedFormData` | Computed values: amounts, prices, deadline, fees |
|
|
115
199
|
| `spot.supportedChains` | Partner's supported chain IDs |
|
|
116
200
|
| `spot.module` | Current `Module` enum |
|
|
117
|
-
| `spot.mutations` | `{ cancelOrder, signOrder, submitOrder }` |
|
|
118
201
|
|
|
119
202
|
### Order Execution Panel
|
|
120
203
|
|
|
@@ -135,6 +218,22 @@ const {
|
|
|
135
218
|
} = useSpot().orderExecutionPanel;
|
|
136
219
|
```
|
|
137
220
|
|
|
221
|
+
### Cancel Order
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
import { useCancelOrder } from "@orbs-network/spot-react";
|
|
225
|
+
|
|
226
|
+
// Inside a component rendered within SpotProvider:
|
|
227
|
+
const { cancelOrder, isLoading, isSuccess, isError, error, txHash } = useCancelOrder(order);
|
|
228
|
+
|
|
229
|
+
// Cancel the order
|
|
230
|
+
await cancelOrder();
|
|
231
|
+
|
|
232
|
+
// Or use getCancelStatus for any order by ID:
|
|
233
|
+
const { getCancelStatus } = useCancelOrder();
|
|
234
|
+
const status = getCancelStatus(orderId); // { status, txHash?, error? } | undefined
|
|
235
|
+
```
|
|
236
|
+
|
|
138
237
|
## Callbacks
|
|
139
238
|
|
|
140
239
|
Pass lifecycle callbacks to `SpotProvider` for wallet notifications:
|
|
@@ -160,9 +259,9 @@ const callbacks: Callbacks = {
|
|
|
160
259
|
onSubmitOrderFailed: ({ code, message }) => {},
|
|
161
260
|
onSubmitOrderRejected: () => {},
|
|
162
261
|
|
|
163
|
-
// Order
|
|
164
|
-
onCancelOrderRequest: (
|
|
165
|
-
onCancelOrderSuccess: ({
|
|
262
|
+
// Order cancellation
|
|
263
|
+
onCancelOrderRequest: (order) => {},
|
|
264
|
+
onCancelOrderSuccess: ({ order, txHash, explorerUrl }) => {},
|
|
166
265
|
onCancelOrderFailed: (error) => {},
|
|
167
266
|
|
|
168
267
|
// Progress (good place to refetch balances)
|
|
@@ -202,8 +301,6 @@ The SDK returns string keys for user-facing messages. You should resolve these t
|
|
|
202
301
|
- `"minFillDelayError"` / `"maxFillDelayError"` (args: `{ fillDelay }`)
|
|
203
302
|
- `"noLiquidity"`
|
|
204
303
|
|
|
205
|
-
See `integration-example.tsx` for a full working reference.
|
|
206
|
-
|
|
207
304
|
## Order Types
|
|
208
305
|
|
|
209
306
|
| Module | Description |
|
|
@@ -248,15 +345,11 @@ import {
|
|
|
248
345
|
|
|
249
346
|
## Overrides
|
|
250
347
|
|
|
251
|
-
For
|
|
348
|
+
For initial form state, pass `overrides` to `SpotProvider`:
|
|
252
349
|
|
|
253
350
|
```tsx
|
|
254
351
|
<SpotProvider
|
|
255
352
|
overrides={{
|
|
256
|
-
wrap: async (amountWei) => txHash,
|
|
257
|
-
approveOrder: async ({ tokenAddress, amount, spenderAddress }) => txHash,
|
|
258
|
-
createOrder: async ({ contractAddress, abi, functionName, args }) => txHash,
|
|
259
|
-
getAllowance: async ({ tokenAddress, spenderAddress }) => allowanceString,
|
|
260
353
|
state: {
|
|
261
354
|
isMarketOrder: false,
|
|
262
355
|
chunks: 10,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"name": "@orbs-network/spot-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"description": "Spot React Components - React components for Spot SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/spot-react.umd.cjs",
|
|
@@ -38,8 +38,7 @@ declare const _default: {
|
|
|
38
38
|
"zustand": "^5.0.9"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@orbs-network/spot-ui": "workspace:*"
|
|
42
|
-
"viem": "^2.43.3"
|
|
41
|
+
"@orbs-network/spot-ui": "workspace:*"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
44
|
"@types/react": "^19.0.2",
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
import { SwapStatus } from '../types';
|
|
1
2
|
import { Order } from '../../../spot-ui/src/index.ts';
|
|
2
|
-
export declare const useCancelOrderRefetchUntilStatusSynced: () => import('@tanstack/react-query').UseMutationResult<void, Error, string
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare const useCancelOrderRefetchUntilStatusSynced: () => import('@tanstack/react-query').UseMutationResult<void, Error, string, unknown>;
|
|
4
|
+
export type CancelOrderStatus = {
|
|
5
|
+
status: SwapStatus;
|
|
6
|
+
txHash?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const useCancelOrder: (order?: Order) => {
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
isSuccess: boolean;
|
|
12
|
+
isError: boolean;
|
|
13
|
+
error: string | undefined;
|
|
14
|
+
txHash: string | undefined;
|
|
15
|
+
cancelOrder: () => Promise<`0x${string}` | undefined>;
|
|
16
|
+
};
|
|
6
17
|
//# sourceMappingURL=use-cancel-order.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-cancel-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-cancel-order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-cancel-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-cancel-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAa,KAAK,EAAe,MAAM,uBAAuB,CAAC;AAUtE,eAAO,MAAM,sCAAsC,uFAwBlD,CAAC;AAuBF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAQ,KAAK;;;;;;;CAqF3C,CAAC"}
|
|
@@ -12,8 +12,7 @@ import { useSubmitOrderButton, useSubmitOrderPanel } from './use-submit-order-pa
|
|
|
12
12
|
import { useFormData } from './use-form-data';
|
|
13
13
|
import { useOrderHistoryPanel } from './order-hooks';
|
|
14
14
|
import { usePartnerChains } from './use-partner-chains';
|
|
15
|
-
import {
|
|
16
|
-
import { useSignOrder, useSubmitOrderMutation } from './use-submit-order';
|
|
15
|
+
import { useCancelOrderRefetchUntilStatusSynced } from './use-cancel-order';
|
|
17
16
|
import { Module } from '../../../spot-ui/src/index.ts';
|
|
18
17
|
type SpotData = {
|
|
19
18
|
tradesAmountPanel: ReturnType<typeof useTradesPanel>;
|
|
@@ -31,12 +30,7 @@ type SpotData = {
|
|
|
31
30
|
derivedFormData: ReturnType<typeof useFormData>;
|
|
32
31
|
supportedChains: ReturnType<typeof usePartnerChains>;
|
|
33
32
|
module: Module;
|
|
34
|
-
|
|
35
|
-
cancelOrder: ReturnType<typeof useCancelOrderMutation>;
|
|
36
|
-
signOrder: ReturnType<typeof useSignOrder>;
|
|
37
|
-
submitOrder: ReturnType<typeof useSubmitOrderMutation>;
|
|
38
|
-
refetchUntilStatusSynced: ReturnType<typeof useCancelOrderRefetchUntilStatusSynced>;
|
|
39
|
-
};
|
|
33
|
+
refetchUntilStatusSynced: ReturnType<typeof useCancelOrderRefetchUntilStatusSynced>;
|
|
40
34
|
};
|
|
41
35
|
export declare const SpotDataProvider: ({ children, }: {
|
|
42
36
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-spot.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-spot.tsx"],"names":[],"mappings":"AAAA,OAAO,
|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D,UAAU,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IAC7C,aAAa,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACnD,eAAe,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IAClD,UAAU,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC9C,iBAAiB,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IAC3D,iBAAiB,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IAC3D,mBAAmB,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC5D,eAAe,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IAChD,eAAe,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB,EAAE,UAAU,CAClC,OAAO,sCAAsC,CAC9C,CAAC;CACH,CAAC;AAIF,eAAO,MAAM,gBAAgB,GAAI,eAE9B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,4CA0CA,CAAC;AAEF,eAAO,MAAM,OAAO,gBAMnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-submit-order-panel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-submit-order-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAStC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-submit-order-panel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-submit-order-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAStC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;CAmC/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;CAsChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-submit-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-submit-order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-submit-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-submit-order.ts"],"names":[],"mappings":"AAwFA,eAAO,MAAM,YAAY,sHAmDxB,CAAC;AAiKF,eAAO,MAAM,sBAAsB,sHA+GlC,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { SpotProvider } from './spot-context';
|
|
2
2
|
import { useDerivedHistoryOrder } from './hooks/use-history-order';
|
|
3
3
|
import { useSpot } from './hooks/use-spot';
|
|
4
|
+
import { useCancelOrder } from './hooks/use-cancel-order';
|
|
5
|
+
import { useSignOrder, useSubmitOrderMutation } from './hooks/use-submit-order';
|
|
4
6
|
export * from './types';
|
|
5
7
|
export * from './utils';
|
|
6
8
|
export { useAmountUi, useExplorerLink, useNetwork } from './hooks/helper-hooks';
|
|
7
9
|
export { useSwapExecution } from './hooks/use-swap-execution';
|
|
8
|
-
export { type
|
|
9
|
-
export {
|
|
10
|
+
export { type CancelOrderStatus } from './hooks/use-cancel-order';
|
|
11
|
+
export { type Config, type SpotConfig, type TimeDuration, type PartnerPayloadItem, type RePermitOrder, type Signature, type Address, type Hex, type InputError, Module, OrderStatus, OrderFilter, OrderType, TimeUnit, Partners, InputErrors, getConfig, getPartners, getMinChunkSizeUsd, buildRePermitOrderData, submitOrder, getNetwork, getPartnerChains, isNativeAddress, eqIgnoreCase, getOrderExecutionRate, getOrderLimitPriceRate, getOrderFillDelayMillis, getTriggerPriceRate, SPOT_VERSION, DISCLAIMER_URL, ORBS_TWAP_FAQ_URL, ORBS_SLTP_FAQ_URL, ORBS_LOGO, ORBS_WEBSITE_URL, networks, } from '../../spot-ui/src/index.ts';
|
|
12
|
+
export { SpotProvider, useSpot, useDerivedHistoryOrder, useCancelOrder, useSignOrder, useSubmitOrderMutation as useSubmitOrder };
|
|
10
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAChF,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAOlE,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,UAAU,EAGf,MAAM,EACN,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,WAAW,EAGX,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EAGnB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,QAAQ,GAGT,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,YAAY,EACZ,OAAO,EACP,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,sBAAsB,IAAI,cAAc,EACzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spot-context.d.ts","sourceRoot":"","sources":["../../../src/spot-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAU7E,OAAO,EACL,SAAS,EACT,eAAe,
|
|
1
|
+
{"version":3,"file":"spot-context.d.ts","sourceRoot":"","sources":["../../../src/spot-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAU7E,OAAO,EACL,SAAS,EACT,eAAe,EAEhB,MAAM,SAAS,CAAC;AAoCjB,eAAO,MAAM,WAAW,uCAA8C,CAAC;AAqLvE,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,4CAM5C,CAAC;AAEF,eAAO,MAAM,cAAc,uBAM1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,SAAS;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC7C,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC,0BAA0B,EAAE,CAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,KAC1B,IAAI,CAAC;IACV,KAAK,EAAE,KAAK,CAAC;CACd;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,SAAS;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC7C,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC,0BAA0B,EAAE,CAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,KAC1B,IAAI,CAAC;IACV,KAAK,EAAE,KAAK,CAAC;CACd;AAWD,eAAO,MAAM,YAAY,wEA+BtB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Partners, Module, Order, SpotConfig, TimeDuration } from '../../spot-ui/src/index.ts';
|
|
2
|
-
import { createPublicClient, createWalletClient, Abi } from 'viem';
|
|
3
2
|
export declare enum SwapStatus {
|
|
4
3
|
LOADING = 1,
|
|
5
4
|
SUCCESS = 2,
|
|
@@ -7,29 +6,29 @@ export declare enum SwapStatus {
|
|
|
7
6
|
}
|
|
8
7
|
export type { Order } from '../../spot-ui/src/index.ts';
|
|
9
8
|
export { OrderStatus, type OrderFill, OrderType, Module } from '../../spot-ui/src/index.ts';
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export type ApproveProps = {
|
|
17
|
-
tokenAddress: string;
|
|
18
|
-
amount: bigint;
|
|
19
|
-
spenderAddress: string;
|
|
20
|
-
};
|
|
21
|
-
export type CreateOrderProps = {
|
|
22
|
-
contractAddress: string;
|
|
23
|
-
abi: Abi;
|
|
24
|
-
functionName: string;
|
|
25
|
-
args: [string[]];
|
|
9
|
+
export type SignOrderProps = {
|
|
10
|
+
domain: Record<string, unknown>;
|
|
11
|
+
types: Record<string, unknown[]>;
|
|
12
|
+
primaryType: string;
|
|
13
|
+
message: Record<string, unknown>;
|
|
14
|
+
account: `0x${string}`;
|
|
26
15
|
};
|
|
27
16
|
export type CancelOrderProps = {
|
|
17
|
+
order: Order;
|
|
28
18
|
contractAddress: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
args: string[] | string[][];
|
|
20
|
+
};
|
|
21
|
+
export type ApproveTokenProps = {
|
|
22
|
+
tokenAddress: string;
|
|
23
|
+
amount: string;
|
|
24
|
+
spenderAddress: string;
|
|
25
|
+
};
|
|
26
|
+
export type WalletInteractions = {
|
|
27
|
+
cancelOrder: (props: CancelOrderProps) => Promise<`0x${string}`>;
|
|
28
|
+
signOrder: (props: SignOrderProps) => Promise<`0x${string}`>;
|
|
29
|
+
wrapNativeToken: (amount: string) => Promise<`0x${string}`>;
|
|
30
|
+
approveToken: (props: ApproveTokenProps) => Promise<`0x${string}`>;
|
|
31
|
+
getAllowance: (props: GetAllowanceProps) => Promise<string>;
|
|
33
32
|
};
|
|
34
33
|
export type GetAllowanceProps = {
|
|
35
34
|
tokenAddress: string;
|
|
@@ -51,10 +50,6 @@ export declare enum Disclaimer {
|
|
|
51
50
|
LIMIT_PRICE = "limitOrderDisclaimer"
|
|
52
51
|
}
|
|
53
52
|
export type Overrides = {
|
|
54
|
-
wrap?: (amountWei: string) => Promise<`0x${string}`>;
|
|
55
|
-
approveOrder?: (props: ApproveProps) => Promise<`0x${string}`>;
|
|
56
|
-
createOrder?: (props: CreateOrderProps) => Promise<`0x${string}`>;
|
|
57
|
-
getAllowance?: (props: GetAllowanceProps) => Promise<string>;
|
|
58
53
|
state?: Partial<InitialState>;
|
|
59
54
|
};
|
|
60
55
|
export type OnApproveSuccessCallback = {
|
|
@@ -69,8 +64,8 @@ export type OnWrapSuccessCallback = {
|
|
|
69
64
|
amount: string;
|
|
70
65
|
};
|
|
71
66
|
export type OnCancelOrderSuccess = {
|
|
72
|
-
|
|
73
|
-
txHash: string
|
|
67
|
+
order: Order;
|
|
68
|
+
txHash: `0x${string}`;
|
|
74
69
|
explorerUrl: string;
|
|
75
70
|
};
|
|
76
71
|
export type ParsedError = {
|
|
@@ -78,7 +73,7 @@ export type ParsedError = {
|
|
|
78
73
|
code: number;
|
|
79
74
|
};
|
|
80
75
|
export type Callbacks = {
|
|
81
|
-
onCancelOrderRequest?: (
|
|
76
|
+
onCancelOrderRequest?: (order: Order) => void;
|
|
82
77
|
onCancelOrderSuccess?: (props: OnCancelOrderSuccess) => void;
|
|
83
78
|
onCancelOrderFailed?: (error: Error) => void;
|
|
84
79
|
onOrdersProgressUpdate?: (orders: Order[]) => void;
|
|
@@ -109,7 +104,7 @@ export type MarketReferencePrice = {
|
|
|
109
104
|
};
|
|
110
105
|
export interface SpotProps {
|
|
111
106
|
children?: React.ReactNode;
|
|
112
|
-
|
|
107
|
+
walletInteractions: WalletInteractions;
|
|
113
108
|
chainId?: number;
|
|
114
109
|
account?: string;
|
|
115
110
|
enableQueryParams?: boolean;
|
|
@@ -131,8 +126,7 @@ export interface SpotProps {
|
|
|
131
126
|
isDev?: boolean;
|
|
132
127
|
}
|
|
133
128
|
export interface SpotContextType {
|
|
134
|
-
|
|
135
|
-
publicClient?: PublicClient;
|
|
129
|
+
walletInteractions?: WalletInteractions;
|
|
136
130
|
marketPrice?: string;
|
|
137
131
|
marketPriceLoading?: boolean;
|
|
138
132
|
account?: `0x${string}`;
|
|
@@ -196,10 +190,11 @@ export interface State {
|
|
|
196
190
|
limitPricePercent?: string | null;
|
|
197
191
|
isMarketOrder?: boolean;
|
|
198
192
|
currentTime: number;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
193
|
+
cancelOrders: Record<string, {
|
|
194
|
+
status: SwapStatus;
|
|
195
|
+
txHash?: string;
|
|
196
|
+
error?: string;
|
|
197
|
+
}>;
|
|
203
198
|
swapExecutions: SwapExecution[];
|
|
204
199
|
swapExecutionIndex: number;
|
|
205
200
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1F,oBAAY,UAAU;IACpB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AACD,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1F,oBAAY,UAAU;IACpB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AACD,YAAY,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIvF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;CACxB,CAAC;AAGF,MAAM,MAAM,gBAAgB,GAAG;I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IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;QAC3B,MAAM,EAAE,UAAU,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IAEH,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EACL,YAAY,EAEZ,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,EAAE,WAAW,MAAM,WAG5D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,EAAE,WAAW,MAAM,WAQ3D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,GAAG,kDAWrC,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,OAAO,GAAG,QAOtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,EAAE,SAAS,MAAM;;;;;CAO/D,CAAC;AAEF,wBAAgB,YAAY,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED,wBAAgB,eAAe,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED,eAAO,MAAM,YAAY,GAAI,eAAe,OAAO,EAAE,QAAQ,MAAM,mEAQlE,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,WAAW,KAAK,EAChB,WAAW,KAAK,EAChB,UAAU,MAAM,YAOjB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,WAAW,KAAK,EAChB,WAAW,KAAK,EAChB,UAAU,MAAM,YAOjB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAEzC,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,WAI9D,CAAC"}
|