@chainflip/sdk 1.5.0-alpha.2 → 1.5.0-alpha.4

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/swap.d.mts CHANGED
@@ -153,8 +153,8 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
153
153
  estimatedDefaultDurationSeconds: number | undefined;
154
154
  srcChainRequiredBlockConfirmations: number | undefined;
155
155
  depositTransactionRef: string | undefined;
156
- latestSwapScheduledAt: number | undefined;
157
- latestSwapScheduledBlockIndex: string | undefined;
156
+ swapScheduledAt: number | undefined;
157
+ swapScheduledBlockIndex: string | undefined;
158
158
  depositTransactionHash: string | undefined;
159
159
  ccmMetadata?: CcmParams;
160
160
  }
@@ -177,21 +177,22 @@ interface DepositAddressFields extends SwapStatusResponseCommonFields {
177
177
  boostSkippedBlockIndex?: string;
178
178
  fillOrKillParams: FillOrKillParams;
179
179
  }
180
- type BroadcastRequested = {
180
+ type EgressScheduled = {
181
181
  swapId: string;
182
182
  depositAmount: string;
183
183
  depositReceivedAt: number;
184
184
  depositReceivedBlockIndex: string;
185
- intermediateAmount: string | undefined;
186
- swapExecutedAt: number;
187
- swapExecutedBlockIndex: string;
188
185
  egressAmount: string;
189
186
  egressScheduledAt: number;
190
187
  egressScheduledBlockIndex: string;
191
- broadcastRequestedAt: number;
192
- broadcastRequestedBlockIndex: string;
193
- };
194
- type RefundBroadcastRequested = Omit<BroadcastRequested, 'swapExecutedAt' | 'swapExecutedBlockIndex'>;
188
+ } & ({
189
+ egressType: 'SWAP';
190
+ intermediateAmount: string | undefined;
191
+ swapExecutedAt: number;
192
+ swapExecutedBlockIndex: string;
193
+ } | {
194
+ egressType: 'REFUND';
195
+ });
195
196
  type CopyFields<T, U> = {
196
197
  [K in Exclude<keyof T, keyof U>]: undefined;
197
198
  } & U;
