@shogun-sdk/swap 0.0.2-test → 0.0.2-test.10
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/dist/core.cjs +153 -45
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +145 -38
- package/dist/{execute-FaLLPp1i.d.cts → execute-DEFbp1WZ.d.cts} +13 -5
- package/dist/{execute-HX1fQ7wG.d.ts → execute-St0oo8GR.d.ts} +13 -5
- package/dist/index.cjs +190 -1557
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +216 -1597
- package/dist/react.cjs +197 -1564
- package/dist/react.d.cts +6 -40
- package/dist/react.d.ts +6 -40
- package/dist/react.js +218 -1599
- package/package.json +7 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainID, QuoteResponse, TokenSearchResponse as TokenSearchResponse$1, TokenInfo as TokenInfo$1 } from '@shogun-sdk/intents-sdk';
|
|
1
|
+
import { ChainID, QuoteResponse, TokenSearchResponse as TokenSearchResponse$1, TokenInfo as TokenInfo$1, ChainOrderStatus } from '@shogun-sdk/intents-sdk';
|
|
2
2
|
import { WalletClient } from 'viem';
|
|
3
3
|
import { A as AdaptedWallet } from './wallet-MmUIz8GE.cjs';
|
|
4
4
|
|
|
@@ -65,7 +65,7 @@ type SwapQuoteResponse = {
|
|
|
65
65
|
warning?: string;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
type Stage = 'processing' | 'approving' | 'approved' | 'signing' | 'submitting' | 'success' | 'error';
|
|
68
|
+
type Stage = 'processing' | 'approving' | 'approved' | 'signing' | 'submitting' | 'initiated' | 'shogun_processing' | 'success' | 'error';
|
|
69
69
|
type PlaceOrderResult = {
|
|
70
70
|
status: boolean;
|
|
71
71
|
txHash?: string;
|
|
@@ -109,6 +109,13 @@ interface BalanceResponse {
|
|
|
109
109
|
type TokenSearchResponse = TokenSearchResponse$1;
|
|
110
110
|
type TokenInfo = TokenInfo$1;
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Types representing the structure of user orders and polling results.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
type OrderStatus = ChainOrderStatus | "Timeout" | "NotFound";
|
|
117
|
+
type PollResult = OrderStatus;
|
|
118
|
+
|
|
112
119
|
/**
|
|
113
120
|
* Executes a swap order on the correct chain (EVM or Solana).
|
|
114
121
|
*
|
|
@@ -135,13 +142,14 @@ declare function executeOrder({ quote, accountAddress, recipientAddress, wallet,
|
|
|
135
142
|
};
|
|
136
143
|
}): Promise<{
|
|
137
144
|
status: boolean;
|
|
138
|
-
|
|
145
|
+
orderId: string;
|
|
139
146
|
chainId: number;
|
|
140
|
-
|
|
147
|
+
finalStatus: PollResult;
|
|
148
|
+
stage: Stage;
|
|
141
149
|
} | {
|
|
142
150
|
status: boolean;
|
|
143
151
|
message: string;
|
|
144
152
|
stage: string;
|
|
145
153
|
}>;
|
|
146
154
|
|
|
147
|
-
export { type BalanceRequestParams as B, type PlaceOrderResult as P, type QuoteTokenInfo as Q, type SwapQuoteParams as S, type TokenBalance as T, type SwapQuoteResponse as a, type Stage as b, type BalanceResponse as c, type TokenSearchResponse as d, executeOrder as e, type TokenInfo as f };
|
|
155
|
+
export { type BalanceRequestParams as B, type PlaceOrderResult as P, type QuoteTokenInfo as Q, type SwapQuoteParams as S, type TokenBalance as T, type SwapQuoteResponse as a, type Stage as b, type BalanceResponse as c, type TokenSearchResponse as d, executeOrder as e, type TokenInfo as f, type PollResult as g };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainID, QuoteResponse, TokenSearchResponse as TokenSearchResponse$1, TokenInfo as TokenInfo$1 } from '@shogun-sdk/intents-sdk';
|
|
1
|
+
import { ChainID, QuoteResponse, TokenSearchResponse as TokenSearchResponse$1, TokenInfo as TokenInfo$1, ChainOrderStatus } from '@shogun-sdk/intents-sdk';
|
|
2
2
|
import { WalletClient } from 'viem';
|
|
3
3
|
import { A as AdaptedWallet } from './wallet-MmUIz8GE.js';
|
|
4
4
|
|
|
@@ -65,7 +65,7 @@ type SwapQuoteResponse = {
|
|
|
65
65
|
warning?: string;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
type Stage = 'processing' | 'approving' | 'approved' | 'signing' | 'submitting' | 'success' | 'error';
|
|
68
|
+
type Stage = 'processing' | 'approving' | 'approved' | 'signing' | 'submitting' | 'initiated' | 'shogun_processing' | 'success' | 'error';
|
|
69
69
|
type PlaceOrderResult = {
|
|
70
70
|
status: boolean;
|
|
71
71
|
txHash?: string;
|
|
@@ -109,6 +109,13 @@ interface BalanceResponse {
|
|
|
109
109
|
type TokenSearchResponse = TokenSearchResponse$1;
|
|
110
110
|
type TokenInfo = TokenInfo$1;
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Types representing the structure of user orders and polling results.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
type OrderStatus = ChainOrderStatus | "Timeout" | "NotFound";
|
|
117
|
+
type PollResult = OrderStatus;
|
|
118
|
+
|
|
112
119
|
/**
|
|
113
120
|
* Executes a swap order on the correct chain (EVM or Solana).
|
|
114
121
|
*
|
|
@@ -135,13 +142,14 @@ declare function executeOrder({ quote, accountAddress, recipientAddress, wallet,
|
|
|
135
142
|
};
|
|
136
143
|
}): Promise<{
|
|
137
144
|
status: boolean;
|
|
138
|
-
|
|
145
|
+
orderId: string;
|
|
139
146
|
chainId: number;
|
|
140
|
-
|
|
147
|
+
finalStatus: PollResult;
|
|
148
|
+
stage: Stage;
|
|
141
149
|
} | {
|
|
142
150
|
status: boolean;
|
|
143
151
|
message: string;
|
|
144
152
|
stage: string;
|
|
145
153
|
}>;
|
|
146
154
|
|
|
147
|
-
export { type BalanceRequestParams as B, type PlaceOrderResult as P, type QuoteTokenInfo as Q, type SwapQuoteParams as S, type TokenBalance as T, type SwapQuoteResponse as a, type Stage as b, type BalanceResponse as c, type TokenSearchResponse as d, executeOrder as e, type TokenInfo as f };
|
|
155
|
+
export { type BalanceRequestParams as B, type PlaceOrderResult as P, type QuoteTokenInfo as Q, type SwapQuoteParams as S, type TokenBalance as T, type SwapQuoteResponse as a, type Stage as b, type BalanceResponse as c, type TokenSearchResponse as d, executeOrder as e, type TokenInfo as f, type PollResult as g };
|