@dynamic-labs-sdk/client 1.24.1 → 1.26.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/dist/client/core/createCore/createCore.d.ts.map +1 -1
- package/dist/client/core/types/DynamicCore.d.ts +11 -0
- package/dist/client/core/types/DynamicCore.d.ts.map +1 -1
- package/dist/core.cjs +7 -7
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +6 -7
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +6 -6
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/CoinbaseTransferMfaFailedError.d.ts +34 -0
- package/dist/errors/CoinbaseTransferMfaFailedError.d.ts.map +1 -0
- package/dist/errors/CoinbaseTransferMfaRequiredError.d.ts +37 -0
- package/dist/errors/CoinbaseTransferMfaRequiredError.d.ts.map +1 -0
- package/dist/errors/CoinbaseTravelRuleRequiredError.d.ts +55 -0
- package/dist/errors/CoinbaseTravelRuleRequiredError.d.ts.map +1 -0
- package/dist/errors/TransactionBroadcastError.d.ts +44 -0
- package/dist/errors/TransactionBroadcastError.d.ts.map +1 -0
- package/dist/exports/core.d.ts +2 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +9 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +3 -1
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/exports/waasCore.d.ts +1 -1
- package/dist/exports/waasCore.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-nLBIQ_5p.native.esm.js → getNetworkProviderFromNetworkId-C5GtE2ef.native.esm.js} +29 -4
- package/dist/getNetworkProviderFromNetworkId-C5GtE2ef.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-CIcatN8-.cjs → getNetworkProviderFromNetworkId-CSxvdrc9.cjs} +32 -2
- package/dist/{getNetworkProviderFromNetworkId-CYONf9-8.esm.js.map → getNetworkProviderFromNetworkId-CSxvdrc9.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CYONf9-8.esm.js → getNetworkProviderFromNetworkId-D7lIOS6I.esm.js} +27 -3
- package/dist/getNetworkProviderFromNetworkId-D7lIOS6I.esm.js.map +1 -0
- package/dist/{getSignedSessionId-B2kslh_k.esm.js → getSignedSessionId-B5Dijw-8.native.esm.js} +12 -3
- package/dist/{getSignedSessionId-DV0hK3Tu.native.esm.js.map → getSignedSessionId-B5Dijw-8.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-DV0hK3Tu.native.esm.js → getSignedSessionId-BiL9k0nE.esm.js} +3 -3
- package/dist/getSignedSessionId-BiL9k0nE.esm.js.map +1 -0
- package/dist/{getSignedSessionId-NZ8ndqG1.cjs → getSignedSessionId-CpcQiZTF.cjs} +17 -2
- package/dist/getSignedSessionId-CpcQiZTF.cjs.map +1 -0
- package/dist/{getWalletProviderByKey-DzKZXm5S.cjs → getWalletProviderByKey-BMJ9TcjM.cjs} +2 -2
- package/dist/{getWalletProviderByKey-DzKZXm5S.cjs.map → getWalletProviderByKey-BMJ9TcjM.cjs.map} +1 -1
- package/dist/{getWalletProviderByKey-DPZP397j.native.esm.js → getWalletProviderByKey-CBIrILYZ.native.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-DPZP397j.native.esm.js.map → getWalletProviderByKey-CBIrILYZ.native.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-Dh3JbMi6.esm.js → getWalletProviderByKey-CU8zmrf2.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-Dh3JbMi6.esm.js.map → getWalletProviderByKey-CU8zmrf2.esm.js.map} +1 -1
- package/dist/index.cjs +405 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +397 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +397 -8
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isDynamicWaasEnabled-BbhbghRE.esm.js → isDynamicWaasEnabled-CBvSRUgG.esm.js} +34 -3
- package/dist/isDynamicWaasEnabled-CBvSRUgG.esm.js.map +1 -0
- package/dist/{isDynamicWaasEnabled-BmB0lQJf.native.esm.js → isDynamicWaasEnabled-d82cX7j9.native.esm.js} +34 -3
- package/dist/isDynamicWaasEnabled-d82cX7j9.native.esm.js.map +1 -0
- package/dist/{isDynamicWaasEnabled-D2U3MRnA.cjs → isDynamicWaasEnabled-idmeju9B.cjs} +39 -2
- package/dist/isDynamicWaasEnabled-idmeju9B.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-DP0kk0tY.native.esm.js → isMfaRequiredForAction-1O_rFiPN.native.esm.js} +32 -3
- package/dist/isMfaRequiredForAction-1O_rFiPN.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-DBlmv1ew.esm.js → isMfaRequiredForAction-D1rhRlDu.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-DBlmv1ew.esm.js.map → isMfaRequiredForAction-D1rhRlDu.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DCyorelQ.cjs → isMfaRequiredForAction-D5o4qznt.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-DCyorelQ.cjs.map → isMfaRequiredForAction-D5o4qznt.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-DygWGu6p.cjs → isUserOnboardingComplete-BfRUVwrT.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-DygWGu6p.cjs.map → isUserOnboardingComplete-BfRUVwrT.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-Ebw4x90F.native.esm.js → isUserOnboardingComplete-bR7jwdjO.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-Ebw4x90F.native.esm.js.map → isUserOnboardingComplete-bR7jwdjO.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-WzXFgdor.esm.js → isUserOnboardingComplete-k3nlisFA.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-WzXFgdor.esm.js.map → isUserOnboardingComplete-k3nlisFA.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-CzPWPaDr.cjs → migrateFromFireblocks-BcYmEZ3_.cjs} +3 -54
- package/dist/migrateFromFireblocks-BcYmEZ3_.cjs.map +1 -0
- package/dist/{migrateFromFireblocks-BkcGdF_B.esm.js → migrateFromFireblocks-Bm7eIfaa.esm.js} +4 -43
- package/dist/migrateFromFireblocks-Bm7eIfaa.esm.js.map +1 -0
- package/dist/migrateFromFireblocks-DVP5tGv_.native.esm.js +65 -0
- package/dist/migrateFromFireblocks-DVP5tGv_.native.esm.js.map +1 -0
- package/dist/modules/apiClient/utils/clientErrorMapper/clientErrorMapper.d.ts.map +1 -1
- package/dist/modules/auth/social/social.types.d.ts +1 -1
- package/dist/modules/auth/social/social.types.d.ts.map +1 -1
- package/dist/modules/funding/coinbase/coinbase.consts.d.ts +74 -0
- package/dist/modules/funding/coinbase/coinbase.consts.d.ts.map +1 -0
- package/dist/modules/funding/coinbase/coinbase.types.d.ts +150 -1
- package/dist/modules/funding/coinbase/coinbase.types.d.ts.map +1 -1
- package/dist/modules/funding/coinbase/createCoinbaseExchangeTransfer/createCoinbaseExchangeTransfer.d.ts +83 -0
- package/dist/modules/funding/coinbase/createCoinbaseExchangeTransfer/createCoinbaseExchangeTransfer.d.ts.map +1 -0
- package/dist/modules/funding/coinbase/createCoinbaseExchangeTransfer/index.d.ts +3 -0
- package/dist/modules/funding/coinbase/createCoinbaseExchangeTransfer/index.d.ts.map +1 -0
- package/dist/modules/funding/coinbase/getCoinbaseAccounts/getCoinbaseAccounts.d.ts +41 -0
- package/dist/modules/funding/coinbase/getCoinbaseAccounts/getCoinbaseAccounts.d.ts.map +1 -0
- package/dist/modules/funding/coinbase/getCoinbaseAccounts/index.d.ts +3 -0
- package/dist/modules/funding/coinbase/getCoinbaseAccounts/index.d.ts.map +1 -0
- package/dist/modules/funding/coinbase/utils/parseCoinbaseTravelRuleMissingFields/index.d.ts +2 -0
- package/dist/modules/funding/coinbase/utils/parseCoinbaseTravelRuleMissingFields/index.d.ts.map +1 -0
- package/dist/modules/funding/coinbase/utils/parseCoinbaseTravelRuleMissingFields/parseCoinbaseTravelRuleMissingFields.d.ts +26 -0
- package/dist/modules/funding/coinbase/utils/parseCoinbaseTravelRuleMissingFields/parseCoinbaseTravelRuleMissingFields.d.ts.map +1 -0
- package/dist/modules/waas/broadcastWaasTransaction/broadcastWaasTransaction.d.ts +18 -0
- package/dist/modules/waas/broadcastWaasTransaction/broadcastWaasTransaction.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.d.ts +13 -1
- package/dist/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.d.ts +2 -1
- package/dist/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.d.ts +15 -2
- package/dist/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts +32 -0
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
- package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
- package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
- package/dist/modules/waas/transactionBroadcastErrorMapper/transactionBroadcastErrorMapper.d.ts +8 -0
- package/dist/modules/waas/transactionBroadcastErrorMapper/transactionBroadcastErrorMapper.d.ts.map +1 -0
- package/dist/modules/waas/waas.types.d.ts +14 -0
- package/dist/modules/waas/waas.types.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderRegistry/index.d.ts +2 -1
- package/dist/modules/wallets/walletProviderRegistry/index.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.consts.d.ts +34 -0
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.consts.d.ts.map +1 -0
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts +5 -21
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts.map +1 -1
- package/dist/services/appForeground/appForeground.types.d.ts +36 -0
- package/dist/services/appForeground/appForeground.types.d.ts.map +1 -0
- package/dist/services/appForeground/createAppForegroundSubscriber/createAppForegroundSubscriber.d.ts +12 -0
- package/dist/services/appForeground/createAppForegroundSubscriber/createAppForegroundSubscriber.d.ts.map +1 -0
- package/dist/services/appForeground/createAppForegroundSubscriber/index.d.ts +2 -0
- package/dist/services/appForeground/createAppForegroundSubscriber/index.d.ts.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{updateAuthFromVerifyResponse-B8tDJdXY.cjs → updateAuthFromVerifyResponse-CPOvKWih.cjs} +20 -26
- package/dist/updateAuthFromVerifyResponse-CPOvKWih.cjs.map +1 -0
- package/dist/{NativeModuleNotLinkedError-dFDBC524.native.esm.js → updateAuthFromVerifyResponse-CTfG6oZa.native.esm.js} +21 -56
- package/dist/updateAuthFromVerifyResponse-CTfG6oZa.native.esm.js.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-C_yGmd99.esm.js → updateAuthFromVerifyResponse-CfqviWkz.esm.js} +20 -26
- package/dist/updateAuthFromVerifyResponse-CfqviWkz.esm.js.map +1 -0
- package/dist/utils/assertChainName/assertChainName.d.ts +15 -0
- package/dist/utils/assertChainName/assertChainName.d.ts.map +1 -0
- package/dist/utils/assertChainName/index.d.ts +2 -0
- package/dist/utils/assertChainName/index.d.ts.map +1 -0
- package/dist/waas.cjs +75 -35
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +75 -37
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +75 -36
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +138 -12
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +135 -9
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +351 -8
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/NativeModuleNotLinkedError-dFDBC524.native.esm.js.map +0 -1
- package/dist/consumeMfaTokenIfRequiredForAction-DdGzQwQQ.esm.js +0 -12
- package/dist/consumeMfaTokenIfRequiredForAction-DdGzQwQQ.esm.js.map +0 -1
- package/dist/consumeMfaTokenIfRequiredForAction-IsOFRL68.cjs +0 -17
- package/dist/consumeMfaTokenIfRequiredForAction-IsOFRL68.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-CIcatN8-.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-nLBIQ_5p.native.esm.js.map +0 -1
- package/dist/getSignedSessionId-B2kslh_k.esm.js.map +0 -1
- package/dist/getSignedSessionId-NZ8ndqG1.cjs.map +0 -1
- package/dist/isDynamicWaasEnabled-BbhbghRE.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-BmB0lQJf.native.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-D2U3MRnA.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-DP0kk0tY.native.esm.js.map +0 -1
- package/dist/migrateFromFireblocks-BkcGdF_B.esm.js.map +0 -1
- package/dist/migrateFromFireblocks-C1yQ4dm7.native.esm.js +0 -321
- package/dist/migrateFromFireblocks-C1yQ4dm7.native.esm.js.map +0 -1
- package/dist/migrateFromFireblocks-CzPWPaDr.cjs.map +0 -1
- package/dist/updateAuthFromVerifyResponse-B8tDJdXY.cjs.map +0 -1
- package/dist/updateAuthFromVerifyResponse-C_yGmd99.esm.js.map +0 -1
package/dist/waas.cjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-
|
|
2
|
-
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-
|
|
3
|
-
const require_getWalletProviderByKey = require('./getWalletProviderByKey-
|
|
4
|
-
require('./
|
|
5
|
-
const require_migrateFromFireblocks = require('./migrateFromFireblocks-CzPWPaDr.cjs');
|
|
1
|
+
const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CPOvKWih.cjs');
|
|
2
|
+
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-idmeju9B.cjs');
|
|
3
|
+
const require_getWalletProviderByKey = require('./getWalletProviderByKey-BMJ9TcjM.cjs');
|
|
4
|
+
const require_migrateFromFireblocks = require('./migrateFromFireblocks-BcYmEZ3_.cjs');
|
|
6
5
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
7
6
|
let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
|
|
8
7
|
|
|
@@ -55,7 +54,7 @@ const addBusinessAccountMember = async ({ businessAccountId, targetIdentity, rol
|
|
|
55
54
|
targetIdentity
|
|
56
55
|
});
|
|
57
56
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
58
|
-
const apiClient = require_updateAuthFromVerifyResponse.createApiClient({}, client);
|
|
57
|
+
const apiClient = require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccountmemberadd }, client);
|
|
59
58
|
const { userId, identifier, identifierType, socialProvider, smsCountryCode } = targetIdentity;
|
|
60
59
|
return await apiClient.sdkAddBusinessAccountMember({
|
|
61
60
|
addBusinessAccountMemberSdkRequest: {
|
|
@@ -117,7 +116,7 @@ const addBusinessAccountSigner = async ({ walletAccount, businessAccountId, wall
|
|
|
117
116
|
const linkWalletId = walletId ?? walletAccount.verifiedCredentialId;
|
|
118
117
|
require_updateAuthFromVerifyResponse.assertDefined(linkWalletId, "addBusinessAccountSigner: cannot resolve a wallet id to link — pass walletId, or use a verified wallet account");
|
|
119
118
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
120
|
-
resolvedBusinessAccountId = (await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkLinkBusinessAccountWallet({
|
|
119
|
+
resolvedBusinessAccountId = (await require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccountsigneradd }, client).sdkLinkBusinessAccountWallet({
|
|
121
120
|
environmentId: core.environmentId,
|
|
122
121
|
linkBusinessAccountWalletSdkRequest: { walletId: linkWalletId }
|
|
123
122
|
})).id;
|
|
@@ -152,7 +151,7 @@ const addBusinessAccountSigner = async ({ walletAccount, businessAccountId, wall
|
|
|
152
151
|
*/
|
|
153
152
|
const addWalletToBusinessAccount = async ({ businessAccountId, walletId }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
154
153
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
155
|
-
const detail = await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkLinkBusinessAccountWallet({
|
|
154
|
+
const detail = await require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccountlinkWallet }, client).sdkLinkBusinessAccountWallet({
|
|
156
155
|
environmentId: core.environmentId,
|
|
157
156
|
linkBusinessAccountWalletSdkRequest: {
|
|
158
157
|
businessAccountId,
|
|
@@ -186,24 +185,6 @@ const backupWaasKeySharesToGoogleDrive = async ({ googleDriveAccessToken, passwo
|
|
|
186
185
|
});
|
|
187
186
|
};
|
|
188
187
|
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region src/modules/waas/businessAccounts/getBusinessAccountsClient/getBusinessAccountsClient.ts
|
|
191
|
-
/**
|
|
192
|
-
* Returns the business accounts API client for the first enabled WaaS chain.
|
|
193
|
-
*
|
|
194
|
-
* @param client - The Dynamic client instance.
|
|
195
|
-
* @returns The business accounts API client.
|
|
196
|
-
* @throws {InvalidParamError} When no WaaS chain configuration is enabled for the project.
|
|
197
|
-
* @notInstrumented
|
|
198
|
-
*/
|
|
199
|
-
const getBusinessAccountsClient = (client) => {
|
|
200
|
-
const projectSettings = client.projectSettings;
|
|
201
|
-
require_updateAuthFromVerifyResponse.assertDefined(projectSettings, "Project settings are not available");
|
|
202
|
-
const chainConfig = projectSettings.sdk.embeddedWallets?.chainConfigurations?.find((chain) => chain.enabled);
|
|
203
|
-
if (!chainConfig) throw new require_updateAuthFromVerifyResponse.InvalidParamError("No WaaS chain is enabled for this project");
|
|
204
|
-
return require_migrateFromFireblocks.createWaasClient({ chainName: require_migrateFromFireblocks.getWaasChainNameFromChain(chainConfig.name) }, client).businessAccounts;
|
|
205
|
-
};
|
|
206
|
-
|
|
207
188
|
//#endregion
|
|
208
189
|
//#region src/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.ts
|
|
209
190
|
/**
|
|
@@ -211,12 +192,22 @@ const getBusinessAccountsClient = (client) => {
|
|
|
211
192
|
*
|
|
212
193
|
* @param [params] - Optional parameters for the business account.
|
|
213
194
|
* @param [params.name] - Optional name for the business account.
|
|
195
|
+
* @param [params.externalRef] - Optional developer-supplied label (not unique; accounts may share one).
|
|
196
|
+
* @param [params.metadata] - Optional arbitrary key-value metadata.
|
|
214
197
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
215
198
|
* @returns The created business account.
|
|
216
199
|
* @notInstrumented
|
|
217
200
|
*/
|
|
218
201
|
const createBusinessAccount = async (params, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
219
|
-
|
|
202
|
+
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
203
|
+
return await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkCreateBusinessAccount({
|
|
204
|
+
createBusinessAccountSdkRequest: {
|
|
205
|
+
externalRef: params?.externalRef,
|
|
206
|
+
metadata: params?.metadata,
|
|
207
|
+
name: params?.name
|
|
208
|
+
},
|
|
209
|
+
environmentId: core.environmentId
|
|
210
|
+
});
|
|
220
211
|
};
|
|
221
212
|
|
|
222
213
|
//#endregion
|
|
@@ -455,7 +446,11 @@ const exportWaasPrivateKey = async ({ displayContainer, password, walletAccount
|
|
|
455
446
|
* @notInstrumented
|
|
456
447
|
*/
|
|
457
448
|
const getBusinessAccount = async ({ businessAccountId }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
458
|
-
|
|
449
|
+
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
450
|
+
return await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkGetBusinessAccountById({
|
|
451
|
+
businessAccountId,
|
|
452
|
+
environmentId: core.environmentId
|
|
453
|
+
});
|
|
459
454
|
};
|
|
460
455
|
|
|
461
456
|
//#endregion
|
|
@@ -562,14 +557,21 @@ const isPasswordRequiredForWaasWallets = (client = require_updateAuthFromVerifyR
|
|
|
562
557
|
//#endregion
|
|
563
558
|
//#region src/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.ts
|
|
564
559
|
/**
|
|
565
|
-
* Lists
|
|
560
|
+
* Lists the business accounts the current user is a member of, scoped to the
|
|
561
|
+
* active project environment. Optionally filter by `externalRefs`.
|
|
566
562
|
*
|
|
563
|
+
* @param [params] - Optional filters.
|
|
564
|
+
* @param [params.externalRefs] - Return only accounts whose externalRef is in this list.
|
|
567
565
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
568
566
|
* @returns A paginated list of business accounts.
|
|
569
567
|
* @notInstrumented
|
|
570
568
|
*/
|
|
571
|
-
const listBusinessAccounts = async (client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
572
|
-
|
|
569
|
+
const listBusinessAccounts = async (params, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
570
|
+
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
571
|
+
return await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkListBusinessAccounts({
|
|
572
|
+
environmentId: core.environmentId,
|
|
573
|
+
externalRef: params?.externalRefs
|
|
574
|
+
});
|
|
573
575
|
};
|
|
574
576
|
|
|
575
577
|
//#endregion
|
|
@@ -621,7 +623,7 @@ const refreshWaasWalletAccountShares = async ({ walletAccount, password }, clien
|
|
|
621
623
|
*/
|
|
622
624
|
const removeBusinessAccountMember = async ({ businessAccountId, userId }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
623
625
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
624
|
-
const { member } = await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkRemoveBusinessAccountMember({
|
|
626
|
+
const { member } = await require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccountmemberremove }, client).sdkRemoveBusinessAccountMember({
|
|
625
627
|
businessAccountId,
|
|
626
628
|
environmentId: core.environmentId,
|
|
627
629
|
userId
|
|
@@ -660,7 +662,7 @@ const removeBusinessAccountMember = async ({ businessAccountId, userId }, client
|
|
|
660
662
|
*/
|
|
661
663
|
const removeBusinessAccountSigner = async ({ businessAccountId, walletId, signerId }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
662
664
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
663
|
-
const { signer } = await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkRemoveBusinessAccountSigner({
|
|
665
|
+
const { signer } = await require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccountsignerremove }, client).sdkRemoveBusinessAccountSigner({
|
|
664
666
|
businessAccountId,
|
|
665
667
|
environmentId: core.environmentId,
|
|
666
668
|
signerId,
|
|
@@ -669,6 +671,42 @@ const removeBusinessAccountSigner = async ({ businessAccountId, walletId, signer
|
|
|
669
671
|
return signer;
|
|
670
672
|
};
|
|
671
673
|
|
|
674
|
+
//#endregion
|
|
675
|
+
//#region src/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.ts
|
|
676
|
+
/**
|
|
677
|
+
* Removes a wallet from a business account (owner-/admin-only). The wallet and
|
|
678
|
+
* all its associated signer rows are detached from the account. The backend
|
|
679
|
+
* refuses to remove the last wallet on a business account.
|
|
680
|
+
*
|
|
681
|
+
* @param params.businessAccountId - The business account the wallet belongs to.
|
|
682
|
+
* @param params.walletId - The wallet to remove (`BusinessAccountWallet.id`).
|
|
683
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
684
|
+
* @returns The updated business account detail.
|
|
685
|
+
*
|
|
686
|
+
* @example
|
|
687
|
+
* ```ts
|
|
688
|
+
* const detail = await getBusinessAccount({ businessAccountId });
|
|
689
|
+
* await removeBusinessAccountWallet({
|
|
690
|
+
* businessAccountId,
|
|
691
|
+
* walletId: detail.wallets[0].id,
|
|
692
|
+
* });
|
|
693
|
+
* ```
|
|
694
|
+
*
|
|
695
|
+
* @see addWalletToBusinessAccount
|
|
696
|
+
* @see getBusinessAccount
|
|
697
|
+
* @notInstrumented
|
|
698
|
+
*/
|
|
699
|
+
const removeBusinessAccountWallet = async ({ businessAccountId, walletId }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
700
|
+
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
701
|
+
const detail = await require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccountwalletremove }, client).sdkRemoveBusinessAccountWallet({
|
|
702
|
+
businessAccountId,
|
|
703
|
+
environmentId: core.environmentId,
|
|
704
|
+
walletId
|
|
705
|
+
});
|
|
706
|
+
await require_isDynamicWaasEnabled.__refreshAuth_wrapped(client);
|
|
707
|
+
return detail;
|
|
708
|
+
};
|
|
709
|
+
|
|
672
710
|
//#endregion
|
|
673
711
|
//#region src/modules/waas/revokeWaasDelegation/revokeWaasDelegation.ts
|
|
674
712
|
/**
|
|
@@ -763,7 +801,7 @@ const shouldAutoCreateWalletForChain = ({ chain }, client = require_updateAuthFr
|
|
|
763
801
|
*/
|
|
764
802
|
const transferBusinessAccountOwnership = async ({ businessAccountId, newOwnerUserId }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
765
803
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
766
|
-
const detail = await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkTransferBusinessAccountOwnership({
|
|
804
|
+
const detail = await require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccounttransferOwnership }, client).sdkTransferBusinessAccountOwnership({
|
|
767
805
|
businessAccountId,
|
|
768
806
|
environmentId: core.environmentId,
|
|
769
807
|
transferBusinessAccountOwnershipSdkRequest: { newOwnerUserId }
|
|
@@ -849,7 +887,7 @@ const ROLE_TO_API = {
|
|
|
849
887
|
*/
|
|
850
888
|
const updateBusinessAccountMemberRole = async ({ businessAccountId, userId, role }, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
851
889
|
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
852
|
-
return await require_updateAuthFromVerifyResponse.createApiClient({}, client).sdkUpdateBusinessAccountMemberRole({
|
|
890
|
+
return await require_updateAuthFromVerifyResponse.createApiClient({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.BusinessAccountmemberroleupdate }, client).sdkUpdateBusinessAccountMemberRole({
|
|
853
891
|
businessAccountId,
|
|
854
892
|
environmentId: core.environmentId,
|
|
855
893
|
updateBusinessAccountMemberRoleSdkRequest: { role: ROLE_TO_API[role] },
|
|
@@ -886,6 +924,7 @@ const updateWaasPassword = async ({ currentPassword, newPassword, walletAccount
|
|
|
886
924
|
|
|
887
925
|
//#endregion
|
|
888
926
|
exports.NotWaasWalletProviderError = require_migrateFromFireblocks.NotWaasWalletProviderError;
|
|
927
|
+
exports.TransactionBroadcastError = require_isDynamicWaasEnabled.TransactionBroadcastError;
|
|
889
928
|
exports.addBusinessAccountMember = addBusinessAccountMember;
|
|
890
929
|
exports.addBusinessAccountSigner = addBusinessAccountSigner;
|
|
891
930
|
exports.addWalletToBusinessAccount = addWalletToBusinessAccount;
|
|
@@ -911,6 +950,7 @@ exports.normalizeWalletRequirements = normalizeWalletRequirements;
|
|
|
911
950
|
exports.refreshWaasWalletAccountShares = refreshWaasWalletAccountShares;
|
|
912
951
|
exports.removeBusinessAccountMember = removeBusinessAccountMember;
|
|
913
952
|
exports.removeBusinessAccountSigner = removeBusinessAccountSigner;
|
|
953
|
+
exports.removeBusinessAccountWallet = removeBusinessAccountWallet;
|
|
914
954
|
exports.revokeWaasDelegation = revokeWaasDelegation;
|
|
915
955
|
exports.setWaasWalletAccountPassword = setWaasWalletAccountPassword;
|
|
916
956
|
exports.shouldAutoCreateWalletForChain = shouldAutoCreateWalletForChain;
|