@dynamic-labs/sdk-api 0.0.1038 → 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.
@@ -299,6 +299,72 @@ class SDKApi extends BaseAPI {
299
299
  * Sets the source wallet address and chain for an initiated transaction.
300
300
  * Attach a source to a checkout transaction
301
301
  */
302
+ async attachFlowSourceRaw(requestParameters, initOverrides) {
303
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
304
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachFlowSource.');
305
+ }
306
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
307
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling attachFlowSource.');
308
+ }
309
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
310
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling attachFlowSource.');
311
+ }
312
+ if (requestParameters.attachSourceRequest === null || requestParameters.attachSourceRequest === undefined) {
313
+ throw new RequiredError('attachSourceRequest', 'Required parameter requestParameters.attachSourceRequest was null or undefined when calling attachFlowSource.');
314
+ }
315
+ const queryParameters = {};
316
+ const headerParameters = {};
317
+ headerParameters['Content-Type'] = 'application/json';
318
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
319
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
320
+ }
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: 'POST',
324
+ headers: headerParameters,
325
+ query: queryParameters,
326
+ body: AttachSourceRequestToJSON(requestParameters.attachSourceRequest),
327
+ }, initOverrides);
328
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
329
+ }
330
+ /**
331
+ * Sets the source wallet address and chain for an initiated transaction.
332
+ * Attach a source to a checkout transaction
333
+ */
334
+ async attachFlowSource(requestParameters, initOverrides) {
335
+ const response = await this.attachFlowSourceRaw(requestParameters, initOverrides);
336
+ return await response.value();
337
+ }
338
+ /**
339
+ * Options call for this endpoint
340
+ */
341
+ async attachFlowSourceOptionsRaw(requestParameters, initOverrides) {
342
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
343
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachFlowSourceOptions.');
344
+ }
345
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
346
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling attachFlowSourceOptions.');
347
+ }
348
+ const queryParameters = {};
349
+ const headerParameters = {};
350
+ const response = await this.request({
351
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/source`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
352
+ method: 'OPTIONS',
353
+ headers: headerParameters,
354
+ query: queryParameters,
355
+ }, initOverrides);
356
+ return new VoidApiResponse(response);
357
+ }
358
+ /**
359
+ * Options call for this endpoint
360
+ */
361
+ async attachFlowSourceOptions(requestParameters, initOverrides) {
362
+ await this.attachFlowSourceOptionsRaw(requestParameters, initOverrides);
363
+ }
364
+ /**
365
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/source instead. Sets the source wallet address and chain for an initiated transaction.
366
+ * Attach a source to a checkout transaction
367
+ */
302
368
  async attachSourceRaw(requestParameters, initOverrides) {
303
369
  if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
304
370
  throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling attachSource.');
@@ -328,7 +394,7 @@ class SDKApi extends BaseAPI {
328
394
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
329
395
  }
330
396
  /**
331
- * Sets the source wallet address and chain for an initiated transaction.
397
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/source instead. Sets the source wallet address and chain for an initiated transaction.
332
398
  * Attach a source to a checkout transaction
333
399
  */
334
400
  async attachSource(requestParameters, initOverrides) {
@@ -854,7 +920,33 @@ class SDKApi extends BaseAPI {
854
920
  await this.broadcastCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
855
921
  }
856
922
  /**
857
- * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
923
+ * Options call for this endpoint
924
+ */
925
+ async broadcastFlowTransactionOptionsRaw(requestParameters, initOverrides) {
926
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
927
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling broadcastFlowTransactionOptions.');
928
+ }
929
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
930
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling broadcastFlowTransactionOptions.');
931
+ }
932
+ const queryParameters = {};
933
+ const headerParameters = {};
934
+ const response = await this.request({
935
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/broadcast`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
936
+ method: 'OPTIONS',
937
+ headers: headerParameters,
938
+ query: queryParameters,
939
+ }, initOverrides);
940
+ return new VoidApiResponse(response);
941
+ }
942
+ /**
943
+ * Options call for this endpoint
944
+ */
945
+ async broadcastFlowTransactionOptions(requestParameters, initOverrides) {
946
+ await this.broadcastFlowTransactionOptionsRaw(requestParameters, initOverrides);
947
+ }
948
+ /**
949
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
858
950
  * Cancel a checkout transaction
859
951
  */
