@dynamic-labs-sdk/client 1.8.2 → 1.9.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/android/src/main/java/xyz/dynamic/client/DynamicClientPackage.kt +10 -0
- package/android/src/main/java/xyz/dynamic/client/screenshot/ScreenshotProtectionModule.kt +48 -0
- package/dist/{InvalidParamError-CmwKWCyr.cjs → InvalidParamError-C7LLi2cZ.cjs} +70 -5
- package/dist/InvalidParamError-C7LLi2cZ.cjs.map +1 -0
- package/dist/{InvalidParamError-c1J0Vmze.esm.js → InvalidParamError-DIPFT3sS.esm.js} +52 -5
- package/dist/InvalidParamError-DIPFT3sS.esm.js.map +1 -0
- package/dist/{InvalidParamError-BqFQnYCi.native.esm.js → InvalidParamError-YG7yXCq5.native.esm.js} +273 -5
- package/dist/InvalidParamError-YG7yXCq5.native.esm.js.map +1 -0
- package/dist/NotWaasWalletAccountError-BWrDQFe8.esm.js +18 -0
- package/dist/NotWaasWalletAccountError-BWrDQFe8.esm.js.map +1 -0
- package/dist/NotWaasWalletAccountError-C8ex1YA_.cjs +23 -0
- package/dist/NotWaasWalletAccountError-C8ex1YA_.cjs.map +1 -0
- package/dist/NotWaasWalletAccountError-Cd2o0wr0.native.esm.js +18 -0
- package/dist/NotWaasWalletAccountError-Cd2o0wr0.native.esm.js.map +1 -0
- package/dist/core.cjs +24 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +24 -6
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +34 -9
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/core.d.ts +4 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +0 -7
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waasCore.d.ts +2 -0
- package/dist/exports/waasCore.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-Cke-DBhx.native.esm.js → getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js} +17 -12
- package/dist/getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-DXzopnuR.cjs → getNetworkProviderFromNetworkId-CBGWQS_K.cjs} +4 -4
- package/dist/{getNetworkProviderFromNetworkId-DXzopnuR.cjs.map → getNetworkProviderFromNetworkId-CBGWQS_K.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CGpE_Y95.esm.js → getNetworkProviderFromNetworkId-D-wj5mPl.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-CGpE_Y95.esm.js.map → getNetworkProviderFromNetworkId-D-wj5mPl.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-CbWFH_TM.cjs → getSignedSessionId-CCHKjoeP.cjs} +3 -3
- package/dist/{getSignedSessionId-CbWFH_TM.cjs.map → getSignedSessionId-CCHKjoeP.cjs.map} +1 -1
- package/dist/{getSignedSessionId-C7YR-jNH.native.esm.js → getSignedSessionId-DdKTM3Rh.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-C7YR-jNH.native.esm.js.map → getSignedSessionId-DdKTM3Rh.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-C1uLkDjy.esm.js → getSignedSessionId-Dy04984p.esm.js} +3 -3
- package/dist/{getSignedSessionId-C1uLkDjy.esm.js.map → getSignedSessionId-Dy04984p.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-DPTHL1pO.esm.js → getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js} +3 -10
- package/dist/getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-DidFNLGP.cjs → getVerifiedCredentialForWalletAccount-BtIVDer3.cjs} +4 -17
- package/dist/getVerifiedCredentialForWalletAccount-BtIVDer3.cjs.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-DAmdvMY5.native.esm.js → getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js} +3 -236
- package/dist/getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js.map +1 -0
- package/dist/getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs +19 -0
- package/dist/getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs.map +1 -0
- package/dist/getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js +14 -0
- package/dist/getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js.map +1 -0
- package/dist/getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js +14 -0
- package/dist/getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js.map +1 -0
- package/dist/index.cjs +51 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +47 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +50 -12
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-DCwLx4Ik.esm.js → isMfaRequiredForAction-BrmFODJQ.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-DCwLx4Ik.esm.js.map → isMfaRequiredForAction-BrmFODJQ.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-Dx4BPJVg.native.esm.js → isMfaRequiredForAction-DAfjBLvz.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-Dx4BPJVg.native.esm.js.map → isMfaRequiredForAction-DAfjBLvz.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-BNipdNF5.cjs → isMfaRequiredForAction-aX0vdwv-.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-BNipdNF5.cjs.map → isMfaRequiredForAction-aX0vdwv-.cjs.map} +1 -1
- package/dist/modules/balances/getBalances/getBalances.d.ts +5 -2
- package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
- package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +6 -3
- package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts.map +1 -1
- package/dist/modules/checkout/checkout.types.d.ts +6 -6
- package/dist/modules/checkout/checkout.types.d.ts.map +1 -1
- package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.d.ts +15 -0
- package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.d.ts.map +1 -0
- package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.types.d.ts +14 -0
- package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.types.d.ts.map +1 -0
- package/dist/modules/waas/createWaasClient/createNativeWaasSDKContainer.d.ts +15 -0
- package/dist/modules/waas/createWaasClient/createNativeWaasSDKContainer.d.ts.map +1 -0
- package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
- package/dist/modules/waas/exportWaasPrivateKeyToContainer/exportWaasPrivateKeyToContainer.d.ts +33 -0
- package/dist/modules/waas/exportWaasPrivateKeyToContainer/exportWaasPrivateKeyToContainer.d.ts.map +1 -0
- package/dist/modules/waas/exportWaasPrivateKeyToContainer/index.d.ts +2 -0
- package/dist/modules/waas/exportWaasPrivateKeyToContainer/index.d.ts.map +1 -0
- package/dist/modules/waas/waas.types.d.ts +3 -1
- package/dist/modules/waas/waas.types.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +5 -1
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
- package/dist/{NotWaasWalletAccountError-CgwG_c2-.esm.js → refreshAuth-B2kFf0pl.native.esm.js} +4 -18
- package/dist/refreshAuth-B2kFf0pl.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-Be0QB89x.native.esm.js → refreshAuth-B8xd2JUm.esm.js} +4 -18
- package/dist/refreshAuth-B8xd2JUm.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-DKEpLrGc.cjs → refreshAuth-BMtIp1do.cjs} +3 -23
- package/dist/refreshAuth-BMtIp1do.cjs.map +1 -0
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentation.types.d.ts +6 -0
- package/dist/services/instrumentation/instrumentation.types.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/getOperatingSystem/getOperatingSystem.d.ts +13 -0
- package/dist/utils/getOperatingSystem/getOperatingSystem.d.ts.map +1 -0
- package/dist/utils/getOperatingSystem/getOperatingSystem.types.d.ts +8 -0
- package/dist/utils/getOperatingSystem/getOperatingSystem.types.d.ts.map +1 -0
- package/dist/utils/getPlatform/getPlatform.d.ts +11 -0
- package/dist/utils/getPlatform/getPlatform.d.ts.map +1 -0
- package/dist/utils/getPlatform/getPlatform.types.d.ts +8 -0
- package/dist/utils/getPlatform/getPlatform.types.d.ts.map +1 -0
- package/dist/waas.cjs +20 -28
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +4 -12
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +4 -12
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +39 -4
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +39 -5
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +68 -10
- package/dist/waasCore.native.esm.js.map +1 -1
- package/ios/DynamicClientScreenshotProtection.h +4 -0
- package/ios/DynamicClientScreenshotProtection.mm +137 -0
- package/package.json +5 -5
- package/src/turboModules/NativeScreenshotProtection.native.spec.ts +57 -0
- package/src/turboModules/NativeScreenshotProtection.ts +26 -0
- package/dist/InvalidParamError-BqFQnYCi.native.esm.js.map +0 -1
- package/dist/InvalidParamError-CmwKWCyr.cjs.map +0 -1
- package/dist/InvalidParamError-c1J0Vmze.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-Be0QB89x.native.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-CgwG_c2-.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-DKEpLrGc.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-Cke-DBhx.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DAmdvMY5.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DPTHL1pO.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DidFNLGP.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-
|
|
2
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
3
|
-
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-
|
|
4
|
-
const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-
|
|
5
|
-
const
|
|
1
|
+
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-aX0vdwv-.cjs');
|
|
2
|
+
const require_InvalidParamError = require('./InvalidParamError-C7LLi2cZ.cjs');
|
|
3
|
+
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-CBGWQS_K.cjs');
|
|
4
|
+
const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-BtIVDer3.cjs');
|
|
5
|
+
const require_refreshAuth = require('./refreshAuth-BMtIp1do.cjs');
|
|
6
|
+
const require_NotWaasWalletAccountError = require('./NotWaasWalletAccountError-C8ex1YA_.cjs');
|
|
6
7
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
7
8
|
let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
|
|
8
9
|
let zod_mini = require("zod/mini");
|
|
@@ -497,7 +498,7 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
497
498
|
* This call can fail with a 401 error if the user is not logged in and the SDK should finish its initialization process
|
|
498
499
|
* without throwing an error because that is an expected behavior.
|
|
499
500
|
*/
|
|
500
|
-
if (require_InvalidParamError.isCookieEnabled(client)) await
|
|
501
|
+
if (require_InvalidParamError.isCookieEnabled(client)) await require_refreshAuth.__refreshAuth_wrapped(client).catch(async (error) => {
|
|
501
502
|
if (error.status === 401) {
|
|
502
503
|
core.logger.error("Session expired during initialization", error);
|
|
503
504
|
if (client.user) await require_isMfaRequiredForAction.__logoutWithReason_wrapped({ reason: "session-refresh-unauthorized" }, client);
|
|
@@ -665,6 +666,7 @@ const connectLoggerToInstrumentation = ({ environmentId, extensions, instrumenta
|
|
|
665
666
|
const { token, user } = state.get();
|
|
666
667
|
instrumentation.log({
|
|
667
668
|
environmentId,
|
|
669
|
+
operatingSystem: require_InvalidParamError.getOperatingSystem(),
|
|
668
670
|
parameters: require_InvalidParamError.scrubParameters({
|
|
669
671
|
piiFields: instrumentation.config.piiFields,
|
|
670
672
|
value: {
|
|
@@ -672,6 +674,7 @@ const connectLoggerToInstrumentation = ({ environmentId, extensions, instrumenta
|
|
|
672
674
|
message
|
|
673
675
|
}
|
|
674
676
|
}),
|
|
677
|
+
platform: require_InvalidParamError.getPlatform(),
|
|
675
678
|
registeredExtensionKeys: Array.from(extensions),
|
|
676
679
|
sdkSessionId,
|
|
677
680
|
sdkVersion,
|
|
@@ -2395,6 +2398,29 @@ const getMultichainTokenBalances = async ({ balanceRequest }, client = require_I
|
|
|
2395
2398
|
})).chainBalances;
|
|
2396
2399
|
};
|
|
2397
2400
|
|
|
2401
|
+
//#endregion
|
|
2402
|
+
//#region src/modules/balances/getBalances/getBalances.ts
|
|
2403
|
+
/**
|
|
2404
|
+
* @deprecated Use {@link getTokenBalances} instead. Renamed so its name
|
|
2405
|
+
* states what it returns (a wallet account's token balances) and is no
|
|
2406
|
+
* longer confusable with the native-only `getBalance` or the
|
|
2407
|
+
* multi-chain `getMultichainTokenBalances`.
|
|
2408
|
+
*
|
|
2409
|
+
* @not-instrumented
|
|
2410
|
+
*/
|
|
2411
|
+
const getBalances = (params, client = require_InvalidParamError.getDefaultClient()) => getTokenBalances(params, client);
|
|
2412
|
+
|
|
2413
|
+
//#endregion
|
|
2414
|
+
//#region src/modules/balances/getMultichainBalances/getMultichainBalances.ts
|
|
2415
|
+
/**
|
|
2416
|
+
* @deprecated Use {@link getMultichainTokenBalances} instead. Renamed so
|
|
2417
|
+
* the name aligns with `getTokenBalances` and signals that this fetches
|
|
2418
|
+
* token balances (not native-only) across multiple chains.
|
|
2419
|
+
*
|
|
2420
|
+
* @not-instrumented
|
|
2421
|
+
*/
|
|
2422
|
+
const getMultichainBalances = (params, client = require_InvalidParamError.getDefaultClient()) => getMultichainTokenBalances(params, client);
|
|
2423
|
+
|
|
2398
2424
|
//#endregion
|
|
2399
2425
|
//#region src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts
|
|
2400
2426
|
/** @not-instrumented */
|
|
@@ -2532,7 +2558,7 @@ const broadcastCheckoutTransaction = async ({ transactionId, txHash }, client =
|
|
|
2532
2558
|
return withCheckoutSessionTokenCleanupOn401({
|
|
2533
2559
|
call: () => apiClient.recordCheckoutBroadcast({
|
|
2534
2560
|
environmentId,
|
|
2535
|
-
|
|
2561
|
+
flowRecordBroadcastRequest: { txHash },
|
|
2536
2562
|
transactionId,
|
|
2537
2563
|
xDynamicCheckoutSessionToken: sessionToken
|
|
2538
2564
|
}),
|
|
@@ -2676,7 +2702,7 @@ const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slip
|
|
|
2676
2702
|
return withCheckoutSessionTokenCleanupOn401({
|
|
2677
2703
|
call: () => apiClient.quoteCheckoutTransaction({
|
|
2678
2704
|
environmentId,
|
|
2679
|
-
|
|
2705
|
+
flowQuoteRequest: {
|
|
2680
2706
|
fromChainId,
|
|
2681
2707
|
fromTokenAddress,
|
|
2682
2708
|
slippage
|
|
@@ -2705,7 +2731,7 @@ const prepareCheckoutTransaction = async ({ assertBalanceForGasCost, assertBalan
|
|
|
2705
2731
|
return withCheckoutSessionTokenCleanupOn401({
|
|
2706
2732
|
call: () => apiClient.prepareCheckoutTransaction({
|
|
2707
2733
|
environmentId,
|
|
2708
|
-
|
|
2734
|
+
flowPrepareSigningRequest: {
|
|
2709
2735
|
assertBalanceForGasCost: assertBalanceForGasCost ?? false,
|
|
2710
2736
|
assertBalanceForTransferAmount: assertBalanceForTransferAmount ?? false
|
|
2711
2737
|
},
|
|
@@ -7542,6 +7568,18 @@ const getNativeBalance = async ({ walletAccount }, client = require_InvalidParam
|
|
|
7542
7568
|
}, client).getBalance({ address: walletAccount.address });
|
|
7543
7569
|
};
|
|
7544
7570
|
|
|
7571
|
+
//#endregion
|
|
7572
|
+
//#region src/modules/wallets/networks/getBalance/getBalance.ts
|
|
7573
|
+
/**
|
|
7574
|
+
* @deprecated Use {@link getNativeBalance} instead. Renamed so its name
|
|
7575
|
+
* states what it returns (native gas balance) and is no longer confusable
|
|
7576
|
+
* with the token-balance fetchers (`getTokenBalances` /
|
|
7577
|
+
* `getMultichainTokenBalances`).
|
|
7578
|
+
*
|
|
7579
|
+
* @not-instrumented
|
|
7580
|
+
*/
|
|
7581
|
+
const getBalance = (params, client = require_InvalidParamError.getDefaultClient()) => getNativeBalance(params, client);
|
|
7582
|
+
|
|
7545
7583
|
//#endregion
|
|
7546
7584
|
//#region src/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.ts
|
|
7547
7585
|
/**
|
|
@@ -8077,9 +8115,9 @@ exports.findMissingGoogleDriveBackupScopes = findMissingGoogleDriveBackupScopes;
|
|
|
8077
8115
|
exports.getActiveNetworkData = getActiveNetworkData;
|
|
8078
8116
|
exports.getActiveNetworkId = getActiveNetworkId;
|
|
8079
8117
|
exports.getAvailableWalletProvidersData = getAvailableWalletProvidersData;
|
|
8080
|
-
exports.getBalance =
|
|
8118
|
+
exports.getBalance = getBalance;
|
|
8081
8119
|
exports.getBalanceForAddress = getBalanceForAddress;
|
|
8082
|
-
exports.getBalances =
|
|
8120
|
+
exports.getBalances = getBalances;
|
|
8083
8121
|
exports.getCheckoutTransaction = getCheckoutTransaction;
|
|
8084
8122
|
exports.getCheckoutTransactionQuote = getCheckoutTransactionQuote;
|
|
8085
8123
|
exports.getCoinbaseBuyUrl = getCoinbaseBuyUrl;
|
|
@@ -8097,7 +8135,7 @@ exports.getMfaRecoveryCodes = getMfaRecoveryCodes;
|
|
|
8097
8135
|
exports.getMissingVerificationForCoinbaseOnrampOrder = getMissingVerificationForCoinbaseOnrampOrder;
|
|
8098
8136
|
exports.getMoonPayCurrencies = __getMoonPayCurrencies_wrapped;
|
|
8099
8137
|
exports.getMoonPayUrl = __getMoonPayUrl_wrapped;
|
|
8100
|
-
exports.getMultichainBalances =
|
|
8138
|
+
exports.getMultichainBalances = getMultichainBalances;
|
|
8101
8139
|
exports.getMultichainTokenBalances = getMultichainTokenBalances;
|
|
8102
8140
|
exports.getNativeBalance = getNativeBalance;
|
|
8103
8141
|
exports.getNetworksData = require_getNetworkProviderFromNetworkId.getNetworksData;
|
|
@@ -8144,7 +8182,7 @@ exports.onceEvent = require_InvalidParamError.onceEvent;
|
|
|
8144
8182
|
exports.parseUserAgent = parseUserAgent;
|
|
8145
8183
|
exports.prepareCheckoutTransaction = __prepareCheckoutTransaction_wrapped;
|
|
8146
8184
|
exports.proveWalletAccountOwnership = __proveWalletAccountOwnership_wrapped;
|
|
8147
|
-
exports.refreshAuth =
|
|
8185
|
+
exports.refreshAuth = require_refreshAuth.__refreshAuth_wrapped;
|
|
8148
8186
|
exports.refreshUser = __refreshUser_wrapped;
|
|
8149
8187
|
exports.registerPasskey = __registerPasskey_wrapped;
|
|
8150
8188
|
exports.registerTotpMfaDevice = __registerTotpMfaDevice_wrapped;
|