@@ -245,35 +246,29 @@ type SwapState = {
245
246
  egressAmount: string;
246
247
  egressScheduledAt: number;
247
248
  egressScheduledBlockIndex: string;
248
- } | {
249
- state: 'REFUND_EGRESS_SCHEDULED';
250
- swapId: string;
251
- depositAmount: string;
252
- depositReceivedAt: number;
253
- depositReceivedBlockIndex: string;
254
- egressAmount: string;
255
- egressScheduledAt: number;
256
- egressScheduledBlockIndex: string;
257
249
  } | ({
258
250
  state: 'BROADCAST_REQUESTED';
259
- } & BroadcastRequested) | ({
251
+ broadcastRequestedAt: number;
252
+ broadcastRequestedBlockIndex: string;
253
+ } & EgressScheduled) | ({
260
254
  state: 'BROADCASTED';
255
+ broadcastRequestedAt: number;
256
+ broadcastRequestedBlockIndex: string;
261
257
  broadcastTransactionRef: string;
262
- } & BroadcastRequested) | ({
263
- state: 'BROADCAST_ABORTED';
264
- broadcastAbortedAt: number;
265
- broadcastAbortedBlockIndex: string;
266
- } & BroadcastRequested) | ({
258
+ } & EgressScheduled) | ({
267
259
  state: 'COMPLETE';
268
- broadcastSucceededAt: number;
269
- broadcastSucceededBlockIndex: string;
260
+ broadcastRequestedAt: number;
261
+ broadcastRequestedBlockIndex: string;
270
262
  broadcastTransactionRef: string;
271
- } & BroadcastRequested) | ({
272
- state: 'REFUNDED';
273
263
  broadcastSucceededAt: number;
274
264
  broadcastSucceededBlockIndex: string;
275
- broadcastTransactionRef: string;
276
- } & RefundBroadcastRequested) | {
265
+ } & EgressScheduled) | ({
266
+ state: 'BROADCAST_ABORTED';
267
+ broadcastRequestedAt: number;
268
+ broadcastRequestedBlockIndex: string;
269
+ broadcastAbortedAt: number;
270
+ broadcastAbortedBlockIndex: string;
271
+ } & EgressScheduled) | {
277
272
  state: 'FAILED';
278
273
  failure: 'INGRESS_IGNORED';
279
274
  error: {
@@ -311,22 +306,9 @@ type SwapState = {
311
306
  depositAmount: string;
312
307
  depositReceivedAt: number;
313
308
  depositReceivedBlockIndex: string;
314
- intermediateAmount: string | undefined;
315
309
  ignoredEgressAmount: string;
316
310
  egressIgnoredAt: number;
317
311
  egressIgnoredBlockIndex: string;
318
- } | {
319
- state: 'FAILED';
320
- failure: 'REFUND_BROADCAST_ABORTED';
321
- swapId: string;
322
- depositAmount: string;
323
- depositReceivedAt: number;
324
- depositReceivedBlockIndex: string;
325
- intermediateAmount: string | undefined;
326
- broadcastRequestedAt: number;
327
- broadcastRequestedBlockIndex: string;
328
- broadcastAbortedAt: number;
329
- broadcastAbortedBlockIndex: string;
330
312
  };
331
313
  type DepositAddressStatusResponse = DepositAddressFields & SwapState;
332
314
  type VaultSwapStatusResponse = VaultSwapFields & SwapState;
package/dist/swap.d.ts CHANGED
@@ -153,8 +153,8 @@ interface SwapStatusResponseCommonFields extends ChainsAndAssets {
153
153
  estimatedDefaultDurationSeconds: number | undefined;
154
154
  srcChainRequiredBlockConfirmations: number | undefined;
155
155
  depositTransactionRef: string | undefined;
156
- latestSwapScheduledAt: number | undefined;
157
- latestSwapScheduledBlockIndex: string | undefined;
156
+ swapScheduledAt: number | undefined;
157
+ swapScheduledBlockIndex: string | undefined;
158
158
  depositTransactionHash: string | undefined;
159
159
  ccmMetadata?: CcmParams;
160
160
  }
@@ -177,21 +177,22 @@ interface DepositAddressFields extends SwapStatusResponseCommonFields {
177
177
  boostSkippedBlockIndex?: string;
178
178
  fillOrKillParams: FillOrKillParams;
179
179
  }
180
- type BroadcastRequested = {
180
+ type EgressScheduled = {
181
181
  swapId: string;
182
182
  depositAmount: string;
183
183
  depositReceivedAt: number;
184
184
  depositReceivedBlockIndex: string;
185
- intermediateAmount: string | undefined;
186
- swapExecutedAt: number;
187
- swapExecutedBlockIndex: string;
188
185
  egressAmount: string;
189
186
  egressScheduledAt: number;
190
187
  egressScheduledBlockIndex: string;
191
- broadcastRequestedAt: number;
192
- broadcastRequestedBlockIndex: string;
193
- };
194
- type RefundBroadcastRequested = Omit<BroadcastRequested, 'swapExecutedAt' | 'swapExecutedBlockIndex'>;
188
+ } & ({
189
+ egressType: 'SWAP';
190
+ intermediateAmount: string | undefined;
191
+ swapExecutedAt: number;
192
+ swapExecutedBlockIndex: string;
193
+ } | {
194
+ egressType: 'REFUND';
195
+ });
195
196
  type CopyFields<T, U> = {
196
197
  [K in Exclude<keyof T, keyof U>]: undefined;
197
198
  } & U;
@@ -245,35 +246,29 @@ type SwapState = {
245
246
  egressAmount: string;
246
247
  egressScheduledAt: number;
247
248
  egressScheduledBlockIndex: string;
248
- } | {
249
- state: 'REFUND_EGRESS_SCHEDULED';
250
- swapId: string;
251
- depositAmount: string;
252
- depositReceivedAt: number;
253
- depositReceivedBlockIndex: string;
254
- egressAmount: string;
255
- egressScheduledAt: number;
256
- egressScheduledBlockIndex: string;
257
249
  } | ({
258
250
  state: 'BROADCAST_REQUESTED';
259
- } & BroadcastRequested) | ({
251
+ broadcastRequestedAt: number;
252
+ broadcastRequestedBlockIndex: string;
253
+ } & EgressScheduled) | ({
260
254
  state: 'BROADCASTED';
255
+ broadcastRequestedAt: number;
256
+ broadcastRequestedBlockIndex: string;
261
257
  broadcastTransactionRef: string;
262
- } & BroadcastRequested) | ({
263
- state: 'BROADCAST_ABORTED';
264
- broadcastAbortedAt: number;
265
- broadcastAbortedBlockIndex: string;
266
- } & BroadcastRequested) | ({
258
+ } & EgressScheduled) | ({
267
259
  state: 'COMPLETE';
268
- broadcastSucceededAt: number;
269
- broadcastSucceededBlockIndex: string;
260
+ broadcastRequestedAt: number;
261
+ broadcastRequestedBlockIndex: string;
270
262
  broadcastTransactionRef: string;
271
- } & BroadcastRequested) | ({
272
- state: 'REFUNDED';
273
263
  broadcastSucceededAt: number;
274
264
  broadcastSucceededBlockIndex: string;
275
- broadcastTransactionRef: string;
276
- } & RefundBroadcastRequested) | {
265
+ } & EgressScheduled) | ({
266
+ state: 'BROADCAST_ABORTED';
267
+ broadcastRequestedAt: number;
268
+ broadcastRequestedBlockIndex: string;
269
+ broadcastAbortedAt: number;
270
+ broadcastAbortedBlockIndex: string;
271
+ } & EgressScheduled) | {
277
272
  state: 'FAILED';
278
273
  failure: 'INGRESS_IGNORED';
279
274
  error: {
@@ -311,22 +306,9 @@ type SwapState = {
311
306
  depositAmount: string;
312
307
  depositReceivedAt: number;
313
308
  depositReceivedBlockIndex: string;
314
- intermediateAmount: string | undefined;
315
309
  ignoredEgressAmount: string;
316
310
  egressIgnoredAt: number;
317
311
  egressIgnoredBlockIndex: string;
318
- } | {
319
- state: 'FAILED';
320
- failure: 'REFUND_BROADCAST_ABORTED';
321
- swapId: string;
322
- depositAmount: string;
323
- depositReceivedAt: number;
324
- depositReceivedBlockIndex: string;
325
- intermediateAmount: string | undefined;
326
- broadcastRequestedAt: number;
327
- broadcastRequestedBlockIndex: string;
328
- broadcastAbortedAt: number;
329
- broadcastAbortedBlockIndex: string;
330
312
  };
331
313
  type DepositAddressStatusResponse = DepositAddressFields & SwapState;
332
314
  type VaultSwapStatusResponse = VaultSwapFields & SwapState;
package/dist/swap.js CHANGED
@@ -10037,7 +10037,7 @@ var getChainData = /* @__PURE__ */ __name((chain2, network, env) => ({
10037
10037
  init_enums();
10038
10038
 
10039
10039
  // package.json
10040
- var version = "1.5.0-alpha.2";
10040
+ var version = "1.5.0-alpha.4";
10041
10041
 
10042
10042
  // src/swap/consts.ts
10043
10043
  var CF_SDK_VERSION_HEADERS = {
package/dist/swap.mjs CHANGED
@@ -3713,7 +3713,7 @@ var getChainData = /* @__PURE__ */ __name((chain, network, env) => ({
3713
3713
  }), "getChainData");
3714
3714
 
3715
3715
  // package.json
3716
- var version = "1.5.0-alpha.2";
3716
+ var version = "1.5.0-alpha.4";
3717
3717
 
3718
3718
  // src/swap/consts.ts
3719
3719
  var CF_SDK_VERSION_HEADERS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/sdk",
3
- "version": "1.5.0-alpha.2",
3
+ "version": "1.5.0-alpha.4",
4
4
  "description": "",
5
5
  "exports": {
6
6
  "./swap": {
@@ -41,7 +41,7 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "@chainflip/rpc": "^1.5.0",
44
+ "@chainflip/rpc": "^1.5.5",
45
45
  "@chainflip/utils": "^0.4.0",
46
46
  "axios": "^1.6.8",
47
47
  "ethers": "^6.13.2"