860
952
  async cancelCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -881,7 +973,7 @@ class SDKApi extends BaseAPI {
881
973
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
882
974
  }
883
975
  /**
884
- * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
976
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
885
977
  * Cancel a checkout transaction
886
978
  */
887
979
  async cancelCheckoutTransaction(requestParameters, initOverrides) {
@@ -914,6 +1006,67 @@ class SDKApi extends BaseAPI {
914
1006
  async cancelCheckoutTransactionOptions(requestParameters, initOverrides) {
915
1007
  await this.cancelCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
916
1008
  }
1009
+ /**
1010
+ * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
1011
+ * Cancel a checkout transaction
1012
+ */
1013
+ async cancelFlowTransactionRaw(requestParameters, initOverrides) {
1014
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1015
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelFlowTransaction.');
1016
+ }
1017
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
1018
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling cancelFlowTransaction.');
1019
+ }
1020
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
1021
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling cancelFlowTransaction.');
1022
+ }
1023
+ const queryParameters = {};
1024
+ const headerParameters = {};
1025
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
1026
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
1027
+ }
1028
+ const response = await this.request({
1029
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/cancel`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
1030
+ method: 'POST',
1031
+ headers: headerParameters,
1032
+ query: queryParameters,
1033
+ }, initOverrides);
1034
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
1035
+ }
1036
+ /**
1037
+ * Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
1038
+ * Cancel a checkout transaction
1039
+ */
1040
+ async cancelFlowTransaction(requestParameters, initOverrides) {
1041
+ const response = await this.cancelFlowTransactionRaw(requestParameters, initOverrides);
1042
+ return await response.value();
1043
+ }
1044
+ /**
1045
+ * Options call for this endpoint
1046
+ */
1047
+ async cancelFlowTransactionOptionsRaw(requestParameters, initOverrides) {
1048
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1049
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelFlowTransactionOptions.');
1050
+ }
1051
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
1052
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling cancelFlowTransactionOptions.');
1053
+ }
1054
+ const queryParameters = {};
1055
+ const headerParameters = {};
1056
+ const response = await this.request({
1057
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/cancel`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
1058
+ method: 'OPTIONS',
1059
+ headers: headerParameters,
1060
+ query: queryParameters,
1061
+ }, initOverrides);
1062
+ return new VoidApiResponse(response);
1063
+ }
1064
+ /**
1065
+ * Options call for this endpoint
1066
+ */
1067
+ async cancelFlowTransactionOptions(requestParameters, initOverrides) {
1068
+ await this.cancelFlowTransactionOptionsRaw(requestParameters, initOverrides);
1069
+ }
917
1070
  /**
918
1071
  * This endpoint proxies requests to `/sdk/{environmentId}/providers/coinbasesocial/redirect` because Coinbase does not allow the string `coinbase` on the redirect URL path
919
1072
  * Handle Coinbase OAuth redirect
@@ -1249,7 +1402,7 @@ class SDKApi extends BaseAPI {
1249
1402
  return await response.value();
1250
1403
  }
1251
1404
  /**
1252
- * Creates a new checkout transaction for the specified checkout.
1405
+ * Deprecated: use POST /sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions instead. Creates a new checkout transaction for the specified checkout.
1253
1406
  * Create a checkout transaction
1254
1407
  */
1255
1408
  async createCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -1275,7 +1428,7 @@ class SDKApi extends BaseAPI {
1275
1428
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionCreateResponseFromJSON(jsonValue));
1276
1429
  }
1277
1430
  /**
1278
- * Creates a new checkout transaction for the specified checkout.
1431
+ * Deprecated: use POST /sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions instead. Creates a new checkout transaction for the specified checkout.
1279
1432
  * Create a checkout transaction
1280
1433
  */
