@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.
@@ -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
- txHash: string;
145
+ orderId: string;
139
146
  chainId: number;
140
- stage: string;
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
- txHash: string;
145
+ orderId: string;
139
146
  chainId: number;
140
- stage: string;
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 };