@dynamic-labs-sdk/client 1.27.2 → 1.29.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/core.cjs +30 -7
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +30 -7
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +30 -7
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/waas.d.ts +26 -2
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DbRI7rjs.esm.js → getNetworkProviderFromNetworkId-Be2CBFTv.esm.js} +2 -2
- package/dist/{getNetworkProviderFromNetworkId-DbRI7rjs.esm.js.map → getNetworkProviderFromNetworkId-Be2CBFTv.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-D9YJPaN-.cjs → getNetworkProviderFromNetworkId-BsmqXKF_.cjs} +2 -2
- package/dist/{getNetworkProviderFromNetworkId-D9YJPaN-.cjs.map → getNetworkProviderFromNetworkId-BsmqXKF_.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BZiHmVr2.native.esm.js → getNetworkProviderFromNetworkId-DReHSnab.native.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-BZiHmVr2.native.esm.js.map → getNetworkProviderFromNetworkId-DReHSnab.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-Cp3O7r7g.esm.js → getSignedSessionId-CLvqM34v.esm.js} +3 -3
- package/dist/{getSignedSessionId-Cp3O7r7g.esm.js.map → getSignedSessionId-CLvqM34v.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-DhjV1Fqf.cjs → getSignedSessionId-CcV_jWux.cjs} +3 -3
- package/dist/{getSignedSessionId-DhjV1Fqf.cjs.map → getSignedSessionId-CcV_jWux.cjs.map} +1 -1
- package/dist/{getSignedSessionId-CmrVr3iy.native.esm.js → getSignedSessionId-DdslNjRv.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-CmrVr3iy.native.esm.js.map → getSignedSessionId-DdslNjRv.native.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-B4k_2uv2.cjs → getWalletProviderByKey-BMsrnfN2.cjs} +2 -2
- package/dist/{getWalletProviderByKey-B4k_2uv2.cjs.map → getWalletProviderByKey-BMsrnfN2.cjs.map} +1 -1
- package/dist/{getWalletProviderByKey-D2v00w6U.native.esm.js → getWalletProviderByKey-BtcGKhh6.native.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-D2v00w6U.native.esm.js.map → getWalletProviderByKey-BtcGKhh6.native.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-DEPcBE0p.esm.js → getWalletProviderByKey-FfQmRcK1.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-DEPcBE0p.esm.js.map → getWalletProviderByKey-FfQmRcK1.esm.js.map} +1 -1
- package/dist/index.cjs +43 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +43 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +43 -6
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isDynamicWaasEnabled-D5isSrbk.esm.js → isDynamicWaasEnabled-B8e0N7Bb.esm.js} +2 -2
- package/dist/{isDynamicWaasEnabled-D5isSrbk.esm.js.map → isDynamicWaasEnabled-B8e0N7Bb.esm.js.map} +1 -1
- package/dist/{isDynamicWaasEnabled-CivDFwvA.cjs → isDynamicWaasEnabled-DT4jhqkC.cjs} +2 -2
- package/dist/{isDynamicWaasEnabled-CivDFwvA.cjs.map → isDynamicWaasEnabled-DT4jhqkC.cjs.map} +1 -1
- package/dist/{isDynamicWaasEnabled-Ci15huyb.native.esm.js → isDynamicWaasEnabled-GTkHpRu6.native.esm.js} +2 -2
- package/dist/{isDynamicWaasEnabled-Ci15huyb.native.esm.js.map → isDynamicWaasEnabled-GTkHpRu6.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-BtFx8pFs.cjs → isMfaRequiredForAction-9ZrKcsTN.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-BtFx8pFs.cjs.map → isMfaRequiredForAction-9ZrKcsTN.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-Dek3pHGj.esm.js → isMfaRequiredForAction-DRqf4xyv.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-Dek3pHGj.esm.js.map → isMfaRequiredForAction-DRqf4xyv.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DRvYZbyp.native.esm.js → isMfaRequiredForAction-e4Bdq2tD.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-DRvYZbyp.native.esm.js.map → isMfaRequiredForAction-e4Bdq2tD.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-BDDx34rh.esm.js → isUserOnboardingComplete-Bq_7_Fck.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-BDDx34rh.esm.js.map → isUserOnboardingComplete-Bq_7_Fck.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-syj63-y3.cjs → isUserOnboardingComplete-DINsEIfi.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-syj63-y3.cjs.map → isUserOnboardingComplete-DINsEIfi.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-DSSsynlf.native.esm.js → isUserOnboardingComplete-DKt0bwXg.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-DSSsynlf.native.esm.js.map → isUserOnboardingComplete-DKt0bwXg.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-CQHXClD2.native.esm.js → migrateFromFireblocks-3naM4iCQ.native.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-CQHXClD2.native.esm.js.map → migrateFromFireblocks-3naM4iCQ.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-Dg5FgBgT.esm.js → migrateFromFireblocks-DbTnFE38.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-Dg5FgBgT.esm.js.map → migrateFromFireblocks-DbTnFE38.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-Ch5uks7o.cjs → migrateFromFireblocks-Dyh2dGWB.cjs} +3 -3
- package/dist/{migrateFromFireblocks-Ch5uks7o.cjs.map → migrateFromFireblocks-Dyh2dGWB.cjs.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/logoutReason.d.ts +1 -1
- package/dist/modules/auth/logoutReason.d.ts.map +1 -1
- package/dist/modules/flow/submitFlowTransaction/submitFlowTransaction.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/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +2 -2
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.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/injectWaasVerifiedCredentialFields/injectWaasVerifiedCredentialFields.d.ts +25 -0
- package/dist/modules/waas/injectWaasVerifiedCredentialFields/injectWaasVerifiedCredentialFields.d.ts.map +1 -0
- 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 +10 -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/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 +23 -0
- package/dist/modules/waas/signSerializedTransaction/signSerializedTransaction.d.ts.map +1 -0
- 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/utils/convertVerifiedCredentialToWalletAccount/convertVerifiedCredentialToWalletAccount.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 +1 -0
- package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{updateAuthFromVerifyResponse-B3V0ynwL.esm.js → updateAuthFromVerifyResponse-B42kkGLd.esm.js} +38 -15
- package/dist/updateAuthFromVerifyResponse-B42kkGLd.esm.js.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-BcKzypsw.cjs → updateAuthFromVerifyResponse-CePaJzru.cjs} +43 -14
- package/dist/updateAuthFromVerifyResponse-CePaJzru.cjs.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-DphOSQfK.native.esm.js → updateAuthFromVerifyResponse-Dd0q0rPX.native.esm.js} +38 -15
- package/dist/updateAuthFromVerifyResponse-Dd0q0rPX.native.esm.js.map +1 -0
- 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/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.esm.js +6 -6
- package/dist/waasCore.native.esm.js +6 -6
- package/package.json +4 -4
- package/dist/updateAuthFromVerifyResponse-B3V0ynwL.esm.js.map +0 -1
- package/dist/updateAuthFromVerifyResponse-BcKzypsw.cjs.map +0 -1
- package/dist/updateAuthFromVerifyResponse-DphOSQfK.native.esm.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { PolicyRuleDeletionMarker, PolicyRules } from '../policies.types';
|
|
3
|
+
type DesugarPolicyRulesParams = {
|
|
4
|
+
entries: (PolicyRuleDeletionMarker | WaasPolicyRule)[];
|
|
5
|
+
};
|
|
6
|
+
type DesugarPolicyRulesResult = {
|
|
7
|
+
rules: PolicyRules;
|
|
8
|
+
unmapped: WaasPolicyRule[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Reverses {@link expandPolicyRules} using {@link findMatchedRuleKind}'s
|
|
12
|
+
* same rule-kind table, skipping deletion markers. A kind claims at most
|
|
13
|
+
* one rule; extra matches, out-of-vocabulary fields, and per-rule
|
|
14
|
+
* `modifiableBySigner` grants (no sugar representation) all go to
|
|
15
|
+
* `unmapped` instead of being dropped.
|
|
16
|
+
*
|
|
17
|
+
* @param params.entries - The policy-Layer's rule entries, as returned in `layerContent.rules`.
|
|
18
|
+
* @returns The recognized rules as a {@link PolicyRules} map, plus whatever wasn't recognized.
|
|
19
|
+
* @notInstrumented
|
|
20
|
+
*/
|
|
21
|
+
export declare const desugarPolicyRules: ({ entries, }: DesugarPolicyRulesParams) => DesugarPolicyRulesResult;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=desugarPolicyRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desugarPolicyRules.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/desugarPolicyRules/desugarPolicyRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAI/E,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,CAAC,wBAAwB,GAAG,cAAc,CAAC,EAAE,CAAC;CACxD,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,iBAE5B,wBAAwB,KAAG,wBAwC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/desugarPolicyRules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WaasChainEnum, WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { PolicyRules } from '../policies.types';
|
|
3
|
+
type ExpandPolicyRulesParams = {
|
|
4
|
+
chain: WaasChainEnum;
|
|
5
|
+
chainIds?: number[];
|
|
6
|
+
rules: PolicyRules;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Expands the {@link PolicyRules} sugar map into `WaasPolicyRule[]` for one
|
|
10
|
+
* chain scope. Omitting `chainIds` (or passing an empty array) builds a
|
|
11
|
+
* wildcard rule matching every chain id of `chain`.
|
|
12
|
+
*
|
|
13
|
+
* @param params.rules - The sugar map describing the desired rules.
|
|
14
|
+
* @param params.chain - The chain these rules apply to.
|
|
15
|
+
* @param params.chainIds - The chain ids these rules apply to; omit for a wildcard rule that matches every chain id of `chain`.
|
|
16
|
+
* @returns The expanded `WaasPolicyRule[]`, without `ruleId`.
|
|
17
|
+
* @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.
|
|
18
|
+
* @notInstrumented
|
|
19
|
+
*/
|
|
20
|
+
export declare const expandPolicyRules: ({ chain, chainIds, rules, }: ExpandPolicyRulesParams) => WaasPolicyRule[];
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=expandPolicyRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandPolicyRules.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/expandPolicyRules/expandPolicyRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,gCAI3B,uBAAuB,KAAG,cAAc,EAqB1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/expandPolicyRules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { PolicyRules } from '../policies.types';
|
|
3
|
+
type FillOmittedRuleValuesParams = {
|
|
4
|
+
existingRulesInScope: WaasPolicyRule[];
|
|
5
|
+
rules: PolicyRules;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A key the caller omitted can be silently dropped if it's merged into the
|
|
9
|
+
* same rule as a key they DID supply (e.g. re-saving only `allowAddresses`
|
|
10
|
+
* when the existing rule also carries `maxAmountPerTransaction`) — carries
|
|
11
|
+
* it forward so a partial re-save never erases a restriction the caller
|
|
12
|
+
* didn't ask to remove.
|
|
13
|
+
*
|
|
14
|
+
* Rules are visited in the same lexicographically-smallest-`ruleId` order
|
|
15
|
+
* `matchExistingRules` reuses, and only the first rule to cover a given key
|
|
16
|
+
* fills it — so when duplicate rules cover the same omitted key, the value
|
|
17
|
+
* always comes from the rule that will actually be upserted.
|
|
18
|
+
*
|
|
19
|
+
* @param params.existingRulesInScope - The layer's rules already narrowed to the target chain scope.
|
|
20
|
+
* @param params.rules - The caller's requested {@link PolicyRules} sugar map.
|
|
21
|
+
* @returns `rules`, with any key a partially-requested existing rule also covers filled in from that rule's current value.
|
|
22
|
+
* @notInstrumented
|
|
23
|
+
*/
|
|
24
|
+
export declare const fillOmittedRuleValues: ({ existingRulesInScope, rules, }: FillOmittedRuleValuesParams) => PolicyRules;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=fillOmittedRuleValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fillOmittedRuleValues.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/fillOmittedRuleValues/fillOmittedRuleValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD,KAAK,2BAA2B,GAAG;IACjC,oBAAoB,EAAE,cAAc,EAAE,CAAC;IACvC,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAWF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB,qCAG/B,2BAA2B,KAAG,WAqBhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/fillOmittedRuleValues/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { PolicyRules } from '../policies.types';
|
|
3
|
+
import { type PolicyRuleKind } from '../policyRuleKinds';
|
|
4
|
+
export type FindMatchedRuleKindParams = {
|
|
5
|
+
claimedKinds: ReadonlySet<PolicyRuleKind>;
|
|
6
|
+
entry: WaasPolicyRule;
|
|
7
|
+
};
|
|
8
|
+
export type MatchedRuleKind = {
|
|
9
|
+
kind: PolicyRuleKind;
|
|
10
|
+
readResult: Partial<PolicyRules>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Finds the first {@link RULE_KINDS} entry that recognizes `entry` as its
|
|
14
|
+
* kind without colliding with an already-claimed key. Must check every key
|
|
15
|
+
* `readRule` would populate, not just this kind's own key — allowAddresses'
|
|
16
|
+
* `readRule` also populates `maxAmountPerTransaction` when the rule carries
|
|
17
|
+
* a merged cap, so accepting it while that key is already claimed would
|
|
18
|
+
* overwrite an earlier standalone cap.
|
|
19
|
+
* @notInstrumented
|
|
20
|
+
*/
|
|
21
|
+
export declare const findMatchedRuleKind: ({ claimedKinds, entry, }: FindMatchedRuleKindParams) => MatchedRuleKind | undefined;
|
|
22
|
+
//# sourceMappingURL=findMatchedRuleKind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findMatchedRuleKind.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/findMatchedRuleKind/findMatchedRuleKind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,oBAAoB,CAAC;AAwB5B,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC1C,KAAK,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAClC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,6BAG7B,yBAAyB,KAAG,eAAe,GAAG,SAYhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/findMatchedRuleKind/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WaasPolicyLayerResponse } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
3
|
+
type GetAccountPolicyLayerParams = {
|
|
4
|
+
businessAccountId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Fetches a business account's active policy rules (the account-Layer).
|
|
8
|
+
* BA owner/admin only. Calls the SDK API directly (no MPC step), so a
|
|
9
|
+
* rejection surfaces as a thrown error.
|
|
10
|
+
*
|
|
11
|
+
* @param params.businessAccountId - The business account to read policy rules for.
|
|
12
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
13
|
+
* @returns The account-Layer, including its current rules.
|
|
14
|
+
* @notInstrumented
|
|
15
|
+
*/
|
|
16
|
+
export declare const getAccountPolicyLayer: ({ businessAccountId }: GetAccountPolicyLayerParams, client?: DynamicClient) => Promise<WaasPolicyLayerResponse>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=getAccountPolicyLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAccountPolicyLayer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getAccountPolicyLayer/getAccountPolicyLayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAI1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,KAAK,2BAA2B,GAAG;IACjC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,0BACT,2BAA2B,WAC1C,aAAa,KACpB,OAAO,CAAC,uBAAuB,CAQjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getAccountPolicyLayer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WaasChainEnum, WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
3
|
+
import type { PolicyRules, PolicyScope } from '../policies.types';
|
|
4
|
+
type GetPolicyParams = {
|
|
5
|
+
chain: WaasChainEnum;
|
|
6
|
+
chainIds?: number[];
|
|
7
|
+
scope: PolicyScope;
|
|
8
|
+
};
|
|
9
|
+
type GetPolicyResult = {
|
|
10
|
+
layerId: string;
|
|
11
|
+
rules: PolicyRules;
|
|
12
|
+
unmapped: WaasPolicyRule[];
|
|
13
|
+
updatedAt: Date;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Fetches a policy layer and reads its `chain`/`chainIds` scope back into
|
|
17
|
+
* the {@link PolicyRules} sugar map (see {@link desugarPolicyRules}). A
|
|
18
|
+
* layer can hold rules for more than one chain, so entries are narrowed to
|
|
19
|
+
* `chain`/`chainIds` first — the same scoping {@link createPolicy} uses —
|
|
20
|
+
* to keep the `getPolicy` → edit → `createPolicy` round-trip safe for
|
|
21
|
+
* multi-chain wallets. Calls the SDK API directly (no MPC step), so a
|
|
22
|
+
* rejection surfaces as a thrown error.
|
|
23
|
+
*
|
|
24
|
+
* @param params.scope - Which policy layer to read — see {@link resolvePolicyScope}.
|
|
25
|
+
* @param params.chain - The chain to read rules for.
|
|
26
|
+
* @param params.chainIds - The chain ids to read rules for; omit to read the wildcard rule matching every chain id of `chain`.
|
|
27
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
28
|
+
* @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.
|
|
29
|
+
* @throws Via {@link resolvePolicyScope}'s scope-resolution errors.
|
|
30
|
+
* @notInstrumented
|
|
31
|
+
*/
|
|
32
|
+
export declare const getPolicy: ({ chain, chainIds, scope }: GetPolicyParams, client?: DynamicClient) => Promise<GetPolicyResult>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=getPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPolicy.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getPolicy/getPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIlE,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS,+BACQ,eAAe,WACnC,aAAa,KACpB,OAAO,CAAC,eAAe,CAmBzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getPolicy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WaasPolicyLayerResponse } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
3
|
+
import type { ResolvedPolicyScope } from '../resolvePolicyScope';
|
|
4
|
+
type GetResolvedPolicyLayerParams = {
|
|
5
|
+
resolvedScope: ResolvedPolicyScope;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Fetches the policy layer a {@link ResolvedPolicyScope} points at. Shared
|
|
9
|
+
* by {@link createPolicy}, {@link getPolicy}, and {@link removePolicyRules}
|
|
10
|
+
* so the account/wallet/signer branch is written once.
|
|
11
|
+
*
|
|
12
|
+
* @notInstrumented
|
|
13
|
+
*/
|
|
14
|
+
export declare const getResolvedPolicyLayer: ({ resolvedScope }: GetResolvedPolicyLayerParams, client: DynamicClient) => Promise<WaasPolicyLayerResponse>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=getResolvedPolicyLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getResolvedPolicyLayer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getResolvedPolicyLayer/getResolvedPolicyLayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,KAAK,4BAA4B,GAAG;IAClC,aAAa,EAAE,mBAAmB,CAAC;CACpC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,sBACd,4BAA4B,UACvC,aAAa,KACpB,OAAO,CAAC,uBAAuB,CAgCjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getResolvedPolicyLayer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { WaasPolicyLayerResponse } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
3
|
+
import type { WalletAccount } from '../../../wallets/walletAccount';
|
|
4
|
+
type GetSignerPolicyLayerParams = {
|
|
5
|
+
/** Targets a share set other than the caller's own. Omit to read the caller's own active share set. */
|
|
6
|
+
shareSetId?: string;
|
|
7
|
+
walletAccount: WalletAccount;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Fetches a signer's active policy rules (the signer-Layer) — the caller's
|
|
11
|
+
* own active share set by default, or another share set on the same wallet
|
|
12
|
+
* (e.g. a delegated share set) when `shareSetId` is given. Calls the SDK API
|
|
13
|
+
* directly (no MPC step), so a rejection surfaces as a thrown error.
|
|
14
|
+
*
|
|
15
|
+
* @param params.walletAccount - The wallet account whose signer-Layer to read.
|
|
16
|
+
* @param [params.shareSetId] - The share set to target; defaults to the caller's own.
|
|
17
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
18
|
+
* @returns The signer-Layer, including its current rules.
|
|
19
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
20
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
21
|
+
* @notInstrumented
|
|
22
|
+
*/
|
|
23
|
+
export declare const getSignerPolicyLayer: ({ shareSetId, walletAccount }: GetSignerPolicyLayerParams, client?: DynamicClient) => Promise<WaasPolicyLayerResponse>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=getSignerPolicyLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSignerPolicyLayer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getSignerPolicyLayer/getSignerPolicyLayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAI1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,KAAK,0BAA0B,GAAG;IAChC,uGAAuG;IACvG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,kCACA,0BAA0B,WACjD,aAAa,KACpB,OAAO,CAAC,uBAAuB,CAcjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getSignerPolicyLayer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WaasPolicyLayerResponse } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
3
|
+
import type { WalletAccount } from '../../../wallets/walletAccount';
|
|
4
|
+
type GetWalletPolicyLayerParams = {
|
|
5
|
+
walletAccount: WalletAccount;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Fetches a wallet's active policy rules (the wallet-Layer). Calls the SDK
|
|
9
|
+
* API directly (no MPC step), so a rejection surfaces as a thrown error.
|
|
10
|
+
*
|
|
11
|
+
* @param params.walletAccount - The wallet account to read policy rules for.
|
|
12
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
13
|
+
* @returns The wallet-Layer, including its current rules.
|
|
14
|
+
* @throws {ValueMustBeDefinedError} When `walletAccount` has no `verifiedCredentialId` (it isn't a verified wallet account yet).
|
|
15
|
+
* @throws {APIError} When the SDK API request fails, for example an unauthorized, not-found, or server error response.
|
|
16
|
+
* @notInstrumented
|
|
17
|
+
*/
|
|
18
|
+
export declare const getWalletPolicyLayer: ({ walletAccount }: GetWalletPolicyLayerParams, client?: DynamicClient) => Promise<WaasPolicyLayerResponse>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=getWalletPolicyLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWalletPolicyLayer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getWalletPolicyLayer/getWalletPolicyLayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAI1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,KAAK,0BAA0B,GAAG;IAChC,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,sBACZ,0BAA0B,WACrC,aAAa,KACpB,OAAO,CAAC,uBAAuB,CAajC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/getWalletPolicyLayer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
/**
|
|
3
|
+
* Checks both the current `addresses` array and the legacy singular `address` field.
|
|
4
|
+
* @notInstrumented
|
|
5
|
+
*/
|
|
6
|
+
export declare const hasAddresses: (rule: WaasPolicyRule) => boolean;
|
|
7
|
+
//# sourceMappingURL=hasAddresses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasAddresses.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/hasAddresses/hasAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,YAAY,SAAU,cAAc,KAAG,OAE9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/hasAddresses/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasUnrecognizedFields.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/hasUnrecognizedFields/hasUnrecognizedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAuBjE;;GAEG;AACH,eAAO,MAAM,qBAAqB,SAAU,cAAc,KAAG,OAML,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/hasUnrecognizedFields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/isPolicyRuleDeletionMarker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { PolicyRuleDeletionMarker } from '../policies.types';
|
|
3
|
+
/**
|
|
4
|
+
* Recognizes a policy-Layer deletion marker — the enclave's stand-in for a
|
|
5
|
+
* rule it couldn't drop outright, kept so the removal stays attributable.
|
|
6
|
+
* Matches on the entry's exact key set, not field presence, since the read
|
|
7
|
+
* response types every entry as a live rule.
|
|
8
|
+
*
|
|
9
|
+
* @param entry - The raw policy-Layer rule entry to check.
|
|
10
|
+
* @returns Whether `entry` is a deletion marker rather than a live rule.
|
|
11
|
+
* @notInstrumented
|
|
12
|
+
*/
|
|
13
|
+
export declare const isPolicyRuleDeletionMarker: (entry: PolicyRuleDeletionMarker | WaasPolicyRule) => entry is PolicyRuleDeletionMarker;
|
|
14
|
+
//# sourceMappingURL=isPolicyRuleDeletionMarker.d.ts.map
|
package/dist/modules/waas/policies/isPolicyRuleDeletionMarker/isPolicyRuleDeletionMarker.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPolicyRuleDeletionMarker.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/isPolicyRuleDeletionMarker/isPolicyRuleDeletionMarker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AASlE;;;;;;;;;GASG;AAEH,eAAO,MAAM,0BAA0B,UAC9B,wBAAwB,GAAG,cAAc,KAC/C,KAAK,IAAI,wBASX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/matchExistingRules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
type MatchExistingRulesParams = {
|
|
3
|
+
builtRule: WaasPolicyRule;
|
|
4
|
+
consumedRuleIds: Set<string>;
|
|
5
|
+
existingRulesInScope: WaasPolicyRule[];
|
|
6
|
+
};
|
|
7
|
+
/** A rule that can be reused or superseded always has a `ruleId` — see the `matches` filter below. */
|
|
8
|
+
type MatchedRule = WaasPolicyRule & {
|
|
9
|
+
ruleId: string;
|
|
10
|
+
};
|
|
11
|
+
export type RuleMatch = {
|
|
12
|
+
/** The rule to upsert `builtRule` onto, if any existing rule covers one of its keys. */
|
|
13
|
+
reused: MatchedRule | undefined;
|
|
14
|
+
/** Rules fully absorbed into `builtRule` — safe to remove. */
|
|
15
|
+
superseded: MatchedRule[];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Matches existing rules covering any of `builtRule`'s keys. Only rules
|
|
19
|
+
* being *absorbed* into it — i.e. no other match claims the same key — are
|
|
20
|
+
* superseded (safe to remove). Two matches claiming the SAME key (e.g. two
|
|
21
|
+
* hand-authored `denyAddresses` rules for this chain scope) are a
|
|
22
|
+
* legitimate duplicate, not one superseding the other, so are left alone
|
|
23
|
+
* rather than removed.
|
|
24
|
+
*
|
|
25
|
+
* @param params.builtRule - The newly built rule to match existing rules against.
|
|
26
|
+
* @param params.consumedRuleIds - `ruleId`s already reused or removed for a prior built rule this call, so none is touched twice.
|
|
27
|
+
* @param params.existingRulesInScope - The layer's rules already narrowed to the target chain scope.
|
|
28
|
+
* @returns The rule to reuse `builtRule`'s upsert onto (if any), and every rule it supersedes.
|
|
29
|
+
* @notInstrumented
|
|
30
|
+
*/
|
|
31
|
+
export declare const matchExistingRules: ({ builtRule, consumedRuleIds, existingRulesInScope, }: MatchExistingRulesParams) => RuleMatch;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=matchExistingRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchExistingRules.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/matchExistingRules/matchExistingRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAKjE,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,cAAc,CAAC;IAC1B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,oBAAoB,EAAE,cAAc,EAAE,CAAC;CACxC,CAAC;AAEF,sGAAsG;AACtG,KAAK,WAAW,GAAG,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IACtB,wFAAwF;IACxF,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC,8DAA8D;IAC9D,UAAU,EAAE,WAAW,EAAE,CAAC;CAC3B,CAAC;AAKF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,0DAI5B,wBAAwB,KAAG,SA2B7B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { WaasChainEnum, WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { PolicyRuleKind } from './policyRuleKinds';
|
|
3
|
+
/**
|
|
4
|
+
* The fields a caller supplies for a policy rule, minus `ruleType` — set
|
|
5
|
+
* instead via {@link buildAllowPolicyRule} or {@link buildDenyPolicyRule}.
|
|
6
|
+
*/
|
|
7
|
+
export type PolicyRuleInput = Omit<WaasPolicyRule, 'ruleType'>;
|
|
8
|
+
/**
|
|
9
|
+
* A value cap on a single transaction, in the smallest unit of the asset
|
|
10
|
+
* (e.g. wei). Omit `asset` to cap the chain's native asset.
|
|
11
|
+
*/
|
|
12
|
+
export type PolicyRuleMaxAmountPerTransaction = {
|
|
13
|
+
amount: string;
|
|
14
|
+
asset?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The chain scope every rule a {@link PolicyRules} key produces is stamped
|
|
18
|
+
* with — but not every kind's enforcement reads it back (some
|
|
19
|
+
* `operationRestrictions` kinds ignore it; see the `blockExport` rule
|
|
20
|
+
* builder).
|
|
21
|
+
*/
|
|
22
|
+
export type RuleKindContext = {
|
|
23
|
+
chain: WaasChainEnum;
|
|
24
|
+
chainIds: number[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The params every rule kind's `buildRule` takes — shared here so the
|
|
28
|
+
* individual builders and `RuleKindDefinition.buildRule` in
|
|
29
|
+
* `policyRuleKinds.ts` can't drift out of sync.
|
|
30
|
+
*/
|
|
31
|
+
export type BuildRuleParams = {
|
|
32
|
+
context: RuleKindContext;
|
|
33
|
+
rules: PolicyRules;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The declarative, sugared surface over a wallet's or signer's policy rules
|
|
37
|
+
* — one key per concern instead of a full {@link WaasPolicyRule}. Setting a
|
|
38
|
+
* key again replaces its rule rather than adding a second one.
|
|
39
|
+
*
|
|
40
|
+
* Deliberately excludes `valueLimit.totalLimit`, `contractAbi`,
|
|
41
|
+
* `functionName`, `argumentConstraints`, `blockClientSigning`,
|
|
42
|
+
* `blockRevocation`, and `disableBlockaidSecurityChecks` — the evaluator
|
|
43
|
+
* has no read site for these against a wallet/signer layer, so a shortcut
|
|
44
|
+
* would silently no-op. Use {@link upsertWalletPolicyRule} or
|
|
45
|
+
* {@link upsertSignerPolicyRule} directly instead.
|
|
46
|
+
*/
|
|
47
|
+
export type PolicyRules = {
|
|
48
|
+
/** Restricts transactions to only these addresses (default-deny of everything else). Combine freely with `maxAmountPerTransaction`, which is merged onto the same rule rather than emitting a second one. */
|
|
49
|
+
allowAddresses?: string[];
|
|
50
|
+
/** Blocks key-export operations, enforced wallet-wide — despite the rule carrying `chain`/`chainIds`, this is not scoped to them. */
|
|
51
|
+
blockExport?: boolean;
|
|
52
|
+
/** Denies these addresses, independent of `allowAddresses`. */
|
|
53
|
+
denyAddresses?: string[];
|
|
54
|
+
/** Caps the value of a single transaction. Merged onto the `allowAddresses` rule when both are given, otherwise stands alone. */
|
|
55
|
+
maxAmountPerTransaction?: PolicyRuleMaxAmountPerTransaction;
|
|
56
|
+
/**
|
|
57
|
+
* Overrides the default human-readable name a rule kind would otherwise get
|
|
58
|
+
* (e.g. `'Allowed addresses'`). When `allowAddresses` and
|
|
59
|
+
* `maxAmountPerTransaction` are merged onto one rule, `allowAddresses`'s
|
|
60
|
+
* name wins.
|
|
61
|
+
*/
|
|
62
|
+
names?: Partial<Record<PolicyRuleKind, string>>;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* A policy-Layer deletion marker — the enclave's stand-in for a rule it
|
|
66
|
+
* removed but couldn't drop outright, kept so the removal stays
|
|
67
|
+
* attributable. Layer reads type every entry as a live rule, so a marker
|
|
68
|
+
* must be recognized structurally — see {@link isPolicyRuleDeletionMarker}.
|
|
69
|
+
*/
|
|
70
|
+
export type PolicyRuleDeletionMarker = {
|
|
71
|
+
deletedById: string;
|
|
72
|
+
deletedByType: string;
|
|
73
|
+
ruleId: string;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Identifies which policy layer a {@link PolicyRules} operation targets: a
|
|
77
|
+
* business account's account-Layer (by `businessAccountId`), a wallet's own
|
|
78
|
+
* wallet-Layer, or a specific share set's signer-Layer (by `walletId` +
|
|
79
|
+
* `shareSetId`, or by `shareSetId` alone when the owning wallet isn't
|
|
80
|
+
* already known). Resolved to a concrete API target by
|
|
81
|
+
* {@link resolvePolicyScope}.
|
|
82
|
+
*/
|
|
83
|
+
export type PolicyScope = {
|
|
84
|
+
businessAccountId: string;
|
|
85
|
+
} | {
|
|
86
|
+
shareSetId?: string;
|
|
87
|
+
walletId: string;
|
|
88
|
+
} | {
|
|
89
|
+
shareSetId: string;
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=policies.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/policies/policies.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,6MAA6M;IAC7M,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,qIAAqI;IACrI,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,iIAAiI;IACjI,uBAAuB,CAAC,EAAE,iCAAiC,CAAC;IAC5D;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,iBAAiB,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PolicyRuleKind } from './policyRuleKinds';
|
|
2
|
+
/**
|
|
3
|
+
* Each rule kind's name when the caller doesn't override it via
|
|
4
|
+
* `PolicyRules['names']`. Shared between the `build*Rule` functions and
|
|
5
|
+
* `desugarPolicyRules` so a rename can't drift the two out of sync — the
|
|
6
|
+
* same reason `RULE_KINDS` in `policyRuleKinds.ts` is a single table
|
|
7
|
+
* instead of parallel switches.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_POLICY_RULE_NAMES: Record<PolicyRuleKind, string>;
|
|
10
|
+
//# sourceMappingURL=policyRuleDefaultNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policyRuleDefaultNames.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/policies/policyRuleDefaultNames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAKpE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WaasPolicyRule } from '@dynamic-labs/sdk-api-core';
|
|
2
|
+
import type { BuildRuleParams, PolicyRules } from './policies.types';
|
|
3
|
+
export type { RuleKindContext } from './policies.types';
|
|
4
|
+
/**
|
|
5
|
+
* Kept as a data table, not parallel switches in
|
|
6
|
+
* `expandPolicyRules`/`desugarPolicyRules`, so the two can't drift out of sync.
|
|
7
|
+
*/
|
|
8
|
+
type RuleKindDefinition = {
|
|
9
|
+
/**
|
|
10
|
+
* Builds this kind's rule from the full sugar map, not just this key's
|
|
11
|
+
* own value, so a key can be absorbed into another kind's rule instead of
|
|
12
|
+
* emitting its own (see `allowAddresses` / `maxAmountPerTransaction`).
|
|
13
|
+
*/
|
|
14
|
+
buildRule: (params: BuildRuleParams) => WaasPolicyRule | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Recognizes an existing rule as this kind and reads its sugar value
|
|
17
|
+
* back. Undefined when it doesn't match, including when it carries a
|
|
18
|
+
* field outside the sugar vocabulary, so that data is never silently
|
|
19
|
+
* dropped.
|
|
20
|
+
*/
|
|
21
|
+
readRule: (rule: WaasPolicyRule) => Partial<PolicyRules> | undefined;
|
|
22
|
+
};
|
|
23
|
+
/** The four keys of {@link PolicyRules}, each of which produces its own rule. */
|
|
24
|
+
export declare const RULE_KIND_KEYS: readonly ["blockExport", "allowAddresses", "denyAddresses", "maxAmountPerTransaction"];
|
|
25
|
+
export type PolicyRuleKind = (typeof RULE_KIND_KEYS)[number];
|
|
26
|
+
/**
|
|
27
|
+
* The single source of truth {@link expandPolicyRules} and
|
|
28
|
+
* {@link desugarPolicyRules} both build on. Entries are alphabetized
|
|
29
|
+
* (enforced by lint), not grouped by relationship — `allowAddresses` and
|
|
30
|
+
* `maxAmountPerTransaction` cooperate (see their builders' comments) despite
|
|
31
|
+
* sitting apart here.
|
|
32
|
+
*/
|
|
33
|
+
export declare const RULE_KINDS: Record<PolicyRuleKind, RuleKindDefinition>;
|
|
34
|
+
//# sourceMappingURL=policyRuleKinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policyRuleKinds.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/policies/policyRuleKinds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAMjE,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAMrE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;GAGG;AACH,KAAK,kBAAkB,GAAG;IACxB;;;;OAIG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,cAAc,GAAG,SAAS,CAAC;IACnE;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;CACtE,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,cAAc,wFAKjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAiBjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/policies/readAllowAddressesRule/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|