@dynamic-labs/sdk-api-core 0.148.0 → 0.150.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 +73 -46
- package/src/apis/SDKApi.cjs.map +1 -1
- package/src/apis/SDKApi.d.ts +32 -20
- package/src/apis/SDKApi.js +73 -46
- package/src/apis/SDKApi.js.map +1 -1
- package/src/index.cjs +8 -4
- package/src/index.cjs.map +1 -1
- package/src/index.js +2 -1
- package/src/index.js.map +1 -1
- package/src/models/WaasSignConfidentialTransactionsRequest.cjs +39 -0
- package/src/models/WaasSignConfidentialTransactionsRequest.cjs.map +1 -0
- package/src/models/WaasSignConfidentialTransactionsRequest.d.ts +45 -0
- package/src/models/WaasSignConfidentialTransactionsRequest.js +33 -0
- package/src/models/WaasSignConfidentialTransactionsRequest.js.map +1 -0
- package/src/models/WaasSignConfidentialTransactionsResponse.cjs +43 -0
- package/src/models/WaasSignConfidentialTransactionsResponse.cjs.map +1 -0
- package/src/models/WaasSignConfidentialTransactionsResponse.d.ts +27 -0
- package/src/models/WaasSignConfidentialTransactionsResponse.js +37 -0
- package/src/models/WaasSignConfidentialTransactionsResponse.js.map +1 -0
- package/src/models/WaasSignConfidentialTransferRequest.d.ts +1 -1
- package/src/models/WaasSignConfidentialTransferResponse.cjs +2 -2
- package/src/models/WaasSignConfidentialTransferResponse.cjs.map +1 -1
- package/src/models/WaasSignConfidentialTransferResponse.d.ts +4 -4
- package/src/models/WaasSignConfidentialTransferResponse.js +2 -2
- package/src/models/WaasSignConfidentialTransferResponse.js.map +1 -1
- package/src/models/WaasSvmConfidentialBalanceRequest.d.ts +1 -1
- package/src/models/index.d.ts +2 -1
- package/src/version.cjs +1 -1
- package/src/version.js +1 -1
- package/src/models/WaasConfidentialSeedPutRequest.cjs +0 -39
- package/src/models/WaasConfidentialSeedPutRequest.cjs.map +0 -1
- package/src/models/WaasConfidentialSeedPutRequest.d.ts +0 -45
- package/src/models/WaasConfidentialSeedPutRequest.js +0 -33
- package/src/models/WaasConfidentialSeedPutRequest.js.map +0 -1
package/package.json
CHANGED
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -325,7 +325,6 @@ var VerifyResponse = require('../models/VerifyResponse.cjs');
|
|
|
325
325
|
var VerifyUnlinkRequest = require('../models/VerifyUnlinkRequest.cjs');
|
|
326
326
|
require('../models/WaasBroadcastStatus.cjs');
|
|
327
327
|
var WaasConfidentialSeedCreateRequest = require('../models/WaasConfidentialSeedCreateRequest.cjs');
|
|
328
|
-
var WaasConfidentialSeedPutRequest = require('../models/WaasConfidentialSeedPutRequest.cjs');
|
|
329
328
|
var WaasConfidentialSeedResponse = require('../models/WaasConfidentialSeedResponse.cjs');
|
|
330
329
|
require('../models/WaasConfidentialTransferOperation.cjs');
|
|
331
330
|
require('../models/WaasDelegatedAccessEncryptionPublicKeyType.cjs');
|
|
@@ -341,6 +340,8 @@ require('../models/WaasPolicyLayerTranslationWarning.cjs');
|
|
|
341
340
|
var WaasPolicyLayerUpdateRequest = require('../models/WaasPolicyLayerUpdateRequest.cjs');
|
|
342
341
|
require('../models/WaasReshareIntent.cjs');
|
|
343
342
|
var WaasSignAndBroadcastRequest = require('../models/WaasSignAndBroadcastRequest.cjs');
|
|
343
|
+
var WaasSignConfidentialTransactionsRequest = require('../models/WaasSignConfidentialTransactionsRequest.cjs');
|
|
344
|
+
var WaasSignConfidentialTransactionsResponse = require('../models/WaasSignConfidentialTransactionsResponse.cjs');
|
|
344
345
|
var WaasSignConfidentialTransferRequest = require('../models/WaasSignConfidentialTransferRequest.cjs');
|
|
345
346
|
var WaasSignConfidentialTransferResponse = require('../models/WaasSignConfidentialTransferResponse.cjs');
|
|
346
347
|
var WaasSignerPolicyLayerUpdateRequest = require('../models/WaasSignerPolicyLayerUpdateRequest.cjs');
|
|
@@ -7992,47 +7993,6 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
7992
7993
|
async publishEvent(requestParameters, initOverrides) {
|
|
7993
7994
|
await this.publishEventRaw(requestParameters, initOverrides);
|
|
7994
7995
|
}
|
|
7995
|
-
/**
|
|
7996
|
-
* Stores an Evervault-sealed Token-2022 confidential-transfer seed for the wallet via client-keyshare-service. Insert-only per (wallet, address, derivation version) — a repeat write returns 409. The sealed seed is opaque to redcoast.
|
|
7997
|
-
* Store a Solana confidential-transfer seed
|
|
7998
|
-
*/
|
|
7999
|
-
async putWaasConfidentialSeedRaw(requestParameters, initOverrides) {
|
|
8000
|
-
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
8001
|
-
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling putWaasConfidentialSeed.');
|
|
8002
|
-
}
|
|
8003
|
-
if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
|
|
8004
|
-
throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling putWaasConfidentialSeed.');
|
|
8005
|
-
}
|
|
8006
|
-
if (requestParameters.waasConfidentialSeedPutRequest === null || requestParameters.waasConfidentialSeedPutRequest === undefined) {
|
|
8007
|
-
throw new runtime.RequiredError('waasConfidentialSeedPutRequest', 'Required parameter requestParameters.waasConfidentialSeedPutRequest was null or undefined when calling putWaasConfidentialSeed.');
|
|
8008
|
-
}
|
|
8009
|
-
const queryParameters = {};
|
|
8010
|
-
const headerParameters = {};
|
|
8011
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
8012
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
8013
|
-
const token = this.configuration.accessToken;
|
|
8014
|
-
const tokenString = await token("bearerAuth", []);
|
|
8015
|
-
if (tokenString) {
|
|
8016
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
8017
|
-
}
|
|
8018
|
-
}
|
|
8019
|
-
const response = await this.request({
|
|
8020
|
-
path: `/sdk/{environmentId}/waas/{walletId}/confidentialSeed`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
|
|
8021
|
-
method: 'PUT',
|
|
8022
|
-
headers: headerParameters,
|
|
8023
|
-
query: queryParameters,
|
|
8024
|
-
body: WaasConfidentialSeedPutRequest.WaasConfidentialSeedPutRequestToJSON(requestParameters.waasConfidentialSeedPutRequest),
|
|
8025
|
-
}, initOverrides);
|
|
8026
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => WaasConfidentialSeedResponse.WaasConfidentialSeedResponseFromJSON(jsonValue));
|
|
8027
|
-
}
|
|
8028
|
-
/**
|
|
8029
|
-
* Stores an Evervault-sealed Token-2022 confidential-transfer seed for the wallet via client-keyshare-service. Insert-only per (wallet, address, derivation version) — a repeat write returns 409. The sealed seed is opaque to redcoast.
|
|
8030
|
-
* Store a Solana confidential-transfer seed
|
|
8031
|
-
*/
|
|
8032
|
-
async putWaasConfidentialSeed(requestParameters, initOverrides) {
|
|
8033
|
-
const response = await this.putWaasConfidentialSeedRaw(requestParameters, initOverrides);
|
|
8034
|
-
return await response.value();
|
|
8035
|
-
}
|
|
8036
7996
|
/**
|
|
8037
7997
|
* Deprecated: use POST /sdk/{environmentId}/flow/{flowId}/quote instead. Fetches a swap quote and stores a snapshot on the transaction.
|
|
8038
7998
|
* Get a quote for a checkout transaction
|
|
@@ -11616,8 +11576,75 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
11616
11576
|
await this.signMessageOptionsRaw(requestParameters, initOverrides);
|
|
11617
11577
|
}
|
|
11618
11578
|
/**
|
|
11619
|
-
*
|
|
11620
|
-
*
|
|
11579
|
+
* 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.
|
|
11580
|
+
* Co-sign enclave-built confidential-transfer transactions
|
|
11581
|
+
*/
|
|
11582
|
+
async signWaasConfidentialTransactionsRaw(requestParameters, initOverrides) {
|
|
11583
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
11584
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling signWaasConfidentialTransactions.');
|
|
11585
|
+
}
|
|
11586
|
+
if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
|
|
11587
|
+
throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling signWaasConfidentialTransactions.');
|
|
11588
|
+
}
|
|
11589
|
+
if (requestParameters.waasSignConfidentialTransactionsRequest === null || requestParameters.waasSignConfidentialTransactionsRequest === undefined) {
|
|
11590
|
+
throw new runtime.RequiredError('waasSignConfidentialTransactionsRequest', 'Required parameter requestParameters.waasSignConfidentialTransactionsRequest was null or undefined when calling signWaasConfidentialTransactions.');
|
|
11591
|
+
}
|
|
11592
|
+
const queryParameters = {};
|
|
11593
|
+
const headerParameters = {};
|
|
11594
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
11595
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
11596
|
+
const token = this.configuration.accessToken;
|
|
11597
|
+
const tokenString = await token("bearerAuth", []);
|
|
11598
|
+
if (tokenString) {
|
|
11599
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
11600
|
+
}
|
|
11601
|
+
}
|
|
11602
|
+
const response = await this.request({
|
|
11603
|
+
path: `/sdk/{environmentId}/waas/{walletId}/signConfidentialTransactions`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
|
|
11604
|
+
method: 'POST',
|
|
11605
|
+
headers: headerParameters,
|
|
11606
|
+
query: queryParameters,
|
|
11607
|
+
body: WaasSignConfidentialTransactionsRequest.WaasSignConfidentialTransactionsRequestToJSON(requestParameters.waasSignConfidentialTransactionsRequest),
|
|
11608
|
+
}, initOverrides);
|
|
11609
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WaasSignConfidentialTransactionsResponse.WaasSignConfidentialTransactionsResponseFromJSON(jsonValue));
|
|
11610
|
+
}
|
|
11611
|
+
/**
|
|
11612
|
+
* 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.
|
|
11613
|
+
* Co-sign enclave-built confidential-transfer transactions
|
|
11614
|
+
*/
|
|
11615
|
+
async signWaasConfidentialTransactions(requestParameters, initOverrides) {
|
|
11616
|
+
const response = await this.signWaasConfidentialTransactionsRaw(requestParameters, initOverrides);
|
|
11617
|
+
return await response.value();
|
|
11618
|
+
}
|
|
11619
|
+
/**
|
|
11620
|
+
* Options call for this endpoint
|
|
11621
|
+
*/
|
|
11622
|
+
async signWaasConfidentialTransactionsOptionsRaw(requestParameters, initOverrides) {
|
|
11623
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
11624
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling signWaasConfidentialTransactionsOptions.');
|
|
11625
|
+
}
|
|
11626
|
+
if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
|
|
11627
|
+
throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling signWaasConfidentialTransactionsOptions.');
|
|
11628
|
+
}
|
|
11629
|
+
const queryParameters = {};
|
|
11630
|
+
const headerParameters = {};
|
|
11631
|
+
const response = await this.request({
|
|
11632
|
+
path: `/sdk/{environmentId}/waas/{walletId}/signConfidentialTransactions`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
|
|
11633
|
+
method: 'OPTIONS',
|
|
11634
|
+
headers: headerParameters,
|
|
11635
|
+
query: queryParameters,
|
|
11636
|
+
}, initOverrides);
|
|
11637
|
+
return new runtime.VoidApiResponse(response);
|
|
11638
|
+
}
|
|
11639
|
+
/**
|
|
11640
|
+
* Options call for this endpoint
|
|
11641
|
+
*/
|
|
11642
|
+
async signWaasConfidentialTransactionsOptions(requestParameters, initOverrides) {
|
|
11643
|
+
await this.signWaasConfidentialTransactionsOptionsRaw(requestParameters, initOverrides);
|
|
11644
|
+
}
|
|
11645
|
+
/**
|
|
11646
|
+
* 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.
|
|
11647
|
+
* Build Token-2022 confidential-transfer transactions
|
|
11621
11648
|
*/
|
|
11622
11649
|
async signWaasConfidentialTransferRaw(requestParameters, initOverrides) {
|
|
11623
11650
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
@@ -11649,8 +11676,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
11649
11676
|
return new runtime.JSONApiResponse(response, (jsonValue) => WaasSignConfidentialTransferResponse.WaasSignConfidentialTransferResponseFromJSON(jsonValue));
|
|
11650
11677
|
}
|
|
11651
11678
|
/**
|
|
11652
|
-
* 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
|
|
11653
|
-
* Build
|
|
11679
|
+
* 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.
|
|
11680
|
+
* Build Token-2022 confidential-transfer transactions
|
|
11654
11681
|
*/
|
|
11655
11682
|
async signWaasConfidentialTransfer(requestParameters, initOverrides) {
|
|
11656
11683
|
const response = await this.signWaasConfidentialTransferRaw(requestParameters, initOverrides);
|