1281
1434
  async createCheckoutTransaction(requestParameters, initOverrides) {
@@ -1499,6 +1652,66 @@ class SDKApi extends BaseAPI {
1499
1652
  async createEmbeddedWalletsOptions(requestParameters, initOverrides) {
1500
1653
  await this.createEmbeddedWalletsOptionsRaw(requestParameters, initOverrides);
1501
1654
  }
1655
+ /**
1656
+ * Creates a new checkout transaction for the specified checkout.
1657
+ * Create a checkout transaction
1658
+ */
1659
+ async createFlowCheckoutTransactionRaw(requestParameters, initOverrides) {
1660
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1661
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckoutTransaction.');
1662
+ }
1663
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
1664
+ throw new RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling createFlowCheckoutTransaction.');
1665
+ }
1666
+ if (requestParameters.checkoutTransactionCreateRequest === null || requestParameters.checkoutTransactionCreateRequest === undefined) {
1667
+ throw new RequiredError('checkoutTransactionCreateRequest', 'Required parameter requestParameters.checkoutTransactionCreateRequest was null or undefined when calling createFlowCheckoutTransaction.');
1668
+ }
1669
+ const queryParameters = {};
1670
+ const headerParameters = {};
1671
+ headerParameters['Content-Type'] = 'application/json';
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: 'POST',
1675
+ headers: headerParameters,
1676
+ query: queryParameters,
1677
+ body: CheckoutTransactionCreateRequestToJSON(requestParameters.checkoutTransactionCreateRequest),
1678
+ }, initOverrides);
1679
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionCreateResponseFromJSON(jsonValue));
1680
+ }
1681
+ /**
1682
+ * Creates a new checkout transaction for the specified checkout.
1683
+ * Create a checkout transaction
1684
+ */
1685
+ async createFlowCheckoutTransaction(requestParameters, initOverrides) {
1686
+ const response = await this.createFlowCheckoutTransactionRaw(requestParameters, initOverrides);
1687
+ return await response.value();
1688
+ }
1689
+ /**
1690
+ * Options call for this endpoint
1691
+ */
1692
+ async createFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides) {
1693
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1694
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckoutTransactionOptions.');
1695
+ }
1696
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
1697
+ throw new RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling createFlowCheckoutTransactionOptions.');
1698
+ }
1699
+ const queryParameters = {};
1700
+ const headerParameters = {};
1701
+ const response = await this.request({
1702
+ path: `/sdk/{environmentId}/flow/checkouts/{checkoutId}/transactions`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
1703
+ method: 'OPTIONS',
1704
+ headers: headerParameters,
1705
+ query: queryParameters,
1706
+ }, initOverrides);
1707
+ return new VoidApiResponse(response);
1708
+ }
1709
+ /**
1710
+ * Options call for this endpoint
1711
+ */
1712
+ async createFlowCheckoutTransactionOptions(requestParameters, initOverrides) {
1713
+ await this.createFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
1714
+ }
1502
1715
  /**
1503
1716
  * Creates a new global wallet connection for the authenticated user.
1504
1717
  * Create a global wallet connection
@@ -3552,6 +3765,7 @@ class SDKApi extends BaseAPI {
3552
3765
  await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
3553
3766
  }
3554
3767
  /**
3768
+ * Deprecated: use GET /sdk/{environmentId}/flow/transactions/{transactionId} instead.
3555
3769
  * Get a checkout transaction by ID
3556
3770
  */
3557
3771
  async getCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -3572,6 +3786,7 @@ class SDKApi extends BaseAPI {
3572
3786
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
3573
3787
  }
3574
3788
  /**
3789
+ * Deprecated: use GET /sdk/{environmentId}/flow/transactions/{transactionId} instead.
3575
3790
  * Get a checkout transaction by ID
3576
3791
  */
