@dynamic-labs/sdk-api-core 0.0.1037 → 0.0.1039

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.
@@ -270,6 +270,72 @@ class SDKApi extends BaseAPI {
270
270
  * Sets the source wallet address and chain for an initiated transaction.
271
271
  * Attach a source to a checkout transaction
272
272
  */
273
+ async attachFlowSourceRaw(requestParameters, initOverrides) {
274
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
275
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachFlowSource.');
276
+ }
277
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
278
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling attachFlowSource.');
279
+ }
280
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
281
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling attachFlowSource.');
282
+ }
283
+ if (requestParameters.attachSourceRequest === null || requestParameters.attachSourceRequest === undefined) {
284
+ throw new RequiredError('attachSourceRequest', 'Required parameter requestParameters.attachSourceRequest was null or undefined when calling attachFlowSource.');
285
+ }
286
+ const queryParameters = {};
287
+ const headerParameters = {};
288
+ headerParameters['Content-Type'] = 'application/json';
289
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
290
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
291
+ }
292
+ const response = await this.request({
293
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/source`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
294
+ method: 'POST',
295
+ headers: headerParameters,
296
+ query: queryParameters,
297
+ body: AttachSourceRequestToJSON(requestParameters.attachSourceRequest),
298
+ }, initOverrides);
299
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
300
+ }
301
+ /**
302
+ * Sets the source wallet address and chain for an initiated transaction.
303
+ * Attach a source to a checkout transaction
304
+ */
305
+ async attachFlowSource(requestParameters, initOverrides) {
306
+ const response = await this.attachFlowSourceRaw(requestParameters, initOverrides);
307
+ return await response.value();
308
+ }
309
+ /**
310
+ * Options call for this endpoint
311
+ */
312
+ async attachFlowSourceOptionsRaw(requestParameters, initOverrides) {
313
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
314
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachFlowSourceOptions.');
315
+ }
316
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
317
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling attachFlowSourceOptions.');
318
+ }
319
+ const queryParameters = {};
320
+ const headerParameters = {};
321
+ const response = await this.request({
322
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/source`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
323
+ method: 'OPTIONS',
324
+ headers: headerParameters,
325
+ query: queryParameters,
326
+ }, initOverrides);
327
+ return new VoidApiResponse(response);
328
+ }
329
+ /**
330
+ * Options call for this endpoint
331
+ */
332
+ async attachFlowSourceOptions(requestParameters, initOverrides) {
333
+ await this.attachFlowSourceOptionsRaw(requestParameters, initOverrides);
334
+ }
335
+ /**
336
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/source instead. Sets the source wallet address and chain for an initiated transaction.
337
+ * Attach a source to a checkout transaction
338
+ */
273
339
  async attachSourceRaw(requestParameters, initOverrides) {
274
340
  if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
275
341
  throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachSource.');
@@ -299,7 +365,7 @@ class SDKApi extends BaseAPI {
299
365
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
300
366
  }
301
367
  /**
302
- * Sets the source wallet address and chain for an initiated transaction.
368
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/source instead. Sets the source wallet address and chain for an initiated transaction.
303
369
  * Attach a source to a checkout transaction
304
370
  */
305
371
  async attachSource(requestParameters, initOverrides) {
@@ -825,7 +891,33 @@ class SDKApi extends BaseAPI {
825
891
  await this.broadcastCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
826
892
  }
827
893
  /**
828
- * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
894
+ * Options call for this endpoint
895
+ */
896
+ async broadcastFlowTransactionOptionsRaw(requestParameters, initOverrides) {
897
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
898
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling broadcastFlowTransactionOptions.');
899
+ }
900
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
901
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling broadcastFlowTransactionOptions.');
902
+ }
903
+ const queryParameters = {};
904
+ const headerParameters = {};
905
+ const response = await this.request({
906
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/broadcast`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
907
+ method: 'OPTIONS',
908
+ headers: headerParameters,
909
+ query: queryParameters,
910
+ }, initOverrides);
911
+ return new VoidApiResponse(response);
912
+ }
913
+ /**
914
+ * Options call for this endpoint
915
+ */
916
+ async broadcastFlowTransactionOptions(requestParameters, initOverrides) {
917
+ await this.broadcastFlowTransactionOptionsRaw(requestParameters, initOverrides);
918
+ }
919
+ /**
920
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
829
921
  * Cancel a checkout transaction
830
922
  */
831
923
  async cancelCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -852,7 +944,7 @@ class SDKApi extends BaseAPI {
852
944
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
853
945
  }
854
946
  /**
855
- * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
947
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
856
948
  * Cancel a checkout transaction
857
949
  */
858
950
  async cancelCheckoutTransaction(requestParameters, initOverrides) {
@@ -885,6 +977,67 @@ class SDKApi extends BaseAPI {
885
977
  async cancelCheckoutTransactionOptions(requestParameters, initOverrides) {
886
978
  await this.cancelCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
887
979
  }
980
+ /**
981
+ * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
982
+ * Cancel a checkout transaction
983
+ */
984
+ async cancelFlowTransactionRaw(requestParameters, initOverrides) {
985
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
986
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelFlowTransaction.');
987
+ }
988
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
989
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling cancelFlowTransaction.');
990
+ }
991
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
992
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling cancelFlowTransaction.');
993
+ }
994
+ const queryParameters = {};
995
+ const headerParameters = {};
996
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
997
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
998
+ }
999
+ const response = await this.request({
1000
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/cancel`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
1001
+ method: 'POST',
1002
+ headers: headerParameters,
1003
+ query: queryParameters,
1004
+ }, initOverrides);
1005
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
1006
+ }
1007
+ /**
1008
+ * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
1009
+ * Cancel a checkout transaction
1010
+ */
1011
+ async cancelFlowTransaction(requestParameters, initOverrides) {
1012
+ const response = await this.cancelFlowTransactionRaw(requestParameters, initOverrides);
1013
+ return await response.value();
1014
+ }
1015
+ /**
1016
+ * Options call for this endpoint
1017
+ */
1018
+ async cancelFlowTransactionOptionsRaw(requestParameters, initOverrides) {
1019
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1020
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelFlowTransactionOptions.');
1021
+ }
1022
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
1023
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling cancelFlowTransactionOptions.');
1024
+ }
1025
+ const queryParameters = {};
1026
+ const headerParameters = {};
1027
+ const response = await this.request({
1028
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/cancel`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
1029
+ method: 'OPTIONS',
1030
+ headers: headerParameters,
1031
+ query: queryParameters,
1032
+ }, initOverrides);
1033
+ return new VoidApiResponse(response);
1034
+ }
1035
+ /**
1036
+ * Options call for this endpoint
1037
+ */
1038
+ async cancelFlowTransactionOptions(requestParameters, initOverrides) {
1039
+ await this.cancelFlowTransactionOptionsRaw(requestParameters, initOverrides);
1040
+ }
888
1041
  /**
889
1042
  * This endpoint proxies requests to `/sdk/{environmentId}/providers/coinbasesocial/redirect` because Coinbase does not allow the string `coinbase` on the redirect URL path
890
1043
  * Handle Coinbase OAuth redirect
@@ -1220,7 +1373,7 @@ class SDKApi extends BaseAPI {
1220
1373
  return await response.value();
1221
1374
  }
1222
1375
  /**
1223
- * Creates a new checkout transaction for the specified checkout.
1376
+ * Deprecated: use POST /sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions instead. Creates a new checkout transaction for the specified checkout.
1224
1377
  * Create a checkout transaction
1225
1378
  */
1226
1379
  async createCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -1246,7 +1399,7 @@ class SDKApi extends BaseAPI {
1246
1399
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionCreateResponseFromJSON(jsonValue));
1247
1400
  }
1248
1401
  /**
1249
- * Creates a new checkout transaction for the specified checkout.
1402
+ * Deprecated: use POST /sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions instead. Creates a new checkout transaction for the specified checkout.
1250
1403
  * Create a checkout transaction
1251
1404
  */
1252
1405
  async createCheckoutTransaction(requestParameters, initOverrides) {
@@ -1470,6 +1623,66 @@ class SDKApi extends BaseAPI {
1470
1623
  async createEmbeddedWalletsOptions(requestParameters, initOverrides) {
1471
1624
  await this.createEmbeddedWalletsOptionsRaw(requestParameters, initOverrides);
1472
1625
  }
1626
+ /**
1627
+ * Creates a new checkout transaction for the specified checkout.
1628
+ * Create a checkout transaction
1629
+ */
1630
+ async createFlowCheckoutTransactionRaw(requestParameters, initOverrides) {
1631
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1632
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckoutTransaction.');
1633
+ }
1634
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
1635
+ throw new RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling createFlowCheckoutTransaction.');
1636
+ }
1637
+ if (requestParameters.checkoutTransactionCreateRequest === null || requestParameters.checkoutTransactionCreateRequest === undefined) {
1638
+ throw new RequiredError('checkoutTransactionCreateRequest', 'Required parameter requestParameters.checkoutTransactionCreateRequest was null or undefined when calling createFlowCheckoutTransaction.');
1639
+ }
1640
+ const queryParameters = {};
1641
+ const headerParameters = {};
1642
+ headerParameters['Content-Type'] = 'application/json';
1643
+ const response = await this.request({
1644
+ path: `/sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
1645
+ method: 'POST',
1646
+ headers: headerParameters,
1647
+ query: queryParameters,
1648
+ body: CheckoutTransactionCreateRequestToJSON(requestParameters.checkoutTransactionCreateRequest),
1649
+ }, initOverrides);
1650
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionCreateResponseFromJSON(jsonValue));
1651
+ }
1652
+ /**
1653
+ * Creates a new checkout transaction for the specified checkout.
1654
+ * Create a checkout transaction
1655
+ */
1656
+ async createFlowCheckoutTransaction(requestParameters, initOverrides) {
1657
+ const response = await this.createFlowCheckoutTransactionRaw(requestParameters, initOverrides);
1658
+ return await response.value();
1659
+ }
1660
+ /**
1661
+ * Options call for this endpoint
1662
+ */
1663
+ async createFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides) {
1664
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1665
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckoutTransactionOptions.');
1666
+ }
1667
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
1668
+ throw new RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling createFlowCheckoutTransactionOptions.');
1669
+ }
1670
+ const queryParameters = {};
1671
+ const headerParameters = {};
1672
+ const response = await this.request({
1673
+ path: `/sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
1674
+ method: 'OPTIONS',
1675
+ headers: headerParameters,
1676
+ query: queryParameters,
1677
+ }, initOverrides);
1678
+ return new VoidApiResponse(response);
1679
+ }
1680
+ /**
1681
+ * Options call for this endpoint
1682
+ */
1683
+ async createFlowCheckoutTransactionOptions(requestParameters, initOverrides) {
1684
+ await this.createFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
1685
+ }
1473
1686
  /**
1474
1687
  * Creates a new global wallet connection for the authenticated user.
1475
1688
  * Create a global wallet connection
@@ -3523,6 +3736,7 @@ class SDKApi extends BaseAPI {
3523
3736
  await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
3524
3737
  }
3525
3738
  /**
3739
+ * Deprecated: use GET /sdk/{environmentId}/flow/transactions/{transactionId} instead.
3526
3740
  * Get a checkout transaction by ID
3527
3741
  */
3528
3742
  async getCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -3543,6 +3757,7 @@ class SDKApi extends BaseAPI {
3543
3757
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
3544
3758
  }
3545
3759
  /**
3760
+ * Deprecated: use GET /sdk/{environmentId}/flow/transactions/{transactionId} instead.
3546
3761
  * Get a checkout transaction by ID
3547
3762
  */
3548
3763
  async getCheckoutTransaction(requestParameters, initOverrides) {
@@ -4135,6 +4350,59 @@ class SDKApi extends BaseAPI {
4135
4350
  async getExchangeTransferDestinationsOptions(requestParameters, initOverrides) {
4136
4351
  await this.getExchangeTransferDestinationsOptionsRaw(requestParameters, initOverrides);
4137
4352
  }
4353
+ /**
4354
+ * Get a checkout transaction by ID
4355
+ */
4356
+ async getFlowCheckoutTransactionRaw(requestParameters, initOverrides) {
4357
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4358
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowCheckoutTransaction.');
4359
+ }
4360
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
4361
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling getFlowCheckoutTransaction.');
4362
+ }
4363
+ const queryParameters = {};
4364
+ const headerParameters = {};
4365
+ const response = await this.request({
4366
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
4367
+ method: 'GET',
4368
+ headers: headerParameters,
4369
+ query: queryParameters,
4370
+ }, initOverrides);
4371
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
4372
+ }
4373
+ /**
4374
+ * Get a checkout transaction by ID
4375
+ */
4376
+ async getFlowCheckoutTransaction(requestParameters, initOverrides) {
4377
+ const response = await this.getFlowCheckoutTransactionRaw(requestParameters, initOverrides);
4378
+ return await response.value();
4379
+ }
4380
+ /**
4381
+ * Options call for this endpoint
4382
+ */
4383
+ async getFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides) {
4384
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4385
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowCheckoutTransactionOptions.');
4386
+ }
4387
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
4388
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling getFlowCheckoutTransactionOptions.');
4389
+ }
4390
+ const queryParameters = {};
4391
+ const headerParameters = {};
4392
+ const response = await this.request({
4393
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
4394
+ method: 'OPTIONS',
4395
+ headers: headerParameters,
4396
+ query: queryParameters,
4397
+ }, initOverrides);
4398
+ return new VoidApiResponse(response);
4399
+ }
4400
+ /**
4401
+ * Options call for this endpoint
4402
+ */
4403
+ async getFlowCheckoutTransactionOptions(requestParameters, initOverrides) {
4404
+ await this.getFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
4405
+ }
4138
4406
  /**
4139
4407
  * Returns the global wallet settings configured for the specified environment.
4140
4408
  * Get the global wallet settings for the environment
@@ -6702,7 +6970,7 @@ class SDKApi extends BaseAPI {
6702
6970
  await this.prefetchRaw(requestParameters, initOverrides);
6703
6971
  }
6704
6972
  /**
6705
- * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
6973
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/prepare instead. Validates quote freshness and risk clearance, then transitions the transaction to signing state.
6706
6974
  * Prepare a checkout transaction for signing
6707
6975
  */
6708
6976
  async prepareCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -6731,7 +6999,7 @@ class SDKApi extends BaseAPI {
6731
6999
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
6732
7000
  }
6733
7001
  /**
6734
- * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
7002
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/prepare instead. Validates quote freshness and risk clearance, then transitions the transaction to signing state.
6735
7003
  * Prepare a checkout transaction for signing
6736
7004
  */
6737
7005
  async prepareCheckoutTransaction(requestParameters, initOverrides) {
@@ -6764,6 +7032,69 @@ class SDKApi extends BaseAPI {
6764
7032
  async prepareCheckoutTransactionOptions(requestParameters, initOverrides) {
6765
7033
  await this.prepareCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
6766
7034
  }
7035
+ /**
7036
+ * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
7037
+ * Prepare a checkout transaction for signing
7038
+ */
7039
+ async prepareFlowTransactionRaw(requestParameters, initOverrides) {
7040
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7041
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling prepareFlowTransaction.');
7042
+ }
7043
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7044
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling prepareFlowTransaction.');
7045
+ }
7046
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
7047
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling prepareFlowTransaction.');
7048
+ }
7049
+ const queryParameters = {};
7050
+ const headerParameters = {};
7051
+ headerParameters['Content-Type'] = 'application/json';
7052
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
7053
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
7054
+ }
7055
+ const response = await this.request({
7056
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/prepare`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7057
+ method: 'POST',
7058
+ headers: headerParameters,
7059
+ query: queryParameters,
7060
+ body: PrepareSigningRequestToJSON(requestParameters.prepareSigningRequest),
7061
+ }, initOverrides);
7062
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
7063
+ }
7064
+ /**
7065
+ * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
7066
+ * Prepare a checkout transaction for signing
7067
+ */
7068
+ async prepareFlowTransaction(requestParameters, initOverrides) {
7069
+ const response = await this.prepareFlowTransactionRaw(requestParameters, initOverrides);
7070
+ return await response.value();
7071
+ }
7072
+ /**
7073
+ * Options call for this endpoint
7074
+ */
7075
+ async prepareFlowTransactionOptionsRaw(requestParameters, initOverrides) {
7076
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7077
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling prepareFlowTransactionOptions.');
7078
+ }
7079
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7080
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling prepareFlowTransactionOptions.');
7081
+ }
7082
+ const queryParameters = {};
7083
+ const headerParameters = {};
7084
+ const response = await this.request({
7085
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/prepare`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7086
+ method: 'OPTIONS',
7087
+ headers: headerParameters,
7088
+ query: queryParameters,
7089
+ }, initOverrides);
7090
+ return new VoidApiResponse(response);
7091
+ }
7092
+ /**
7093
+ * Options call for this endpoint
7094
+ */
7095
+ async prepareFlowTransactionOptions(requestParameters, initOverrides) {
7096
+ await this.prepareFlowTransactionOptionsRaw(requestParameters, initOverrides);
7097
+ }
6767
7098
  /**
6768
7099
  * Publishes SDK analytics events for the given environment.
6769
7100
  * Publish SDK events
@@ -6795,7 +7126,7 @@ class SDKApi extends BaseAPI {
6795
7126
  await this.publishEventRaw(requestParameters, initOverrides);
6796
7127
  }
6797
7128
  /**
6798
- * Fetches a swap quote and stores a snapshot on the transaction.
7129
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/quote instead. Fetches a swap quote and stores a snapshot on the transaction.
6799
7130
  * Get a quote for a checkout transaction
6800
7131
  */
6801
7132
  async quoteCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -6827,7 +7158,7 @@ class SDKApi extends BaseAPI {
6827
7158
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
6828
7159
  }
6829
7160
  /**
6830
- * Fetches a swap quote and stores a snapshot on the transaction.
7161
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/quote instead. Fetches a swap quote and stores a snapshot on the transaction.
6831
7162
  * Get a quote for a checkout transaction
6832
7163
  */
6833
7164
  async quoteCheckoutTransaction(requestParameters, initOverrides) {
@@ -6860,6 +7191,72 @@ class SDKApi extends BaseAPI {
6860
7191
  async quoteCheckoutTransactionOptions(requestParameters, initOverrides) {
6861
7192
  await this.quoteCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
6862
7193
  }
7194
+ /**
7195
+ * Fetches a swap quote and stores a snapshot on the transaction.
7196
+ * Get a quote for a checkout transaction
7197
+ */
7198
+ async quoteFlowTransactionRaw(requestParameters, initOverrides) {
7199
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7200
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling quoteFlowTransaction.');
7201
+ }
7202
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7203
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling quoteFlowTransaction.');
7204
+ }
7205
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
7206
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling quoteFlowTransaction.');
7207
+ }
7208
+ if (requestParameters.quoteRequest === null || requestParameters.quoteRequest === undefined) {
7209
+ throw new RequiredError('quoteRequest', 'Required parameter requestParameters.quoteRequest was null or undefined when calling quoteFlowTransaction.');
7210
+ }
7211
+ const queryParameters = {};
7212
+ const headerParameters = {};
7213
+ headerParameters['Content-Type'] = 'application/json';
7214
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
7215
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
7216
+ }
7217
+ const response = await this.request({
7218
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7219
+ method: 'POST',
7220
+ headers: headerParameters,
7221
+ query: queryParameters,
7222
+ body: QuoteRequestToJSON(requestParameters.quoteRequest),
7223
+ }, initOverrides);
7224
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
7225
+ }
7226
+ /**
7227
+ * Fetches a swap quote and stores a snapshot on the transaction.
7228
+ * Get a quote for a checkout transaction
7229
+ */
7230
+ async quoteFlowTransaction(requestParameters, initOverrides) {
7231
+ const response = await this.quoteFlowTransactionRaw(requestParameters, initOverrides);
7232
+ return await response.value();
7233
+ }
7234
+ /**
7235
+ * Options call for this endpoint
7236
+ */
7237
+ async quoteFlowTransactionOptionsRaw(requestParameters, initOverrides) {
7238
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7239
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling quoteFlowTransactionOptions.');
7240
+ }
7241
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7242
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling quoteFlowTransactionOptions.');
7243
+ }
7244
+ const queryParameters = {};
7245
+ const headerParameters = {};
7246
+ const response = await this.request({
7247
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7248
+ method: 'OPTIONS',
7249
+ headers: headerParameters,
7250
+ query: queryParameters,
7251
+ }, initOverrides);
7252
+ return new VoidApiResponse(response);
7253
+ }
7254
+ /**
7255
+ * Options call for this endpoint
7256
+ */
7257
+ async quoteFlowTransactionOptions(requestParameters, initOverrides) {
7258
+ await this.quoteFlowTransactionOptionsRaw(requestParameters, initOverrides);
7259
+ }
6863
7260
  /**
6864
7261
  * Options call for this endpoint
6865
7262
  */
@@ -6884,7 +7281,7 @@ class SDKApi extends BaseAPI {
6884
7281
  await this.realtimeAuthOptionsRaw(requestParameters, initOverrides);
6885
7282
  }
6886
7283
  /**
6887
- * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7284
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/broadcast instead. Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
6888
7285
  * Record a broadcast for a checkout transaction
6889
7286
  */
6890
7287
  async recordCheckoutBroadcastRaw(requestParameters, initOverrides) {
@@ -6916,13 +7313,53 @@ class SDKApi extends BaseAPI {
6916
7313
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
6917
7314
  }
6918
7315
  /**
6919
- * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7316
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/broadcast instead. Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
6920
7317
  * Record a broadcast for a checkout transaction
6921
7318
  */
6922
7319
  async recordCheckoutBroadcast(requestParameters, initOverrides) {
6923
7320
  const response = await this.recordCheckoutBroadcastRaw(requestParameters, initOverrides);
6924
7321
  return await response.value();
6925
7322
  }
7323
+ /**
7324
+ * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7325
+ * Record a broadcast for a checkout transaction
7326
+ */
7327
+ async recordFlowBroadcastRaw(requestParameters, initOverrides) {
7328
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7329
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling recordFlowBroadcast.');
7330
+ }
7331
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7332
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling recordFlowBroadcast.');
7333
+ }
7334
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
7335
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling recordFlowBroadcast.');
7336
+ }
7337
+ if (requestParameters.recordBroadcastRequest === null || requestParameters.recordBroadcastRequest === undefined) {
7338
+ throw new RequiredError('recordBroadcastRequest', 'Required parameter requestParameters.recordBroadcastRequest was null or undefined when calling recordFlowBroadcast.');
7339
+ }
7340
+ const queryParameters = {};
7341
+ const headerParameters = {};
7342
+ headerParameters['Content-Type'] = 'application/json';
7343
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
7344
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
7345
+ }
7346
+ const response = await this.request({
7347
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/broadcast`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7348
+ method: 'POST',
7349
+ headers: headerParameters,
7350
+ query: queryParameters,
7351
+ body: RecordBroadcastRequestToJSON(requestParameters.recordBroadcastRequest),
7352
+ }, initOverrides);
7353
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
7354
+ }
7355
+ /**
7356
+ * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7357
+ * Record a broadcast for a checkout transaction
7358
+ */
7359
+ async recordFlowBroadcast(requestParameters, initOverrides) {
7360
+ const response = await this.recordFlowBroadcastRaw(requestParameters, initOverrides);
7361
+ return await response.value();
7362
+ }
6926
7363
  /**
6927
7364
  * Recovers the client key shares for the specified WAAS wallet from backup.
6928
7365
  * Recover WAAS keyshares