@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/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-
|
|
2
|
-
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-
|
|
3
|
-
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-
|
|
4
|
-
const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-
|
|
5
|
-
const require_getWalletProviderByKey = require('./getWalletProviderByKey-
|
|
6
|
-
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-
|
|
1
|
+
const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CPOvKWih.cjs');
|
|
2
|
+
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-CSxvdrc9.cjs');
|
|
3
|
+
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-idmeju9B.cjs');
|
|
4
|
+
const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-BfRUVwrT.cjs');
|
|
5
|
+
const require_getWalletProviderByKey = require('./getWalletProviderByKey-BMJ9TcjM.cjs');
|
|
6
|
+
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-D5o4qznt.cjs');
|
|
7
7
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
8
8
|
let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
|
|
9
9
|
let zod_mini = require("zod/mini");
|
|
@@ -978,6 +978,7 @@ const createCore = (config) => {
|
|
|
978
978
|
});
|
|
979
979
|
const fetch = config.coreConfig?.fetch ?? createWebFetch();
|
|
980
980
|
const openDeeplink = config.coreConfig?.openDeeplink ?? createDeeplinkOpener();
|
|
981
|
+
const subscribeToAppForeground = require_getNetworkProviderFromNetworkId.createAppForegroundSubscriber();
|
|
981
982
|
const openAuthSession = config.coreConfig?.openAuthSession;
|
|
982
983
|
const navigate = config.coreConfig?.navigate ?? createNavigationHandler();
|
|
983
984
|
const state = createObservableState(getInitialState);
|
|
@@ -1033,6 +1034,7 @@ const createCore = (config) => {
|
|
|
1033
1034
|
sdkSessionId,
|
|
1034
1035
|
state,
|
|
1035
1036
|
storage,
|
|
1037
|
+
subscribeToAppForeground,
|
|
1036
1038
|
transformers: config.transformers,
|
|
1037
1039
|
version: require_updateAuthFromVerifyResponse.version,
|
|
1038
1040
|
waas: config.waas
|
|
@@ -1158,6 +1160,150 @@ var CheckoutSessionTokenMissingError = class extends require_updateAuthFromVerif
|
|
|
1158
1160
|
}
|
|
1159
1161
|
};
|
|
1160
1162
|
|
|
1163
|
+
//#endregion
|
|
1164
|
+
//#region src/errors/CoinbaseTransferMfaFailedError.ts
|
|
1165
|
+
/**
|
|
1166
|
+
* Thrown when a {@link createCoinbaseExchangeTransfer} retry supplies an
|
|
1167
|
+
* `mfaCode` that Coinbase rejects -- the two-step verification code was
|
|
1168
|
+
* incorrect, or it expired before the retry was submitted. Coinbase's own
|
|
1169
|
+
* codes are short-lived, so this is expected to happen occasionally even
|
|
1170
|
+
* with correct user input; it does not mean the transfer itself is invalid.
|
|
1171
|
+
*
|
|
1172
|
+
* Coinbase does not automatically send a new code on this failure -- prompt
|
|
1173
|
+
* the user again and retry, which triggers
|
|
1174
|
+
* {@link CoinbaseTransferMfaRequiredError} again and, with it, a fresh code.
|
|
1175
|
+
*
|
|
1176
|
+
* @example
|
|
1177
|
+
* ```ts
|
|
1178
|
+
* const transferParams = { accountId, amount: 0.5, currency: 'USDC', to };
|
|
1179
|
+
* const submitWithMfaCode = (mfaCode: string) =>
|
|
1180
|
+
* createCoinbaseExchangeTransfer({ ...transferParams, mfaCode });
|
|
1181
|
+
*
|
|
1182
|
+
* try {
|
|
1183
|
+
* await submitWithMfaCode(mfaCode);
|
|
1184
|
+
* } catch (error) {
|
|
1185
|
+
* if (error instanceof CoinbaseTransferMfaFailedError) {
|
|
1186
|
+
* // wrong or expired code -- ask the user to try again
|
|
1187
|
+
* await createCoinbaseExchangeTransfer(transferParams);
|
|
1188
|
+
* }
|
|
1189
|
+
* }
|
|
1190
|
+
* ```
|
|
1191
|
+
* @see createCoinbaseExchangeTransfer
|
|
1192
|
+
* @see CoinbaseTransferMfaRequiredError
|
|
1193
|
+
*/
|
|
1194
|
+
var CoinbaseTransferMfaFailedError = class extends require_updateAuthFromVerifyResponse.BaseError {
|
|
1195
|
+
constructor({ cause }) {
|
|
1196
|
+
super({
|
|
1197
|
+
cause,
|
|
1198
|
+
code: "transfer_mfa_failed",
|
|
1199
|
+
docsUrl: null,
|
|
1200
|
+
name: "CoinbaseTransferMfaFailedError",
|
|
1201
|
+
shortMessage: "The Coinbase two-step verification code was incorrect or has expired. Retry createCoinbaseExchangeTransfer with a fresh 'mfaCode'."
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
//#endregion
|
|
1207
|
+
//#region src/errors/CoinbaseTransferMfaRequiredError.ts
|
|
1208
|
+
/**
|
|
1209
|
+
* Thrown when Coinbase rejects a {@link createCoinbaseExchangeTransfer} call
|
|
1210
|
+
* because the account holder's two-step verification ("2FA") is required to
|
|
1211
|
+
* authorize the transfer. This is unrelated to Dynamic's own step-up auth
|
|
1212
|
+
* (see {@link checkStepUpAuth}) -- it is a security requirement enforced by
|
|
1213
|
+
* Coinbase itself, on the Coinbase account being transferred from.
|
|
1214
|
+
*
|
|
1215
|
+
* The first `createCoinbaseExchangeTransfer` call for a transfer
|
|
1216
|
+
* automatically triggers Coinbase to send the account holder a verification
|
|
1217
|
+
* code (SMS, or push to an authenticator app such as Authy if one is
|
|
1218
|
+
* linked). Retry the *same* transfer with `mfaCode` set to that code before
|
|
1219
|
+
* it expires. If the code is wrong or has expired, the retry throws
|
|
1220
|
+
* {@link CoinbaseTransferMfaFailedError} instead, so a fresh code can be
|
|
1221
|
+
* requested and retried again.
|
|
1222
|
+
*
|
|
1223
|
+
* @example
|
|
1224
|
+
* ```ts
|
|
1225
|
+
* const transferParams = { accountId, amount: 0.5, currency: 'USDC', to };
|
|
1226
|
+
*
|
|
1227
|
+
* try {
|
|
1228
|
+
* await createCoinbaseExchangeTransfer(transferParams);
|
|
1229
|
+
* } catch (error) {
|
|
1230
|
+
* if (error instanceof CoinbaseTransferMfaRequiredError) {
|
|
1231
|
+
* // Coinbase already sent a code to the account holder -- prompt for it
|
|
1232
|
+
* const mfaCode = await promptUserForCoinbase2faCode();
|
|
1233
|
+
* await createCoinbaseExchangeTransfer({ ...transferParams, mfaCode });
|
|
1234
|
+
* }
|
|
1235
|
+
* }
|
|
1236
|
+
* ```
|
|
1237
|
+
* @see createCoinbaseExchangeTransfer
|
|
1238
|
+
* @see CoinbaseTransferMfaFailedError
|
|
1239
|
+
*/
|
|
1240
|
+
var CoinbaseTransferMfaRequiredError = class extends require_updateAuthFromVerifyResponse.BaseError {
|
|
1241
|
+
constructor({ cause }) {
|
|
1242
|
+
super({
|
|
1243
|
+
cause,
|
|
1244
|
+
code: "transfer_mfa_required",
|
|
1245
|
+
docsUrl: null,
|
|
1246
|
+
name: "CoinbaseTransferMfaRequiredError",
|
|
1247
|
+
shortMessage: "Coinbase requires a two-step verification code to complete this transfer. Coinbase has automatically sent the code to the account holder (SMS or authenticator app) -- retry createCoinbaseExchangeTransfer with 'mfaCode' set to that code before it expires."
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
|
|
1252
|
+
//#endregion
|
|
1253
|
+
//#region src/errors/CoinbaseTravelRuleRequiredError.ts
|
|
1254
|
+
/**
|
|
1255
|
+
* Thrown when Coinbase rejects a {@link createCoinbaseExchangeTransfer} call
|
|
1256
|
+
* because it's missing "Travel Rule" information about the transfer's
|
|
1257
|
+
* recipient. The Travel Rule is a regulatory requirement on custodial
|
|
1258
|
+
* exchanges (like Coinbase) to collect basic counterparty information above
|
|
1259
|
+
* certain transfer thresholds -- which fields are required depends on the
|
|
1260
|
+
* sender's and recipient's jurisdictions and the transfer amount, so it can't
|
|
1261
|
+
* be predicted client-side; Coinbase reports the exact missing fields on
|
|
1262
|
+
* {@link missingFields}.
|
|
1263
|
+
*
|
|
1264
|
+
* Unlike {@link CoinbaseTransferMfaRequiredError}, retrying does not require
|
|
1265
|
+
* waiting for anything from Coinbase -- collect the listed fields (each has a
|
|
1266
|
+
* user-facing `description`) and retry the same transfer with
|
|
1267
|
+
* `travelRuleData` set.
|
|
1268
|
+
*
|
|
1269
|
+
* @example
|
|
1270
|
+
* ```ts
|
|
1271
|
+
* const transferParams = { accountId, amount: 0.5, currency: 'USDC', to };
|
|
1272
|
+
*
|
|
1273
|
+
* try {
|
|
1274
|
+
* await createCoinbaseExchangeTransfer(transferParams);
|
|
1275
|
+
* } catch (error) {
|
|
1276
|
+
* if (error instanceof CoinbaseTravelRuleRequiredError) {
|
|
1277
|
+
* // e.g. [{ name: 'BENEFICIARY_NAME', description: "The recipient's full legal name." }, ...]
|
|
1278
|
+
* console.log(error.missingFields);
|
|
1279
|
+
*
|
|
1280
|
+
* const travelRuleData = await promptUserForTravelRuleFields(
|
|
1281
|
+
* error.missingFields
|
|
1282
|
+
* );
|
|
1283
|
+
* await createCoinbaseExchangeTransfer({ ...transferParams, travelRuleData });
|
|
1284
|
+
* }
|
|
1285
|
+
* }
|
|
1286
|
+
* ```
|
|
1287
|
+
* @see createCoinbaseExchangeTransfer
|
|
1288
|
+
* @see CoinbaseTravelRuleData
|
|
1289
|
+
* @see CoinbaseTravelRuleFieldName
|
|
1290
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/travel-rule
|
|
1291
|
+
*/
|
|
1292
|
+
var CoinbaseTravelRuleRequiredError = class extends require_updateAuthFromVerifyResponse.BaseError {
|
|
1293
|
+
missingFields;
|
|
1294
|
+
constructor({ cause, missingFields }) {
|
|
1295
|
+
super({
|
|
1296
|
+
cause,
|
|
1297
|
+
code: "coinbase_travel_rule_required",
|
|
1298
|
+
docsUrl: "https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/travel-rule",
|
|
1299
|
+
metaMessages: missingFields.map(({ name: name$1, description }) => `- ${name$1}: ${description}`),
|
|
1300
|
+
name: "CoinbaseTravelRuleRequiredError",
|
|
1301
|
+
shortMessage: "Coinbase requires additional recipient information (Travel Rule compliance) before this transfer can complete."
|
|
1302
|
+
});
|
|
1303
|
+
this.missingFields = missingFields;
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1161
1307
|
//#endregion
|
|
1162
1308
|
//#region src/errors/DeeplinkConnectAndVerifyUnsupportedError.ts
|
|
1163
1309
|
var DeeplinkConnectAndVerifyUnsupportedError = class extends require_updateAuthFromVerifyResponse.BaseError {
|
|
@@ -3970,6 +4116,196 @@ const addCoinbaseOnrampOrderEventListener = ({ listener }, client = require_upda
|
|
|
3970
4116
|
};
|
|
3971
4117
|
};
|
|
3972
4118
|
|
|
4119
|
+
//#endregion
|
|
4120
|
+
//#region src/modules/funding/coinbase/coinbase.consts.ts
|
|
4121
|
+
/**
|
|
4122
|
+
* Whether the transfer's destination wallet is self-hosted (controlled
|
|
4123
|
+
* directly by its owner, with no custodial exchange in between) or held at
|
|
4124
|
+
* another exchange -- required by some jurisdictions' Travel Rule rules, see
|
|
4125
|
+
* {@link CoinbaseTravelRuleData}.
|
|
4126
|
+
*
|
|
4127
|
+
* @example
|
|
4128
|
+
* ```typescript
|
|
4129
|
+
* const walletType = CoinbaseBeneficiaryWalletType.SelfHosted;
|
|
4130
|
+
* ```
|
|
4131
|
+
* @see CoinbaseTravelRuleData
|
|
4132
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/travel-rule
|
|
4133
|
+
*/
|
|
4134
|
+
const CoinbaseBeneficiaryWalletType = {
|
|
4135
|
+
Exchange: "WALLET_TYPE_EXCHANGE",
|
|
4136
|
+
SelfHosted: "WALLET_TYPE_SELF_HOSTED"
|
|
4137
|
+
};
|
|
4138
|
+
/**
|
|
4139
|
+
* Whether the transfer's destination wallet also belongs to the sender --
|
|
4140
|
+
* required by some jurisdictions' Travel Rule rules, see
|
|
4141
|
+
* {@link CoinbaseTravelRuleData}.
|
|
4142
|
+
*
|
|
4143
|
+
* @example
|
|
4144
|
+
* ```typescript
|
|
4145
|
+
* const isSelfTransfer = CoinbaseIsSelfTransfer.SelfOwned;
|
|
4146
|
+
* ```
|
|
4147
|
+
* @see CoinbaseTravelRuleData
|
|
4148
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/travel-rule
|
|
4149
|
+
*/
|
|
4150
|
+
const CoinbaseIsSelfTransfer = {
|
|
4151
|
+
NotSelfOwned: "IS_SELF_FALSE",
|
|
4152
|
+
SelfOwned: "IS_SELF_TRUE"
|
|
4153
|
+
};
|
|
4154
|
+
/**
|
|
4155
|
+
* The individual Travel Rule fields Coinbase can require on a transfer.
|
|
4156
|
+
* Which of these are actually required depends on the sender's and
|
|
4157
|
+
* recipient's jurisdictions and the transfer amount -- Coinbase reports the
|
|
4158
|
+
* exact list that's missing for a given transfer via
|
|
4159
|
+
* {@link CoinbaseTravelRuleRequiredError.missingFields}.
|
|
4160
|
+
*
|
|
4161
|
+
* @example
|
|
4162
|
+
* ```typescript
|
|
4163
|
+
* const fieldName = CoinbaseTravelRuleFieldName.BeneficiaryName;
|
|
4164
|
+
* ```
|
|
4165
|
+
* @see CoinbaseTravelRuleRequiredError
|
|
4166
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/travel-rule
|
|
4167
|
+
*/
|
|
4168
|
+
const CoinbaseTravelRuleFieldName = {
|
|
4169
|
+
BeneficiaryAddress: "BENEFICIARY_ADDRESS",
|
|
4170
|
+
BeneficiaryCountry: "BENEFICIARY_COUNTRY",
|
|
4171
|
+
BeneficiaryFinancialInstitution: "BENEFICIARY_FINANCIAL_INSTITUTION",
|
|
4172
|
+
BeneficiaryName: "BENEFICIARY_NAME",
|
|
4173
|
+
BeneficiaryWalletType: "BENEFICIARY_WALLET_TYPE",
|
|
4174
|
+
IsSelf: "IS_SELF",
|
|
4175
|
+
TransferPurpose: "TRANSFER_PURPOSE"
|
|
4176
|
+
};
|
|
4177
|
+
/**
|
|
4178
|
+
* Human-readable description of a {@link CoinbaseTravelRuleFieldName},
|
|
4179
|
+
* written to be shown directly to an end user (for example, as helper text
|
|
4180
|
+
* next to the form field that collects it).
|
|
4181
|
+
*
|
|
4182
|
+
* @example
|
|
4183
|
+
* ```typescript
|
|
4184
|
+
* const description = COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS.IS_SELF;
|
|
4185
|
+
* // "Whether the destination wallet also belongs to you."
|
|
4186
|
+
* ```
|
|
4187
|
+
* @see CoinbaseTravelRuleFieldName
|
|
4188
|
+
* @see CoinbaseTravelRuleRequiredError
|
|
4189
|
+
*/
|
|
4190
|
+
const COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS = {
|
|
4191
|
+
BENEFICIARY_ADDRESS: "The recipient's postal address.",
|
|
4192
|
+
BENEFICIARY_COUNTRY: "The recipient's country, as an ISO 3166-1 alpha-2 code (e.g. \"US\", \"GB\").",
|
|
4193
|
+
BENEFICIARY_FINANCIAL_INSTITUTION: "The identifier (VASP ID) of the recipient exchange, required when the destination wallet is held at another exchange rather than self-hosted.",
|
|
4194
|
+
BENEFICIARY_NAME: "The recipient's full legal name.",
|
|
4195
|
+
BENEFICIARY_WALLET_TYPE: "Whether the destination wallet is self-hosted (the recipient controls it directly) or held at another exchange.",
|
|
4196
|
+
IS_SELF: "Whether the destination wallet also belongs to you.",
|
|
4197
|
+
TRANSFER_PURPOSE: "The reason for this transfer (e.g. \"Rent\", \"Gift\")."
|
|
4198
|
+
};
|
|
4199
|
+
|
|
4200
|
+
//#endregion
|
|
4201
|
+
//#region src/modules/funding/coinbase/utils/parseCoinbaseTravelRuleMissingFields/parseCoinbaseTravelRuleMissingFields.ts
|
|
4202
|
+
/**
|
|
4203
|
+
* Coinbase reports missing Travel Rule fields as a bracketed, comma-separated
|
|
4204
|
+
* list appended to its error message, e.g. `"... Param:
|
|
4205
|
+
* [BENEFICIARY_WALLET_TYPE, BENEFICIARY_NAME]"`.
|
|
4206
|
+
*/
|
|
4207
|
+
const TRAVEL_RULE_PARAM_LIST_REGEX = /Param:\s*\[([^\]]+)\]/;
|
|
4208
|
+
const isCoinbaseTravelRuleFieldName = (name$1) => Object.hasOwn(COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS, name$1);
|
|
4209
|
+
/**
|
|
4210
|
+
* Extracts the list of missing Travel Rule fields from a Coinbase
|
|
4211
|
+
* `unknown_transfer_error` message, pairing each field with its user-facing
|
|
4212
|
+
* description. Returns an empty array if the message doesn't contain a
|
|
4213
|
+
* recognizable Travel Rule field list (i.e. this isn't a Travel Rule error).
|
|
4214
|
+
*
|
|
4215
|
+
* @param params.message - The raw `error` string from Coinbase's response body.
|
|
4216
|
+
* @returns The missing fields, or an empty array if none were found.
|
|
4217
|
+
* @example
|
|
4218
|
+
* ```typescript
|
|
4219
|
+
* const missingFields = parseCoinbaseTravelRuleMissingFields({
|
|
4220
|
+
* message: 'Incomplete travel rules information provided. Param: [BENEFICIARY_NAME, IS_SELF]',
|
|
4221
|
+
* });
|
|
4222
|
+
* // [
|
|
4223
|
+
* // { name: 'BENEFICIARY_NAME', description: "The recipient's full legal name." },
|
|
4224
|
+
* // { name: 'IS_SELF', description: 'Whether the destination wallet also belongs to you.' },
|
|
4225
|
+
* // ]
|
|
4226
|
+
* ```
|
|
4227
|
+
* @see CoinbaseTravelRuleRequiredError
|
|
4228
|
+
* @notInstrumented
|
|
4229
|
+
*/
|
|
4230
|
+
const parseCoinbaseTravelRuleMissingFields = ({ message }) => {
|
|
4231
|
+
const match = TRAVEL_RULE_PARAM_LIST_REGEX.exec(message);
|
|
4232
|
+
if (!match) return [];
|
|
4233
|
+
return match[1].split(",").map((name$1) => name$1.trim()).filter(isCoinbaseTravelRuleFieldName).map((name$1) => ({
|
|
4234
|
+
description: COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS[name$1],
|
|
4235
|
+
name: name$1
|
|
4236
|
+
}));
|
|
4237
|
+
};
|
|
4238
|
+
|
|
4239
|
+
//#endregion
|
|
4240
|
+
//#region src/modules/funding/coinbase/createCoinbaseExchangeTransfer/createCoinbaseExchangeTransfer.ts
|
|
4241
|
+
/**
|
|
4242
|
+
* Creates a Coinbase exchange transfer to send crypto from a Coinbase account to an external address.
|
|
4243
|
+
*
|
|
4244
|
+
* Coinbase may reject the transfer for reasons that require a second attempt
|
|
4245
|
+
* rather than a hard failure:
|
|
4246
|
+
* - {@link CoinbaseTransferMfaRequiredError} / {@link CoinbaseTransferMfaFailedError} --
|
|
4247
|
+
* Coinbase's own two-step verification on the sending account.
|
|
4248
|
+
* - {@link CoinbaseTravelRuleRequiredError} -- missing recipient information
|
|
4249
|
+
* required by regulation for this transfer's jurisdictions/amount.
|
|
4250
|
+
*
|
|
4251
|
+
* @param transferParams - The parameters for the transfer including accountId.
|
|
4252
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4253
|
+
* @returns A promise resolving to the created exchange transfer.
|
|
4254
|
+
* @throws {CoinbaseTransferMfaRequiredError} When the API requires MFA for the transfer.
|
|
4255
|
+
* @throws {CoinbaseTransferMfaFailedError} When the provided MFA code is rejected.
|
|
4256
|
+
* @throws {CoinbaseTravelRuleRequiredError} When Coinbase requires additional recipient information for the transfer.
|
|
4257
|
+
* @throws {APIError} For any other API error returned by the exchange transfer request.
|
|
4258
|
+
* @example
|
|
4259
|
+
* ```typescript
|
|
4260
|
+
* // Include any known recipient info upfront -- see travelRuleData below for why.
|
|
4261
|
+
* const transferParams = {
|
|
4262
|
+
* accountId: accounts[0].id,
|
|
4263
|
+
* amount: 0.5,
|
|
4264
|
+
* currency: 'USDC',
|
|
4265
|
+
* to: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F',
|
|
4266
|
+
* travelRuleData: { beneficiaryName: 'Jane Doe', beneficiaryCountry: 'US' },
|
|
4267
|
+
* };
|
|
4268
|
+
*
|
|
4269
|
+
* try {
|
|
4270
|
+
* const transfer = await createCoinbaseExchangeTransfer(transferParams);
|
|
4271
|
+
* } catch (error) {
|
|
4272
|
+
* if (error instanceof CoinbaseTravelRuleRequiredError) {
|
|
4273
|
+
* const travelRuleData = await promptUserForTravelRuleFields(error.missingFields);
|
|
4274
|
+
* await createCoinbaseExchangeTransfer({ ...transferParams, travelRuleData });
|
|
4275
|
+
* }
|
|
4276
|
+
* }
|
|
4277
|
+
* ```
|
|
4278
|
+
* @see getCoinbaseAccounts
|
|
4279
|
+
* @see CoinbaseTransferMfaRequiredError
|
|
4280
|
+
* @see CoinbaseTravelRuleRequiredError
|
|
4281
|
+
* @notInstrumented
|
|
4282
|
+
*/
|
|
4283
|
+
const createCoinbaseExchangeTransfer = async (transferParams, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
4284
|
+
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
4285
|
+
const apiClient = require_updateAuthFromVerifyResponse.createApiClient({ includeMfaToken: true }, client);
|
|
4286
|
+
const { accountId, ...createExchangeTransferRequest } = transferParams;
|
|
4287
|
+
try {
|
|
4288
|
+
return await apiClient.postExchangeAccountTransfer({
|
|
4289
|
+
accountId,
|
|
4290
|
+
createExchangeTransferRequest,
|
|
4291
|
+
environmentId: core.environmentId,
|
|
4292
|
+
exchangeKey: _dynamic_labs_sdk_api_core.ExchangeKeyEnum.Coinbase
|
|
4293
|
+
});
|
|
4294
|
+
} catch (error) {
|
|
4295
|
+
if (!(error instanceof require_updateAuthFromVerifyResponse.APIError)) throw error;
|
|
4296
|
+
if (error.code === "transfer_mfa_required") throw new CoinbaseTransferMfaRequiredError({ cause: error });
|
|
4297
|
+
if (error.code === "transfer_mfa_failed") throw new CoinbaseTransferMfaFailedError({ cause: error });
|
|
4298
|
+
if (error.code === "unknown_transfer_error") {
|
|
4299
|
+
const missingFields = parseCoinbaseTravelRuleMissingFields({ message: error.message });
|
|
4300
|
+
if (missingFields.length > 0) throw new CoinbaseTravelRuleRequiredError({
|
|
4301
|
+
cause: error,
|
|
4302
|
+
missingFields
|
|
4303
|
+
});
|
|
4304
|
+
}
|
|
4305
|
+
throw error;
|
|
4306
|
+
}
|
|
4307
|
+
};
|
|
4308
|
+
|
|
3973
4309
|
//#endregion
|
|
3974
4310
|
//#region src/modules/funding/coinbase/getMissingVerificationForCoinbaseOnrampOrder/getMissingVerificationForCoinbaseOnrampOrder.ts
|
|
3975
4311
|
/**
|
|
@@ -4091,6 +4427,59 @@ const __createCoinbaseOnrampOrder_wrapped = require_updateAuthFromVerifyResponse
|
|
|
4091
4427
|
}
|
|
4092
4428
|
});
|
|
4093
4429
|
|
|
4430
|
+
//#endregion
|
|
4431
|
+
//#region src/utils/assertChainName/assertChainName.ts
|
|
4432
|
+
const CHAIN_ENUM_VALUES = Object.values(_dynamic_labs_sdk_api_core.ChainEnum);
|
|
4433
|
+
/**
|
|
4434
|
+
* Validates that a chain name is a recognized ChainEnum value.
|
|
4435
|
+
*
|
|
4436
|
+
* Throws an {@link InvalidParamError} when the value is undefined or is not a
|
|
4437
|
+
* valid chain name.
|
|
4438
|
+
*
|
|
4439
|
+
* @category Extension Development
|
|
4440
|
+
*
|
|
4441
|
+
* @param chainName - The chain name to validate.
|
|
4442
|
+
* @throws {InvalidParamError} When chainName is undefined or not a valid ChainEnum value.
|
|
4443
|
+
* @notInstrumented
|
|
4444
|
+
*/
|
|
4445
|
+
const assertChainName = (chainName) => {
|
|
4446
|
+
if (chainName === void 0) throw new require_updateAuthFromVerifyResponse.InvalidParamError("chainName is required");
|
|
4447
|
+
if (!CHAIN_ENUM_VALUES.includes(chainName)) throw new require_updateAuthFromVerifyResponse.InvalidParamError(`Invalid chainName: ${chainName}`);
|
|
4448
|
+
};
|
|
4449
|
+
|
|
4450
|
+
//#endregion
|
|
4451
|
+
//#region src/modules/funding/coinbase/getCoinbaseAccounts/getCoinbaseAccounts.ts
|
|
4452
|
+
/**
|
|
4453
|
+
* Gets the Coinbase accounts (balances) for the authenticated user.
|
|
4454
|
+
*
|
|
4455
|
+
* @param [params] GetCoinbaseAccountsParams - Optional filters for the accounts.
|
|
4456
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4457
|
+
* @returns A promise resolving to an array of Coinbase accounts with balances.
|
|
4458
|
+
* @throws {InvalidParamError} When chainName is not a valid ChainEnum value or networkId is a non-integer or negative number.
|
|
4459
|
+
* @example
|
|
4460
|
+
* ```typescript
|
|
4461
|
+
* const accounts = await getCoinbaseAccounts({ chainName: 'EVM' });
|
|
4462
|
+
* console.log(accounts[0].balances);
|
|
4463
|
+
* ```
|
|
4464
|
+
* @see createCoinbaseExchangeTransfer
|
|
4465
|
+
* @see GetCoinbaseAccountsParams
|
|
4466
|
+
* @notInstrumented
|
|
4467
|
+
*/
|
|
4468
|
+
const getCoinbaseAccounts = async (params, client = require_updateAuthFromVerifyResponse.getDefaultClient()) => {
|
|
4469
|
+
const core = require_updateAuthFromVerifyResponse.getCore(client);
|
|
4470
|
+
const apiClient = require_updateAuthFromVerifyResponse.createApiClient({ includeMfaToken: true }, client);
|
|
4471
|
+
const chainName = params?.chainName;
|
|
4472
|
+
if (chainName !== void 0) assertChainName(chainName);
|
|
4473
|
+
const networkId = params?.networkId;
|
|
4474
|
+
if (networkId !== void 0 && (!Number.isInteger(networkId) || networkId < 0)) throw new require_updateAuthFromVerifyResponse.InvalidParamError(`Invalid networkId: ${networkId}`);
|
|
4475
|
+
return await apiClient.getUserAccounts({
|
|
4476
|
+
chainName,
|
|
4477
|
+
environmentId: core.environmentId,
|
|
4478
|
+
exchangeKey: _dynamic_labs_sdk_api_core.ExchangeKeyEnum.Coinbase,
|
|
4479
|
+
networkId
|
|
4480
|
+
});
|
|
4481
|
+
};
|
|
4482
|
+
|
|
4094
4483
|
//#endregion
|
|
4095
4484
|
//#region src/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.ts
|
|
4096
4485
|
/**
|
|
@@ -9201,9 +9590,16 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
9201
9590
|
|
|
9202
9591
|
//#endregion
|
|
9203
9592
|
exports.BaseError = require_updateAuthFromVerifyResponse.BaseError;
|
|
9593
|
+
exports.COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS = COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS;
|
|
9204
9594
|
exports.CaptchaProviderEnum = CaptchaProviderEnum;
|
|
9205
9595
|
exports.CheckoutSessionTokenMissingError = CheckoutSessionTokenMissingError;
|
|
9206
9596
|
exports.ClientAlreadyInitializedError = ClientAlreadyInitializedError;
|
|
9597
|
+
exports.CoinbaseBeneficiaryWalletType = CoinbaseBeneficiaryWalletType;
|
|
9598
|
+
exports.CoinbaseIsSelfTransfer = CoinbaseIsSelfTransfer;
|
|
9599
|
+
exports.CoinbaseTransferMfaFailedError = CoinbaseTransferMfaFailedError;
|
|
9600
|
+
exports.CoinbaseTransferMfaRequiredError = CoinbaseTransferMfaRequiredError;
|
|
9601
|
+
exports.CoinbaseTravelRuleFieldName = CoinbaseTravelRuleFieldName;
|
|
9602
|
+
exports.CoinbaseTravelRuleRequiredError = CoinbaseTravelRuleRequiredError;
|
|
9207
9603
|
exports.DeeplinkConnectAndVerifyUnsupportedError = DeeplinkConnectAndVerifyUnsupportedError;
|
|
9208
9604
|
exports.DeviceRegistrationIdentityMismatchError = DeviceRegistrationIdentityMismatchError;
|
|
9209
9605
|
exports.FeeEstimationFailedError = FeeEstimationFailedError;
|
|
@@ -9257,6 +9653,7 @@ Object.defineProperty(exports, 'TokenScope', {
|
|
|
9257
9653
|
}
|
|
9258
9654
|
});
|
|
9259
9655
|
exports.TokenSwapError = TokenSwapError;
|
|
9656
|
+
exports.TransactionBroadcastError = require_isDynamicWaasEnabled.TransactionBroadcastError;
|
|
9260
9657
|
exports.UnauthorizedError = require_updateAuthFromVerifyResponse.UnauthorizedError;
|
|
9261
9658
|
exports.UnavailableInServerSideError = require_getNetworkProviderFromNetworkId.UnavailableInServerSideError;
|
|
9262
9659
|
exports.UnrecognizedNetworkError = UnrecognizedNetworkError;
|
|
@@ -9299,6 +9696,7 @@ exports.connectAndVerifyWithWalletProvider = __connectAndVerifyWithWalletProvide
|
|
|
9299
9696
|
exports.connectWithWalletProvider = __connectWithWalletProvider_wrapped;
|
|
9300
9697
|
exports.consumeMfaToken = require_isMfaRequiredForAction.__consumeMfaToken_wrapped;
|
|
9301
9698
|
exports.createCheckoutTransaction = __createCheckoutTransaction_wrapped;
|
|
9699
|
+
exports.createCoinbaseExchangeTransfer = createCoinbaseExchangeTransfer;
|
|
9302
9700
|
exports.createCoinbaseOnrampOrder = __createCoinbaseOnrampOrder_wrapped;
|
|
9303
9701
|
exports.createCryptoDotComPayment = __createCryptoDotComPayment_wrapped;
|
|
9304
9702
|
exports.createDynamicClient = __createDynamicClient_wrapped;
|
|
@@ -9323,6 +9721,7 @@ exports.getBalances = getBalances;
|
|
|
9323
9721
|
exports.getCaptchaSettings = getCaptchaSettings;
|
|
9324
9722
|
exports.getCheckoutTransaction = getCheckoutTransaction;
|
|
9325
9723
|
exports.getCheckoutTransactionQuote = getCheckoutTransactionQuote;
|
|
9724
|
+
exports.getCoinbaseAccounts = getCoinbaseAccounts;
|
|
9326
9725
|
exports.getCoinbaseBuyUrl = getCoinbaseBuyUrl;
|
|
9327
9726
|
exports.getConnectedAddresses = getConnectedAddresses;
|
|
9328
9727
|
exports.getDefaultClient = require_updateAuthFromVerifyResponse.getDefaultClient;
|