3577
3792
  async getCheckoutTransaction(requestParameters, initOverrides) {
@@ -4207,6 +4422,59 @@ class SDKApi extends BaseAPI {
4207
4422
  async getExchangeTransferDestinationsOptions(requestParameters, initOverrides) {
4208
4423
  await this.getExchangeTransferDestinationsOptionsRaw(requestParameters, initOverrides);
4209
4424
  }
4425
+ /**
4426
+ * Get a checkout transaction by ID
4427
+ */
4428
+ async getFlowCheckoutTransactionRaw(requestParameters, initOverrides) {
4429
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4430
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowCheckoutTransaction.');
4431
+ }
4432
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
4433
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling getFlowCheckoutTransaction.');
4434
+ }
4435
+ const queryParameters = {};
4436
+ const headerParameters = {};
4437
+ const response = await this.request({
4438
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
4439
+ method: 'GET',
4440
+ headers: headerParameters,
4441
+ query: queryParameters,
4442
+ }, initOverrides);
4443
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
4444
+ }
4445
+ /**
4446
+ * Get a checkout transaction by ID
4447
+ */
4448
+ async getFlowCheckoutTransaction(requestParameters, initOverrides) {
4449
+ const response = await this.getFlowCheckoutTransactionRaw(requestParameters, initOverrides);
4450
+ return await response.value();
4451
+ }
4452
+ /**
4453
+ * Options call for this endpoint
4454
+ */
4455
+ async getFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides) {
4456
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4457
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowCheckoutTransactionOptions.');
4458
+ }
4459
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
4460
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling getFlowCheckoutTransactionOptions.');
4461
+ }
4462
+ const queryParameters = {};
4463
+ const headerParameters = {};
4464
+ const response = await this.request({
4465
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
4466
+ method: 'OPTIONS',
4467
+ headers: headerParameters,
4468
+ query: queryParameters,
4469
+ }, initOverrides);
4470
+ return new VoidApiResponse(response);
4471
+ }
4472
+ /**
4473
+ * Options call for this endpoint
4474
+ */
4475
+ async getFlowCheckoutTransactionOptions(requestParameters, initOverrides) {
4476
+ await this.getFlowCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
4477
+ }
4210
4478
  /**
4211
4479
  * Returns the global wallet settings configured for the specified environment.
4212
4480
  * Get the global wallet settings for the environment
@@ -6808,7 +7076,7 @@ class SDKApi extends BaseAPI {
6808
7076
  await this.prefetchRaw(requestParameters, initOverrides);
6809
7077
  }
6810
7078
  /**
6811
- * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
7079
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/prepare instead. Validates quote freshness and risk clearance, then transitions the transaction to signing state.
6812
7080
  * Prepare a checkout transaction for signing
6813
7081
  */
6814
7082
  async prepareCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -6837,7 +7105,7 @@ class SDKApi extends BaseAPI {
6837
7105
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
6838
7106
  }
6839
7107
  /**
6840
- * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
7108
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/prepare instead. Validates quote freshness and risk clearance, then transitions the transaction to signing state.
6841
7109
  * Prepare a checkout transaction for signing
6842
7110
  */
6843
7111
  async prepareCheckoutTransaction(requestParameters, initOverrides) {
@@ -6870,6 +7138,69 @@ class SDKApi extends BaseAPI {
6870
7138
  async prepareCheckoutTransactionOptions(requestParameters, initOverrides) {
6871
7139
  await this.prepareCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
6872
7140
  }
7141
+ /**
7142
+ * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
7143
+ * Prepare a checkout transaction for signing
7144
+ */
7145
+ async prepareFlowTransactionRaw(requestParameters, initOverrides) {
7146
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7147
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling prepareFlowTransaction.');
7148
+ }
7149
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7150
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling prepareFlowTransaction.');
7151
+ }
7152
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
7153
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling prepareFlowTransaction.');
7154
+ }
7155
+ const queryParameters = {};
7156
+ const headerParameters = {};
7157
+ headerParameters['Content-Type'] = 'application/json';
7158
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
7159
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
7160
+ }
7161
+ const response = await this.request({
7162
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/prepare`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7163
+ method: 'POST',
7164
+ headers: headerParameters,
7165
+ query: queryParameters,
7166
+ body: PrepareSigningRequestToJSON(requestParameters.prepareSigningRequest),
7167
+ }, initOverrides);
7168
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
7169
+ }
7170
+ /**
7171
+ * Validates quote freshness and risk clearance, then transitions the transaction to signing state.
7172
+ * Prepare a checkout transaction for signing
7173
+ */
7174
+ async prepareFlowTransaction(requestParameters, initOverrides) {
7175
+ const response = await this.prepareFlowTransactionRaw(requestParameters, initOverrides);
7176
+ return await response.value();
7177
+ }
7178
+ /**
7179
+ * Options call for this endpoint
7180
+ */
7181
+ async prepareFlowTransactionOptionsRaw(requestParameters, initOverrides) {
7182
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7183
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling prepareFlowTransactionOptions.');
7184
+ }
7185
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7186
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling prepareFlowTransactionOptions.');
7187
+ }
7188
+ const queryParameters = {};
7189
+ const headerParameters = {};
7190
+ const response = await this.request({
7191
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/prepare`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7192
+ method: 'OPTIONS',
7193
+ headers: headerParameters,
7194
+ query: queryParameters,
7195
+ }, initOverrides);
7196
+ return new VoidApiResponse(response);
7197
+ }
7198
+ /**
7199
+ * Options call for this endpoint
7200
+ */
7201
+ async prepareFlowTransactionOptions(requestParameters, initOverrides) {
7202
+ await this.prepareFlowTransactionOptionsRaw(requestParameters, initOverrides);
7203
+ }
6873
7204
  /**
6874
7205
  * Publishes SDK analytics events for the given environment.
6875
7206
  * Publish SDK events
@@ -6901,7 +7232,7 @@ class SDKApi extends BaseAPI {
6901
7232
  await this.publishEventRaw(requestParameters, initOverrides);
6902
7233
  }
6903
7234
  /**
6904
- * Fetches a swap quote and stores a snapshot on the transaction.
7235
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/quote instead. Fetches a swap quote and stores a snapshot on the transaction.
6905
7236
  * Get a quote for a checkout transaction
6906
7237
  */
