@dynamic-labs/sdk-api-core 0.152.0 → 0.153.0

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.
@@ -104,6 +104,15 @@ export interface BroadcastWaasTransactionOptionsRequest {
104
104
  environmentId: string;
105
105
  walletId: string;
106
106
  }
107
+ export interface BuildWaasConfidentialTransactionRequest {
108
+ environmentId: string;
109
+ walletId: string;
110
+ waasSignConfidentialTransferRequest: WaasSignConfidentialTransferRequest;
111
+ }
112
+ export interface BuildWaasConfidentialTransactionOptionsRequest {
113
+ environmentId: string;
114
+ walletId: string;
115
+ }
107
116
  export interface CancelCheckoutTransactionRequest {
108
117
  environmentId: string;
109
118
  transactionId: string;
@@ -1510,6 +1519,15 @@ export interface SignMessageOptionsRequest {
1510
1519
  environmentId: string;
1511
1520
  walletId: string;
1512
1521
  }
1522
+ export interface SignWaasConfidentialTransactionRequest {
1523
+ environmentId: string;
1524
+ walletId: string;
1525
+ waasSignConfidentialTransactionsRequest: WaasSignConfidentialTransactionsRequest;
1526
+ }
1527
+ export interface SignWaasConfidentialTransactionOptionsRequest {
1528
+ environmentId: string;
1529
+ walletId: string;
1530
+ }
1513
1531
  export interface SignWaasConfidentialTransactionsRequest {
1514
1532
  environmentId: string;
1515
1533
  walletId: string;
@@ -2025,6 +2043,24 @@ export declare class SDKApi extends runtime.BaseAPI {
2025
2043
  * Options call for this endpoint
2026
2044
  */
2027
2045
  broadcastWaasTransactionOptions(requestParameters: BroadcastWaasTransactionOptionsRequest, initOverrides?: RequestInit): Promise<void>;
2046
+ /**
2047
+ * Decrypts the wallet\'s stored confidential seed inside the enclave, generates the zero-knowledge proofs the requested operation requires, builds the Token-2022 confidential-transfer instructions and returns the transactions unsigned (the wallet\'s signature slot is zeroed) in broadcast order, plus a `transactionsTag` binding them. Signing is a separate step: submit the transactions and tag unchanged to `POST /waas/{walletId}/signConfidentialTransactions`, which co-signs inside caller-visible MPC rooms. The enclave is offline: the caller supplies the token accounts\' raw on-chain state (`accountState`, `destinationAccountState`), the cluster rent constant (`lamportsPerByte`) and a fresh `recentBlockhash`/`lastValidBlockHeight`. Confidential amounts are opaque on-chain — policy screens the operation, mint and addresses but cannot evaluate the transferred amount.
2048
+ * Build Token-2022 confidential-transfer transactions
2049
+ */
2050
+ buildWaasConfidentialTransactionRaw(requestParameters: BuildWaasConfidentialTransactionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasSignConfidentialTransferResponse>>;
2051
+ /**
2052
+ * Decrypts the wallet\'s stored confidential seed inside the enclave, generates the zero-knowledge proofs the requested operation requires, builds the Token-2022 confidential-transfer instructions and returns the transactions unsigned (the wallet\'s signature slot is zeroed) in broadcast order, plus a `transactionsTag` binding them. Signing is a separate step: submit the transactions and tag unchanged to `POST /waas/{walletId}/signConfidentialTransactions`, which co-signs inside caller-visible MPC rooms. The enclave is offline: the caller supplies the token accounts\' raw on-chain state (`accountState`, `destinationAccountState`), the cluster rent constant (`lamportsPerByte`) and a fresh `recentBlockhash`/`lastValidBlockHeight`. Confidential amounts are opaque on-chain — policy screens the operation, mint and addresses but cannot evaluate the transferred amount.
2053
+ * Build Token-2022 confidential-transfer transactions
2054
+ */
2055
+ buildWaasConfidentialTransaction(requestParameters: BuildWaasConfidentialTransactionRequest, initOverrides?: RequestInit): Promise<WaasSignConfidentialTransferResponse>;
2056
+ /**
2057
+ * Options call for this endpoint
2058
+ */
2059
+ buildWaasConfidentialTransactionOptionsRaw(requestParameters: BuildWaasConfidentialTransactionOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
2060
+ /**
2061
+ * Options call for this endpoint
2062
+ */
2063
+ buildWaasConfidentialTransactionOptions(requestParameters: BuildWaasConfidentialTransactionOptionsRequest, initOverrides?: RequestInit): Promise<void>;
2028
2064
  /**
2029
2065
  * Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
2030
2066
  * Cancel a checkout transaction
@@ -5119,6 +5155,24 @@ export declare class SDKApi extends runtime.BaseAPI {
5119
5155
  * Options call for this endpoint
5120
5156
  */
5121
5157
  signMessageOptions(requestParameters: SignMessageOptionsRequest, initOverrides?: RequestInit): Promise<void>;
5158
+ /**
5159
+ * Second half of the confidential-transfer flow. Provisions one MPC signing room for the operation (Solana v1 packs it into a single transaction) and hands the enclave-built transaction and its `transactionsTag` to the enclave\'s `SignConfidentialTransactions` action, which verifies the tag — rejecting tampered, extra or expired transactions — and joins the room to co-sign. MFA step-up is enforced once for the whole operation. The response returns immediately with the room id; join it with the wallet\'s client share to complete the threshold signature.
5160
+ * Co-sign enclave-built confidential-transfer transactions
5161
+ */
5162
+ signWaasConfidentialTransactionRaw(requestParameters: SignWaasConfidentialTransactionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasSignConfidentialTransactionsResponse>>;
5163
+ /**
5164
+ * Second half of the confidential-transfer flow. Provisions one MPC signing room for the operation (Solana v1 packs it into a single transaction) and hands the enclave-built transaction and its `transactionsTag` to the enclave\'s `SignConfidentialTransactions` action, which verifies the tag — rejecting tampered, extra or expired transactions — and joins the room to co-sign. MFA step-up is enforced once for the whole operation. The response returns immediately with the room id; join it with the wallet\'s client share to complete the threshold signature.
5165
+ * Co-sign enclave-built confidential-transfer transactions
5166
+ */
5167
+ signWaasConfidentialTransaction(requestParameters: SignWaasConfidentialTransactionRequest, initOverrides?: RequestInit): Promise<WaasSignConfidentialTransactionsResponse>;
5168
+ /**
5169
+ * Options call for this endpoint
5170
+ */
5171
+ signWaasConfidentialTransactionOptionsRaw(requestParameters: SignWaasConfidentialTransactionOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
5172
+ /**
5173
+ * Options call for this endpoint
5174
+ */
5175
+ signWaasConfidentialTransactionOptions(requestParameters: SignWaasConfidentialTransactionOptionsRequest, initOverrides?: RequestInit): Promise<void>;
5122
5176
  /**
5123
5177
  * Second half of the confidential-transfer flow. Provisions one MPC signing room for the operation (Solana v1 packs it into a single transaction) and hands the enclave-built transaction and its `transactionsTag` to the enclave\'s `SignConfidentialTransactions` action, which verifies the tag — rejecting tampered, extra or expired transactions — and joins the room to co-sign. MFA step-up is enforced once for the whole operation. The response returns immediately with the room id; join it with the wallet\'s client share to complete the threshold signature.
5124
5178
  * Co-sign enclave-built confidential-transfer transactions
@@ -1068,6 +1068,73 @@ class SDKApi extends BaseAPI {
1068
1068
  async broadcastWaasTransactionOptions(requestParameters, initOverrides) {
1069
1069
  await this.broadcastWaasTransactionOptionsRaw(requestParameters, initOverrides);
1070
1070
  }
1071
+ /**
1072
+ * Decrypts the wallet\'s stored confidential seed inside the enclave, generates the zero-knowledge proofs the requested operation requires, builds the Token-2022 confidential-transfer instructions and returns the transactions unsigned (the wallet\'s signature slot is zeroed) in broadcast order, plus a `transactionsTag` binding them. Signing is a separate step: submit the transactions and tag unchanged to `POST /waas/{walletId}/signConfidentialTransactions`, which co-signs inside caller-visible MPC rooms. The enclave is offline: the caller supplies the token accounts\' raw on-chain state (`accountState`, `destinationAccountState`), the cluster rent constant (`lamportsPerByte`) and a fresh `recentBlockhash`/`lastValidBlockHeight`. Confidential amounts are opaque on-chain — policy screens the operation, mint and addresses but cannot evaluate the transferred amount.
1073
+ * Build Token-2022 confidential-transfer transactions
1074
+ */
1075
+ async buildWaasConfidentialTransactionRaw(requestParameters, initOverrides) {
1076
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1077
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling buildWaasConfidentialTransaction.');
1078
+ }
1079
+ if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
1080
+ throw new RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling buildWaasConfidentialTransaction.');
1081
+ }
1082
+ if (requestParameters.waasSignConfidentialTransferRequest === null || requestParameters.waasSignConfidentialTransferRequest === undefined) {
1083
+ throw new RequiredError('waasSignConfidentialTransferRequest', 'Required parameter requestParameters.waasSignConfidentialTransferRequest was null or undefined when calling buildWaasConfidentialTransaction.');
1084
+ }
1085
+ const queryParameters = {};
1086
+ const headerParameters = {};
1087
+ headerParameters['Content-Type'] = 'application/json';
1088
+ if (this.configuration && this.configuration.accessToken) {
1089
+ const token = this.configuration.accessToken;
1090
+ const tokenString = await token("bearerAuth", []);
1091
+ if (tokenString) {
1092
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1093
+ }
1094
+ }
1095
+ const response = await this.request({
1096
+ path: `/sdk/{environmentId}/waas/{walletId}/buildConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
1097
+ method: 'POST',
1098
+ headers: headerParameters,
1099
+ query: queryParameters,
1100
+ body: WaasSignConfidentialTransferRequestToJSON(requestParameters.waasSignConfidentialTransferRequest),
1101
+ }, initOverrides);
1102
+ return new JSONApiResponse(response, (jsonValue) => WaasSignConfidentialTransferResponseFromJSON(jsonValue));
1103
+ }
1104
+ /**
1105
+ * Decrypts the wallet\'s stored confidential seed inside the enclave, generates the zero-knowledge proofs the requested operation requires, builds the Token-2022 confidential-transfer instructions and returns the transactions unsigned (the wallet\'s signature slot is zeroed) in broadcast order, plus a `transactionsTag` binding them. Signing is a separate step: submit the transactions and tag unchanged to `POST /waas/{walletId}/signConfidentialTransactions`, which co-signs inside caller-visible MPC rooms. The enclave is offline: the caller supplies the token accounts\' raw on-chain state (`accountState`, `destinationAccountState`), the cluster rent constant (`lamportsPerByte`) and a fresh `recentBlockhash`/`lastValidBlockHeight`. Confidential amounts are opaque on-chain — policy screens the operation, mint and addresses but cannot evaluate the transferred amount.
1106
+ * Build Token-2022 confidential-transfer transactions
1107
+ */
1108
+ async buildWaasConfidentialTransaction(requestParameters, initOverrides) {
1109
+ const response = await this.buildWaasConfidentialTransactionRaw(requestParameters, initOverrides);
1110
+ return await response.value();
1111
+ }
1112
+ /**
1113
+ * Options call for this endpoint
1114
+ */
1115
+ async buildWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides) {
1116
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1117
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling buildWaasConfidentialTransactionOptions.');
1118
+ }
1119
+ if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
1120
+ throw new RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling buildWaasConfidentialTransactionOptions.');
1121
+ }
1122
+ const queryParameters = {};
1123
+ const headerParameters = {};
1124
+ const response = await this.request({
1125
+ path: `/sdk/{environmentId}/waas/{walletId}/buildConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
1126
+ method: 'OPTIONS',
1127
+ headers: headerParameters,
1128
+ query: queryParameters,
1129
+ }, initOverrides);
1130
+ return new VoidApiResponse(response);
1131
+ }
1132
+ /**
1133
+ * Options call for this endpoint
1134
+ */
1135
+ async buildWaasConfidentialTransactionOptions(requestParameters, initOverrides) {
1136
+ await this.buildWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides);
1137
+ }
1071
1138
  /**
1072
1139
  * Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
1073
1140
  * Cancel a checkout transaction
@@ -11694,6 +11761,73 @@ class SDKApi extends BaseAPI {
11694
11761
  async signMessageOptions(requestParameters, initOverrides) {
11695
11762
  await this.signMessageOptionsRaw(requestParameters, initOverrides);
11696
11763
  }
11764
+ /**
11765
+ * Second half of the confidential-transfer flow. Provisions one MPC signing room for the operation (Solana v1 packs it into a single transaction) and hands the enclave-built transaction and its `transactionsTag` to the enclave\'s `SignConfidentialTransactions` action, which verifies the tag — rejecting tampered, extra or expired transactions — and joins the room to co-sign. MFA step-up is enforced once for the whole operation. The response returns immediately with the room id; join it with the wallet\'s client share to complete the threshold signature.
11766
+ * Co-sign enclave-built confidential-transfer transactions
11767
+ */
11768
+ async signWaasConfidentialTransactionRaw(requestParameters, initOverrides) {
11769
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
11770
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling signWaasConfidentialTransaction.');
11771
+ }
11772
+ if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
11773
+ throw new RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling signWaasConfidentialTransaction.');
11774
+ }
11775
+ if (requestParameters.waasSignConfidentialTransactionsRequest === null || requestParameters.waasSignConfidentialTransactionsRequest === undefined) {
11776
+ throw new RequiredError('waasSignConfidentialTransactionsRequest', 'Required parameter requestParameters.waasSignConfidentialTransactionsRequest was null or undefined when calling signWaasConfidentialTransaction.');
11777
+ }
11778
+ const queryParameters = {};
11779
+ const headerParameters = {};
11780
+ headerParameters['Content-Type'] = 'application/json';
11781
+ if (this.configuration && this.configuration.accessToken) {
11782
+ const token = this.configuration.accessToken;
11783
+ const tokenString = await token("bearerAuth", []);
11784
+ if (tokenString) {
11785
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
11786
+ }
11787
+ }
11788
+ const response = await this.request({
11789
+ path: `/sdk/{environmentId}/waas/{walletId}/signConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
11790
+ method: 'POST',
11791
+ headers: headerParameters,
11792
+ query: queryParameters,
11793
+ body: WaasSignConfidentialTransactionsRequestToJSON(requestParameters.waasSignConfidentialTransactionsRequest),
11794
+ }, initOverrides);
11795
+ return new JSONApiResponse(response, (jsonValue) => WaasSignConfidentialTransactionsResponseFromJSON(jsonValue));
11796
+ }
11797
+ /**
11798
+ * Second half of the confidential-transfer flow. Provisions one MPC signing room for the operation (Solana v1 packs it into a single transaction) and hands the enclave-built transaction and its `transactionsTag` to the enclave\'s `SignConfidentialTransactions` action, which verifies the tag — rejecting tampered, extra or expired transactions — and joins the room to co-sign. MFA step-up is enforced once for the whole operation. The response returns immediately with the room id; join it with the wallet\'s client share to complete the threshold signature.
11799
+ * Co-sign enclave-built confidential-transfer transactions
11800
+ */
11801
+ async signWaasConfidentialTransaction(requestParameters, initOverrides) {
11802
+ const response = await this.signWaasConfidentialTransactionRaw(requestParameters, initOverrides);
11803
+ return await response.value();
11804
+ }
11805
+ /**
11806
+ * Options call for this endpoint
11807
+ */
11808
+ async signWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides) {
11809
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
11810
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling signWaasConfidentialTransactionOptions.');
11811
+ }
11812
+ if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
11813
+ throw new RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling signWaasConfidentialTransactionOptions.');
11814
+ }
11815
+ const queryParameters = {};
11816
+ const headerParameters = {};
11817
+ const response = await this.request({
11818
+ path: `/sdk/{environmentId}/waas/{walletId}/signConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
11819
+ method: 'OPTIONS',
11820
+ headers: headerParameters,
11821
+ query: queryParameters,
11822
+ }, initOverrides);
11823
+ return new VoidApiResponse(response);
11824
+ }
11825
+ /**
11826
+ * Options call for this endpoint
11827
+ */
11828
+ async signWaasConfidentialTransactionOptions(requestParameters, initOverrides) {
11829
+ await this.signWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides);
11830
+ }
11697
11831
  /**
11698
11832
  * Second half of the confidential-transfer flow. Provisions one MPC signing room for the operation (Solana v1 packs it into a single transaction) and hands the enclave-built transaction and its `transactionsTag` to the enclave\'s `SignConfidentialTransactions` action, which verifies the tag — rejecting tampered, extra or expired transactions — and joins the room to co-sign. MFA step-up is enforced once for the whole operation. The response returns immediately with the room id; join it with the wallet\'s client share to complete the threshold signature.
11699
11833
  * Co-sign enclave-built confidential-transfer transactions