@dynamic-labs-sdk/client 1.28.0 → 1.30.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/webview/DynamicWebViewHost.kt +8 -3
- package/android/src/main/java/xyz/dynamic/client/webview/DynamicWebViewModule.kt +27 -0
- package/dist/client/defaultClient/defaultClient.d.ts.map +1 -1
- package/dist/core.cjs +5 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +7 -7
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +7 -7
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/ScreeningNotRequiredError.d.ts +23 -0
- package/dist/errors/ScreeningNotRequiredError.d.ts.map +1 -0
- package/dist/errors/base/BaseError.d.ts.map +1 -1
- package/dist/exports/core.d.ts +2 -1
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +10 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +26 -2
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CKWQLHSE.native.esm.js → getNetworkProviderFromNetworkId-BUjaD1Hl.native.esm.js} +7 -7
- package/dist/getNetworkProviderFromNetworkId-BUjaD1Hl.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-DBjVmBmy.esm.js → getNetworkProviderFromNetworkId-ChdEfI2Q.esm.js} +6 -6
- package/dist/getNetworkProviderFromNetworkId-ChdEfI2Q.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-OhoRrL_X.cjs → getNetworkProviderFromNetworkId-wbWC24tw.cjs} +2 -2
- package/dist/getNetworkProviderFromNetworkId-wbWC24tw.cjs.map +1 -0
- package/dist/{getSignedSessionId-BncZzHdQ.esm.js → getSignedSessionId-CAcYlAuB.esm.js} +3 -3
- package/dist/getSignedSessionId-CAcYlAuB.esm.js.map +1 -0
- package/dist/{getSignedSessionId-gwqj9h2p.cjs → getSignedSessionId-Ccdmqz-E.cjs} +3 -3
- package/dist/getSignedSessionId-Ccdmqz-E.cjs.map +1 -0
- package/dist/{getSignedSessionId-Dwqj_Cxx.native.esm.js → getSignedSessionId-GpNy9mNZ.native.esm.js} +3 -3
- package/dist/getSignedSessionId-GpNy9mNZ.native.esm.js.map +1 -0
- package/dist/{getWalletProviderByKey-CnpXHkmq.cjs → getWalletProviderByKey-BapuuI8t.cjs} +2 -2
- package/dist/getWalletProviderByKey-BapuuI8t.cjs.map +1 -0
- package/dist/{getWalletProviderByKey-Dh1slnTF.native.esm.js → getWalletProviderByKey-Bo8REwtt.native.esm.js} +4 -2
- package/dist/getWalletProviderByKey-Bo8REwtt.native.esm.js.map +1 -0
- package/dist/{getWalletProviderByKey-C9TWlmDD.esm.js → getWalletProviderByKey-D678OktF.esm.js} +2 -2
- package/dist/getWalletProviderByKey-D678OktF.esm.js.map +1 -0
- package/dist/index.cjs +351 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +349 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +349 -10
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isDynamicWaasEnabled-CvxVdfKf.native.esm.js → isDynamicWaasEnabled-6Fvh5fsA.native.esm.js} +2 -2
- package/dist/{isDynamicWaasEnabled-CvxVdfKf.native.esm.js.map → isDynamicWaasEnabled-6Fvh5fsA.native.esm.js.map} +1 -1
- package/dist/{isDynamicWaasEnabled-DnDhv_Uj.cjs → isDynamicWaasEnabled-BPEtdwZI.cjs} +2 -2
- package/dist/{isDynamicWaasEnabled-DnDhv_Uj.cjs.map → isDynamicWaasEnabled-BPEtdwZI.cjs.map} +1 -1
- package/dist/{isDynamicWaasEnabled-D3-nDwVw.esm.js → isDynamicWaasEnabled-CIJILHSm.esm.js} +2 -2
- package/dist/{isDynamicWaasEnabled-D3-nDwVw.esm.js.map → isDynamicWaasEnabled-CIJILHSm.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-BjRiou3K.cjs → isMfaRequiredForAction-DjZ5p_og.cjs} +2 -2
- package/dist/isMfaRequiredForAction-DjZ5p_og.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-BJGirRfD.native.esm.js → isMfaRequiredForAction-WvmXGQKP.native.esm.js} +2 -2
- package/dist/isMfaRequiredForAction-WvmXGQKP.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-D5rzx59E.esm.js → isMfaRequiredForAction-h3H3j2fJ.esm.js} +2 -2
- package/dist/isMfaRequiredForAction-h3H3j2fJ.esm.js.map +1 -0
- package/dist/{isUserOnboardingComplete-OFxAxj23.esm.js → isUserOnboardingComplete-BYM3G09A.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-OFxAxj23.esm.js.map → isUserOnboardingComplete-BYM3G09A.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-KCtF3oaO.cjs → isUserOnboardingComplete-CxIX-dC1.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-KCtF3oaO.cjs.map → isUserOnboardingComplete-CxIX-dC1.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-B3cHYyNI.native.esm.js → isUserOnboardingComplete-HLRIFAZb.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-B3cHYyNI.native.esm.js.map → isUserOnboardingComplete-HLRIFAZb.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-DY0SAilk.native.esm.js → migrateFromFireblocks-4jrfIkDp.native.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-DY0SAilk.native.esm.js.map → migrateFromFireblocks-4jrfIkDp.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-BM6Iaii-.esm.js → migrateFromFireblocks-R-aPmpUZ.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-BM6Iaii-.esm.js.map → migrateFromFireblocks-R-aPmpUZ.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-Dg6igmRk.cjs → migrateFromFireblocks-mA-hvJcQ.cjs} +3 -3
- package/dist/{migrateFromFireblocks-Dg6igmRk.cjs.map → migrateFromFireblocks-mA-hvJcQ.cjs.map} +1 -1
- package/dist/modules/apiClient/createApiClient.d.ts +2 -1
- package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
- package/dist/modules/apiClient/createBaseApiClient.d.ts.map +1 -1
- package/dist/modules/auth/createVisit/createVisit.d.ts.map +1 -1
- package/dist/modules/auth/decodeJwt/decodeJwt.d.ts +2 -1
- package/dist/modules/auth/decodeJwt/decodeJwt.d.ts.map +1 -1
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts +2 -1
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts.map +1 -1
- package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts +2 -1
- package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts.map +1 -1
- package/dist/modules/auth/initializeAuth/initializeAuth.d.ts.map +1 -1
- package/dist/modules/auth/isSignedIn/isSignedIn.d.ts.map +1 -1
- package/dist/modules/auth/logout/logout.d.ts.map +1 -1
- package/dist/modules/auth/logoutReason.d.ts +1 -1
- package/dist/modules/auth/logoutReason.d.ts.map +1 -1
- package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/getPasskeys/getPasskeys.d.ts +3 -2
- package/dist/modules/auth/passkeys/getPasskeys/getPasskeys.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts +2 -2
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/serverAuthenticatePasskey/serverAuthenticatePasskey.d.ts +2 -2
- package/dist/modules/auth/passkeys/serverAuthenticatePasskey/serverAuthenticatePasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/serverRegisterPasskey/serverRegisterPasskey.d.ts +2 -2
- package/dist/modules/auth/passkeys/serverRegisterPasskey/serverRegisterPasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/serverSigninPasskey/serverSigninPasskey.d.ts +2 -2
- package/dist/modules/auth/passkeys/serverSigninPasskey/serverSigninPasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +2 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts.map +1 -1
- package/dist/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.d.ts.map +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/checkAndRaiseWalletAccountsChangedEvent/checkAndRaiseWalletAccountsChangedEvent.d.ts.map +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
- package/dist/modules/captcha/isCaptchaRequired/isCaptchaRequired.d.ts.map +1 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts.map +1 -1
- package/dist/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.d.ts +2 -1
- package/dist/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.d.ts.map +1 -1
- package/dist/modules/checkout/utils/createCheckoutTransactionChannelSchema/createCheckoutTransactionChannelSchema.d.ts +9 -7
- package/dist/modules/checkout/utils/createCheckoutTransactionChannelSchema/createCheckoutTransactionChannelSchema.d.ts.map +1 -1
- package/dist/modules/clientEvents/clientEvents.d.ts +2 -2
- package/dist/modules/clientEvents/clientEvents.d.ts.map +1 -1
- package/dist/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.d.ts +1 -1
- package/dist/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts +1 -1
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts.map +1 -1
- package/dist/modules/extension/hasExtension/hasExtension.d.ts +1 -1
- package/dist/modules/extension/hasExtension/hasExtension.d.ts.map +1 -1
- package/dist/modules/extension/registerExtension/registerExtension.d.ts +1 -1
- package/dist/modules/extension/registerExtension/registerExtension.d.ts.map +1 -1
- package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts +2 -1
- package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts.map +1 -1
- package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
- package/dist/modules/initializeClient/logoutIfSessionPublicKeyMismatched/logoutIfSessionPublicKeyMismatched.d.ts +18 -0
- package/dist/modules/initializeClient/logoutIfSessionPublicKeyMismatched/logoutIfSessionPublicKeyMismatched.d.ts.map +1 -0
- package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts.map +1 -1
- package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts +2 -1
- package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts.map +1 -1
- package/dist/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.d.ts.map +1 -1
- package/dist/modules/mfa/acknowledgeRecoveryCodes/acknowledgeRecoveryCodes.d.ts +3 -2
- package/dist/modules/mfa/acknowledgeRecoveryCodes/acknowledgeRecoveryCodes.d.ts.map +1 -1
- package/dist/modules/mfa/authenticateMfaRecoveryCode/authenticateMfaRecoveryCode.d.ts +2 -2
- package/dist/modules/mfa/authenticateMfaRecoveryCode/authenticateMfaRecoveryCode.d.ts.map +1 -1
- package/dist/modules/mfa/authenticatePasskeyMFA/authenticatePasskeyMFA.d.ts +2 -2
- package/dist/modules/mfa/authenticatePasskeyMFA/authenticatePasskeyMFA.d.ts.map +1 -1
- package/dist/modules/mfa/authenticateTotpMfaDevice/authenticateTotpMfaDevice.d.ts +2 -2
- package/dist/modules/mfa/authenticateTotpMfaDevice/authenticateTotpMfaDevice.d.ts.map +1 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts.map +1 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts +2 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts.map +1 -1
- package/dist/modules/mfa/deleteMfaDevice/deleteMfaDevice.d.ts +1 -1
- package/dist/modules/mfa/deleteMfaDevice/deleteMfaDevice.d.ts.map +1 -1
- package/dist/modules/mfa/getMfaDevices/getMfaDevices.d.ts +3 -2
- package/dist/modules/mfa/getMfaDevices/getMfaDevices.d.ts.map +1 -1
- package/dist/modules/mfa/getMfaMethods/getMfaMethods.d.ts +3 -2
- package/dist/modules/mfa/getMfaMethods/getMfaMethods.d.ts.map +1 -1
- package/dist/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.d.ts +3 -2
- package/dist/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.d.ts.map +1 -1
- package/dist/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.d.ts +1 -1
- package/dist/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.d.ts.map +1 -1
- package/dist/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.d.ts +1 -1
- package/dist/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.d.ts.map +1 -1
- package/dist/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.d.ts +1 -1
- package/dist/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.d.ts.map +1 -1
- package/dist/modules/mfa/registerTotpMfaDevice/registerTotpMfaDevice.d.ts +2 -1
- package/dist/modules/mfa/registerTotpMfaDevice/registerTotpMfaDevice.d.ts.map +1 -1
- package/dist/modules/mfa/setDefaultMfaDevice/setDefaultMfaDevice.d.ts +1 -1
- package/dist/modules/mfa/setDefaultMfaDevice/setDefaultMfaDevice.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts +2 -1
- package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.d.ts +2 -1
- package/dist/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.d.ts.map +1 -1
- package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +2 -1
- package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts.map +1 -1
- package/dist/modules/sessionKeys/generateNonceSignature/generateNonceSignature.d.ts +4 -3
- package/dist/modules/sessionKeys/generateNonceSignature/generateNonceSignature.d.ts.map +1 -1
- package/dist/modules/sessionKeys/generateSessionSignature/generateSessionSignature.d.ts +4 -3
- package/dist/modules/sessionKeys/generateSessionSignature/generateSessionSignature.d.ts.map +1 -1
- package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts +5 -3
- package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts.map +1 -1
- package/dist/modules/state/raiseStateEvents/raiseStateEvents.d.ts.map +1 -1
- package/dist/modules/storageSync/initializeStorageSync.d.ts.map +1 -1
- package/dist/modules/storageSync/syncStateWithStorage/syncStateWithStorage.d.ts.map +1 -1
- package/dist/modules/swap/executeSwapTransaction/executeSwapTransaction.d.ts +4 -3
- package/dist/modules/swap/executeSwapTransaction/executeSwapTransaction.d.ts.map +1 -1
- package/dist/modules/swap/utils/ensureCorrectActiveNetwork/ensureCorrectActiveNetwork.d.ts.map +1 -1
- package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts.map +1 -1
- package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts +1 -1
- package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +6 -5
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.d.ts +6 -5
- package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/createWaasOfflineRecoveryShares/createWaasOfflineRecoveryShares.d.ts.map +1 -1
- package/dist/modules/waas/exportWaasClientKeyshares/exportWaasClientKeyshares.d.ts +1 -1
- package/dist/modules/waas/exportWaasClientKeyshares/exportWaasClientKeyshares.d.ts.map +1 -1
- package/dist/modules/waas/exportWaasPrivateKey/exportWaasPrivateKey.d.ts +1 -1
- package/dist/modules/waas/exportWaasPrivateKey/exportWaasPrivateKey.d.ts.map +1 -1
- package/dist/modules/waas/exportWaasPrivateKeyToContainer/exportWaasPrivateKeyToContainer.d.ts.map +1 -1
- package/dist/modules/waas/getWalletAccountShareSets/getWalletAccountShareSets.d.ts +27 -0
- package/dist/modules/waas/getWalletAccountShareSets/getWalletAccountShareSets.d.ts.map +1 -0
- package/dist/modules/waas/getWalletAccountShareSets/index.d.ts +3 -0
- package/dist/modules/waas/getWalletAccountShareSets/index.d.ts.map +1 -0
- package/dist/modules/waas/importWaasPrivateKey/importWaasPrivateKey.d.ts +1 -1
- package/dist/modules/waas/importWaasPrivateKey/importWaasPrivateKey.d.ts.map +1 -1
- package/dist/modules/waas/injectWaasVerifiedCredentialFields/injectWaasVerifiedCredentialFields.d.ts +26 -0
- package/dist/modules/waas/injectWaasVerifiedCredentialFields/injectWaasVerifiedCredentialFields.d.ts.map +1 -0
- package/dist/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.d.ts +1 -1
- package/dist/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.d.ts.map +1 -1
- package/dist/modules/waas/policies/applyPolicyLayerBatch/applyPolicyLayerBatch.d.ts +18 -0
- package/dist/modules/waas/policies/applyPolicyLayerBatch/applyPolicyLayerBatch.d.ts.map +1 -0
- package/dist/modules/waas/policies/applyPolicyLayerBatch/index.d.ts +2 -0
- package/dist/modules/waas/policies/applyPolicyLayerBatch/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildAllowAddressesRule/buildAllowAddressesRule.d.ts +10 -0
- package/dist/modules/waas/policies/buildAllowAddressesRule/buildAllowAddressesRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildAllowAddressesRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildAllowAddressesRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildAllowPolicyRule/buildAllowPolicyRule.d.ts +11 -0
- package/dist/modules/waas/policies/buildAllowPolicyRule/buildAllowPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildAllowPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildAllowPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildBlockExportRule/buildBlockExportRule.d.ts +11 -0
- package/dist/modules/waas/policies/buildBlockExportRule/buildBlockExportRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildBlockExportRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildBlockExportRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildDenyAddressesRule/buildDenyAddressesRule.d.ts +8 -0
- package/dist/modules/waas/policies/buildDenyAddressesRule/buildDenyAddressesRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildDenyAddressesRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildDenyAddressesRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildDenyPolicyRule/buildDenyPolicyRule.d.ts +11 -0
- package/dist/modules/waas/policies/buildDenyPolicyRule/buildDenyPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildDenyPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildDenyPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildMaxAmountPerTransactionRule/buildMaxAmountPerTransactionRule.d.ts +10 -0
- package/dist/modules/waas/policies/buildMaxAmountPerTransactionRule/buildMaxAmountPerTransactionRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildMaxAmountPerTransactionRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildMaxAmountPerTransactionRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildOperationForExistingRule/buildOperationForExistingRule.d.ts +26 -0
- package/dist/modules/waas/policies/buildOperationForExistingRule/buildOperationForExistingRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildOperationForExistingRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildOperationForExistingRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildOperationsForRule/buildOperationsForRule.d.ts +24 -0
- package/dist/modules/waas/policies/buildOperationsForRule/buildOperationsForRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildOperationsForRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildOperationsForRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildValueLimit/buildValueLimit.d.ts +12 -0
- package/dist/modules/waas/policies/buildValueLimit/buildValueLimit.d.ts.map +1 -0
- package/dist/modules/waas/policies/buildValueLimit/index.d.ts +2 -0
- package/dist/modules/waas/policies/buildValueLimit/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/createPolicy/createPolicy.d.ts +39 -0
- package/dist/modules/waas/policies/createPolicy/createPolicy.d.ts.map +1 -0
- package/dist/modules/waas/policies/createPolicy/index.d.ts +2 -0
- package/dist/modules/waas/policies/createPolicy/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/desugarPolicyRules/desugarPolicyRules.d.ts +23 -0
- package/dist/modules/waas/policies/desugarPolicyRules/desugarPolicyRules.d.ts.map +1 -0
- package/dist/modules/waas/policies/desugarPolicyRules/index.d.ts +2 -0
- package/dist/modules/waas/policies/desugarPolicyRules/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/expandPolicyRules/expandPolicyRules.d.ts +22 -0
- package/dist/modules/waas/policies/expandPolicyRules/expandPolicyRules.d.ts.map +1 -0
- package/dist/modules/waas/policies/expandPolicyRules/index.d.ts +2 -0
- package/dist/modules/waas/policies/expandPolicyRules/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/fillOmittedRuleValues/fillOmittedRuleValues.d.ts +26 -0
- package/dist/modules/waas/policies/fillOmittedRuleValues/fillOmittedRuleValues.d.ts.map +1 -0
- package/dist/modules/waas/policies/fillOmittedRuleValues/index.d.ts +2 -0
- package/dist/modules/waas/policies/fillOmittedRuleValues/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/findMatchedRuleKind/findMatchedRuleKind.d.ts +22 -0
- package/dist/modules/waas/policies/findMatchedRuleKind/findMatchedRuleKind.d.ts.map +1 -0
- package/dist/modules/waas/policies/findMatchedRuleKind/index.d.ts +3 -0
- package/dist/modules/waas/policies/findMatchedRuleKind/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/getAccountPolicyLayer/getAccountPolicyLayer.d.ts +18 -0
- package/dist/modules/waas/policies/getAccountPolicyLayer/getAccountPolicyLayer.d.ts.map +1 -0
- package/dist/modules/waas/policies/getAccountPolicyLayer/index.d.ts +2 -0
- package/dist/modules/waas/policies/getAccountPolicyLayer/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/getPolicy/getPolicy.d.ts +34 -0
- package/dist/modules/waas/policies/getPolicy/getPolicy.d.ts.map +1 -0
- package/dist/modules/waas/policies/getPolicy/index.d.ts +2 -0
- package/dist/modules/waas/policies/getPolicy/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/getResolvedPolicyLayer/getResolvedPolicyLayer.d.ts +16 -0
- package/dist/modules/waas/policies/getResolvedPolicyLayer/getResolvedPolicyLayer.d.ts.map +1 -0
- package/dist/modules/waas/policies/getResolvedPolicyLayer/index.d.ts +2 -0
- package/dist/modules/waas/policies/getResolvedPolicyLayer/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/getSignerPolicyLayer/getSignerPolicyLayer.d.ts +25 -0
- package/dist/modules/waas/policies/getSignerPolicyLayer/getSignerPolicyLayer.d.ts.map +1 -0
- package/dist/modules/waas/policies/getSignerPolicyLayer/index.d.ts +2 -0
- package/dist/modules/waas/policies/getSignerPolicyLayer/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/getWalletPolicyLayer/getWalletPolicyLayer.d.ts +20 -0
- package/dist/modules/waas/policies/getWalletPolicyLayer/getWalletPolicyLayer.d.ts.map +1 -0
- package/dist/modules/waas/policies/getWalletPolicyLayer/index.d.ts +2 -0
- package/dist/modules/waas/policies/getWalletPolicyLayer/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/hasAddresses/hasAddresses.d.ts +7 -0
- package/dist/modules/waas/policies/hasAddresses/hasAddresses.d.ts.map +1 -0
- package/dist/modules/waas/policies/hasAddresses/index.d.ts +2 -0
- package/dist/modules/waas/policies/hasAddresses/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/hasUnrecognizedFields/hasUnrecognizedFields.d.ts +6 -0
- package/dist/modules/waas/policies/hasUnrecognizedFields/hasUnrecognizedFields.d.ts.map +1 -0
- package/dist/modules/waas/policies/hasUnrecognizedFields/index.d.ts +2 -0
- package/dist/modules/waas/policies/hasUnrecognizedFields/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/isPolicyRuleDeletionMarker/index.d.ts +2 -0
- package/dist/modules/waas/policies/isPolicyRuleDeletionMarker/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/isPolicyRuleDeletionMarker/isPolicyRuleDeletionMarker.d.ts +14 -0
- package/dist/modules/waas/policies/isPolicyRuleDeletionMarker/isPolicyRuleDeletionMarker.d.ts.map +1 -0
- package/dist/modules/waas/policies/matchExistingRules/index.d.ts +3 -0
- package/dist/modules/waas/policies/matchExistingRules/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/matchExistingRules/matchExistingRules.d.ts +33 -0
- package/dist/modules/waas/policies/matchExistingRules/matchExistingRules.d.ts.map +1 -0
- package/dist/modules/waas/policies/policies.types.d.ts +91 -0
- package/dist/modules/waas/policies/policies.types.d.ts.map +1 -0
- package/dist/modules/waas/policies/policyRuleDefaultNames.d.ts +10 -0
- package/dist/modules/waas/policies/policyRuleDefaultNames.d.ts.map +1 -0
- package/dist/modules/waas/policies/policyRuleKinds.d.ts +34 -0
- package/dist/modules/waas/policies/policyRuleKinds.d.ts.map +1 -0
- package/dist/modules/waas/policies/readAllowAddressesRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/readAllowAddressesRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/readAllowAddressesRule/readAllowAddressesRule.d.ts +9 -0
- package/dist/modules/waas/policies/readAllowAddressesRule/readAllowAddressesRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/readBlockExportRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/readBlockExportRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/readBlockExportRule/readBlockExportRule.d.ts +8 -0
- package/dist/modules/waas/policies/readBlockExportRule/readBlockExportRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/readCoveredRule/index.d.ts +3 -0
- package/dist/modules/waas/policies/readCoveredRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/readCoveredRule/readCoveredRule.d.ts +31 -0
- package/dist/modules/waas/policies/readCoveredRule/readCoveredRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/readDenyAddressesRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/readDenyAddressesRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/readDenyAddressesRule/readDenyAddressesRule.d.ts +8 -0
- package/dist/modules/waas/policies/readDenyAddressesRule/readDenyAddressesRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/readMaxAmountPerTransactionRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/readMaxAmountPerTransactionRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/readMaxAmountPerTransactionRule/readMaxAmountPerTransactionRule.d.ts +8 -0
- package/dist/modules/waas/policies/readMaxAmountPerTransactionRule/readMaxAmountPerTransactionRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/readValueLimit/index.d.ts +2 -0
- package/dist/modules/waas/policies/readValueLimit/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/readValueLimit/readValueLimit.d.ts +10 -0
- package/dist/modules/waas/policies/readValueLimit/readValueLimit.d.ts.map +1 -0
- package/dist/modules/waas/policies/removeAccountPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/removeAccountPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/removeAccountPolicyRule/removeAccountPolicyRule.d.ts +20 -0
- package/dist/modules/waas/policies/removeAccountPolicyRule/removeAccountPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/removePolicyRules/index.d.ts +2 -0
- package/dist/modules/waas/policies/removePolicyRules/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/removePolicyRules/removePolicyRules.d.ts +30 -0
- package/dist/modules/waas/policies/removePolicyRules/removePolicyRules.d.ts.map +1 -0
- package/dist/modules/waas/policies/removeSignerPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/removeSignerPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/removeSignerPolicyRule/removeSignerPolicyRule.d.ts +25 -0
- package/dist/modules/waas/policies/removeSignerPolicyRule/removeSignerPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/removeWalletPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/removeWalletPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/removeWalletPolicyRule/removeWalletPolicyRule.d.ts +22 -0
- package/dist/modules/waas/policies/removeWalletPolicyRule/removeWalletPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/resolvePolicyScope/index.d.ts +3 -0
- package/dist/modules/waas/policies/resolvePolicyScope/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/resolvePolicyScope/resolvePolicyScope.d.ts +31 -0
- package/dist/modules/waas/policies/resolvePolicyScope/resolvePolicyScope.d.ts.map +1 -0
- package/dist/modules/waas/policies/resolveRuleName/index.d.ts +2 -0
- package/dist/modules/waas/policies/resolveRuleName/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/resolveRuleName/resolveRuleName.d.ts +20 -0
- package/dist/modules/waas/policies/resolveRuleName/resolveRuleName.d.ts.map +1 -0
- package/dist/modules/waas/policies/sameChainIds/index.d.ts +2 -0
- package/dist/modules/waas/policies/sameChainIds/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/sameChainIds/sameChainIds.d.ts +14 -0
- package/dist/modules/waas/policies/sameChainIds/sameChainIds.d.ts.map +1 -0
- package/dist/modules/waas/policies/sortRulesByRuleId/index.d.ts +2 -0
- package/dist/modules/waas/policies/sortRulesByRuleId/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/sortRulesByRuleId/sortRulesByRuleId.d.ts +12 -0
- package/dist/modules/waas/policies/sortRulesByRuleId/sortRulesByRuleId.d.ts.map +1 -0
- package/dist/modules/waas/policies/upsertAccountPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/upsertAccountPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/upsertAccountPolicyRule/upsertAccountPolicyRule.d.ts +24 -0
- package/dist/modules/waas/policies/upsertAccountPolicyRule/upsertAccountPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/upsertSignerPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/upsertSignerPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/upsertSignerPolicyRule/upsertSignerPolicyRule.d.ts +28 -0
- package/dist/modules/waas/policies/upsertSignerPolicyRule/upsertSignerPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/policies/upsertWalletPolicyRule/index.d.ts +2 -0
- package/dist/modules/waas/policies/upsertWalletPolicyRule/index.d.ts.map +1 -0
- package/dist/modules/waas/policies/upsertWalletPolicyRule/upsertWalletPolicyRule.d.ts +25 -0
- package/dist/modules/waas/policies/upsertWalletPolicyRule/upsertWalletPolicyRule.d.ts.map +1 -0
- package/dist/modules/waas/refreshWaasWalletAccountShares/refreshWaasWalletAccountShares.d.ts +1 -1
- package/dist/modules/waas/refreshWaasWalletAccountShares/refreshWaasWalletAccountShares.d.ts.map +1 -1
- package/dist/modules/waas/setWaasWalletAccountPassword/setWaasWalletAccountPassword.d.ts +1 -1
- package/dist/modules/waas/setWaasWalletAccountPassword/setWaasWalletAccountPassword.d.ts.map +1 -1
- package/dist/modules/waas/shouldAutoCreateWalletForChain/shouldAutoCreateWalletForChain.d.ts +1 -1
- package/dist/modules/waas/shouldAutoCreateWalletForChain/shouldAutoCreateWalletForChain.d.ts.map +1 -1
- package/dist/modules/waas/signSerializedTransaction/index.d.ts +2 -0
- package/dist/modules/waas/signSerializedTransaction/index.d.ts.map +1 -0
- package/dist/modules/waas/signSerializedTransaction/signSerializedTransaction.d.ts +24 -0
- package/dist/modules/waas/signSerializedTransaction/signSerializedTransaction.d.ts.map +1 -0
- package/dist/modules/waas/updateWaasPassword/updateWaasPassword.d.ts +1 -1
- package/dist/modules/waas/updateWaasPassword/updateWaasPassword.d.ts.map +1 -1
- package/dist/modules/waas/waas.types.d.ts +22 -1
- package/dist/modules/waas/waas.types.d.ts.map +1 -1
- package/dist/modules/wallets/assertWalletAccountSigningAvailability/assertWalletAccountSigningAvailability.d.ts +1 -1
- package/dist/modules/wallets/assertWalletAccountSigningAvailability/assertWalletAccountSigningAvailability.d.ts.map +1 -1
- package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts +2 -1
- package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts.map +1 -1
- package/dist/modules/wallets/destroyWalletProviders/destroyWalletProviders.d.ts.map +1 -1
- package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts +4 -3
- package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletAccountAddressByType/getWalletAccountAddressByType.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.d.ts +2 -1
- package/dist/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletProviders/getWalletProviders.d.ts +3 -2
- package/dist/modules/wallets/getWalletProviders/getWalletProviders.d.ts.map +1 -1
- package/dist/modules/wallets/isExternalWalletScreeningEnabled/index.d.ts +2 -0
- package/dist/modules/wallets/isExternalWalletScreeningEnabled/index.d.ts.map +1 -0
- package/dist/modules/wallets/isExternalWalletScreeningEnabled/isExternalWalletScreeningEnabled.d.ts +28 -0
- package/dist/modules/wallets/isExternalWalletScreeningEnabled/isExternalWalletScreeningEnabled.d.ts.map +1 -0
- package/dist/modules/wallets/isWalletAccountVerified/isWalletAccountVerified.d.ts.map +1 -1
- package/dist/modules/wallets/networks/addNetwork/addNetwork.d.ts +1 -1
- package/dist/modules/wallets/networks/addNetwork/addNetwork.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getActiveNetworkData/getActiveNetworkData.d.ts +5 -3
- package/dist/modules/wallets/networks/getActiveNetworkData/getActiveNetworkData.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.d.ts +5 -4
- package/dist/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.d.ts +4 -3
- package/dist/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts +4 -3
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts.map +1 -1
- package/dist/modules/wallets/networks/isProgrammaticNetworkSwitchAvailable/isProgrammaticNetworkSwitchAvailable.d.ts +1 -1
- package/dist/modules/wallets/networks/isProgrammaticNetworkSwitchAvailable/isProgrammaticNetworkSwitchAvailable.d.ts.map +1 -1
- package/dist/modules/wallets/networks/switchActiveNetwork/switchActiveNetwork.d.ts.map +1 -1
- package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts +5 -4
- package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts.map +1 -1
- package/dist/modules/wallets/screenTransaction/index.d.ts +2 -0
- package/dist/modules/wallets/screenTransaction/index.d.ts.map +1 -0
- package/dist/modules/wallets/screenTransaction/screenTransaction.d.ts +47 -0
- package/dist/modules/wallets/screenTransaction/screenTransaction.d.ts.map +1 -0
- package/dist/modules/wallets/signMessage/signMessage.d.ts +4 -3
- package/dist/modules/wallets/signMessage/signMessage.d.ts.map +1 -1
- package/dist/modules/wallets/transferAmount/transferAmount.d.ts +5 -3
- package/dist/modules/wallets/transferAmount/transferAmount.d.ts.map +1 -1
- package/dist/modules/wallets/transferWalletAccount/transferWalletAccount.d.ts +2 -1
- package/dist/modules/wallets/transferWalletAccount/transferWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/unverifiedWalletAccounts/removeUnverifiedWalletAccount/removeUnverifiedWalletAccount.d.ts +1 -1
- package/dist/modules/wallets/unverifiedWalletAccounts/removeUnverifiedWalletAccount/removeUnverifiedWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/userHasExternalWallet/userHasExternalWallet.d.ts.map +1 -1
- package/dist/modules/wallets/utils/convertVerifiedCredentialToWalletAccount/convertVerifiedCredentialToWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/utils/formatSignInMessage/formatSignInMessage.d.ts +1 -1
- package/dist/modules/wallets/utils/formatSignInMessage/formatSignInMessage.d.ts.map +1 -1
- package/dist/modules/wallets/utils/formatWalletProviderKey/formatWalletProviderKey.d.ts +1 -1
- package/dist/modules/wallets/utils/formatWalletProviderKey/formatWalletProviderKey.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getChainIdForAccountVerification/getChainIdForAccountVerification.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts +2 -1
- package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.d.ts +2 -1
- package/dist/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts +2 -1
- package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts +1 -1
- package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts.map +1 -1
- package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts +1 -1
- package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts.map +1 -1
- package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts +0 -2
- package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.d.ts +8 -7
- package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/index.d.ts +1 -0
- package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/index.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/events/offWalletProviderEvent/offWalletProviderEvent.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/events/offWalletProviderEvent/offWalletProviderEvent.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts +2 -2
- package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/index.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/index.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts +15 -1
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/walletProviderKeyMap/getWalletProviderKeyFromVerifiedCredential/getWalletProviderKeyFromVerifiedCredential.d.ts +3 -2
- package/dist/modules/wallets/walletProvider/walletProviderKeyMap/getWalletProviderKeyFromVerifiedCredential/getWalletProviderKeyFromVerifiedCredential.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.d.ts.map +1 -1
- package/dist/modules/yield/claimYieldRewards/claimYieldRewards.d.ts +43 -0
- package/dist/modules/yield/claimYieldRewards/claimYieldRewards.d.ts.map +1 -0
- package/dist/modules/yield/claimYieldRewards/index.d.ts +3 -0
- package/dist/modules/yield/claimYieldRewards/index.d.ts.map +1 -0
- package/dist/modules/yield/depositToYieldVault/depositToYieldVault.d.ts +66 -0
- package/dist/modules/yield/depositToYieldVault/depositToYieldVault.d.ts.map +1 -0
- package/dist/modules/yield/depositToYieldVault/index.d.ts +3 -0
- package/dist/modules/yield/depositToYieldVault/index.d.ts.map +1 -0
- package/dist/modules/yield/utils/executeYieldTransaction/executeYieldTransaction.d.ts +40 -0
- package/dist/modules/yield/utils/executeYieldTransaction/executeYieldTransaction.d.ts.map +1 -0
- package/dist/modules/yield/utils/executeYieldTransaction/index.d.ts +3 -0
- package/dist/modules/yield/utils/executeYieldTransaction/index.d.ts.map +1 -0
- package/dist/modules/yield/withdrawFromYieldVault/index.d.ts +3 -0
- package/dist/modules/yield/withdrawFromYieldVault/index.d.ts.map +1 -0
- package/dist/modules/yield/withdrawFromYieldVault/withdrawFromYieldVault.d.ts +57 -0
- package/dist/modules/yield/withdrawFromYieldVault/withdrawFromYieldVault.d.ts.map +1 -0
- package/dist/modules/yield/yield.types.d.ts +27 -1
- package/dist/modules/yield/yield.types.d.ts.map +1 -1
- package/dist/services/eventEmitter/createEventEmitter.d.ts +1 -1
- package/dist/services/eventEmitter/createEventEmitter.d.ts.map +1 -1
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts +1 -1
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
- package/dist/services/runtimeServices/createRuntimeServiceAccessKey/createRuntimeServiceAccessKey.d.ts +2 -2
- package/dist/services/runtimeServices/createRuntimeServiceAccessKey/createRuntimeServiceAccessKey.d.ts.map +1 -1
- package/dist/services/storage/createStorage/formatForStorage/storageFormat.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{updateAuthFromVerifyResponse-DcwFCD-Y.esm.js → updateAuthFromVerifyResponse-CFIyg2PR.esm.js} +62 -37
- package/dist/updateAuthFromVerifyResponse-CFIyg2PR.esm.js.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-DtnQfhJ1.native.esm.js → updateAuthFromVerifyResponse-Cc1OH9i1.native.esm.js} +60 -37
- package/dist/updateAuthFromVerifyResponse-Cc1OH9i1.native.esm.js.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-DD_rZDrQ.cjs → updateAuthFromVerifyResponse-Dvd40QfL.cjs} +67 -36
- package/dist/updateAuthFromVerifyResponse-Dvd40QfL.cjs.map +1 -0
- package/dist/utils/base64UrlDecode/base64UrlDecode.d.ts +2 -2
- package/dist/utils/base64UrlDecode/base64UrlDecode.d.ts.map +1 -1
- package/dist/utils/bufferToHex/bufferToHex.d.ts +1 -1
- package/dist/utils/bufferToHex/bufferToHex.d.ts.map +1 -1
- package/dist/utils/compressRawPublicKey/compressRawPublicKey.d.ts +2 -2
- package/dist/utils/compressRawPublicKey/compressRawPublicKey.d.ts.map +1 -1
- package/dist/utils/createTranslateRejection/createTranslateRejection.d.ts +1 -1
- package/dist/utils/createTranslateRejection/createTranslateRejection.d.ts.map +1 -1
- package/dist/utils/digestSHA256/digestSHA256.d.ts.map +1 -1
- package/dist/utils/encodeBase64Url/encodeBase64Url.d.ts +1 -1
- package/dist/utils/encodeBase64Url/encodeBase64Url.d.ts.map +1 -1
- package/dist/utils/getBuffer/getBuffer.d.ts.map +1 -1
- package/dist/utils/isEqualShallow/isEqualShallow.d.ts +1 -1
- package/dist/utils/isEqualShallow/isEqualShallow.d.ts.map +1 -1
- package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
- package/dist/utils/isServerSideRendering/isServerSideRendering.d.ts +1 -1
- package/dist/utils/isServerSideRendering/isServerSideRendering.d.ts.map +1 -1
- package/dist/utils/objectKeys/index.d.ts +2 -0
- package/dist/utils/objectKeys/index.d.ts.map +1 -0
- package/dist/utils/objectKeys/objectKeys.d.ts +8 -0
- package/dist/utils/objectKeys/objectKeys.d.ts.map +1 -0
- package/dist/utils/observable/subscribeWithSelector/subscribeWithSelector.d.ts +2 -2
- package/dist/utils/observable/subscribeWithSelector/subscribeWithSelector.d.ts.map +1 -1
- package/dist/utils/p256Keygen/p256Keygen.d.ts +5 -3
- package/dist/utils/p256Keygen/p256Keygen.d.ts.map +1 -1
- package/dist/utils/p256Sign/p256Sign.d.ts +1 -1
- package/dist/utils/p256Sign/p256Sign.d.ts.map +1 -1
- package/dist/utils/randomString/randomString.d.ts.map +1 -1
- package/dist/utils/retryOnFail/retryOnFail.d.ts.map +1 -1
- package/dist/utils/setCookie/setCookie.d.ts +1 -1
- package/dist/utils/setCookie/setCookie.d.ts.map +1 -1
- package/dist/waas.cjs +1198 -4
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +1176 -7
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +1176 -7
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +6 -6
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +6 -6
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +6 -6
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +4 -4
- package/dist/getNetworkProviderFromNetworkId-CKWQLHSE.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DBjVmBmy.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-OhoRrL_X.cjs.map +0 -1
- package/dist/getSignedSessionId-BncZzHdQ.esm.js.map +0 -1
- package/dist/getSignedSessionId-Dwqj_Cxx.native.esm.js.map +0 -1
- package/dist/getSignedSessionId-gwqj9h2p.cjs.map +0 -1
- package/dist/getWalletProviderByKey-C9TWlmDD.esm.js.map +0 -1
- package/dist/getWalletProviderByKey-CnpXHkmq.cjs.map +0 -1
- package/dist/getWalletProviderByKey-Dh1slnTF.native.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-BJGirRfD.native.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-BjRiou3K.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-D5rzx59E.esm.js.map +0 -1
- package/dist/updateAuthFromVerifyResponse-DD_rZDrQ.cjs.map +0 -1
- package/dist/updateAuthFromVerifyResponse-DcwFCD-Y.esm.js.map +0 -1
- package/dist/updateAuthFromVerifyResponse-DtnQfhJ1.native.esm.js.map +0 -1
package/dist/waas.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ct as
|
|
2
|
-
import { i as __refreshAuth_wrapped, n as TransactionBroadcastError, t as isDynamicWaasEnabled } from "./isDynamicWaasEnabled-
|
|
3
|
-
import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-
|
|
4
|
-
import { n as getWaasWalletProviderFromWalletAccount, r as NotWaasWalletProviderError, t as migrateFromFireblocks } from "./migrateFromFireblocks-
|
|
1
|
+
import { Ct as name, F as getChainFromVerifiedCredentialChain, K as createApiClient, M as getWalletAccounts, N as formatWalletProviderKey, O as NoWalletProviderFoundError, St as getCore, a as InvalidParamError, c as findWaasWalletProviderByChain, f as DYNAMIC_WAAS_METADATA, ft as assertDefined, h as __logoutWithReason_wrapped, l as isWaasWalletProvider, s as isWaasWalletAccount, vt as getDefaultClient, wt as version } from "./updateAuthFromVerifyResponse-CFIyg2PR.esm.js";
|
|
2
|
+
import { i as __refreshAuth_wrapped, n as TransactionBroadcastError, t as isDynamicWaasEnabled } from "./isDynamicWaasEnabled-CIJILHSm.esm.js";
|
|
3
|
+
import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-D678OktF.esm.js";
|
|
4
|
+
import { n as getWaasWalletProviderFromWalletAccount, r as NotWaasWalletProviderError, t as migrateFromFireblocks } from "./migrateFromFireblocks-R-aPmpUZ.esm.js";
|
|
5
5
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
6
|
-
import { AssignableBusinessAccountMemberRole, JwtVerifiedCredentialFormatEnum, TokenScope, UserIdentifierTypeEnum, WaasWalletShareSetType, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
6
|
+
import { AssignableBusinessAccountMemberRole, JwtVerifiedCredentialFormatEnum, TokenScope, UserIdentifierTypeEnum, WaasPolicyLayerRuleOperationOpEnum, WaasPolicyLayerUpdateRequestOpEnum, WaasPolicyRuleType, WaasSignerPolicyLayerUpdateRequestOpEnum, WaasWalletShareSetType, WaasWalletShareSetType as WaasWalletShareSetType$1, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/waas/businessAccounts/assertTargetIdentity.ts
|
|
9
9
|
/**
|
|
@@ -185,6 +185,34 @@ const backupWaasKeySharesToGoogleDrive = async ({ googleDriveAccessToken, passwo
|
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
187
|
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/modules/waas/policies/buildAllowPolicyRule/buildAllowPolicyRule.ts
|
|
190
|
+
/**
|
|
191
|
+
* Builds a policy rule that permits the described action.
|
|
192
|
+
*
|
|
193
|
+
* @param rule - The rule fields (name, chain, and any targeting/limit fields).
|
|
194
|
+
* @returns A `WaasPolicyRule` with `ruleType` set to `allow`.
|
|
195
|
+
* @notInstrumented
|
|
196
|
+
*/
|
|
197
|
+
const buildAllowPolicyRule = (rule) => ({
|
|
198
|
+
...rule,
|
|
199
|
+
ruleType: WaasPolicyRuleType.Allow
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/modules/waas/policies/buildDenyPolicyRule/buildDenyPolicyRule.ts
|
|
204
|
+
/**
|
|
205
|
+
* Builds a policy rule that blocks the described action.
|
|
206
|
+
*
|
|
207
|
+
* @param rule - The rule fields (name, chain, and any targeting/limit fields).
|
|
208
|
+
* @returns A `WaasPolicyRule` with `ruleType` set to `deny`.
|
|
209
|
+
* @notInstrumented
|
|
210
|
+
*/
|
|
211
|
+
const buildDenyPolicyRule = (rule) => ({
|
|
212
|
+
...rule,
|
|
213
|
+
ruleType: WaasPolicyRuleType.Deny
|
|
214
|
+
});
|
|
215
|
+
|
|
188
216
|
//#endregion
|
|
189
217
|
//#region src/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.ts
|
|
190
218
|
/**
|
|
@@ -212,6 +240,649 @@ const createBusinessAccount = async (params, client = getDefaultClient()) => {
|
|
|
212
240
|
return result;
|
|
213
241
|
};
|
|
214
242
|
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/modules/waas/policies/applyPolicyLayerBatch/applyPolicyLayerBatch.ts
|
|
245
|
+
/**
|
|
246
|
+
* Applies a batch of rule operations to the policy layer a
|
|
247
|
+
* {@link ResolvedPolicyScope} points at, atomically in one enclave cycle.
|
|
248
|
+
* Shared by {@link createPolicy} and {@link removePolicyRules} so the
|
|
249
|
+
* account-vs-wallet-vs-signer branch is written once.
|
|
250
|
+
*
|
|
251
|
+
* @notInstrumented
|
|
252
|
+
*/
|
|
253
|
+
const applyPolicyLayerBatch = ({ operations, resolvedScope }, client) => {
|
|
254
|
+
const { environmentId } = getCore(client);
|
|
255
|
+
const apiClient = createApiClient({}, client);
|
|
256
|
+
switch (resolvedScope.target) {
|
|
257
|
+
case "account": return apiClient.updateBusinessAccountPolicyLayer({
|
|
258
|
+
businessAccountId: resolvedScope.businessAccountId,
|
|
259
|
+
environmentId,
|
|
260
|
+
waasPolicyLayerUpdateRequest: {
|
|
261
|
+
op: WaasPolicyLayerUpdateRequestOpEnum.Batch,
|
|
262
|
+
operations
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
case "wallet": return apiClient.updateWaasWalletSelfPolicyLayer({
|
|
266
|
+
environmentId,
|
|
267
|
+
waasPolicyLayerUpdateRequest: {
|
|
268
|
+
op: WaasPolicyLayerUpdateRequestOpEnum.Batch,
|
|
269
|
+
operations
|
|
270
|
+
},
|
|
271
|
+
walletId: resolvedScope.walletId
|
|
272
|
+
});
|
|
273
|
+
case "signer": return apiClient.updateWaasSignerSelfPolicyLayer({
|
|
274
|
+
environmentId,
|
|
275
|
+
waasSignerPolicyLayerUpdateRequest: {
|
|
276
|
+
op: WaasSignerPolicyLayerUpdateRequestOpEnum.Batch,
|
|
277
|
+
operations,
|
|
278
|
+
shareSetId: resolvedScope.shareSetId
|
|
279
|
+
},
|
|
280
|
+
walletId: resolvedScope.walletId
|
|
281
|
+
});
|
|
282
|
+
default: {
|
|
283
|
+
const unhandledScope = resolvedScope;
|
|
284
|
+
throw new InvalidParamError(`applyPolicyLayerBatch: unhandled target "${JSON.stringify(unhandledScope)}"`);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/utils/objectKeys/objectKeys.ts
|
|
291
|
+
/**
|
|
292
|
+
* Typed `Object.keys` — returns `(keyof T)[]` instead of `string[]`, for
|
|
293
|
+
* objects whose key set is fully known at the type level.
|
|
294
|
+
*
|
|
295
|
+
* @notInstrumented
|
|
296
|
+
*/
|
|
297
|
+
const objectKeys = (value) => Object.keys(value);
|
|
298
|
+
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/modules/waas/policies/buildValueLimit/buildValueLimit.ts
|
|
301
|
+
/**
|
|
302
|
+
* Turns a {@link PolicyRuleMaxAmountPerTransaction} into the `valueLimit` shape a rule stores it as.
|
|
303
|
+
* @notInstrumented
|
|
304
|
+
*/
|
|
305
|
+
const buildValueLimit = ({ amount, asset }) => ({
|
|
306
|
+
asset,
|
|
307
|
+
maxPerCall: amount
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/modules/waas/policies/policyRuleDefaultNames.ts
|
|
312
|
+
/**
|
|
313
|
+
* Each rule kind's name when the caller doesn't override it via
|
|
314
|
+
* `PolicyRules['names']`. Shared between the `build*Rule` functions and
|
|
315
|
+
* `desugarPolicyRules` so a rename can't drift the two out of sync — the
|
|
316
|
+
* same reason `RULE_KINDS` in `policyRuleKinds.ts` is a single table
|
|
317
|
+
* instead of parallel switches.
|
|
318
|
+
*/
|
|
319
|
+
const DEFAULT_POLICY_RULE_NAMES = {
|
|
320
|
+
allowAddresses: "Allowed addresses",
|
|
321
|
+
blockExport: "Block key export",
|
|
322
|
+
denyAddresses: "Denied addresses",
|
|
323
|
+
maxAmountPerTransaction: "Per-transaction cap"
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region src/modules/waas/policies/buildAllowAddressesRule/buildAllowAddressesRule.ts
|
|
328
|
+
/**
|
|
329
|
+
* Builds the `allowAddresses` rule, absorbing a sibling
|
|
330
|
+
* `maxAmountPerTransaction` onto the same rule instead of letting it emit
|
|
331
|
+
* its own — see `buildMaxAmountPerTransactionRule`.
|
|
332
|
+
* @notInstrumented
|
|
333
|
+
*/
|
|
334
|
+
const buildAllowAddressesRule = ({ context: { chain, chainIds }, rules }) => {
|
|
335
|
+
if (!rules.allowAddresses || rules.allowAddresses.length === 0) return void 0;
|
|
336
|
+
return {
|
|
337
|
+
addresses: rules.allowAddresses,
|
|
338
|
+
chain,
|
|
339
|
+
chainIds,
|
|
340
|
+
name: rules.names?.allowAddresses ?? DEFAULT_POLICY_RULE_NAMES.allowAddresses,
|
|
341
|
+
ruleType: WaasPolicyRuleType.Allow,
|
|
342
|
+
...rules.maxAmountPerTransaction ? { valueLimit: buildValueLimit(rules.maxAmountPerTransaction) } : {}
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/modules/waas/policies/buildBlockExportRule/buildBlockExportRule.ts
|
|
348
|
+
/**
|
|
349
|
+
* Builds the `blockExport` rule. `deny`, not `allow`: an addressless
|
|
350
|
+
* allow-rule normalizes to an empty allowed-set, denying every transaction.
|
|
351
|
+
* `chain`/`chainIds` are stamped for consistency but the enforcement of a
|
|
352
|
+
* `blockExport` `operationRestrictions` rule is wallet-wide, ignoring them.
|
|
353
|
+
* @notInstrumented
|
|
354
|
+
*/
|
|
355
|
+
const buildBlockExportRule = ({ context: { chain, chainIds }, rules }) => {
|
|
356
|
+
if (rules.blockExport !== true) return void 0;
|
|
357
|
+
return {
|
|
358
|
+
chain,
|
|
359
|
+
chainIds,
|
|
360
|
+
name: rules.names?.blockExport ?? DEFAULT_POLICY_RULE_NAMES.blockExport,
|
|
361
|
+
operationRestrictions: { blockExport: true },
|
|
362
|
+
ruleType: WaasPolicyRuleType.Deny
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/modules/waas/policies/buildDenyAddressesRule/buildDenyAddressesRule.ts
|
|
368
|
+
/**
|
|
369
|
+
* Builds the `denyAddresses` rule. Independent of `allowAddresses`.
|
|
370
|
+
* @notInstrumented
|
|
371
|
+
*/
|
|
372
|
+
const buildDenyAddressesRule = ({ context: { chain, chainIds }, rules }) => {
|
|
373
|
+
if (!rules.denyAddresses || rules.denyAddresses.length === 0) return void 0;
|
|
374
|
+
return {
|
|
375
|
+
addresses: rules.denyAddresses,
|
|
376
|
+
chain,
|
|
377
|
+
chainIds,
|
|
378
|
+
name: rules.names?.denyAddresses ?? DEFAULT_POLICY_RULE_NAMES.denyAddresses,
|
|
379
|
+
ruleType: WaasPolicyRuleType.Deny
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
//#endregion
|
|
384
|
+
//#region src/modules/waas/policies/buildMaxAmountPerTransactionRule/buildMaxAmountPerTransactionRule.ts
|
|
385
|
+
/**
|
|
386
|
+
* Builds the standalone `maxAmountPerTransaction` rule. Only fires when
|
|
387
|
+
* `allowAddresses` didn't already absorb this cap onto its own rule. `deny`
|
|
388
|
+
* for the same reason as `blockExport`'s builder.
|
|
389
|
+
* @notInstrumented
|
|
390
|
+
*/
|
|
391
|
+
const buildMaxAmountPerTransactionRule = ({ context: { chain, chainIds }, rules }) => {
|
|
392
|
+
const isAbsorbedByAllowAddresses = Boolean(rules.allowAddresses?.length);
|
|
393
|
+
if (!rules.maxAmountPerTransaction || isAbsorbedByAllowAddresses) return void 0;
|
|
394
|
+
return {
|
|
395
|
+
chain,
|
|
396
|
+
chainIds,
|
|
397
|
+
name: rules.names?.maxAmountPerTransaction ?? DEFAULT_POLICY_RULE_NAMES.maxAmountPerTransaction,
|
|
398
|
+
ruleType: WaasPolicyRuleType.Deny,
|
|
399
|
+
valueLimit: buildValueLimit(rules.maxAmountPerTransaction)
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
//#endregion
|
|
404
|
+
//#region src/modules/waas/policies/hasAddresses/hasAddresses.ts
|
|
405
|
+
/**
|
|
406
|
+
* Checks both the current `addresses` array and the legacy singular `address` field.
|
|
407
|
+
* @notInstrumented
|
|
408
|
+
*/
|
|
409
|
+
const hasAddresses = (rule) => rule.addresses !== void 0 && rule.addresses.length > 0 || rule.address != null;
|
|
410
|
+
|
|
411
|
+
//#endregion
|
|
412
|
+
//#region src/modules/waas/policies/hasUnrecognizedFields/hasUnrecognizedFields.ts
|
|
413
|
+
const RECOGNIZED_TOP_LEVEL_KEY_SET = new Set([
|
|
414
|
+
"ruleId",
|
|
415
|
+
"name",
|
|
416
|
+
"ruleType",
|
|
417
|
+
"addresses",
|
|
418
|
+
"chain",
|
|
419
|
+
"chainIds",
|
|
420
|
+
"valueLimit",
|
|
421
|
+
"operationRestrictions"
|
|
422
|
+
]);
|
|
423
|
+
/**
|
|
424
|
+
* @notInstrumented
|
|
425
|
+
*/
|
|
426
|
+
const hasUnrecognizedFields = (rule) => Object.keys(rule).some((key) => !RECOGNIZED_TOP_LEVEL_KEY_SET.has(key) && rule[key] != null) || rule.valueLimit?.totalLimit != null || rule.operationRestrictions?.blockRevocation != null || rule.operationRestrictions?.blockClientSigning != null;
|
|
427
|
+
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/modules/waas/policies/readValueLimit/readValueLimit.ts
|
|
430
|
+
/**
|
|
431
|
+
* Reads a stored `valueLimit` back into a {@link PolicyRuleMaxAmountPerTransaction}.
|
|
432
|
+
* @notInstrumented
|
|
433
|
+
*/
|
|
434
|
+
const readValueLimit = ({ asset, maxPerCall }) => ({
|
|
435
|
+
amount: maxPerCall,
|
|
436
|
+
...asset ? { asset } : {}
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region src/modules/waas/policies/readAllowAddressesRule/readAllowAddressesRule.ts
|
|
441
|
+
/**
|
|
442
|
+
* Recognizes an existing rule as `allowAddresses`, reading back a merged
|
|
443
|
+
* `maxAmountPerTransaction` cap too when the rule carries one.
|
|
444
|
+
* @notInstrumented
|
|
445
|
+
*/
|
|
446
|
+
const readAllowAddressesRule = (rule) => {
|
|
447
|
+
if (!(rule.ruleType === WaasPolicyRuleType.Allow && rule.operationRestrictions === void 0 && (rule.valueLimit === void 0 || rule.valueLimit.maxPerCall !== void 0) && hasAddresses(rule) && !hasUnrecognizedFields(rule))) return void 0;
|
|
448
|
+
return {
|
|
449
|
+
allowAddresses: rule.addresses,
|
|
450
|
+
...rule.valueLimit?.maxPerCall !== void 0 ? { maxAmountPerTransaction: readValueLimit({
|
|
451
|
+
asset: rule.valueLimit.asset,
|
|
452
|
+
maxPerCall: rule.valueLimit.maxPerCall
|
|
453
|
+
}) } : {}
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region src/modules/waas/policies/readBlockExportRule/readBlockExportRule.ts
|
|
459
|
+
/**
|
|
460
|
+
* Recognizes an existing rule as `blockExport`.
|
|
461
|
+
* @notInstrumented
|
|
462
|
+
*/
|
|
463
|
+
const readBlockExportRule = (rule) => {
|
|
464
|
+
if (!(rule.ruleType === WaasPolicyRuleType.Deny && rule.operationRestrictions?.blockExport === true && rule.valueLimit === void 0 && !hasAddresses(rule) && !hasUnrecognizedFields(rule))) return void 0;
|
|
465
|
+
return { blockExport: true };
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
//#endregion
|
|
469
|
+
//#region src/modules/waas/policies/readDenyAddressesRule/readDenyAddressesRule.ts
|
|
470
|
+
/**
|
|
471
|
+
* Recognizes an existing rule as `denyAddresses`.
|
|
472
|
+
* @notInstrumented
|
|
473
|
+
*/
|
|
474
|
+
const readDenyAddressesRule = (rule) => {
|
|
475
|
+
if (!(rule.ruleType === WaasPolicyRuleType.Deny && rule.operationRestrictions === void 0 && rule.valueLimit === void 0 && hasAddresses(rule) && !hasUnrecognizedFields(rule))) return void 0;
|
|
476
|
+
return { denyAddresses: rule.addresses };
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/modules/waas/policies/readMaxAmountPerTransactionRule/readMaxAmountPerTransactionRule.ts
|
|
481
|
+
/**
|
|
482
|
+
* Recognizes an existing rule as a standalone `maxAmountPerTransaction` cap.
|
|
483
|
+
* @notInstrumented
|
|
484
|
+
*/
|
|
485
|
+
const readMaxAmountPerTransactionRule = (rule) => {
|
|
486
|
+
if (!(rule.ruleType === WaasPolicyRuleType.Deny && rule.operationRestrictions === void 0 && rule.valueLimit?.maxPerCall !== void 0 && !hasAddresses(rule) && !hasUnrecognizedFields(rule))) return void 0;
|
|
487
|
+
return { maxAmountPerTransaction: readValueLimit({
|
|
488
|
+
asset: rule.valueLimit.asset,
|
|
489
|
+
maxPerCall: rule.valueLimit.maxPerCall
|
|
490
|
+
}) };
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region src/modules/waas/policies/policyRuleKinds.ts
|
|
495
|
+
/** The four keys of {@link PolicyRules}, each of which produces its own rule. */
|
|
496
|
+
const RULE_KIND_KEYS = [
|
|
497
|
+
"blockExport",
|
|
498
|
+
"allowAddresses",
|
|
499
|
+
"denyAddresses",
|
|
500
|
+
"maxAmountPerTransaction"
|
|
501
|
+
];
|
|
502
|
+
/**
|
|
503
|
+
* The single source of truth {@link expandPolicyRules} and
|
|
504
|
+
* {@link desugarPolicyRules} both build on. Entries are alphabetized
|
|
505
|
+
* (enforced by lint), not grouped by relationship — `allowAddresses` and
|
|
506
|
+
* `maxAmountPerTransaction` cooperate (see their builders' comments) despite
|
|
507
|
+
* sitting apart here.
|
|
508
|
+
*/
|
|
509
|
+
const RULE_KINDS = {
|
|
510
|
+
allowAddresses: {
|
|
511
|
+
buildRule: buildAllowAddressesRule,
|
|
512
|
+
readRule: readAllowAddressesRule
|
|
513
|
+
},
|
|
514
|
+
blockExport: {
|
|
515
|
+
buildRule: buildBlockExportRule,
|
|
516
|
+
readRule: readBlockExportRule
|
|
517
|
+
},
|
|
518
|
+
denyAddresses: {
|
|
519
|
+
buildRule: buildDenyAddressesRule,
|
|
520
|
+
readRule: readDenyAddressesRule
|
|
521
|
+
},
|
|
522
|
+
maxAmountPerTransaction: {
|
|
523
|
+
buildRule: buildMaxAmountPerTransactionRule,
|
|
524
|
+
readRule: readMaxAmountPerTransactionRule
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
//#endregion
|
|
529
|
+
//#region src/modules/waas/policies/readCoveredRule/readCoveredRule.ts
|
|
530
|
+
/**
|
|
531
|
+
* The sugar keys and values an existing rule structurally represents — a
|
|
532
|
+
* single rule can cover more than one key (see `allowAddresses` absorbing
|
|
533
|
+
* `maxAmountPerTransaction` in `policyRuleKinds.ts`). A rule carrying a
|
|
534
|
+
* per-rule `modifiableBySigner` grant is never matched here — treating it
|
|
535
|
+
* as covering keys would let a caller's batch reuse/replace/remove it and
|
|
536
|
+
* silently revoke that signer's edit permission (mirrors `desugarPolicyRules`).
|
|
537
|
+
*
|
|
538
|
+
* @param rule - The existing policy-layer rule to read.
|
|
539
|
+
* @returns The sugar keys and values the rule covers, or undefined when it matches no kind or carries a signer grant.
|
|
540
|
+
* @notInstrumented
|
|
541
|
+
*/
|
|
542
|
+
const readCoveredRule = (rule) => {
|
|
543
|
+
if (rule.modifiableBySigner === true) return;
|
|
544
|
+
for (const kind of RULE_KIND_KEYS) {
|
|
545
|
+
const values = RULE_KINDS[kind].readRule(rule);
|
|
546
|
+
if (values === void 0) continue;
|
|
547
|
+
return {
|
|
548
|
+
keys: objectKeys(values),
|
|
549
|
+
kind,
|
|
550
|
+
values
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region src/modules/waas/policies/sortRulesByRuleId/sortRulesByRuleId.ts
|
|
557
|
+
/**
|
|
558
|
+
* Sorts rules by `ruleId` ascending (a rule missing one sorts first, as `''`)
|
|
559
|
+
* — the deterministic order {@link matchExistingRules} picks its reuse
|
|
560
|
+
* target from, so every caller agrees on which duplicate rule wins.
|
|
561
|
+
*
|
|
562
|
+
* @param rules - The rules to sort.
|
|
563
|
+
* @returns A new array, sorted by `ruleId` ascending.
|
|
564
|
+
* @notInstrumented
|
|
565
|
+
*/
|
|
566
|
+
const sortRulesByRuleId = (rules) => [...rules].sort((a, b) => {
|
|
567
|
+
const idA = a.ruleId ?? "";
|
|
568
|
+
const idB = b.ruleId ?? "";
|
|
569
|
+
if (idA < idB) return -1;
|
|
570
|
+
if (idA > idB) return 1;
|
|
571
|
+
return 0;
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region src/modules/waas/policies/matchExistingRules/matchExistingRules.ts
|
|
576
|
+
const coveredRuleKeys = (rule) => readCoveredRule(rule)?.keys ?? [];
|
|
577
|
+
/**
|
|
578
|
+
* Matches existing rules covering any of `builtRule`'s keys. Only rules
|
|
579
|
+
* being *absorbed* into it — i.e. no other match claims the same key — are
|
|
580
|
+
* superseded (safe to remove). Two matches claiming the SAME key (e.g. two
|
|
581
|
+
* hand-authored `denyAddresses` rules for this chain scope) are a
|
|
582
|
+
* legitimate duplicate, not one superseding the other, so are left alone
|
|
583
|
+
* rather than removed.
|
|
584
|
+
*
|
|
585
|
+
* @param params.builtRule - The newly built rule to match existing rules against.
|
|
586
|
+
* @param params.consumedRuleIds - `ruleId`s already reused or removed for a prior built rule this call, so none is touched twice.
|
|
587
|
+
* @param params.existingRulesInScope - The layer's rules already narrowed to the target chain scope.
|
|
588
|
+
* @returns The rule to reuse `builtRule`'s upsert onto (if any), and every rule it supersedes.
|
|
589
|
+
* @notInstrumented
|
|
590
|
+
*/
|
|
591
|
+
const matchExistingRules = ({ builtRule, consumedRuleIds, existingRulesInScope }) => {
|
|
592
|
+
const builtKeys = new Set(coveredRuleKeys(builtRule));
|
|
593
|
+
const matches = sortRulesByRuleId(existingRulesInScope).filter((existingRule) => existingRule.ruleId !== void 0 && !consumedRuleIds.has(existingRule.ruleId)).map((rule) => ({
|
|
594
|
+
keys: coveredRuleKeys(rule),
|
|
595
|
+
rule
|
|
596
|
+
})).filter(({ keys }) => keys.some((key) => builtKeys.has(key)));
|
|
597
|
+
const [reused, ...rest] = matches;
|
|
598
|
+
const superseded = rest.filter(({ keys, rule }) => {
|
|
599
|
+
const ruleKeys = new Set(keys);
|
|
600
|
+
return !matches.some((other) => other.rule.ruleId !== rule.ruleId && other.keys.some((key) => ruleKeys.has(key)));
|
|
601
|
+
}).map(({ rule }) => rule);
|
|
602
|
+
return {
|
|
603
|
+
reused: reused?.rule,
|
|
604
|
+
superseded
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
//#endregion
|
|
609
|
+
//#region src/modules/waas/policies/resolveRuleName/resolveRuleName.ts
|
|
610
|
+
/**
|
|
611
|
+
* Keeps the reused rule's label unless the caller overrides it or its
|
|
612
|
+
* name-owning kind changed.
|
|
613
|
+
*
|
|
614
|
+
* @param params.builtRule - The newly built rule about to be upserted.
|
|
615
|
+
* @param params.reused - The existing rule `builtRule` is upserted onto, if any.
|
|
616
|
+
* @param params.rules - The caller's requested {@link PolicyRules} sugar map.
|
|
617
|
+
* @returns The name to use for the upserted rule.
|
|
618
|
+
* @notInstrumented
|
|
619
|
+
*/
|
|
620
|
+
const resolveRuleName = ({ builtRule, reused, rules }) => {
|
|
621
|
+
if (reused === void 0) return builtRule.name;
|
|
622
|
+
const builtKind = readCoveredRule(builtRule)?.kind;
|
|
623
|
+
const reusedKind = readCoveredRule(reused)?.kind;
|
|
624
|
+
const sameOwningKind = builtKind !== void 0 && builtKind === reusedKind;
|
|
625
|
+
const nameOverridden = builtKind !== void 0 && rules.names?.[builtKind] !== void 0;
|
|
626
|
+
return sameOwningKind && !nameOverridden ? reused.name : builtRule.name;
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
//#endregion
|
|
630
|
+
//#region src/modules/waas/policies/buildOperationsForRule/buildOperationsForRule.ts
|
|
631
|
+
/**
|
|
632
|
+
* Upserts `builtRule` onto the existing rule it reuses (if any), and
|
|
633
|
+
* removes every rule that rule superseded. Mutates `consumedRuleIds` so a
|
|
634
|
+
* later call for a different built rule never reuses or removes the same
|
|
635
|
+
* existing rule twice.
|
|
636
|
+
*
|
|
637
|
+
* @param params.builtRule - The newly built rule to turn into batch operations.
|
|
638
|
+
* @param params.consumedRuleIds - `ruleId`s already reused or removed for a prior built rule this call.
|
|
639
|
+
* @param params.existingRulesInScope - The layer's rules already narrowed to the target chain scope.
|
|
640
|
+
* @param params.rules - The caller's requested {@link PolicyRules} sugar map.
|
|
641
|
+
* @returns The batch operations for this built rule — one upsert, plus a remove per superseded rule.
|
|
642
|
+
* @notInstrumented
|
|
643
|
+
*/
|
|
644
|
+
const buildOperationsForRule = ({ builtRule, consumedRuleIds, existingRulesInScope, rules }) => {
|
|
645
|
+
const { reused, superseded } = matchExistingRules({
|
|
646
|
+
builtRule,
|
|
647
|
+
consumedRuleIds,
|
|
648
|
+
existingRulesInScope
|
|
649
|
+
});
|
|
650
|
+
const reusedRuleId = reused?.ruleId;
|
|
651
|
+
const operations = [{
|
|
652
|
+
op: WaasPolicyLayerRuleOperationOpEnum.Upsert,
|
|
653
|
+
rule: reusedRuleId ? {
|
|
654
|
+
...builtRule,
|
|
655
|
+
name: resolveRuleName({
|
|
656
|
+
builtRule,
|
|
657
|
+
reused,
|
|
658
|
+
rules
|
|
659
|
+
}),
|
|
660
|
+
ruleId: reusedRuleId
|
|
661
|
+
} : builtRule
|
|
662
|
+
}];
|
|
663
|
+
if (reusedRuleId) consumedRuleIds.add(reusedRuleId);
|
|
664
|
+
for (const { ruleId } of superseded) {
|
|
665
|
+
consumedRuleIds.add(ruleId);
|
|
666
|
+
operations.push({
|
|
667
|
+
op: WaasPolicyLayerRuleOperationOpEnum.Remove,
|
|
668
|
+
ruleId
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
return operations;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
//#endregion
|
|
675
|
+
//#region src/modules/waas/policies/expandPolicyRules/expandPolicyRules.ts
|
|
676
|
+
/**
|
|
677
|
+
* Expands the {@link PolicyRules} sugar map into `WaasPolicyRule[]` for one
|
|
678
|
+
* chain scope. Omitting `chainIds` (or passing an empty array) builds a
|
|
679
|
+
* wildcard rule matching every chain id of `chain`.
|
|
680
|
+
*
|
|
681
|
+
* @param params.rules - The sugar map describing the desired rules.
|
|
682
|
+
* @param params.chain - The chain these rules apply to.
|
|
683
|
+
* @param params.chainIds - The chain ids these rules apply to; omit for a wildcard rule that matches every chain id of `chain`.
|
|
684
|
+
* @returns The expanded `WaasPolicyRule[]`, without `ruleId`.
|
|
685
|
+
* @throws When expansion would produce an `allow` rule with a value limit and no addresses — that empties the allowed set and denies every transaction on the chain.
|
|
686
|
+
* @notInstrumented
|
|
687
|
+
*/
|
|
688
|
+
const expandPolicyRules = ({ chain, chainIds, rules }) => {
|
|
689
|
+
const context = {
|
|
690
|
+
chain,
|
|
691
|
+
chainIds: chainIds ?? []
|
|
692
|
+
};
|
|
693
|
+
const expanded = RULE_KIND_KEYS.flatMap((key) => {
|
|
694
|
+
const rule = RULE_KINDS[key].buildRule({
|
|
695
|
+
context,
|
|
696
|
+
rules
|
|
697
|
+
});
|
|
698
|
+
return rule ? [rule] : [];
|
|
699
|
+
});
|
|
700
|
+
if (expanded.some((rule) => rule.ruleType === WaasPolicyRuleType.Allow && rule.valueLimit !== void 0 && (rule.addresses === void 0 || rule.addresses.length === 0))) throw new InvalidParamError("expandPolicyRules: refusing to emit an allow rule with a value limit and no addresses — it would empty the allowed-address set and deny every transaction on this chain");
|
|
701
|
+
return expanded;
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
//#endregion
|
|
705
|
+
//#region src/modules/waas/policies/fillOmittedRuleValues/fillOmittedRuleValues.ts
|
|
706
|
+
/**
|
|
707
|
+
* Whether the caller's value for a sugar key would actually produce a rule —
|
|
708
|
+
* an empty `allowAddresses`/`denyAddresses` array builds no rule (see
|
|
709
|
+
* `buildAllowAddressesRule`/`buildDenyAddressesRule`), so it must count the
|
|
710
|
+
* same as omitted here. Otherwise a real value is present.
|
|
711
|
+
*/
|
|
712
|
+
const isRuleKeyRequested = (value) => Array.isArray(value) ? value.length > 0 : value !== void 0;
|
|
713
|
+
/**
|
|
714
|
+
* A key the caller omitted can be silently dropped if it's merged into the
|
|
715
|
+
* same rule as a key they DID supply (e.g. re-saving only `allowAddresses`
|
|
716
|
+
* when the existing rule also carries `maxAmountPerTransaction`) — carries
|
|
717
|
+
* it forward so a partial re-save never erases a restriction the caller
|
|
718
|
+
* didn't ask to remove.
|
|
719
|
+
*
|
|
720
|
+
* Rules are visited in the same lexicographically-smallest-`ruleId` order
|
|
721
|
+
* `matchExistingRules` reuses, and only the first rule to cover a given key
|
|
722
|
+
* fills it — so when duplicate rules cover the same omitted key, the value
|
|
723
|
+
* always comes from the rule that will actually be upserted.
|
|
724
|
+
*
|
|
725
|
+
* @param params.existingRulesInScope - The layer's rules already narrowed to the target chain scope.
|
|
726
|
+
* @param params.rules - The caller's requested {@link PolicyRules} sugar map.
|
|
727
|
+
* @returns `rules`, with any key a partially-requested existing rule also covers filled in from that rule's current value.
|
|
728
|
+
* @notInstrumented
|
|
729
|
+
*/
|
|
730
|
+
const fillOmittedRuleValues = ({ existingRulesInScope, rules }) => {
|
|
731
|
+
const mergedRules = { ...rules };
|
|
732
|
+
for (const existingRule of sortRulesByRuleId(existingRulesInScope)) {
|
|
733
|
+
const covered = readCoveredRule(existingRule);
|
|
734
|
+
const isPartiallyRequested = covered !== void 0 && covered.keys.some((key) => isRuleKeyRequested(rules[key])) && covered.keys.some((key) => !isRuleKeyRequested(rules[key]));
|
|
735
|
+
if (covered === void 0 || !isPartiallyRequested) continue;
|
|
736
|
+
for (const key of covered.keys) if (!isRuleKeyRequested(rules[key]) && mergedRules[key] === void 0) Object.assign(mergedRules, { [key]: covered.values[key] });
|
|
737
|
+
}
|
|
738
|
+
return mergedRules;
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
//#endregion
|
|
742
|
+
//#region src/modules/waas/policies/getResolvedPolicyLayer/getResolvedPolicyLayer.ts
|
|
743
|
+
/**
|
|
744
|
+
* Fetches the policy layer a {@link ResolvedPolicyScope} points at. Shared
|
|
745
|
+
* by {@link createPolicy}, {@link getPolicy}, and {@link removePolicyRules}
|
|
746
|
+
* so the account/wallet/signer branch is written once.
|
|
747
|
+
*
|
|
748
|
+
* @notInstrumented
|
|
749
|
+
*/
|
|
750
|
+
const getResolvedPolicyLayer = ({ resolvedScope }, client) => {
|
|
751
|
+
const { environmentId } = getCore(client);
|
|
752
|
+
const apiClient = createApiClient({}, client);
|
|
753
|
+
switch (resolvedScope.target) {
|
|
754
|
+
case "account": return apiClient.getBusinessAccountPolicyLayer({
|
|
755
|
+
businessAccountId: resolvedScope.businessAccountId,
|
|
756
|
+
environmentId
|
|
757
|
+
});
|
|
758
|
+
case "wallet": return apiClient.getWaasWalletSelfPolicyLayer({
|
|
759
|
+
environmentId,
|
|
760
|
+
walletId: resolvedScope.walletId
|
|
761
|
+
});
|
|
762
|
+
case "signer": return apiClient.getWaasSignerSelfPolicyLayer({
|
|
763
|
+
environmentId,
|
|
764
|
+
shareSetId: resolvedScope.shareSetId,
|
|
765
|
+
walletId: resolvedScope.walletId
|
|
766
|
+
});
|
|
767
|
+
default: {
|
|
768
|
+
const unhandledScope = resolvedScope;
|
|
769
|
+
throw new InvalidParamError(`getResolvedPolicyLayer: unhandled target "${JSON.stringify(unhandledScope)}"`);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region src/modules/waas/policies/resolvePolicyScope/resolvePolicyScope.ts
|
|
776
|
+
/** Narrows a {@link WalletAccount} to {@link WaasWalletAccount} so WaaS-only fields (e.g. `shareSetId`) are accessible. */
|
|
777
|
+
const isWaasWallet = (walletAccount) => isWaasWalletAccount({ walletAccount });
|
|
778
|
+
/**
|
|
779
|
+
* Resolves a {@link PolicyScope} to its concrete policy layer. When only a
|
|
780
|
+
* `shareSetId` is given, the owning wallet is found locally by scanning the
|
|
781
|
+
* client's own wallet accounts — no network request.
|
|
782
|
+
*
|
|
783
|
+
* @param params.scope - The scope to resolve.
|
|
784
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
785
|
+
* @returns The concrete target (`account`, `wallet`, or `signer`) plus the ids needed to call the SDK API.
|
|
786
|
+
* @throws When a `shareSetId`-only scope doesn't match any of the client's wallet accounts.
|
|
787
|
+
* @notInstrumented
|
|
788
|
+
*/
|
|
789
|
+
const resolvePolicyScope = ({ scope }, client = getDefaultClient()) => {
|
|
790
|
+
if ("businessAccountId" in scope) return {
|
|
791
|
+
businessAccountId: scope.businessAccountId,
|
|
792
|
+
target: "account"
|
|
793
|
+
};
|
|
794
|
+
if ("walletId" in scope) return scope.shareSetId === void 0 ? {
|
|
795
|
+
target: "wallet",
|
|
796
|
+
walletId: scope.walletId
|
|
797
|
+
} : {
|
|
798
|
+
shareSetId: scope.shareSetId,
|
|
799
|
+
target: "signer",
|
|
800
|
+
walletId: scope.walletId
|
|
801
|
+
};
|
|
802
|
+
const owningWalletAccount = getWalletAccounts(client).filter(isWaasWallet).find((walletAccount) => walletAccount.shareSetId === scope.shareSetId || walletAccount.otherShareSets?.some((shareSet) => shareSet.shareSetId === scope.shareSetId));
|
|
803
|
+
assertDefined(owningWalletAccount?.verifiedCredentialId, `resolvePolicyScope: could not resolve a wallet for shareSetId "${scope.shareSetId}" — no verified wallet account exposes this share set`);
|
|
804
|
+
return {
|
|
805
|
+
shareSetId: scope.shareSetId,
|
|
806
|
+
target: "signer",
|
|
807
|
+
walletId: owningWalletAccount.verifiedCredentialId
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
//#endregion
|
|
812
|
+
//#region src/modules/waas/policies/sameChainIds/sameChainIds.ts
|
|
813
|
+
/**
|
|
814
|
+
* Whether two chainIds arrays describe the same set, regardless of order.
|
|
815
|
+
* Shared by {@link createPolicy} and {@link removePolicyRules} to keep their
|
|
816
|
+
* existing-rule lookups consistent.
|
|
817
|
+
*
|
|
818
|
+
* @notInstrumented
|
|
819
|
+
*/
|
|
820
|
+
const sameChainIds = ({ existing = [], requested }) => {
|
|
821
|
+
if (existing.length !== requested.length) return false;
|
|
822
|
+
const sortedExisting = [...existing].sort((x, y) => x - y);
|
|
823
|
+
const sortedRequested = [...requested].sort((x, y) => x - y);
|
|
824
|
+
return sortedExisting.every((id, index) => id === sortedRequested[index]);
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
//#endregion
|
|
828
|
+
//#region src/modules/waas/policies/createPolicy/createPolicy.ts
|
|
829
|
+
/**
|
|
830
|
+
* Creates or updates a wallet's, signer's, or business account's policy rules from the
|
|
831
|
+
* {@link PolicyRules} sugar map, in one atomic `batch` PATCH. Each key in
|
|
832
|
+
* `rules` maps to at most one underlying rule, so calling this twice with
|
|
833
|
+
* the same map updates that rule in place instead of duplicating it.
|
|
834
|
+
*
|
|
835
|
+
* Known race: no ETag / optimistic-concurrency check — concurrent calls for
|
|
836
|
+
* the same scope can both read-then-write and duplicate a rule.
|
|
837
|
+
*
|
|
838
|
+
* When more than one existing rule matches the same sugar key(s), only
|
|
839
|
+
* rules being absorbed into the newly built rule (i.e. no other match
|
|
840
|
+
* claims the same key) are removed. Two rules that duplicate the same key
|
|
841
|
+
* (e.g. two hand-authored `denyAddresses` rules for this chain scope) are
|
|
842
|
+
* left as-is rather than one being silently deleted — this call updates the
|
|
843
|
+
* lexicographically-smallest-`ruleId` match in place and leaves the rest
|
|
844
|
+
* untouched. A caller repeating this call will not converge on a single
|
|
845
|
+
* rule; the duplicate has to be removed by hand.
|
|
846
|
+
*
|
|
847
|
+
* @param params.scope - Which policy layer to update — see {@link resolvePolicyScope}.
|
|
848
|
+
* @param params.chain - The chain the rules apply to.
|
|
849
|
+
* @param params.chainIds - The chain ids the rules apply to; omit for a wildcard rule that matches every chain id of `chain`.
|
|
850
|
+
* @param params.rules - The desired rules, as a {@link PolicyRules} sugar map.
|
|
851
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
852
|
+
* @returns The policy layer as it stands after the batch is applied.
|
|
853
|
+
* @throws When `rules` produces no recognized keys, or via {@link resolvePolicyScope}'s scope-resolution errors.
|
|
854
|
+
* @notInstrumented
|
|
855
|
+
*/
|
|
856
|
+
const createPolicy = async ({ chain, chainIds, rules, scope }, client = getDefaultClient()) => {
|
|
857
|
+
const normalizedChainIds = chainIds ?? [];
|
|
858
|
+
const resolvedScope = resolvePolicyScope({ scope }, client);
|
|
859
|
+
const existingRulesInScope = ((await getResolvedPolicyLayer({ resolvedScope }, client)).layerContent.rules ?? []).filter((existingRule) => existingRule.chain === chain && sameChainIds({
|
|
860
|
+
existing: existingRule.chainIds,
|
|
861
|
+
requested: normalizedChainIds
|
|
862
|
+
}));
|
|
863
|
+
const expandedRules = expandPolicyRules({
|
|
864
|
+
chain,
|
|
865
|
+
chainIds: normalizedChainIds,
|
|
866
|
+
rules: fillOmittedRuleValues({
|
|
867
|
+
existingRulesInScope,
|
|
868
|
+
rules
|
|
869
|
+
})
|
|
870
|
+
});
|
|
871
|
+
if (expandedRules.length === 0) throw new InvalidParamError("createPolicy: rules must include at least one recognized policy key");
|
|
872
|
+
const consumedRuleIds = /* @__PURE__ */ new Set();
|
|
873
|
+
const operations = [];
|
|
874
|
+
for (const builtRule of expandedRules) operations.push(...buildOperationsForRule({
|
|
875
|
+
builtRule,
|
|
876
|
+
consumedRuleIds,
|
|
877
|
+
existingRulesInScope,
|
|
878
|
+
rules
|
|
879
|
+
}));
|
|
880
|
+
return applyPolicyLayerBatch({
|
|
881
|
+
operations,
|
|
882
|
+
resolvedScope
|
|
883
|
+
}, client);
|
|
884
|
+
};
|
|
885
|
+
|
|
215
886
|
//#endregion
|
|
216
887
|
//#region src/modules/waas/createWaasOfflineRecoveryShares/createWaasOfflineRecoveryShares.ts
|
|
217
888
|
/**
|
|
@@ -323,6 +994,7 @@ const normalizeWalletRequirements = ({ defaultBitcoinConfig, input }) => {
|
|
|
323
994
|
const createWaasWalletAccounts = async ({ chains, password, thresholdSignatureScheme }, client = getDefaultClient()) => {
|
|
324
995
|
const normalizedRequirements = normalizeWalletRequirements({ input: chains });
|
|
325
996
|
const supportedChains = [
|
|
997
|
+
"ALEO",
|
|
326
998
|
"BTC",
|
|
327
999
|
"EVM",
|
|
328
1000
|
"SOL",
|
|
@@ -420,6 +1092,101 @@ const delegateWaasKeyShares = async ({ initialSignerRules, password, walletAccou
|
|
|
420
1092
|
await __refreshAuth_wrapped(client);
|
|
421
1093
|
};
|
|
422
1094
|
|
|
1095
|
+
//#endregion
|
|
1096
|
+
//#region src/modules/waas/policies/findMatchedRuleKind/findMatchedRuleKind.ts
|
|
1097
|
+
const COUPLED_RULE_KINDS = new Set(["allowAddresses", "maxAmountPerTransaction"]);
|
|
1098
|
+
const isBlocked = ({ claimedKinds, populatedKeys }) => populatedKeys.some((key) => claimedKinds.has(key) || COUPLED_RULE_KINDS.has(key) && [...COUPLED_RULE_KINDS].some((coupledKey) => claimedKinds.has(coupledKey)));
|
|
1099
|
+
/**
|
|
1100
|
+
* Finds the first {@link RULE_KINDS} entry that recognizes `entry` as its
|
|
1101
|
+
* kind without colliding with an already-claimed key. Must check every key
|
|
1102
|
+
* `readRule` would populate, not just this kind's own key — allowAddresses'
|
|
1103
|
+
* `readRule` also populates `maxAmountPerTransaction` when the rule carries
|
|
1104
|
+
* a merged cap, so accepting it while that key is already claimed would
|
|
1105
|
+
* overwrite an earlier standalone cap.
|
|
1106
|
+
* @notInstrumented
|
|
1107
|
+
*/
|
|
1108
|
+
const findMatchedRuleKind = ({ claimedKinds, entry }) => {
|
|
1109
|
+
for (const key of RULE_KIND_KEYS) {
|
|
1110
|
+
const readResult = RULE_KINDS[key].readRule(entry);
|
|
1111
|
+
if (readResult === void 0) continue;
|
|
1112
|
+
if (!isBlocked({
|
|
1113
|
+
claimedKinds,
|
|
1114
|
+
populatedKeys: Object.keys(readResult)
|
|
1115
|
+
})) return {
|
|
1116
|
+
kind: key,
|
|
1117
|
+
readResult
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region src/modules/waas/policies/isPolicyRuleDeletionMarker/isPolicyRuleDeletionMarker.ts
|
|
1124
|
+
/** The exact key set of a deletion marker — checked as a closed shape, not by presence alone. */
|
|
1125
|
+
const DELETION_MARKER_KEYS = new Set([
|
|
1126
|
+
"ruleId",
|
|
1127
|
+
"deletedByType",
|
|
1128
|
+
"deletedById"
|
|
1129
|
+
]);
|
|
1130
|
+
/**
|
|
1131
|
+
* Recognizes a policy-Layer deletion marker — the enclave's stand-in for a
|
|
1132
|
+
* rule it couldn't drop outright, kept so the removal stays attributable.
|
|
1133
|
+
* Matches on the entry's exact key set, not field presence, since the read
|
|
1134
|
+
* response types every entry as a live rule.
|
|
1135
|
+
*
|
|
1136
|
+
* @param entry - The raw policy-Layer rule entry to check.
|
|
1137
|
+
* @returns Whether `entry` is a deletion marker rather than a live rule.
|
|
1138
|
+
* @notInstrumented
|
|
1139
|
+
*/
|
|
1140
|
+
const isPolicyRuleDeletionMarker = (entry) => {
|
|
1141
|
+
const candidate = entry;
|
|
1142
|
+
return typeof candidate.ruleId === "string" && typeof candidate.deletedByType === "string" && typeof candidate.deletedById === "string" && Object.keys(entry).every((key) => DELETION_MARKER_KEYS.has(key));
|
|
1143
|
+
};
|
|
1144
|
+
|
|
1145
|
+
//#endregion
|
|
1146
|
+
//#region src/modules/waas/policies/desugarPolicyRules/desugarPolicyRules.ts
|
|
1147
|
+
/**
|
|
1148
|
+
* Reverses {@link expandPolicyRules} using {@link findMatchedRuleKind}'s
|
|
1149
|
+
* same rule-kind table, skipping deletion markers. A kind claims at most
|
|
1150
|
+
* one rule; extra matches, out-of-vocabulary fields, and per-rule
|
|
1151
|
+
* `modifiableBySigner` grants (no sugar representation) all go to
|
|
1152
|
+
* `unmapped` instead of being dropped.
|
|
1153
|
+
*
|
|
1154
|
+
* @param params.entries - The policy-Layer's rule entries, as returned in `layerContent.rules`.
|
|
1155
|
+
* @returns The recognized rules as a {@link PolicyRules} map, plus whatever wasn't recognized.
|
|
1156
|
+
* @notInstrumented
|
|
1157
|
+
*/
|
|
1158
|
+
const desugarPolicyRules = ({ entries }) => {
|
|
1159
|
+
const rules = {};
|
|
1160
|
+
const unmapped = [];
|
|
1161
|
+
const claimedKinds = /* @__PURE__ */ new Set();
|
|
1162
|
+
for (const entry of entries) {
|
|
1163
|
+
if (isPolicyRuleDeletionMarker(entry)) continue;
|
|
1164
|
+
if (entry.modifiableBySigner === true) {
|
|
1165
|
+
unmapped.push(entry);
|
|
1166
|
+
continue;
|
|
1167
|
+
}
|
|
1168
|
+
const matched = findMatchedRuleKind({
|
|
1169
|
+
claimedKinds,
|
|
1170
|
+
entry
|
|
1171
|
+
});
|
|
1172
|
+
if (matched === void 0) {
|
|
1173
|
+
unmapped.push(entry);
|
|
1174
|
+
continue;
|
|
1175
|
+
}
|
|
1176
|
+
const { kind, readResult } = matched;
|
|
1177
|
+
Object.assign(rules, readResult);
|
|
1178
|
+
for (const key of Object.keys(readResult)) claimedKinds.add(key);
|
|
1179
|
+
if (entry.name !== DEFAULT_POLICY_RULE_NAMES[kind]) rules.names = {
|
|
1180
|
+
...rules.names,
|
|
1181
|
+
[kind]: entry.name
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
return {
|
|
1185
|
+
rules,
|
|
1186
|
+
unmapped
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
|
|
423
1190
|
//#endregion
|
|
424
1191
|
//#region src/modules/waas/exportWaasClientKeyshares/exportWaasClientKeyshares.ts
|
|
425
1192
|
/**
|
|
@@ -464,6 +1231,26 @@ const exportWaasPrivateKey = async ({ displayContainer, password, walletAccount
|
|
|
464
1231
|
});
|
|
465
1232
|
};
|
|
466
1233
|
|
|
1234
|
+
//#endregion
|
|
1235
|
+
//#region src/modules/waas/policies/getAccountPolicyLayer/getAccountPolicyLayer.ts
|
|
1236
|
+
/**
|
|
1237
|
+
* Fetches a business account's active policy rules (the account-Layer).
|
|
1238
|
+
* BA owner/admin only. Calls the SDK API directly (no MPC step), so a
|
|
1239
|
+
* rejection surfaces as a thrown error.
|
|
1240
|
+
*
|
|
1241
|
+
* @param params.businessAccountId - The business account to read policy rules for.
|
|
1242
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1243
|
+
* @returns The account-Layer, including its current rules.
|
|
1244
|
+
* @notInstrumented
|
|
1245
|
+
*/
|
|
1246
|
+
const getAccountPolicyLayer = async ({ businessAccountId }, client = getDefaultClient()) => {
|
|
1247
|
+
const core = getCore(client);
|
|
1248
|
+
return createApiClient({}, client).getBusinessAccountPolicyLayer({
|
|
1249
|
+
businessAccountId,
|
|
1250
|
+
environmentId: core.environmentId
|
|
1251
|
+
});
|
|
1252
|
+
};
|
|
1253
|
+
|
|
467
1254
|
//#endregion
|
|
468
1255
|
//#region src/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.ts
|
|
469
1256
|
/**
|
|
@@ -512,6 +1299,110 @@ const getChainsMissingWaasWalletAccounts = (client = getDefaultClient()) => {
|
|
|
512
1299
|
}));
|
|
513
1300
|
};
|
|
514
1301
|
|
|
1302
|
+
//#endregion
|
|
1303
|
+
//#region src/modules/waas/policies/getPolicy/getPolicy.ts
|
|
1304
|
+
/**
|
|
1305
|
+
* Fetches a policy layer and reads its `chain`/`chainIds` scope back into
|
|
1306
|
+
* the {@link PolicyRules} sugar map (see {@link desugarPolicyRules}). A
|
|
1307
|
+
* layer can hold rules for more than one chain, so entries are narrowed to
|
|
1308
|
+
* `chain`/`chainIds` first — the same scoping {@link createPolicy} uses —
|
|
1309
|
+
* to keep the `getPolicy` → edit → `createPolicy` round-trip safe for
|
|
1310
|
+
* multi-chain wallets. Calls the SDK API directly (no MPC step), so a
|
|
1311
|
+
* rejection surfaces as a thrown error.
|
|
1312
|
+
*
|
|
1313
|
+
* @param params.scope - Which policy layer to read — see {@link resolvePolicyScope}.
|
|
1314
|
+
* @param params.chain - The chain to read rules for.
|
|
1315
|
+
* @param params.chainIds - The chain ids to read rules for; omit to read the wildcard rule matching every chain id of `chain`.
|
|
1316
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1317
|
+
* @returns The recognized rules as a {@link PolicyRules} map, whatever wasn't recognized within `chain`/`chainIds`, and the layer's id and last-updated timestamp.
|
|
1318
|
+
* @throws Via {@link resolvePolicyScope}'s scope-resolution errors.
|
|
1319
|
+
* @notInstrumented
|
|
1320
|
+
*/
|
|
1321
|
+
const getPolicy = async ({ chain, chainIds, scope }, client = getDefaultClient()) => {
|
|
1322
|
+
const normalizedChainIds = chainIds ?? [];
|
|
1323
|
+
const layer = await getResolvedPolicyLayer({ resolvedScope: resolvePolicyScope({ scope }, client) }, client);
|
|
1324
|
+
const { rules, unmapped } = desugarPolicyRules({ entries: (layer.layerContent.rules ?? []).filter((entry) => entry.chain === chain && sameChainIds({
|
|
1325
|
+
existing: entry.chainIds,
|
|
1326
|
+
requested: normalizedChainIds
|
|
1327
|
+
})) });
|
|
1328
|
+
return {
|
|
1329
|
+
layerId: layer.layerId,
|
|
1330
|
+
rules,
|
|
1331
|
+
unmapped,
|
|
1332
|
+
updatedAt: layer.updatedAt
|
|
1333
|
+
};
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
//#endregion
|
|
1337
|
+
//#region src/modules/waas/policies/getSignerPolicyLayer/getSignerPolicyLayer.ts
|
|
1338
|
+
/**
|
|
1339
|
+
* Fetches a signer's active policy rules (the signer-Layer) — the caller's
|
|
1340
|
+
* own active share set by default, or another share set on the same wallet
|
|
1341
|
+
* (e.g. a delegated share set) when `shareSetId` is given. Calls the SDK API
|
|
1342
|
+
* directly (no MPC step), so a rejection surfaces as a thrown error.
|
|
1343
|
+
*
|
|
1344
|
+
* @param params.walletAccount - The wallet account whose signer-Layer to read.
|
|
1345
|
+
* @param [params.shareSetId] - The share set to target; defaults to the caller's own.
|
|
1346
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1347
|
+
* @returns The signer-Layer, including its current rules.
|
|
1348
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
1349
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
1350
|
+
* @notInstrumented
|
|
1351
|
+
*/
|
|
1352
|
+
const getSignerPolicyLayer = async ({ shareSetId, walletAccount }, client = getDefaultClient()) => {
|
|
1353
|
+
assertDefined(walletAccount.verifiedCredentialId, "getSignerPolicyLayer: cannot resolve a wallet id — use a verified wallet account");
|
|
1354
|
+
const core = getCore(client);
|
|
1355
|
+
return createApiClient({}, client).getWaasSignerSelfPolicyLayer({
|
|
1356
|
+
environmentId: core.environmentId,
|
|
1357
|
+
shareSetId,
|
|
1358
|
+
walletId: walletAccount.verifiedCredentialId
|
|
1359
|
+
});
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1362
|
+
//#endregion
|
|
1363
|
+
//#region src/modules/waas/getWalletAccountShareSets/getWalletAccountShareSets.ts
|
|
1364
|
+
/**
|
|
1365
|
+
* No network request. Share set ids rotate on refresh/reshare (stale ids are
|
|
1366
|
+
* rejected server-side), so re-read rather than cache; non-WaaS accounts
|
|
1367
|
+
* return `{ own: undefined, others: [] }` instead of throwing.
|
|
1368
|
+
*
|
|
1369
|
+
* @param params.walletAccount - The WaaS wallet account whose share sets to read.
|
|
1370
|
+
* @returns The account's own share set (if any) and the wallet's other active share sets.
|
|
1371
|
+
* @notInstrumented
|
|
1372
|
+
*/
|
|
1373
|
+
const getWalletAccountShareSets = ({ walletAccount }) => {
|
|
1374
|
+
const own = walletAccount.shareSetId ? {
|
|
1375
|
+
shareSetId: walletAccount.shareSetId,
|
|
1376
|
+
shareSetType: walletAccount.shareSetType
|
|
1377
|
+
} : void 0;
|
|
1378
|
+
return {
|
|
1379
|
+
others: walletAccount.otherShareSets ?? [],
|
|
1380
|
+
own
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
//#endregion
|
|
1385
|
+
//#region src/modules/waas/policies/getWalletPolicyLayer/getWalletPolicyLayer.ts
|
|
1386
|
+
/**
|
|
1387
|
+
* Fetches a wallet's active policy rules (the wallet-Layer). Calls the SDK
|
|
1388
|
+
* API directly (no MPC step), so a rejection surfaces as a thrown error.
|
|
1389
|
+
*
|
|
1390
|
+
* @param params.walletAccount - The wallet account to read policy rules for.
|
|
1391
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1392
|
+
* @returns The wallet-Layer, including its current rules.
|
|
1393
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
1394
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
1395
|
+
* @notInstrumented
|
|
1396
|
+
*/
|
|
1397
|
+
const getWalletPolicyLayer = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
1398
|
+
assertDefined(walletAccount.verifiedCredentialId, "getWalletPolicyLayer: cannot resolve a wallet id — use a verified wallet account");
|
|
1399
|
+
const core = getCore(client);
|
|
1400
|
+
return createApiClient({}, client).getWaasWalletSelfPolicyLayer({
|
|
1401
|
+
environmentId: core.environmentId,
|
|
1402
|
+
walletId: walletAccount.verifiedCredentialId
|
|
1403
|
+
});
|
|
1404
|
+
};
|
|
1405
|
+
|
|
515
1406
|
//#endregion
|
|
516
1407
|
//#region src/modules/waas/getWalletRecoveryState/getWalletRecoveryState.ts
|
|
517
1408
|
/**
|
|
@@ -540,7 +1431,7 @@ const hasDelegatedAccess = ({ walletAccount }, client = getDefaultClient()) => {
|
|
|
540
1431
|
const verifiedCredential = getVerifiedCredentialForWalletAccount({ walletAccount }, client);
|
|
541
1432
|
assertDefined(verifiedCredential, "Verified credential not found for Waas wallet account");
|
|
542
1433
|
const hasDelegatedKeyShare = verifiedCredential.walletProperties?.keyShares?.some((keyShare) => keyShare.backupLocation === "delegated");
|
|
543
|
-
const hasDelegatedShareSet = verifiedCredential.walletProperties?.otherShareSets?.some((shareSet) => shareSet.shareSetType === WaasWalletShareSetType.Delegated);
|
|
1434
|
+
const hasDelegatedShareSet = verifiedCredential.walletProperties?.otherShareSets?.some((shareSet) => shareSet.shareSetType === WaasWalletShareSetType$1.Delegated);
|
|
544
1435
|
return Boolean(hasDelegatedKeyShare || hasDelegatedShareSet);
|
|
545
1436
|
};
|
|
546
1437
|
|
|
@@ -626,6 +1517,31 @@ const refreshWaasWalletAccountShares = async ({ walletAccount, password }, clien
|
|
|
626
1517
|
});
|
|
627
1518
|
};
|
|
628
1519
|
|
|
1520
|
+
//#endregion
|
|
1521
|
+
//#region src/modules/waas/policies/removeAccountPolicyRule/removeAccountPolicyRule.ts
|
|
1522
|
+
/**
|
|
1523
|
+
* Removes a single rule from a business account's account-Layer. BA
|
|
1524
|
+
* owner/admin only. Calls the SDK API directly (no MPC step), so a
|
|
1525
|
+
* rejection surfaces as a thrown error.
|
|
1526
|
+
*
|
|
1527
|
+
* @param params.businessAccountId - The business account to remove the rule from.
|
|
1528
|
+
* @param params.ruleId - The id of the rule to remove.
|
|
1529
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1530
|
+
* @returns The account-Layer as it stands after the rule is removed.
|
|
1531
|
+
* @notInstrumented
|
|
1532
|
+
*/
|
|
1533
|
+
const removeAccountPolicyRule = async ({ businessAccountId, ruleId }, client = getDefaultClient()) => {
|
|
1534
|
+
const core = getCore(client);
|
|
1535
|
+
return createApiClient({}, client).updateBusinessAccountPolicyLayer({
|
|
1536
|
+
businessAccountId,
|
|
1537
|
+
environmentId: core.environmentId,
|
|
1538
|
+
waasPolicyLayerUpdateRequest: {
|
|
1539
|
+
op: WaasPolicyLayerUpdateRequestOpEnum.Remove,
|
|
1540
|
+
ruleId
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1543
|
+
};
|
|
1544
|
+
|
|
629
1545
|
//#endregion
|
|
630
1546
|
//#region src/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.ts
|
|
631
1547
|
/**
|
|
@@ -738,6 +1654,147 @@ const removeBusinessAccountWallet = async ({ businessAccountId, walletId }, clie
|
|
|
738
1654
|
return detail;
|
|
739
1655
|
};
|
|
740
1656
|
|
|
1657
|
+
//#endregion
|
|
1658
|
+
//#region src/modules/waas/policies/buildOperationForExistingRule/buildOperationForExistingRule.ts
|
|
1659
|
+
/**
|
|
1660
|
+
* Builds the operation to remove or rebuild `existingRule` when the
|
|
1661
|
+
* caller's requested keys touch it — outright removal when every key it
|
|
1662
|
+
* covers is being removed, or an upsert of the rule rebuilt from its
|
|
1663
|
+
* remaining keys when only some are. Returns undefined when none of the
|
|
1664
|
+
* requested keys touch this rule, when it's outside the sugar vocabulary,
|
|
1665
|
+
* or when it can't be identified without a `ruleId`.
|
|
1666
|
+
*
|
|
1667
|
+
* @param params.chain - The chain the rule to remove/rebuild applies to.
|
|
1668
|
+
* @param params.chainIds - The chain ids the rule to remove/rebuild applies to.
|
|
1669
|
+
* @param params.existingRule - The existing layer rule to check.
|
|
1670
|
+
* @param params.rules - The sugar keys to remove.
|
|
1671
|
+
* @returns The operation for this rule, or undefined when it isn't touched.
|
|
1672
|
+
* @notInstrumented
|
|
1673
|
+
*/
|
|
1674
|
+
const buildOperationForExistingRule = ({ chain, chainIds, existingRule, rules }) => {
|
|
1675
|
+
if (existingRule.ruleId === void 0) return;
|
|
1676
|
+
const covered = readCoveredRule(existingRule);
|
|
1677
|
+
if (covered === void 0) return;
|
|
1678
|
+
const remainingKeys = covered.keys.filter((key) => !rules.includes(key));
|
|
1679
|
+
if (remainingKeys.length === covered.keys.length) return;
|
|
1680
|
+
if (remainingKeys.length === 0) return {
|
|
1681
|
+
op: WaasPolicyLayerRuleOperationOpEnum.Remove,
|
|
1682
|
+
ruleId: existingRule.ruleId
|
|
1683
|
+
};
|
|
1684
|
+
const remainingRules = {};
|
|
1685
|
+
for (const key of remainingKeys) Object.assign(remainingRules, { [key]: covered.values[key] });
|
|
1686
|
+
const [rebuiltRule] = expandPolicyRules({
|
|
1687
|
+
chain,
|
|
1688
|
+
chainIds,
|
|
1689
|
+
rules: remainingRules
|
|
1690
|
+
});
|
|
1691
|
+
if (rebuiltRule === void 0) return;
|
|
1692
|
+
const keepsName = readCoveredRule(rebuiltRule)?.kind === covered.kind;
|
|
1693
|
+
return {
|
|
1694
|
+
op: WaasPolicyLayerRuleOperationOpEnum.Upsert,
|
|
1695
|
+
rule: {
|
|
1696
|
+
...rebuiltRule,
|
|
1697
|
+
name: keepsName ? existingRule.name ?? rebuiltRule.name : rebuiltRule.name,
|
|
1698
|
+
ruleId: existingRule.ruleId
|
|
1699
|
+
}
|
|
1700
|
+
};
|
|
1701
|
+
};
|
|
1702
|
+
|
|
1703
|
+
//#endregion
|
|
1704
|
+
//#region src/modules/waas/policies/removePolicyRules/removePolicyRules.ts
|
|
1705
|
+
/**
|
|
1706
|
+
* Removes the rules behind one or more {@link PolicyRules} keys from a
|
|
1707
|
+
* policy layer, in one atomic `batch` PATCH. For every existing rule the
|
|
1708
|
+
* given keys touch, either removes it outright or — when it also covers a
|
|
1709
|
+
* key the caller didn't ask to remove (e.g. an
|
|
1710
|
+
* `allowAddresses`+`maxAmountPerTransaction` rule with only the cap
|
|
1711
|
+
* removed) — rebuilds it from the remaining keys so that restriction
|
|
1712
|
+
* survives.
|
|
1713
|
+
*
|
|
1714
|
+
* @param params.scope - Which policy layer to update — see {@link resolvePolicyScope}.
|
|
1715
|
+
* @param params.chain - The chain the rules to remove apply to.
|
|
1716
|
+
* @param params.chainIds - The chain ids the rules to remove apply to; omit to target the wildcard rule that matches every chain id of `chain`.
|
|
1717
|
+
* @param params.rules - The sugar keys to remove.
|
|
1718
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1719
|
+
* @returns The policy layer as it stands after the batch is applied.
|
|
1720
|
+
* @throws When none of the given keys match an existing rule for this chain scope, or via {@link resolvePolicyScope}'s scope-resolution errors.
|
|
1721
|
+
* @notInstrumented
|
|
1722
|
+
*/
|
|
1723
|
+
const removePolicyRules = async ({ chain, chainIds, rules, scope }, client = getDefaultClient()) => {
|
|
1724
|
+
const normalizedChainIds = chainIds ?? [];
|
|
1725
|
+
const resolvedScope = resolvePolicyScope({ scope }, client);
|
|
1726
|
+
const operations = ((await getResolvedPolicyLayer({ resolvedScope }, client)).layerContent.rules ?? []).filter((existingRule) => existingRule.chain === chain && sameChainIds({
|
|
1727
|
+
existing: existingRule.chainIds,
|
|
1728
|
+
requested: normalizedChainIds
|
|
1729
|
+
})).map((existingRule) => buildOperationForExistingRule({
|
|
1730
|
+
chain,
|
|
1731
|
+
chainIds: normalizedChainIds,
|
|
1732
|
+
existingRule,
|
|
1733
|
+
rules
|
|
1734
|
+
})).filter((operation) => operation !== void 0);
|
|
1735
|
+
if (operations.length === 0) throw new InvalidParamError("removePolicyRules: none of the given rule keys matched an existing rule for this scope");
|
|
1736
|
+
return applyPolicyLayerBatch({
|
|
1737
|
+
operations,
|
|
1738
|
+
resolvedScope
|
|
1739
|
+
}, client);
|
|
1740
|
+
};
|
|
1741
|
+
|
|
1742
|
+
//#endregion
|
|
1743
|
+
//#region src/modules/waas/policies/removeSignerPolicyRule/removeSignerPolicyRule.ts
|
|
1744
|
+
/**
|
|
1745
|
+
* Removes a single rule from a signer's policy layer. Calls the SDK API
|
|
1746
|
+
* directly (no MPC step), so a rejection surfaces as a thrown error.
|
|
1747
|
+
*
|
|
1748
|
+
* @param params.walletAccount - The wallet account whose signer-Layer to update.
|
|
1749
|
+
* @param params.ruleId - The id of the rule to remove.
|
|
1750
|
+
* @param [params.shareSetId] - The share set to target; defaults to the caller's own. Only the wallet's own owner may target another share set.
|
|
1751
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1752
|
+
* @returns The signer-Layer as it stands after the rule is removed.
|
|
1753
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
1754
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
1755
|
+
* @notInstrumented
|
|
1756
|
+
*/
|
|
1757
|
+
const removeSignerPolicyRule = async ({ ruleId, shareSetId, walletAccount }, client = getDefaultClient()) => {
|
|
1758
|
+
assertDefined(walletAccount.verifiedCredentialId, "removeSignerPolicyRule: cannot resolve a wallet id — use a verified wallet account");
|
|
1759
|
+
const core = getCore(client);
|
|
1760
|
+
return createApiClient({}, client).updateWaasSignerSelfPolicyLayer({
|
|
1761
|
+
environmentId: core.environmentId,
|
|
1762
|
+
waasSignerPolicyLayerUpdateRequest: {
|
|
1763
|
+
op: WaasSignerPolicyLayerUpdateRequestOpEnum.Remove,
|
|
1764
|
+
ruleId,
|
|
1765
|
+
shareSetId
|
|
1766
|
+
},
|
|
1767
|
+
walletId: walletAccount.verifiedCredentialId
|
|
1768
|
+
});
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
//#endregion
|
|
1772
|
+
//#region src/modules/waas/policies/removeWalletPolicyRule/removeWalletPolicyRule.ts
|
|
1773
|
+
/**
|
|
1774
|
+
* Removes a single rule from a wallet's policy layer. Calls the SDK API
|
|
1775
|
+
* directly (no MPC step), so a rejection surfaces as a thrown error.
|
|
1776
|
+
*
|
|
1777
|
+
* @param params.walletAccount - The wallet account to remove the rule from.
|
|
1778
|
+
* @param params.ruleId - The id of the rule to remove.
|
|
1779
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1780
|
+
* @returns The wallet-Layer as it stands after the rule is removed.
|
|
1781
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
1782
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
1783
|
+
* @notInstrumented
|
|
1784
|
+
*/
|
|
1785
|
+
const removeWalletPolicyRule = async ({ ruleId, walletAccount }, client = getDefaultClient()) => {
|
|
1786
|
+
assertDefined(walletAccount.verifiedCredentialId, "removeWalletPolicyRule: cannot resolve a wallet id — use a verified wallet account");
|
|
1787
|
+
const core = getCore(client);
|
|
1788
|
+
return createApiClient({}, client).updateWaasWalletSelfPolicyLayer({
|
|
1789
|
+
environmentId: core.environmentId,
|
|
1790
|
+
waasPolicyLayerUpdateRequest: {
|
|
1791
|
+
op: WaasPolicyLayerUpdateRequestOpEnum.Remove,
|
|
1792
|
+
ruleId
|
|
1793
|
+
},
|
|
1794
|
+
walletId: walletAccount.verifiedCredentialId
|
|
1795
|
+
});
|
|
1796
|
+
};
|
|
1797
|
+
|
|
741
1798
|
//#endregion
|
|
742
1799
|
//#region src/modules/waas/revokeWaasDelegation/revokeWaasDelegation.ts
|
|
743
1800
|
/**
|
|
@@ -805,6 +1862,27 @@ const shouldAutoCreateWalletForChain = ({ chain }, client = getDefaultClient())
|
|
|
805
1862
|
return getChainsMissingWaasWalletAccounts(client).includes(chain);
|
|
806
1863
|
};
|
|
807
1864
|
|
|
1865
|
+
//#endregion
|
|
1866
|
+
//#region src/modules/waas/signSerializedTransaction/signSerializedTransaction.ts
|
|
1867
|
+
/**
|
|
1868
|
+
* No gas estimation, balance check, or broadcast — unlike `transferAmount`.
|
|
1869
|
+
* Useful for exercising WaaS policy enforcement in isolation.
|
|
1870
|
+
*
|
|
1871
|
+
* @param params.walletAccount - The wallet account to sign with.
|
|
1872
|
+
* @param params.serializedTransaction - The raw serialized transaction (e.g. viem's `serializeTransaction`).
|
|
1873
|
+
* @param [params.chainId] - The chain id, if required by the target chain's signer.
|
|
1874
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1875
|
+
* @returns The raw signature.
|
|
1876
|
+
* @notInstrumented
|
|
1877
|
+
*/
|
|
1878
|
+
const signSerializedTransaction = async ({ chainId, serializedTransaction, walletAccount }, client = getDefaultClient()) => {
|
|
1879
|
+
return getWaasWalletProviderFromWalletAccount({ walletAccount }, client).signSerializedTransaction({
|
|
1880
|
+
chainId,
|
|
1881
|
+
serializedTransaction,
|
|
1882
|
+
walletAccount
|
|
1883
|
+
});
|
|
1884
|
+
};
|
|
1885
|
+
|
|
808
1886
|
//#endregion
|
|
809
1887
|
//#region src/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.ts
|
|
810
1888
|
/**
|
|
@@ -949,10 +2027,101 @@ const updateWaasPassword = async ({ currentPassword, newPassword, walletAccount
|
|
|
949
2027
|
});
|
|
950
2028
|
};
|
|
951
2029
|
|
|
2030
|
+
//#endregion
|
|
2031
|
+
//#region src/modules/waas/policies/upsertAccountPolicyRule/upsertAccountPolicyRule.ts
|
|
2032
|
+
/**
|
|
2033
|
+
* Creates or updates a single rule on a business account's account-Layer
|
|
2034
|
+
* (rules applied to every wallet in the account). Build `rule` with
|
|
2035
|
+
* {@link buildAllowPolicyRule} / {@link buildDenyPolicyRule}. Omit
|
|
2036
|
+
* `rule.ruleId` to create a new rule (the enclave mints one for you); pass
|
|
2037
|
+
* an existing `ruleId` to update it in place. BA owner/admin only. Calls
|
|
2038
|
+
* the SDK API directly (no MPC step), so a rejection surfaces as a thrown
|
|
2039
|
+
* error.
|
|
2040
|
+
*
|
|
2041
|
+
* @param params.businessAccountId - The business account to apply the rule to.
|
|
2042
|
+
* @param params.rule - The rule to create or update.
|
|
2043
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2044
|
+
* @returns The account-Layer as it stands after the rule is applied.
|
|
2045
|
+
* @notInstrumented
|
|
2046
|
+
*/
|
|
2047
|
+
const upsertAccountPolicyRule = async ({ businessAccountId, rule }, client = getDefaultClient()) => {
|
|
2048
|
+
const core = getCore(client);
|
|
2049
|
+
return createApiClient({}, client).updateBusinessAccountPolicyLayer({
|
|
2050
|
+
businessAccountId,
|
|
2051
|
+
environmentId: core.environmentId,
|
|
2052
|
+
waasPolicyLayerUpdateRequest: {
|
|
2053
|
+
op: WaasPolicyLayerUpdateRequestOpEnum.Upsert,
|
|
2054
|
+
rule
|
|
2055
|
+
}
|
|
2056
|
+
});
|
|
2057
|
+
};
|
|
2058
|
+
|
|
2059
|
+
//#endregion
|
|
2060
|
+
//#region src/modules/waas/policies/upsertSignerPolicyRule/upsertSignerPolicyRule.ts
|
|
2061
|
+
/**
|
|
2062
|
+
* Creates or updates a single rule on a signer's policy layer. Build `rule`
|
|
2063
|
+
* with {@link buildAllowPolicyRule} / {@link buildDenyPolicyRule}. Omit
|
|
2064
|
+
* `rule.ruleId` to create a new rule (the enclave mints one for you); pass an
|
|
2065
|
+
* existing `ruleId` to update it in place. Calls the SDK API directly (no MPC
|
|
2066
|
+
* step), so a rejection surfaces as a thrown error.
|
|
2067
|
+
*
|
|
2068
|
+
* @param params.walletAccount - The wallet account whose signer-Layer to update.
|
|
2069
|
+
* @param params.rule - The rule to create or update.
|
|
2070
|
+
* @param [params.shareSetId] - The share set to target; defaults to the caller's own. Only the wallet's own owner may target another share set.
|
|
2071
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2072
|
+
* @returns The signer-Layer as it stands after the rule is applied.
|
|
2073
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
2074
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
2075
|
+
* @notInstrumented
|
|
2076
|
+
*/
|
|
2077
|
+
const upsertSignerPolicyRule = async ({ rule, shareSetId, walletAccount }, client = getDefaultClient()) => {
|
|
2078
|
+
assertDefined(walletAccount.verifiedCredentialId, "upsertSignerPolicyRule: cannot resolve a wallet id — use a verified wallet account");
|
|
2079
|
+
const core = getCore(client);
|
|
2080
|
+
return createApiClient({}, client).updateWaasSignerSelfPolicyLayer({
|
|
2081
|
+
environmentId: core.environmentId,
|
|
2082
|
+
waasSignerPolicyLayerUpdateRequest: {
|
|
2083
|
+
op: WaasSignerPolicyLayerUpdateRequestOpEnum.Upsert,
|
|
2084
|
+
rule,
|
|
2085
|
+
shareSetId
|
|
2086
|
+
},
|
|
2087
|
+
walletId: walletAccount.verifiedCredentialId
|
|
2088
|
+
});
|
|
2089
|
+
};
|
|
2090
|
+
|
|
2091
|
+
//#endregion
|
|
2092
|
+
//#region src/modules/waas/policies/upsertWalletPolicyRule/upsertWalletPolicyRule.ts
|
|
2093
|
+
/**
|
|
2094
|
+
* Creates or updates a single rule on a wallet's policy layer. Build `rule`
|
|
2095
|
+
* with {@link buildAllowPolicyRule} / {@link buildDenyPolicyRule}. Omit
|
|
2096
|
+
* `rule.ruleId` to create a new rule (the enclave mints one for you); pass an
|
|
2097
|
+
* existing `ruleId` to update it in place. Calls the SDK API directly (no MPC
|
|
2098
|
+
* step), so a rejection surfaces as a thrown error.
|
|
2099
|
+
*
|
|
2100
|
+
* @param params.walletAccount - The wallet account to apply the rule to.
|
|
2101
|
+
* @param params.rule - The rule to create or update.
|
|
2102
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2103
|
+
* @returns The wallet-Layer as it stands after the rule is applied.
|
|
2104
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
2105
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
2106
|
+
* @notInstrumented
|
|
2107
|
+
*/
|
|
2108
|
+
const upsertWalletPolicyRule = async ({ rule, walletAccount }, client = getDefaultClient()) => {
|
|
2109
|
+
assertDefined(walletAccount.verifiedCredentialId, "upsertWalletPolicyRule: cannot resolve a wallet id — use a verified wallet account");
|
|
2110
|
+
const core = getCore(client);
|
|
2111
|
+
return createApiClient({}, client).updateWaasWalletSelfPolicyLayer({
|
|
2112
|
+
environmentId: core.environmentId,
|
|
2113
|
+
waasPolicyLayerUpdateRequest: {
|
|
2114
|
+
op: WaasPolicyLayerUpdateRequestOpEnum.Upsert,
|
|
2115
|
+
rule
|
|
2116
|
+
},
|
|
2117
|
+
walletId: walletAccount.verifiedCredentialId
|
|
2118
|
+
});
|
|
2119
|
+
};
|
|
2120
|
+
|
|
952
2121
|
//#endregion
|
|
953
2122
|
//#region src/exports/waas.ts
|
|
954
2123
|
assertPackageVersion(name, version);
|
|
955
2124
|
|
|
956
2125
|
//#endregion
|
|
957
|
-
export { NotWaasWalletProviderError, TransactionBroadcastError, addBusinessAccountMember, addBusinessAccountSigner, addWalletToBusinessAccount, backupWaasKeySharesToGoogleDrive, createBusinessAccount, createWaasOfflineRecoveryShares, createWaasWalletAccounts, createWalletForBusinessAccount, delegateWaasKeyShares, exportWaasClientKeyshares, exportWaasPrivateKey, getBusinessAccount, getChainsMissingWaasWalletAccounts, getWalletRecoveryState, hasDelegatedAccess, importWaasPrivateKey, isDynamicWaasEnabled, isPasswordRequiredForWaasWallets, isWaasWalletAccount, isWalletCreationRequirement, listBusinessAccounts, migrateFromFireblocks, normalizeWalletRequirements, refreshWaasWalletAccountShares, removeBusinessAccountMember, removeBusinessAccountSigner, removeBusinessAccountWallet, revokeWaasDelegation, setWaasWalletAccountPassword, shouldAutoCreateWalletForChain, transferBusinessAccountOwnership, unlockWallet, updateBusinessAccount, updateBusinessAccountMemberRole, updateWaasPassword };
|
|
2126
|
+
export { NotWaasWalletProviderError, TransactionBroadcastError, WaasWalletShareSetType, addBusinessAccountMember, addBusinessAccountSigner, addWalletToBusinessAccount, backupWaasKeySharesToGoogleDrive, buildAllowPolicyRule, buildDenyPolicyRule, createBusinessAccount, createPolicy, createWaasOfflineRecoveryShares, createWaasWalletAccounts, createWalletForBusinessAccount, delegateWaasKeyShares, desugarPolicyRules, expandPolicyRules, exportWaasClientKeyshares, exportWaasPrivateKey, getAccountPolicyLayer, getBusinessAccount, getChainsMissingWaasWalletAccounts, getPolicy, getSignerPolicyLayer, getWalletAccountShareSets, getWalletPolicyLayer, getWalletRecoveryState, hasDelegatedAccess, importWaasPrivateKey, isDynamicWaasEnabled, isPasswordRequiredForWaasWallets, isWaasWalletAccount, isWalletCreationRequirement, listBusinessAccounts, migrateFromFireblocks, normalizeWalletRequirements, refreshWaasWalletAccountShares, removeAccountPolicyRule, removeBusinessAccountMember, removeBusinessAccountSigner, removeBusinessAccountWallet, removePolicyRules, removeSignerPolicyRule, removeWalletPolicyRule, resolvePolicyScope, revokeWaasDelegation, setWaasWalletAccountPassword, shouldAutoCreateWalletForChain, signSerializedTransaction, transferBusinessAccountOwnership, unlockWallet, updateBusinessAccount, updateBusinessAccountMemberRole, updateWaasPassword, upsertAccountPolicyRule, upsertSignerPolicyRule, upsertWalletPolicyRule };
|
|
958
2127
|
//# sourceMappingURL=waas.esm.js.map
|