@dynamic-labs/sdk-api-core 0.151.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.
- package/package.json +1 -1
- package/src/apis/SDKApi.cjs +255 -0
- package/src/apis/SDKApi.cjs.map +1 -1
- package/src/apis/SDKApi.d.ts +105 -1
- package/src/apis/SDKApi.js +255 -0
- package/src/apis/SDKApi.js.map +1 -1
- package/src/apis/WaasApi.cjs +1 -0
- package/src/apis/WaasApi.cjs.map +1 -1
- package/src/apis/WaasApi.js +1 -0
- package/src/apis/WaasApi.js.map +1 -1
- package/src/index.cjs +20 -0
- package/src/index.cjs.map +1 -1
- package/src/index.js +3 -0
- package/src/index.js.map +1 -1
- package/src/models/AcceptBusinessAccountInviteResponse.cjs +36 -0
- package/src/models/AcceptBusinessAccountInviteResponse.cjs.map +1 -0
- package/src/models/AcceptBusinessAccountInviteResponse.d.ts +35 -0
- package/src/models/AcceptBusinessAccountInviteResponse.js +30 -0
- package/src/models/AcceptBusinessAccountInviteResponse.js.map +1 -0
- package/src/models/BusinessAccountInvite.cjs +70 -0
- package/src/models/BusinessAccountInvite.cjs.map +1 -0
- package/src/models/BusinessAccountInvite.d.ts +103 -0
- package/src/models/BusinessAccountInvite.js +64 -0
- package/src/models/BusinessAccountInvite.js.map +1 -0
- package/src/models/BusinessAccountInviteListResponse.cjs +33 -0
- package/src/models/BusinessAccountInviteListResponse.cjs.map +1 -0
- package/src/models/BusinessAccountInviteListResponse.d.ts +28 -0
- package/src/models/BusinessAccountInviteListResponse.js +27 -0
- package/src/models/BusinessAccountInviteListResponse.js.map +1 -0
- package/src/models/index.d.ts +3 -0
- package/src/version.cjs +1 -1
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var runtime = require('../runtime.cjs');
|
|
6
|
+
var AcceptBusinessAccountInviteResponse = require('../models/AcceptBusinessAccountInviteResponse.cjs');
|
|
6
7
|
var Account = require('../models/Account.cjs');
|
|
7
8
|
require('../models/ProviderEnum.cjs');
|
|
8
9
|
require('../models/UserIdentifierTypeEnum.cjs');
|
|
@@ -57,6 +58,8 @@ var BusinessAccountMember = require('../models/BusinessAccountMember.cjs');
|
|
|
57
58
|
require('../models/ChainEnum.cjs');
|
|
58
59
|
var BusinessAccountGovernanceResponse = require('../models/BusinessAccountGovernanceResponse.cjs');
|
|
59
60
|
require('../models/BusinessAccountGovernedAction.cjs');
|
|
61
|
+
require('../models/BusinessAccountInvite.cjs');
|
|
62
|
+
var BusinessAccountInviteListResponse = require('../models/BusinessAccountInviteListResponse.cjs');
|
|
60
63
|
var BusinessAccountList = require('../models/BusinessAccountList.cjs');
|
|
61
64
|
var BusinessAccountMemberCreationResult = require('../models/BusinessAccountMemberCreationResult.cjs');
|
|
62
65
|
require('../models/BusinessAccountMemberInviteReceipt.cjs');
|
|
@@ -376,6 +379,68 @@ var YieldVaultRewardsResponse = require('../models/YieldVaultRewardsResponse.cjs
|
|
|
376
379
|
*
|
|
377
380
|
*/
|
|
378
381
|
class SDKApi extends runtime.BaseAPI {
|
|
382
|
+
/**
|
|
383
|
+
* Activates the authenticated user\'s pending RBAC membership and creates their business account member record atomically. The target user is always the authenticated JWT subject. Repeating a successful acceptance returns the same accepted invitation and active member.
|
|
384
|
+
* Accept a pending business account invitation
|
|
385
|
+
*/
|
|
386
|
+
async acceptBusinessAccountInviteRaw(requestParameters, initOverrides) {
|
|
387
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
388
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling acceptBusinessAccountInvite.');
|
|
389
|
+
}
|
|
390
|
+
if (requestParameters.inviteId === null || requestParameters.inviteId === undefined) {
|
|
391
|
+
throw new runtime.RequiredError('inviteId', 'Required parameter requestParameters.inviteId was null or undefined when calling acceptBusinessAccountInvite.');
|
|
392
|
+
}
|
|
393
|
+
const queryParameters = {};
|
|
394
|
+
const headerParameters = {};
|
|
395
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
396
|
+
const token = this.configuration.accessToken;
|
|
397
|
+
const tokenString = await token("bearerAuth", []);
|
|
398
|
+
if (tokenString) {
|
|
399
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
const response = await this.request({
|
|
403
|
+
path: `/sdk/{environmentId}/businessAccounts/invites/{inviteId}/accept`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"inviteId"}}`, encodeURIComponent(String(requestParameters.inviteId))),
|
|
404
|
+
method: 'POST',
|
|
405
|
+
headers: headerParameters,
|
|
406
|
+
query: queryParameters,
|
|
407
|
+
}, initOverrides);
|
|
408
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AcceptBusinessAccountInviteResponse.AcceptBusinessAccountInviteResponseFromJSON(jsonValue));
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Activates the authenticated user\'s pending RBAC membership and creates their business account member record atomically. The target user is always the authenticated JWT subject. Repeating a successful acceptance returns the same accepted invitation and active member.
|
|
412
|
+
* Accept a pending business account invitation
|
|
413
|
+
*/
|
|
414
|
+
async acceptBusinessAccountInvite(requestParameters, initOverrides) {
|
|
415
|
+
const response = await this.acceptBusinessAccountInviteRaw(requestParameters, initOverrides);
|
|
416
|
+
return await response.value();
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Options call for this endpoint
|
|
420
|
+
*/
|
|
421
|
+
async acceptBusinessAccountInviteOptionsRaw(requestParameters, initOverrides) {
|
|
422
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
423
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling acceptBusinessAccountInviteOptions.');
|
|
424
|
+
}
|
|
425
|
+
if (requestParameters.inviteId === null || requestParameters.inviteId === undefined) {
|
|
426
|
+
throw new runtime.RequiredError('inviteId', 'Required parameter requestParameters.inviteId was null or undefined when calling acceptBusinessAccountInviteOptions.');
|
|
427
|
+
}
|
|
428
|
+
const queryParameters = {};
|
|
429
|
+
const headerParameters = {};
|
|
430
|
+
const response = await this.request({
|
|
431
|
+
path: `/sdk/{environmentId}/businessAccounts/invites/{inviteId}/accept`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"inviteId"}}`, encodeURIComponent(String(requestParameters.inviteId))),
|
|
432
|
+
method: 'OPTIONS',
|
|
433
|
+
headers: headerParameters,
|
|
434
|
+
query: queryParameters,
|
|
435
|
+
}, initOverrides);
|
|
436
|
+
return new runtime.VoidApiResponse(response);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Options call for this endpoint
|
|
440
|
+
*/
|
|
441
|
+
async acceptBusinessAccountInviteOptions(requestParameters, initOverrides) {
|
|
442
|
+
await this.acceptBusinessAccountInviteOptionsRaw(requestParameters, initOverrides);
|
|
443
|
+
}
|
|
379
444
|
/**
|
|
380
445
|
* Sets the source wallet address and chain on a flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow\'s state and by CORS. A source can be attached while the flow is initiated, source_attached, quoted or signing, so a payer can switch source before broadcasting. Unlike quote, prepare, broadcast and cancel, which always require the session token, attach needs no token for the first attach or while the flow is source_attached or quoted. From signing, the current session token must be supplied (X-Dynamic-Flow-Session-Token) to prove the caller is the original signer; otherwise the request is rejected with 403 session_token_invalid. Once the flow has been broadcasted or source_detected, or has reached a terminal state, the request is rejected with 409 flow_invalid_transition. Each attach mints a new session token and invalidates the previous one, so at most one live token exists per flow at a time.
|
|
381
446
|
* Attach a source to a flow and mint a session token
|
|
@@ -1007,6 +1072,73 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
1007
1072
|
async broadcastWaasTransactionOptions(requestParameters, initOverrides) {
|
|
1008
1073
|
await this.broadcastWaasTransactionOptionsRaw(requestParameters, initOverrides);
|
|
1009
1074
|
}
|
|
1075
|
+
/**
|
|
1076
|
+
* 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.
|
|
1077
|
+
* Build Token-2022 confidential-transfer transactions
|
|
1078
|
+
*/
|
|
1079
|
+
async buildWaasConfidentialTransactionRaw(requestParameters, initOverrides) {
|
|
1080
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1081
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling buildWaasConfidentialTransaction.');
|
|
1082
|
+
}
|
|
1083
|
+
if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
|
|
1084
|
+
throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling buildWaasConfidentialTransaction.');
|
|
1085
|
+
}
|
|
1086
|
+
if (requestParameters.waasSignConfidentialTransferRequest === null || requestParameters.waasSignConfidentialTransferRequest === undefined) {
|
|
1087
|
+
throw new runtime.RequiredError('waasSignConfidentialTransferRequest', 'Required parameter requestParameters.waasSignConfidentialTransferRequest was null or undefined when calling buildWaasConfidentialTransaction.');
|
|
1088
|
+
}
|
|
1089
|
+
const queryParameters = {};
|
|
1090
|
+
const headerParameters = {};
|
|
1091
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1092
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1093
|
+
const token = this.configuration.accessToken;
|
|
1094
|
+
const tokenString = await token("bearerAuth", []);
|
|
1095
|
+
if (tokenString) {
|
|
1096
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
const response = await this.request({
|
|
1100
|
+
path: `/sdk/{environmentId}/waas/{walletId}/buildConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
|
|
1101
|
+
method: 'POST',
|
|
1102
|
+
headers: headerParameters,
|
|
1103
|
+
query: queryParameters,
|
|
1104
|
+
body: WaasSignConfidentialTransferRequest.WaasSignConfidentialTransferRequestToJSON(requestParameters.waasSignConfidentialTransferRequest),
|
|
1105
|
+
}, initOverrides);
|
|
1106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WaasSignConfidentialTransferResponse.WaasSignConfidentialTransferResponseFromJSON(jsonValue));
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* 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.
|
|
1110
|
+
* Build Token-2022 confidential-transfer transactions
|
|
1111
|
+
*/
|
|
1112
|
+
async buildWaasConfidentialTransaction(requestParameters, initOverrides) {
|
|
1113
|
+
const response = await this.buildWaasConfidentialTransactionRaw(requestParameters, initOverrides);
|
|
1114
|
+
return await response.value();
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Options call for this endpoint
|
|
1118
|
+
*/
|
|
1119
|
+
async buildWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides) {
|
|
1120
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1121
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling buildWaasConfidentialTransactionOptions.');
|
|
1122
|
+
}
|
|
1123
|
+
if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
|
|
1124
|
+
throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling buildWaasConfidentialTransactionOptions.');
|
|
1125
|
+
}
|
|
1126
|
+
const queryParameters = {};
|
|
1127
|
+
const headerParameters = {};
|
|
1128
|
+
const response = await this.request({
|
|
1129
|
+
path: `/sdk/{environmentId}/waas/{walletId}/buildConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
|
|
1130
|
+
method: 'OPTIONS',
|
|
1131
|
+
headers: headerParameters,
|
|
1132
|
+
query: queryParameters,
|
|
1133
|
+
}, initOverrides);
|
|
1134
|
+
return new runtime.VoidApiResponse(response);
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Options call for this endpoint
|
|
1138
|
+
*/
|
|
1139
|
+
async buildWaasConfidentialTransactionOptions(requestParameters, initOverrides) {
|
|
1140
|
+
await this.buildWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides);
|
|
1141
|
+
}
|
|
1010
1142
|
/**
|
|
1011
1143
|
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/cancel instead. Cancels a pre-broadcast transaction. Only allowed before the transaction is broadcasted.
|
|
1012
1144
|
* Cancel a checkout transaction
|
|
@@ -3822,6 +3954,62 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
3822
3954
|
async getBackupTokenOptions(requestParameters, initOverrides) {
|
|
3823
3955
|
await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
|
|
3824
3956
|
}
|
|
3957
|
+
/**
|
|
3958
|
+
* Returns unexpired invitations sent to the authenticated user in this environment. Invitee identity comes exclusively from the authenticated JWT and cannot be supplied in the request.
|
|
3959
|
+
* List the authenticated user\'s pending business account invitations
|
|
3960
|
+
*/
|
|
3961
|
+
async getBusinessAccountInvitesRaw(requestParameters, initOverrides) {
|
|
3962
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3963
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountInvites.');
|
|
3964
|
+
}
|
|
3965
|
+
const queryParameters = {};
|
|
3966
|
+
const headerParameters = {};
|
|
3967
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3968
|
+
const token = this.configuration.accessToken;
|
|
3969
|
+
const tokenString = await token("bearerAuth", []);
|
|
3970
|
+
if (tokenString) {
|
|
3971
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3972
|
+
}
|
|
3973
|
+
}
|
|
3974
|
+
const response = await this.request({
|
|
3975
|
+
path: `/sdk/{environmentId}/businessAccounts/invites`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
3976
|
+
method: 'GET',
|
|
3977
|
+
headers: headerParameters,
|
|
3978
|
+
query: queryParameters,
|
|
3979
|
+
}, initOverrides);
|
|
3980
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountInviteListResponse.BusinessAccountInviteListResponseFromJSON(jsonValue));
|
|
3981
|
+
}
|
|
3982
|
+
/**
|
|
3983
|
+
* Returns unexpired invitations sent to the authenticated user in this environment. Invitee identity comes exclusively from the authenticated JWT and cannot be supplied in the request.
|
|
3984
|
+
* List the authenticated user\'s pending business account invitations
|
|
3985
|
+
*/
|
|
3986
|
+
async getBusinessAccountInvites(requestParameters, initOverrides) {
|
|
3987
|
+
const response = await this.getBusinessAccountInvitesRaw(requestParameters, initOverrides);
|
|
3988
|
+
return await response.value();
|
|
3989
|
+
}
|
|
3990
|
+
/**
|
|
3991
|
+
* Options call for this endpoint
|
|
3992
|
+
*/
|
|
3993
|
+
async getBusinessAccountInvitesOptionsRaw(requestParameters, initOverrides) {
|
|
3994
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3995
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountInvitesOptions.');
|
|
3996
|
+
}
|
|
3997
|
+
const queryParameters = {};
|
|
3998
|
+
const headerParameters = {};
|
|
3999
|
+
const response = await this.request({
|
|
4000
|
+
path: `/sdk/{environmentId}/businessAccounts/invites`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
4001
|
+
method: 'OPTIONS',
|
|
4002
|
+
headers: headerParameters,
|
|
4003
|
+
query: queryParameters,
|
|
4004
|
+
}, initOverrides);
|
|
4005
|
+
return new runtime.VoidApiResponse(response);
|
|
4006
|
+
}
|
|
4007
|
+
/**
|
|
4008
|
+
* Options call for this endpoint
|
|
4009
|
+
*/
|
|
4010
|
+
async getBusinessAccountInvitesOptions(requestParameters, initOverrides) {
|
|
4011
|
+
await this.getBusinessAccountInvitesOptionsRaw(requestParameters, initOverrides);
|
|
4012
|
+
}
|
|
3825
4013
|
/**
|
|
3826
4014
|
* Returns the Composition account-Layer content for the business account — the Rules that apply to every wallet in the business account. BA owner/admin only. Returns 404 if the caller is not a qualifying owner/admin of the business account, or if the account-Layer has not been minted yet (it\'s created by the first PATCH to this path, or the first time a signer is added to a wallet in this business account with Composition enabled — see the PATCH docs on this same path).
|
|
3827
4015
|
* Get the business account\'s account-Layer Rules
|
|
@@ -11577,6 +11765,73 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
11577
11765
|
async signMessageOptions(requestParameters, initOverrides) {
|
|
11578
11766
|
await this.signMessageOptionsRaw(requestParameters, initOverrides);
|
|
11579
11767
|
}
|
|
11768
|
+
/**
|
|
11769
|
+
* 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.
|
|
11770
|
+
* Co-sign enclave-built confidential-transfer transactions
|
|
11771
|
+
*/
|
|
11772
|
+
async signWaasConfidentialTransactionRaw(requestParameters, initOverrides) {
|
|
11773
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
11774
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling signWaasConfidentialTransaction.');
|
|
11775
|
+
}
|
|
11776
|
+
if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
|
|
11777
|
+
throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling signWaasConfidentialTransaction.');
|
|
11778
|
+
}
|
|
11779
|
+
if (requestParameters.waasSignConfidentialTransactionsRequest === null || requestParameters.waasSignConfidentialTransactionsRequest === undefined) {
|
|
11780
|
+
throw new runtime.RequiredError('waasSignConfidentialTransactionsRequest', 'Required parameter requestParameters.waasSignConfidentialTransactionsRequest was null or undefined when calling signWaasConfidentialTransaction.');
|
|
11781
|
+
}
|
|
11782
|
+
const queryParameters = {};
|
|
11783
|
+
const headerParameters = {};
|
|
11784
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
11785
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
11786
|
+
const token = this.configuration.accessToken;
|
|
11787
|
+
const tokenString = await token("bearerAuth", []);
|
|
11788
|
+
if (tokenString) {
|
|
11789
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
11790
|
+
}
|
|
11791
|
+
}
|
|
11792
|
+
const response = await this.request({
|
|
11793
|
+
path: `/sdk/{environmentId}/waas/{walletId}/signConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
|
|
11794
|
+
method: 'POST',
|
|
11795
|
+
headers: headerParameters,
|
|
11796
|
+
query: queryParameters,
|
|
11797
|
+
body: WaasSignConfidentialTransactionsRequest.WaasSignConfidentialTransactionsRequestToJSON(requestParameters.waasSignConfidentialTransactionsRequest),
|
|
11798
|
+
}, initOverrides);
|
|
11799
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WaasSignConfidentialTransactionsResponse.WaasSignConfidentialTransactionsResponseFromJSON(jsonValue));
|
|
11800
|
+
}
|
|
11801
|
+
/**
|
|
11802
|
+
* 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.
|
|
11803
|
+
* Co-sign enclave-built confidential-transfer transactions
|
|
11804
|
+
*/
|
|
11805
|
+
async signWaasConfidentialTransaction(requestParameters, initOverrides) {
|
|
11806
|
+
const response = await this.signWaasConfidentialTransactionRaw(requestParameters, initOverrides);
|
|
11807
|
+
return await response.value();
|
|
11808
|
+
}
|
|
11809
|
+
/**
|
|
11810
|
+
* Options call for this endpoint
|
|
11811
|
+
*/
|
|
11812
|
+
async signWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides) {
|
|
11813
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
11814
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling signWaasConfidentialTransactionOptions.');
|
|
11815
|
+
}
|
|
11816
|
+
if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
|
|
11817
|
+
throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling signWaasConfidentialTransactionOptions.');
|
|
11818
|
+
}
|
|
11819
|
+
const queryParameters = {};
|
|
11820
|
+
const headerParameters = {};
|
|
11821
|
+
const response = await this.request({
|
|
11822
|
+
path: `/sdk/{environmentId}/waas/{walletId}/signConfidentialTransaction`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
|
|
11823
|
+
method: 'OPTIONS',
|
|
11824
|
+
headers: headerParameters,
|
|
11825
|
+
query: queryParameters,
|
|
11826
|
+
}, initOverrides);
|
|
11827
|
+
return new runtime.VoidApiResponse(response);
|
|
11828
|
+
}
|
|
11829
|
+
/**
|
|
11830
|
+
* Options call for this endpoint
|
|
11831
|
+
*/
|
|
11832
|
+
async signWaasConfidentialTransactionOptions(requestParameters, initOverrides) {
|
|
11833
|
+
await this.signWaasConfidentialTransactionOptionsRaw(requestParameters, initOverrides);
|
|
11834
|
+
}
|
|
11580
11835
|
/**
|
|
11581
11836
|
* 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.
|
|
11582
11837
|
* Co-sign enclave-built confidential-transfer transactions
|