@dynamic-labs/sdk-api-core 0.2.0 → 0.3.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/src/apis/SDKApi.d.ts
CHANGED
|
@@ -1377,6 +1377,11 @@ export interface UpdateAdditionalAddressesOptionsRequest {
|
|
|
1377
1377
|
environmentId: string;
|
|
1378
1378
|
walletId: string;
|
|
1379
1379
|
}
|
|
1380
|
+
export interface UpdateBusinessAccountPolicyLayerRequest {
|
|
1381
|
+
environmentId: string;
|
|
1382
|
+
businessAccountId: string;
|
|
1383
|
+
waasPolicyLayerUpdateRequest: WaasPolicyLayerUpdateRequest;
|
|
1384
|
+
}
|
|
1380
1385
|
export interface UpdateEmbeddedWalletRecoveryEmailRequest {
|
|
1381
1386
|
environmentId: string;
|
|
1382
1387
|
updateRecoveryEmailRequest: UpdateRecoveryEmailRequest;
|
|
@@ -1686,12 +1691,12 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
1686
1691
|
*/
|
|
1687
1692
|
broadcastFlowOptions(requestParameters: BroadcastFlowOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
1688
1693
|
/**
|
|
1689
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
1694
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
1690
1695
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
1691
1696
|
*/
|
|
1692
1697
|
broadcastWaasTransactionRaw(requestParameters: BroadcastWaasTransactionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasTransactionBroadcastResponse>>;
|
|
1693
1698
|
/**
|
|
1694
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
1699
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
1695
1700
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
1696
1701
|
*/
|
|
1697
1702
|
broadcastWaasTransaction(requestParameters: BroadcastWaasTransactionRequest, initOverrides?: RequestInit): Promise<WaasTransactionBroadcastResponse>;
|
|
@@ -2508,12 +2513,12 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
2508
2513
|
*/
|
|
2509
2514
|
getBackupTokenOptions(requestParameters: GetBackupTokenOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
2510
2515
|
/**
|
|
2511
|
-
* 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.
|
|
2516
|
+
* 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).
|
|
2512
2517
|
* Get the business account\'s account-Layer Rules
|
|
2513
2518
|
*/
|
|
2514
2519
|
getBusinessAccountPolicyLayerRaw(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
|
|
2515
2520
|
/**
|
|
2516
|
-
* 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.
|
|
2521
|
+
* 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).
|
|
2517
2522
|
* Get the business account\'s account-Layer Rules
|
|
2518
2523
|
*/
|
|
2519
2524
|
getBusinessAccountPolicyLayer(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
|
|
@@ -4617,6 +4622,16 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
4617
4622
|
* Options call for this endpoint
|
|
4618
4623
|
*/
|
|
4619
4624
|
updateAdditionalAddressesOptions(requestParameters: UpdateAdditionalAddressesOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
4625
|
+
/**
|
|
4626
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
4627
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
4628
|
+
*/
|
|
4629
|
+
updateBusinessAccountPolicyLayerRaw(requestParameters: UpdateBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
|
|
4630
|
+
/**
|
|
4631
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
4632
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
4633
|
+
*/
|
|
4634
|
+
updateBusinessAccountPolicyLayer(requestParameters: UpdateBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
|
|
4620
4635
|
/**
|
|
4621
4636
|
* Updates the V2 recovery email address for the authenticated user.
|
|
4622
4637
|
* Update a user\'s V2 recovery email
|
package/src/apis/SDKApi.js
CHANGED
|
@@ -866,7 +866,7 @@ class SDKApi extends BaseAPI {
|
|
|
866
866
|
await this.broadcastFlowOptionsRaw(requestParameters, initOverrides);
|
|
867
867
|
}
|
|
868
868
|
/**
|
|
869
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
869
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
870
870
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
871
871
|
*/
|
|
872
872
|
async broadcastWaasTransactionRaw(requestParameters, initOverrides) {
|
|
@@ -905,7 +905,7 @@ class SDKApi extends BaseAPI {
|
|
|
905
905
|
return new JSONApiResponse(response, (jsonValue) => WaasTransactionBroadcastResponseFromJSON(jsonValue));
|
|
906
906
|
}
|
|
907
907
|
/**
|
|
908
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
908
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
909
909
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
910
910
|
*/
|
|
911
911
|
async broadcastWaasTransaction(requestParameters, initOverrides) {
|
|
@@ -3698,7 +3698,7 @@ class SDKApi extends BaseAPI {
|
|
|
3698
3698
|
await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
|
|
3699
3699
|
}
|
|
3700
3700
|
/**
|
|
3701
|
-
* 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.
|
|
3701
|
+
* 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).
|
|
3702
3702
|
* Get the business account\'s account-Layer Rules
|
|
3703
3703
|
*/
|
|
3704
3704
|
async getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
|
|
@@ -3726,7 +3726,7 @@ class SDKApi extends BaseAPI {
|
|
|
3726
3726
|
return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
|
|
3727
3727
|
}
|
|
3728
3728
|
/**
|
|
3729
|
-
* 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.
|
|
3729
|
+
* 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).
|
|
3730
3730
|
* Get the business account\'s account-Layer Rules
|
|
3731
3731
|
*/
|
|
3732
3732
|
async getBusinessAccountPolicyLayer(requestParameters, initOverrides) {
|
|
@@ -10735,6 +10735,47 @@ class SDKApi extends BaseAPI {
|
|
|
10735
10735
|
async updateAdditionalAddressesOptions(requestParameters, initOverrides) {
|
|
10736
10736
|
await this.updateAdditionalAddressesOptionsRaw(requestParameters, initOverrides);
|
|
10737
10737
|
}
|
|
10738
|
+
/**
|
|
10739
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
10740
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
10741
|
+
*/
|
|
10742
|
+
async updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
|
|
10743
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
10744
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateBusinessAccountPolicyLayer.');
|
|
10745
|
+
}
|
|
10746
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
10747
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling updateBusinessAccountPolicyLayer.');
|
|
10748
|
+
}
|
|
10749
|
+
if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
|
|
10750
|
+
throw new RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateBusinessAccountPolicyLayer.');
|
|
10751
|
+
}
|
|
10752
|
+
const queryParameters = {};
|
|
10753
|
+
const headerParameters = {};
|
|
10754
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
10755
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10756
|
+
const token = this.configuration.accessToken;
|
|
10757
|
+
const tokenString = await token("bearerAuth", []);
|
|
10758
|
+
if (tokenString) {
|
|
10759
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10760
|
+
}
|
|
10761
|
+
}
|
|
10762
|
+
const response = await this.request({
|
|
10763
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
10764
|
+
method: 'PATCH',
|
|
10765
|
+
headers: headerParameters,
|
|
10766
|
+
query: queryParameters,
|
|
10767
|
+
body: WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
|
|
10768
|
+
}, initOverrides);
|
|
10769
|
+
return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
|
|
10770
|
+
}
|
|
10771
|
+
/**
|
|
10772
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
10773
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
10774
|
+
*/
|
|
10775
|
+
async updateBusinessAccountPolicyLayer(requestParameters, initOverrides) {
|
|
10776
|
+
const response = await this.updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
|
|
10777
|
+
return await response.value();
|
|
10778
|
+
}
|
|
10738
10779
|
/**
|
|
10739
10780
|
* Updates the V2 recovery email address for the authenticated user.
|
|
10740
10781
|
* Update a user\'s V2 recovery email
|