6907
7238
  async quoteCheckoutTransactionRaw(requestParameters, initOverrides) {
@@ -6933,7 +7264,7 @@ class SDKApi extends BaseAPI {
6933
7264
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
6934
7265
  }
6935
7266
  /**
6936
- * Fetches a swap quote and stores a snapshot on the transaction.
7267
+ * Deprecated: use POST /sdk/{environmentId}/flow/transactions/{transactionId}/quote instead. Fetches a swap quote and stores a snapshot on the transaction.
6937
7268
  * Get a quote for a checkout transaction
6938
7269
  */
6939
7270
  async quoteCheckoutTransaction(requestParameters, initOverrides) {
@@ -6966,6 +7297,72 @@ class SDKApi extends BaseAPI {
6966
7297
  async quoteCheckoutTransactionOptions(requestParameters, initOverrides) {
6967
7298
  await this.quoteCheckoutTransactionOptionsRaw(requestParameters, initOverrides);
6968
7299
  }
7300
+ /**
7301
+ * Fetches a swap quote and stores a snapshot on the transaction.
7302
+ * Get a quote for a checkout transaction
7303
+ */
7304
+ async quoteFlowTransactionRaw(requestParameters, initOverrides) {
7305
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7306
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling quoteFlowTransaction.');
7307
+ }
7308
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7309
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling quoteFlowTransaction.');
7310
+ }
7311
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
7312
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling quoteFlowTransaction.');
7313
+ }
7314
+ if (requestParameters.quoteRequest === null || requestParameters.quoteRequest === undefined) {
7315
+ throw new RequiredError('quoteRequest', 'Required parameter requestParameters.quoteRequest was null or undefined when calling quoteFlowTransaction.');
7316
+ }
7317
+ const queryParameters = {};
7318
+ const headerParameters = {};
7319
+ headerParameters['Content-Type'] = 'application/json';
7320
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
7321
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
7322
+ }
7323
+ const response = await this.request({
7324
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7325
+ method: 'POST',
7326
+ headers: headerParameters,
7327
+ query: queryParameters,
7328
+ body: QuoteRequestToJSON(requestParameters.quoteRequest),
7329
+ }, initOverrides);
7330
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
7331
+ }
7332
+ /**
7333
+ * Fetches a swap quote and stores a snapshot on the transaction.
7334
+ * Get a quote for a checkout transaction
7335
+ */
7336
+ async quoteFlowTransaction(requestParameters, initOverrides) {
7337
+ const response = await this.quoteFlowTransactionRaw(requestParameters, initOverrides);
7338
+ return await response.value();
7339
+ }
7340
+ /**
7341
+ * Options call for this endpoint
7342
+ */
7343
+ async quoteFlowTransactionOptionsRaw(requestParameters, initOverrides) {
7344
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7345
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling quoteFlowTransactionOptions.');
7346
+ }
7347
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7348
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling quoteFlowTransactionOptions.');
7349
+ }
7350
+ const queryParameters = {};
7351
+ const headerParameters = {};
7352
+ const response = await this.request({
7353
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/quote`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7354
+ method: 'OPTIONS',
7355
+ headers: headerParameters,
7356
+ query: queryParameters,
7357
+ }, initOverrides);
7358
+ return new VoidApiResponse(response);
7359
+ }
7360
+ /**
7361
+ * Options call for this endpoint
7362
+ */
7363
+ async quoteFlowTransactionOptions(requestParameters, initOverrides) {
7364
+ await this.quoteFlowTransactionOptionsRaw(requestParameters, initOverrides);
7365
+ }
6969
7366
  /**
6970
7367
  * Options call for this endpoint
6971
7368
  */
@@ -6990,7 +7387,7 @@ class SDKApi extends BaseAPI {
6990
7387
  await this.realtimeAuthOptionsRaw(requestParameters, initOverrides);
6991
7388
  }
6992
7389
  /**
6993
- * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7390
+ * 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.
6994
7391
  * Record a broadcast for a checkout transaction
6995
7392
  */
6996
7393
  async recordCheckoutBroadcastRaw(requestParameters, initOverrides) {
@@ -7022,13 +7419,53 @@ class SDKApi extends BaseAPI {
7022
7419
  return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
7023
7420
  }
7024
7421
  /**
7025
- * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7422
+ * 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.
7026
7423
  * Record a broadcast for a checkout transaction
7027
7424
  */
7028
7425
  async recordCheckoutBroadcast(requestParameters, initOverrides) {
7029
7426
  const response = await this.recordCheckoutBroadcastRaw(requestParameters, initOverrides);
7030
7427
  return await response.value();
7031
7428
  }
7429
+ /**
7430
+ * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7431
+ * Record a broadcast for a checkout transaction
7432
+ */
7433
+ async recordFlowBroadcastRaw(requestParameters, initOverrides) {
7434
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
7435
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling recordFlowBroadcast.');
7436
+ }
7437
+ if (requestParameters.transactionId === null || requestParameters.transactionId === undefined) {
7438
+ throw new RequiredError('transactionId', 'Required parameter requestParameters.transactionId was null or undefined when calling recordFlowBroadcast.');
7439
+ }
7440
+ if (requestParameters.xDynamicCheckoutSessionToken === null || requestParameters.xDynamicCheckoutSessionToken === undefined) {
7441
+ throw new RequiredError('xDynamicCheckoutSessionToken', 'Required parameter requestParameters.xDynamicCheckoutSessionToken was null or undefined when calling recordFlowBroadcast.');
7442
+ }
7443
+ if (requestParameters.recordBroadcastRequest === null || requestParameters.recordBroadcastRequest === undefined) {
7444
+ throw new RequiredError('recordBroadcastRequest', 'Required parameter requestParameters.recordBroadcastRequest was null or undefined when calling recordFlowBroadcast.');
7445
+ }
7446
+ const queryParameters = {};
7447
+ const headerParameters = {};
7448
+ headerParameters['Content-Type'] = 'application/json';
7449
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
7450
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
7451
+ }
7452
+ const response = await this.request({
7453
+ path: `/sdk/{environmentId}/flow/transactions/{transactionId}/broadcast`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"transactionId"}}`, encodeURIComponent(String(requestParameters.transactionId))),
7454
+ method: 'POST',
7455
+ headers: headerParameters,
7456
+ query: queryParameters,
7457
+ body: RecordBroadcastRequestToJSON(requestParameters.recordBroadcastRequest),
7458
+ }, initOverrides);
7459
+ return new JSONApiResponse(response, (jsonValue) => CheckoutTransactionFromJSON(jsonValue));
7460
+ }
7461
+ /**
7462
+ * Records the on-chain transaction hash and transitions the transaction to broadcasted state. This is the point of no return.
7463
+ * Record a broadcast for a checkout transaction
7464
+ */
7465
+ async recordFlowBroadcast(requestParameters, initOverrides) {
7466
+ const response = await this.recordFlowBroadcastRaw(requestParameters, initOverrides);
7467
+ return await response.value();
7468
+ }
7032
7469
  /**
7033
7470
  * Recovers the client key shares for the specified WAAS wallet from backup.
7034
7471
  * Recover WAAS keyshares