@dynamic-labs-sdk/client 1.33.2 → 1.33.4

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.
Files changed (223) hide show
  1. package/dist/{apiClient-B0eCQXEJ.native.esm.js → apiClient-BGh68_e6.native.esm.js} +3 -3
  2. package/dist/{apiClient-B0eCQXEJ.native.esm.js.map → apiClient-BGh68_e6.native.esm.js.map} +1 -1
  3. package/dist/core.cjs +5 -78
  4. package/dist/core.cjs.map +1 -1
  5. package/dist/core.esm.js +6 -77
  6. package/dist/core.esm.js.map +1 -1
  7. package/dist/core.native.esm.js +8 -79
  8. package/dist/core.native.esm.js.map +1 -1
  9. package/dist/exports/core.d.ts +0 -2
  10. package/dist/exports/core.d.ts.map +1 -1
  11. package/dist/exports/waas.d.ts +13 -1
  12. package/dist/exports/waas.d.ts.map +1 -1
  13. package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js → getNetworkProviderFromNetworkId-BqiVs3Ni.esm.js} +2 -2
  14. package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js.map → getNetworkProviderFromNetworkId-BqiVs3Ni.esm.js.map} +1 -1
  15. package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs → getNetworkProviderFromNetworkId-C_bqlRFD.cjs} +2 -2
  16. package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs.map → getNetworkProviderFromNetworkId-C_bqlRFD.cjs.map} +1 -1
  17. package/dist/{getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js → getNetworkProviderFromNetworkId-TczZgKDH.native.esm.js} +8 -8
  18. package/dist/getNetworkProviderFromNetworkId-TczZgKDH.native.esm.js.map +1 -0
  19. package/dist/{getSignedSessionId-DdMeCIV-.esm.js → getSignedSessionId-DRJW9tb8.esm.js} +3 -3
  20. package/dist/{getSignedSessionId-DdMeCIV-.esm.js.map → getSignedSessionId-DRJW9tb8.esm.js.map} +1 -1
  21. package/dist/{getSignedSessionId-KiBgLtda.cjs → getSignedSessionId-Dc6_q9ph.cjs} +3 -3
  22. package/dist/{getSignedSessionId-KiBgLtda.cjs.map → getSignedSessionId-Dc6_q9ph.cjs.map} +1 -1
  23. package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js → getSignedSessionId-h-zAmDnk.native.esm.js} +3 -3
  24. package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js.map → getSignedSessionId-h-zAmDnk.native.esm.js.map} +1 -1
  25. package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js → getVerifiedCredentialForWalletAccount-BWtWpYjd.esm.js} +2 -2
  26. package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js.map → getVerifiedCredentialForWalletAccount-BWtWpYjd.esm.js.map} +1 -1
  27. package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs → getVerifiedCredentialForWalletAccount-CgI__iTv.cjs} +2 -2
  28. package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs.map → getVerifiedCredentialForWalletAccount-CgI__iTv.cjs.map} +1 -1
  29. package/dist/index.cjs +8 -8
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.esm.js +8 -8
  32. package/dist/index.esm.js.map +1 -1
  33. package/dist/index.native.esm.js +10 -10
  34. package/dist/index.native.esm.js.map +1 -1
  35. package/dist/{isMfaRequiredForAction-By7uHgpn.cjs → isMfaRequiredForAction-Aov24tU3.cjs} +2 -2
  36. package/dist/{isMfaRequiredForAction-By7uHgpn.cjs.map → isMfaRequiredForAction-Aov24tU3.cjs.map} +1 -1
  37. package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js → isMfaRequiredForAction-FW_GM4tb.native.esm.js} +2 -2
  38. package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js.map → isMfaRequiredForAction-FW_GM4tb.native.esm.js.map} +1 -1
  39. package/dist/{isMfaRequiredForAction-BLegdReE.esm.js → isMfaRequiredForAction-mcAjTfRu.esm.js} +2 -2
  40. package/dist/{isMfaRequiredForAction-BLegdReE.esm.js.map → isMfaRequiredForAction-mcAjTfRu.esm.js.map} +1 -1
  41. package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js → isUserOnboardingComplete-BTvFsIW7.esm.js} +3 -3
  42. package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js.map → isUserOnboardingComplete-BTvFsIW7.esm.js.map} +1 -1
  43. package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js → isUserOnboardingComplete-BzEm_9UF.native.esm.js} +3 -3
  44. package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js.map → isUserOnboardingComplete-BzEm_9UF.native.esm.js.map} +1 -1
  45. package/dist/{isUserOnboardingComplete-DMefkHRY.cjs → isUserOnboardingComplete-Deq_CabI.cjs} +3 -3
  46. package/dist/{isUserOnboardingComplete-DMefkHRY.cjs.map → isUserOnboardingComplete-Deq_CabI.cjs.map} +1 -1
  47. package/dist/{logoutWithReason-c1DmyRBx.cjs → logoutWithReason-BqgbyO5j.cjs} +30 -4
  48. package/dist/logoutWithReason-BqgbyO5j.cjs.map +1 -0
  49. package/dist/{logoutWithReason-B-cf-dUs.esm.js → logoutWithReason-Demgc354.esm.js} +25 -5
  50. package/dist/logoutWithReason-Demgc354.esm.js.map +1 -0
  51. package/dist/{logoutWithReason-C4AgSbjv.native.esm.js → logoutWithReason-rupibyb3.native.esm.js} +24 -4
  52. package/dist/logoutWithReason-rupibyb3.native.esm.js.map +1 -0
  53. package/dist/{migrateFromFireblocks-RCqy2qOG.cjs → migrateFromFireblocks-C1El-Dce.cjs} +2 -2
  54. package/dist/{migrateFromFireblocks-RCqy2qOG.cjs.map → migrateFromFireblocks-C1El-Dce.cjs.map} +1 -1
  55. package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js → migrateFromFireblocks-Cc6JO6e2.native.esm.js} +2 -2
  56. package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js.map → migrateFromFireblocks-Cc6JO6e2.native.esm.js.map} +1 -1
  57. package/dist/{migrateFromFireblocks-B76sFd7a.esm.js → migrateFromFireblocks-DSgWzuHJ.esm.js} +2 -2
  58. package/dist/{migrateFromFireblocks-B76sFd7a.esm.js.map → migrateFromFireblocks-DSgWzuHJ.esm.js.map} +1 -1
  59. package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts +20 -0
  60. package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts.map +1 -0
  61. package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts +2 -0
  62. package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts.map +1 -0
  63. package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts +39 -6
  64. package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts.map +1 -1
  65. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +9 -3
  66. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
  67. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +10 -3
  68. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
  69. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts +43 -0
  70. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts.map +1 -0
  71. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts +2 -0
  72. package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts.map +1 -0
  73. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +249 -0
  74. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
  75. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts +45 -0
  76. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts.map +1 -0
  77. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts +2 -0
  78. package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts.map +1 -0
  79. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts +41 -0
  80. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts.map +1 -0
  81. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts +2 -0
  82. package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts.map +1 -0
  83. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts +39 -0
  84. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts.map +1 -0
  85. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts +2 -0
  86. package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts.map +1 -0
  87. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts +30 -0
  88. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts.map +1 -0
  89. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts +2 -0
  90. package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts.map +1 -0
  91. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts +2 -0
  92. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts.map +1 -0
  93. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts +26 -0
  94. package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts.map +1 -0
  95. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts +2 -0
  96. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts.map +1 -0
  97. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts +21 -0
  98. package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts.map +1 -0
  99. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts +2 -0
  100. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts.map +1 -0
  101. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts +26 -0
  102. package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts.map +1 -0
  103. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts +11 -2
  104. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts.map +1 -1
  105. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts +11 -2
  106. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts.map +1 -1
  107. package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts +12 -4
  108. package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts.map +1 -1
  109. package/dist/modules/waas/businessAccounts/resendFields.d.ts +39 -0
  110. package/dist/modules/waas/businessAccounts/resendFields.d.ts.map +1 -0
  111. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts +2 -0
  112. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts.map +1 -0
  113. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts +49 -0
  114. package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts.map +1 -0
  115. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts +11 -2
  116. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -1
  117. package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts +11 -2
  118. package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
  119. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts +2 -0
  120. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts.map +1 -0
  121. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts +29 -0
  122. package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts.map +1 -0
  123. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts +2 -0
  124. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts.map +1 -0
  125. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts +29 -0
  126. package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts.map +1 -0
  127. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/createResilientIndexedDbStore.d.ts +44 -0
  128. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/createResilientIndexedDbStore.d.ts.map +1 -0
  129. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/index.d.ts +2 -0
  130. package/dist/services/resilientIndexedDbStore/createResilientIndexedDbStore/index.d.ts.map +1 -0
  131. package/dist/services/resilientIndexedDbStore/errors/TransactionNotCompletedError.d.ts +5 -0
  132. package/dist/services/resilientIndexedDbStore/errors/TransactionNotCompletedError.d.ts.map +1 -0
  133. package/dist/services/resilientIndexedDbStore/resilientIndexedDbStore.types.d.ts +79 -0
  134. package/dist/services/resilientIndexedDbStore/resilientIndexedDbStore.types.d.ts.map +1 -0
  135. package/dist/services/resilientIndexedDbStore/utils/applyMutation/applyMutation.d.ts +29 -0
  136. package/dist/services/resilientIndexedDbStore/utils/applyMutation/applyMutation.d.ts.map +1 -0
  137. package/dist/services/resilientIndexedDbStore/utils/applyMutation/index.d.ts +2 -0
  138. package/dist/services/resilientIndexedDbStore/utils/applyMutation/index.d.ts.map +1 -0
  139. package/dist/services/resilientIndexedDbStore/utils/constants.d.ts +24 -0
  140. package/dist/services/resilientIndexedDbStore/utils/constants.d.ts.map +1 -0
  141. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/createTombstoneStore.d.ts +61 -0
  142. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/createTombstoneStore.d.ts.map +1 -0
  143. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/index.d.ts +3 -0
  144. package/dist/services/resilientIndexedDbStore/utils/createTombstoneStore/index.d.ts.map +1 -0
  145. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/createWorkQueue.d.ts +60 -0
  146. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/createWorkQueue.d.ts.map +1 -0
  147. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/index.d.ts +3 -0
  148. package/dist/services/resilientIndexedDbStore/utils/createWorkQueue/index.d.ts.map +1 -0
  149. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/deleteRecord.d.ts +35 -0
  150. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/deleteRecord.d.ts.map +1 -0
  151. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/index.d.ts +2 -0
  152. package/dist/services/resilientIndexedDbStore/utils/deleteRecord/index.d.ts.map +1 -0
  153. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/getBackoffDelay.d.ts +22 -0
  154. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/getBackoffDelay.d.ts.map +1 -0
  155. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/index.d.ts +2 -0
  156. package/dist/services/resilientIndexedDbStore/utils/getBackoffDelay/index.d.ts.map +1 -0
  157. package/dist/services/resilientIndexedDbStore/utils/getRecord/getRecord.d.ts +32 -0
  158. package/dist/services/resilientIndexedDbStore/utils/getRecord/getRecord.d.ts.map +1 -0
  159. package/dist/services/resilientIndexedDbStore/utils/getRecord/index.d.ts +2 -0
  160. package/dist/services/resilientIndexedDbStore/utils/getRecord/index.d.ts.map +1 -0
  161. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/getRecordKey.d.ts +27 -0
  162. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/getRecordKey.d.ts.map +1 -0
  163. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/index.d.ts +2 -0
  164. package/dist/services/resilientIndexedDbStore/utils/getRecordKey/index.d.ts.map +1 -0
  165. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/getTransactionError.d.ts +28 -0
  166. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/getTransactionError.d.ts.map +1 -0
  167. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/index.d.ts +2 -0
  168. package/dist/services/resilientIndexedDbStore/utils/getTransactionError/index.d.ts.map +1 -0
  169. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/index.d.ts +2 -0
  170. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/index.d.ts.map +1 -0
  171. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/isPermanentWriteError.d.ts +20 -0
  172. package/dist/services/resilientIndexedDbStore/utils/isPermanentWriteError/isPermanentWriteError.d.ts.map +1 -0
  173. package/dist/services/resilientIndexedDbStore/utils/openDatabase/index.d.ts +2 -0
  174. package/dist/services/resilientIndexedDbStore/utils/openDatabase/index.d.ts.map +1 -0
  175. package/dist/services/resilientIndexedDbStore/utils/openDatabase/openDatabase.d.ts +31 -0
  176. package/dist/services/resilientIndexedDbStore/utils/openDatabase/openDatabase.d.ts.map +1 -0
  177. package/dist/services/resilientIndexedDbStore/utils/putRecord/index.d.ts +2 -0
  178. package/dist/services/resilientIndexedDbStore/utils/putRecord/index.d.ts.map +1 -0
  179. package/dist/services/resilientIndexedDbStore/utils/putRecord/putRecord.d.ts +37 -0
  180. package/dist/services/resilientIndexedDbStore/utils/putRecord/putRecord.d.ts.map +1 -0
  181. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/index.d.ts +2 -0
  182. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/index.d.ts.map +1 -0
  183. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/readStoredValue.d.ts +42 -0
  184. package/dist/services/resilientIndexedDbStore/utils/readStoredValue/readStoredValue.d.ts.map +1 -0
  185. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/index.d.ts +2 -0
  186. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/index.d.ts.map +1 -0
  187. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/replayTombstones.d.ts +31 -0
  188. package/dist/services/resilientIndexedDbStore/utils/replayTombstones/replayTombstones.d.ts.map +1 -0
  189. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/index.d.ts +2 -0
  190. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/index.d.ts.map +1 -0
  191. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/runWithTimeout.d.ts +34 -0
  192. package/dist/services/resilientIndexedDbStore/utils/runWithTimeout/runWithTimeout.d.ts.map +1 -0
  193. package/dist/services/resilientIndexedDbStore/utils/withDatabase/index.d.ts +2 -0
  194. package/dist/services/resilientIndexedDbStore/utils/withDatabase/index.d.ts.map +1 -0
  195. package/dist/services/resilientIndexedDbStore/utils/withDatabase/withDatabase.d.ts +39 -0
  196. package/dist/services/resilientIndexedDbStore/utils/withDatabase/withDatabase.d.ts.map +1 -0
  197. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  198. package/dist/utils/retryOnFail/retryOnFail.d.ts.map +1 -1
  199. package/dist/utils/retryOnFetchError/retryOnFetchError.d.ts.map +1 -1
  200. package/dist/utils/waitForDelay/index.d.ts +2 -0
  201. package/dist/utils/waitForDelay/index.d.ts.map +1 -0
  202. package/dist/utils/waitForDelay/waitForDelay.d.ts +21 -0
  203. package/dist/utils/waitForDelay/waitForDelay.d.ts.map +1 -0
  204. package/dist/{waas-H5xyBfTI.esm.js → waas-BAcC_ZEU.esm.js} +688 -26
  205. package/dist/waas-BAcC_ZEU.esm.js.map +1 -0
  206. package/dist/{waas-DIlnOHm6.native.esm.js → waas-BnBxnaH4.native.esm.js} +688 -26
  207. package/dist/waas-BnBxnaH4.native.esm.js.map +1 -0
  208. package/dist/{waas-7vSYuH3H.cjs → waas-EJACWt9Q.cjs} +764 -24
  209. package/dist/waas-EJACWt9Q.cjs.map +1 -0
  210. package/dist/waas.cjs +18 -5
  211. package/dist/waas.esm.js +5 -5
  212. package/dist/waas.native.esm.js +5 -5
  213. package/dist/waasCore.cjs +5 -5
  214. package/dist/waasCore.esm.js +5 -5
  215. package/dist/waasCore.native.esm.js +5 -5
  216. package/package.json +3 -4
  217. package/dist/getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js.map +0 -1
  218. package/dist/logoutWithReason-B-cf-dUs.esm.js.map +0 -1
  219. package/dist/logoutWithReason-C4AgSbjv.native.esm.js.map +0 -1
  220. package/dist/logoutWithReason-c1DmyRBx.cjs.map +0 -1
  221. package/dist/waas-7vSYuH3H.cjs.map +0 -1
  222. package/dist/waas-DIlnOHm6.native.esm.js.map +0 -1
  223. package/dist/waas-H5xyBfTI.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"migrateFromFireblocks-RCqy2qOG.cjs","names":["BaseError","BaseError","BaseError","getWalletProviderFromWalletAccount","isWaasWalletProvider","getDefaultClient","EmbeddedWalletVersionEnum","getDefaultClient","getWalletProviders","NoWalletProviderFoundError","DYNAMIC_WAAS_METADATA","isWaasWalletProvider","refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/errors/TransactionBroadcastError.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Error codes that identify why a v3 WaaS transaction broadcast was rejected.\n *\n * @example 'BROADCAST_REJECTED'\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastErrorCode =\n | 'BROADCAST_IDEMPOTENCY_CONFLICT'\n | 'BROADCAST_OUTCOME_UNKNOWN'\n | 'BROADCAST_RATE_LIMITED'\n | 'BROADCAST_REJECTED'\n | 'BROADCAST_REQUIRES_RESIGN'\n | 'BROADCAST_WALLET_INELIGIBLE'\n | 'INVALID_SIGNED_TRANSACTION'\n | 'NETWORK_NOT_ENABLED'\n | 'SIGNED_TRANSACTION_WALLET_MISMATCH'\n | 'UNSUPPORTED_WAAS_CHAIN';\n\n/**\n * States describing whether the signed transaction reached the chain.\n *\n * @example 'not_submitted'\n * @see TransactionBroadcastError\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastSubmissionState =\n | 'not_submitted'\n | 'requires_resign'\n | 'unknown';\n\ntype TransactionBroadcastErrorParams = {\n attempts: number;\n broadcastId: string;\n cause: Error;\n code: TransactionBroadcastErrorCode;\n message: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId?: string;\n};\n\n/**\n * Error raised when Redcoast fails to submit a v3 WaaS transaction after the SDK signed it.\n *\n * @example new TransactionBroadcastError({ attempts: 1, broadcastId: 'broadcast-id', cause, code: 'BROADCAST_REJECTED', message: 'rejected', retryable: false, submissionState: 'not_submitted', transactionId: undefined })\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport class TransactionBroadcastError extends BaseError {\n attempts: number;\n broadcastId: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId: string | undefined;\n\n constructor({\n attempts,\n broadcastId,\n cause,\n code,\n message,\n retryable,\n submissionState,\n transactionId,\n }: TransactionBroadcastErrorParams) {\n super({\n cause,\n code,\n docsUrl: null,\n name: 'TransactionBroadcastError',\n shortMessage: message,\n });\n\n this.attempts = attempts;\n this.broadcastId = broadcastId;\n this.retryable = retryable;\n this.submissionState = submissionState;\n this.transactionId = transactionId;\n }\n}\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()): boolean => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgDA,mCAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;;;;;;;ACqCN,IAAa,4BAAb,cAA+CC,mCAAU;CACvD;CACA;CACA;CACA;CACA;CAEA,YAAY,EACV,UACA,aACA,OACA,MACA,SACA,WACA,iBACA,iBACkC;AAClC,QAAM;GACJ;GACA;GACA,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,WAAW;AAChB,OAAK,cAAc;AACnB,OAAK,YAAY;AACjB,OAAK,kBAAkB;AACvB,OAAK,gBAAgB;;;;;;AC1EzB,IAAa,4BAAb,cAA+CC,mCAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiBC,4DACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAACC,8CAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;ACZT,MAAa,wBAAwB,SAASC,2CAAkB,KAAc;CAC5E,MAAM,kBAAkB,OAAO;AAE/B,wCAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxBC,qDAA0B;;;;;;;;;;;;;;;;;;;;;;;ACmC9B,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAASC,2CAAkB,KACgB;CAC3C,MAAM,YAAYC,4CAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAIC,oDAA2B,EACnC,mBAAmBC,+CAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAKC,8CAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMC,+CAAY,OAAO;AAEzB,QAAO"}
1
+ {"version":3,"file":"migrateFromFireblocks-C1El-Dce.cjs","names":["BaseError","BaseError","BaseError","getWalletProviderFromWalletAccount","isWaasWalletProvider","getDefaultClient","EmbeddedWalletVersionEnum","getDefaultClient","getWalletProviders","NoWalletProviderFoundError","DYNAMIC_WAAS_METADATA","isWaasWalletProvider","refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/errors/TransactionBroadcastError.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Error codes that identify why a v3 WaaS transaction broadcast was rejected.\n *\n * @example 'BROADCAST_REJECTED'\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastErrorCode =\n | 'BROADCAST_IDEMPOTENCY_CONFLICT'\n | 'BROADCAST_OUTCOME_UNKNOWN'\n | 'BROADCAST_RATE_LIMITED'\n | 'BROADCAST_REJECTED'\n | 'BROADCAST_REQUIRES_RESIGN'\n | 'BROADCAST_WALLET_INELIGIBLE'\n | 'INVALID_SIGNED_TRANSACTION'\n | 'NETWORK_NOT_ENABLED'\n | 'SIGNED_TRANSACTION_WALLET_MISMATCH'\n | 'UNSUPPORTED_WAAS_CHAIN';\n\n/**\n * States describing whether the signed transaction reached the chain.\n *\n * @example 'not_submitted'\n * @see TransactionBroadcastError\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastSubmissionState =\n | 'not_submitted'\n | 'requires_resign'\n | 'unknown';\n\ntype TransactionBroadcastErrorParams = {\n attempts: number;\n broadcastId: string;\n cause: Error;\n code: TransactionBroadcastErrorCode;\n message: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId?: string;\n};\n\n/**\n * Error raised when Redcoast fails to submit a v3 WaaS transaction after the SDK signed it.\n *\n * @example new TransactionBroadcastError({ attempts: 1, broadcastId: 'broadcast-id', cause, code: 'BROADCAST_REJECTED', message: 'rejected', retryable: false, submissionState: 'not_submitted', transactionId: undefined })\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport class TransactionBroadcastError extends BaseError {\n attempts: number;\n broadcastId: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId: string | undefined;\n\n constructor({\n attempts,\n broadcastId,\n cause,\n code,\n message,\n retryable,\n submissionState,\n transactionId,\n }: TransactionBroadcastErrorParams) {\n super({\n cause,\n code,\n docsUrl: null,\n name: 'TransactionBroadcastError',\n shortMessage: message,\n });\n\n this.attempts = attempts;\n this.broadcastId = broadcastId;\n this.retryable = retryable;\n this.submissionState = submissionState;\n this.transactionId = transactionId;\n }\n}\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()): boolean => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgDA,mCAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;;;;;;;ACqCN,IAAa,4BAAb,cAA+CC,mCAAU;CACvD;CACA;CACA;CACA;CACA;CAEA,YAAY,EACV,UACA,aACA,OACA,MACA,SACA,WACA,iBACA,iBACkC;AAClC,QAAM;GACJ;GACA;GACA,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,WAAW;AAChB,OAAK,cAAc;AACnB,OAAK,YAAY;AACjB,OAAK,kBAAkB;AACvB,OAAK,gBAAgB;;;;;;AC1EzB,IAAa,4BAAb,cAA+CC,mCAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiBC,4DACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAACC,8CAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;ACZT,MAAa,wBAAwB,SAASC,2CAAkB,KAAc;CAC5E,MAAM,kBAAkB,OAAO;AAE/B,wCAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxBC,qDAA0B;;;;;;;;;;;;;;;;;;;;;;;ACmC9B,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAASC,2CAAkB,KACgB;CAC3C,MAAM,YAAYC,4CAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAIC,oDAA2B,EACnC,mBAAmBC,+CAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAKC,8CAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMC,+CAAY,OAAO;AAEzB,QAAO"}
@@ -1,4 +1,4 @@
1
- import { E as getWalletProviders, S as isWaasWalletProvider, T as DYNAMIC_WAAS_METADATA, bt as getDefaultClient, ht as assertDefined, i as __refreshAuth_wrapped, n as NoWalletProviderFoundError, t as getWalletProviderFromWalletAccount, wt as BaseError } from "./apiClient-B0eCQXEJ.native.esm.js";
1
+ import { E as getWalletProviders, S as isWaasWalletProvider, T as DYNAMIC_WAAS_METADATA, bt as getDefaultClient, ht as assertDefined, i as __refreshAuth_wrapped, n as NoWalletProviderFoundError, t as getWalletProviderFromWalletAccount, wt as BaseError } from "./apiClient-BGh68_e6.native.esm.js";
2
2
  import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
3
3
 
4
4
  //#region src/errors/NotWaasWalletProviderError.ts
@@ -125,4 +125,4 @@ const migrateFromFireblocks = async ({ coinTypes, deviceId, expectedAddresses, j
125
125
 
126
126
  //#endregion
127
127
  export { TransactionBroadcastError as a, NotWaasWalletAccountError as i, isDynamicWaasEnabled as n, NotWaasWalletProviderError as o, getWaasWalletProviderFromWalletAccount as r, migrateFromFireblocks as t };
128
- //# sourceMappingURL=migrateFromFireblocks-B0pkwAaK.native.esm.js.map
128
+ //# sourceMappingURL=migrateFromFireblocks-Cc6JO6e2.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrateFromFireblocks-B0pkwAaK.native.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/errors/TransactionBroadcastError.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Error codes that identify why a v3 WaaS transaction broadcast was rejected.\n *\n * @example 'BROADCAST_REJECTED'\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastErrorCode =\n | 'BROADCAST_IDEMPOTENCY_CONFLICT'\n | 'BROADCAST_OUTCOME_UNKNOWN'\n | 'BROADCAST_RATE_LIMITED'\n | 'BROADCAST_REJECTED'\n | 'BROADCAST_REQUIRES_RESIGN'\n | 'BROADCAST_WALLET_INELIGIBLE'\n | 'INVALID_SIGNED_TRANSACTION'\n | 'NETWORK_NOT_ENABLED'\n | 'SIGNED_TRANSACTION_WALLET_MISMATCH'\n | 'UNSUPPORTED_WAAS_CHAIN';\n\n/**\n * States describing whether the signed transaction reached the chain.\n *\n * @example 'not_submitted'\n * @see TransactionBroadcastError\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastSubmissionState =\n | 'not_submitted'\n | 'requires_resign'\n | 'unknown';\n\ntype TransactionBroadcastErrorParams = {\n attempts: number;\n broadcastId: string;\n cause: Error;\n code: TransactionBroadcastErrorCode;\n message: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId?: string;\n};\n\n/**\n * Error raised when Redcoast fails to submit a v3 WaaS transaction after the SDK signed it.\n *\n * @example new TransactionBroadcastError({ attempts: 1, broadcastId: 'broadcast-id', cause, code: 'BROADCAST_REJECTED', message: 'rejected', retryable: false, submissionState: 'not_submitted', transactionId: undefined })\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport class TransactionBroadcastError extends BaseError {\n attempts: number;\n broadcastId: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId: string | undefined;\n\n constructor({\n attempts,\n broadcastId,\n cause,\n code,\n message,\n retryable,\n submissionState,\n transactionId,\n }: TransactionBroadcastErrorParams) {\n super({\n cause,\n code,\n docsUrl: null,\n name: 'TransactionBroadcastError',\n shortMessage: message,\n });\n\n this.attempts = attempts;\n this.broadcastId = broadcastId;\n this.retryable = retryable;\n this.submissionState = submissionState;\n this.transactionId = transactionId;\n }\n}\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()): boolean => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;;;;;;;ACqCN,IAAa,4BAAb,cAA+C,UAAU;CACvD;CACA;CACA;CACA;CACA;CAEA,YAAY,EACV,UACA,aACA,OACA,MACA,SACA,WACA,iBACA,iBACkC;AAClC,QAAM;GACJ;GACA;GACA,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,WAAW;AAChB,OAAK,cAAc;AACnB,OAAK,YAAY;AACjB,OAAK,kBAAkB;AACvB,OAAK,gBAAgB;;;;;;AC1EzB,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;ACZT,MAAa,wBAAwB,SAAS,kBAAkB,KAAc;CAC5E,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;ACmC9B,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
1
+ {"version":3,"file":"migrateFromFireblocks-Cc6JO6e2.native.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/errors/TransactionBroadcastError.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Error codes that identify why a v3 WaaS transaction broadcast was rejected.\n *\n * @example 'BROADCAST_REJECTED'\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastErrorCode =\n | 'BROADCAST_IDEMPOTENCY_CONFLICT'\n | 'BROADCAST_OUTCOME_UNKNOWN'\n | 'BROADCAST_RATE_LIMITED'\n | 'BROADCAST_REJECTED'\n | 'BROADCAST_REQUIRES_RESIGN'\n | 'BROADCAST_WALLET_INELIGIBLE'\n | 'INVALID_SIGNED_TRANSACTION'\n | 'NETWORK_NOT_ENABLED'\n | 'SIGNED_TRANSACTION_WALLET_MISMATCH'\n | 'UNSUPPORTED_WAAS_CHAIN';\n\n/**\n * States describing whether the signed transaction reached the chain.\n *\n * @example 'not_submitted'\n * @see TransactionBroadcastError\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastSubmissionState =\n | 'not_submitted'\n | 'requires_resign'\n | 'unknown';\n\ntype TransactionBroadcastErrorParams = {\n attempts: number;\n broadcastId: string;\n cause: Error;\n code: TransactionBroadcastErrorCode;\n message: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId?: string;\n};\n\n/**\n * Error raised when Redcoast fails to submit a v3 WaaS transaction after the SDK signed it.\n *\n * @example new TransactionBroadcastError({ attempts: 1, broadcastId: 'broadcast-id', cause, code: 'BROADCAST_REJECTED', message: 'rejected', retryable: false, submissionState: 'not_submitted', transactionId: undefined })\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport class TransactionBroadcastError extends BaseError {\n attempts: number;\n broadcastId: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId: string | undefined;\n\n constructor({\n attempts,\n broadcastId,\n cause,\n code,\n message,\n retryable,\n submissionState,\n transactionId,\n }: TransactionBroadcastErrorParams) {\n super({\n cause,\n code,\n docsUrl: null,\n name: 'TransactionBroadcastError',\n shortMessage: message,\n });\n\n this.attempts = attempts;\n this.broadcastId = broadcastId;\n this.retryable = retryable;\n this.submissionState = submissionState;\n this.transactionId = transactionId;\n }\n}\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()): boolean => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;;;;;;;ACqCN,IAAa,4BAAb,cAA+C,UAAU;CACvD;CACA;CACA;CACA;CACA;CAEA,YAAY,EACV,UACA,aACA,OACA,MACA,SACA,WACA,iBACA,iBACkC;AAClC,QAAM;GACJ;GACA;GACA,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,WAAW;AAChB,OAAK,cAAc;AACnB,OAAK,YAAY;AACjB,OAAK,kBAAkB;AACvB,OAAK,gBAAgB;;;;;;AC1EzB,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;ACZT,MAAa,wBAAwB,SAAS,kBAAkB,KAAc;CAC5E,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;ACmC9B,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
@@ -1,4 +1,4 @@
1
- import { Et as BaseError, M as getWalletProviders, O as isWaasWalletProvider, St as getDefaultClient, _t as assertDefined, c as NoWalletProviderFoundError, j as DYNAMIC_WAAS_METADATA, s as getWalletProviderFromWalletAccount, u as __refreshAuth_wrapped } from "./logoutWithReason-B-cf-dUs.esm.js";
1
+ import { Ct as getDefaultClient, Dt as BaseError, M as DYNAMIC_WAAS_METADATA, N as getWalletProviders, c as getWalletProviderFromWalletAccount, d as __refreshAuth_wrapped, k as isWaasWalletProvider, l as NoWalletProviderFoundError, vt as assertDefined } from "./logoutWithReason-Demgc354.esm.js";
2
2
  import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
3
3
 
4
4
  //#region src/errors/NotWaasWalletProviderError.ts
@@ -125,4 +125,4 @@ const migrateFromFireblocks = async ({ coinTypes, deviceId, expectedAddresses, j
125
125
 
126
126
  //#endregion
127
127
  export { TransactionBroadcastError as a, NotWaasWalletAccountError as i, isDynamicWaasEnabled as n, NotWaasWalletProviderError as o, getWaasWalletProviderFromWalletAccount as r, migrateFromFireblocks as t };
128
- //# sourceMappingURL=migrateFromFireblocks-B76sFd7a.esm.js.map
128
+ //# sourceMappingURL=migrateFromFireblocks-DSgWzuHJ.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrateFromFireblocks-B76sFd7a.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/errors/TransactionBroadcastError.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Error codes that identify why a v3 WaaS transaction broadcast was rejected.\n *\n * @example 'BROADCAST_REJECTED'\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastErrorCode =\n | 'BROADCAST_IDEMPOTENCY_CONFLICT'\n | 'BROADCAST_OUTCOME_UNKNOWN'\n | 'BROADCAST_RATE_LIMITED'\n | 'BROADCAST_REJECTED'\n | 'BROADCAST_REQUIRES_RESIGN'\n | 'BROADCAST_WALLET_INELIGIBLE'\n | 'INVALID_SIGNED_TRANSACTION'\n | 'NETWORK_NOT_ENABLED'\n | 'SIGNED_TRANSACTION_WALLET_MISMATCH'\n | 'UNSUPPORTED_WAAS_CHAIN';\n\n/**\n * States describing whether the signed transaction reached the chain.\n *\n * @example 'not_submitted'\n * @see TransactionBroadcastError\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastSubmissionState =\n | 'not_submitted'\n | 'requires_resign'\n | 'unknown';\n\ntype TransactionBroadcastErrorParams = {\n attempts: number;\n broadcastId: string;\n cause: Error;\n code: TransactionBroadcastErrorCode;\n message: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId?: string;\n};\n\n/**\n * Error raised when Redcoast fails to submit a v3 WaaS transaction after the SDK signed it.\n *\n * @example new TransactionBroadcastError({ attempts: 1, broadcastId: 'broadcast-id', cause, code: 'BROADCAST_REJECTED', message: 'rejected', retryable: false, submissionState: 'not_submitted', transactionId: undefined })\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport class TransactionBroadcastError extends BaseError {\n attempts: number;\n broadcastId: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId: string | undefined;\n\n constructor({\n attempts,\n broadcastId,\n cause,\n code,\n message,\n retryable,\n submissionState,\n transactionId,\n }: TransactionBroadcastErrorParams) {\n super({\n cause,\n code,\n docsUrl: null,\n name: 'TransactionBroadcastError',\n shortMessage: message,\n });\n\n this.attempts = attempts;\n this.broadcastId = broadcastId;\n this.retryable = retryable;\n this.submissionState = submissionState;\n this.transactionId = transactionId;\n }\n}\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()): boolean => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;;;;;;;ACqCN,IAAa,4BAAb,cAA+C,UAAU;CACvD;CACA;CACA;CACA;CACA;CAEA,YAAY,EACV,UACA,aACA,OACA,MACA,SACA,WACA,iBACA,iBACkC;AAClC,QAAM;GACJ;GACA;GACA,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,WAAW;AAChB,OAAK,cAAc;AACnB,OAAK,YAAY;AACjB,OAAK,kBAAkB;AACvB,OAAK,gBAAgB;;;;;;AC1EzB,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;ACZT,MAAa,wBAAwB,SAAS,kBAAkB,KAAc;CAC5E,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;ACmC9B,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
1
+ {"version":3,"file":"migrateFromFireblocks-DSgWzuHJ.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/errors/TransactionBroadcastError.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Error codes that identify why a v3 WaaS transaction broadcast was rejected.\n *\n * @example 'BROADCAST_REJECTED'\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastErrorCode =\n | 'BROADCAST_IDEMPOTENCY_CONFLICT'\n | 'BROADCAST_OUTCOME_UNKNOWN'\n | 'BROADCAST_RATE_LIMITED'\n | 'BROADCAST_REJECTED'\n | 'BROADCAST_REQUIRES_RESIGN'\n | 'BROADCAST_WALLET_INELIGIBLE'\n | 'INVALID_SIGNED_TRANSACTION'\n | 'NETWORK_NOT_ENABLED'\n | 'SIGNED_TRANSACTION_WALLET_MISMATCH'\n | 'UNSUPPORTED_WAAS_CHAIN';\n\n/**\n * States describing whether the signed transaction reached the chain.\n *\n * @example 'not_submitted'\n * @see TransactionBroadcastError\n * @see broadcastWaasTransaction\n */\nexport type TransactionBroadcastSubmissionState =\n | 'not_submitted'\n | 'requires_resign'\n | 'unknown';\n\ntype TransactionBroadcastErrorParams = {\n attempts: number;\n broadcastId: string;\n cause: Error;\n code: TransactionBroadcastErrorCode;\n message: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId?: string;\n};\n\n/**\n * Error raised when Redcoast fails to submit a v3 WaaS transaction after the SDK signed it.\n *\n * @example new TransactionBroadcastError({ attempts: 1, broadcastId: 'broadcast-id', cause, code: 'BROADCAST_REJECTED', message: 'rejected', retryable: false, submissionState: 'not_submitted', transactionId: undefined })\n * @see transactionBroadcastErrorMapper\n * @see broadcastWaasTransaction\n */\nexport class TransactionBroadcastError extends BaseError {\n attempts: number;\n broadcastId: string;\n retryable: boolean;\n submissionState: TransactionBroadcastSubmissionState;\n transactionId: string | undefined;\n\n constructor({\n attempts,\n broadcastId,\n cause,\n code,\n message,\n retryable,\n submissionState,\n transactionId,\n }: TransactionBroadcastErrorParams) {\n super({\n cause,\n code,\n docsUrl: null,\n name: 'TransactionBroadcastError',\n shortMessage: message,\n });\n\n this.attempts = attempts;\n this.broadcastId = broadcastId;\n this.retryable = retryable;\n this.submissionState = submissionState;\n this.transactionId = transactionId;\n }\n}\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()): boolean => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;;;;;;;ACqCN,IAAa,4BAAb,cAA+C,UAAU;CACvD;CACA;CACA;CACA;CACA;CAEA,YAAY,EACV,UACA,aACA,OACA,MACA,SACA,WACA,iBACA,iBACkC;AAClC,QAAM;GACJ;GACA;GACA,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,WAAW;AAChB,OAAK,cAAc;AACnB,OAAK,YAAY;AACjB,OAAK,kBAAkB;AACvB,OAAK,gBAAgB;;;;;;AC1EzB,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;ACZT,MAAa,wBAAwB,SAAS,kBAAkB,KAAc;CAC5E,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;ACmC9B,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Deterministic canonical JSON: codepoint-sorted keys at every depth, arrays
3
+ * in order, `undefined` fields removed, no whitespace. Byte-identical to
4
+ * auth-service's `enclave/canonical-json`, which the enclave re-canonicalizes
5
+ * against when verifying signatures.
6
+ *
7
+ * @param obj - The document to canonicalize.
8
+ * @returns The canonical JSON string.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * canonicalizeJson({ b: 1, a: 2 }); // '{"a":2,"b":1}'
13
+ * ```
14
+ *
15
+ * @see {@link signBusinessAccountIntent} for the signature flow that depends on this byte sequence.
16
+ * @see {@link signBusinessAccountApproval} for the co-signer flow using the same canonical form.
17
+ * @notInstrumented
18
+ */
19
+ export declare const canonicalizeJson: (obj: Record<string, unknown>) => string;
20
+ //# sourceMappingURL=canonicalizeJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalizeJson.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/canonicalizeJson/canonicalizeJson.ts"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,QAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { canonicalizeJson } from './canonicalizeJson';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/canonicalizeJson/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -8,6 +8,17 @@ import type { DynamicClient } from '../../../client/types';
8
8
  * There is deliberately no `expiresAt`. How long an intent stays redeemable is
9
9
  * the account's governance to decide, measured from `createdAt` — an
10
10
  * initiator-chosen expiry would be an initiator-chosen authorization lifetime.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const result = await addBusinessAccountMember({ businessAccountId, targetIdentity, role: 'admin' });
15
+ * if (isBusinessAccountActionRequired(result)) {
16
+ * const intent: BusinessAccountIntent = result.intent;
17
+ * }
18
+ * ```
19
+ *
20
+ * @see {@link signBusinessAccountIntent} for signing one of these.
21
+ * @see {@link BusinessAccountActionRequired} for where an unsigned intent is returned.
11
22
  */
12
23
  export type BusinessAccountIntent = {
13
24
  actionType: string;
@@ -22,7 +33,17 @@ export type BusinessAccountIntent = {
22
33
  type SignBusinessAccountIntentParams = {
23
34
  intent: BusinessAccountIntent;
24
35
  };
25
- /** The signed intent and the signature over its canonical form. */
36
+ /**
37
+ * The signed intent and the signature over its canonical form.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const signed: SignBusinessAccountIntentResult = await signBusinessAccountIntent({ intent });
42
+ * ```
43
+ *
44
+ * @see {@link signBusinessAccountIntent} for producing this shape.
45
+ * @see {@link SignedBusinessAccountIntent} for resending it to a governed mutation.
46
+ */
26
47
  export type SignBusinessAccountIntentResult = {
27
48
  intent: BusinessAccountIntent;
28
49
  intentSignature: string;
@@ -40,7 +61,7 @@ export type SignBusinessAccountIntentResult = {
40
61
  * WebCrypto verify expects.
41
62
  *
42
63
  * @param params.intent - The intent to sign.
43
- * @param client - The Dynamic client instance.
64
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
44
65
  * @returns The intent alongside the P1363 hex signature over its canonical form.
45
66
  *
46
67
  * @example
@@ -50,16 +71,27 @@ export type SignBusinessAccountIntentResult = {
50
71
  *
51
72
  * @see {@link signBusinessAccountApproval} for a co-signer approving this intent.
52
73
  * @see {@link BusinessAccountIntent} for the shape being signed.
74
+ * @noHook A local crypto step inside a larger flow, not a standalone server mutation a component would drive loading/error state around.
53
75
  * @notInstrumented
54
76
  */
55
- export declare const signBusinessAccountIntent: ({ intent }: SignBusinessAccountIntentParams, client: DynamicClient) => Promise<SignBusinessAccountIntentResult>;
77
+ export declare const signBusinessAccountIntent: ({ intent }: SignBusinessAccountIntentParams, client?: DynamicClient) => Promise<SignBusinessAccountIntentResult>;
56
78
  type SignBusinessAccountApprovalParams = {
57
79
  /** Defaults to now. Accepted for tests and for a caller that has already
58
80
  * recorded when the human consented. */
59
81
  approvedAt?: string;
60
82
  intent: BusinessAccountIntent;
61
83
  };
62
- /** An approval's signature and the timestamp it was signed over. */
84
+ /**
85
+ * An approval's signature and the timestamp it was signed over.
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * const { approvedAt, signature }: SignBusinessAccountApprovalResult = await signBusinessAccountApproval({ intent });
90
+ * ```
91
+ *
92
+ * @see {@link signBusinessAccountApproval} for producing this shape.
93
+ * @see {@link approveBusinessAccountProposal} for the usual way to approve a proposal instead.
94
+ */
63
95
  export type SignBusinessAccountApprovalResult = {
64
96
  approvedAt: string;
65
97
  signature: string;
@@ -78,7 +110,7 @@ export type SignBusinessAccountApprovalResult = {
78
110
  *
79
111
  * @param params.intent - The intent being approved.
80
112
  * @param params.approvedAt - When the approver consented. Defaults to now.
81
- * @param client - The Dynamic client instance.
113
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
82
114
  * @returns The timestamp signed over, alongside the P1363 hex signature.
83
115
  *
84
116
  * @example
@@ -88,8 +120,9 @@ export type SignBusinessAccountApprovalResult = {
88
120
  *
89
121
  * @see {@link signBusinessAccountIntent} for the initiator's own signature over the intent.
90
122
  * @see {@link BusinessAccountIntent} for the shape being approved.
123
+ * @noHook A local crypto step inside a larger flow — {@link approveBusinessAccountProposal} already wraps it for the normal approve-a-proposal case.
91
124
  * @notInstrumented
92
125
  */
93
- export declare const signBusinessAccountApproval: ({ intent, approvedAt, }: SignBusinessAccountApprovalParams, client: DynamicClient) => Promise<SignBusinessAccountApprovalResult>;
126
+ export declare const signBusinessAccountApproval: ({ intent, approvedAt, }: SignBusinessAccountApprovalParams, client?: DynamicClient) => Promise<SignBusinessAccountApprovalResult>;
94
127
  export {};
95
128
  //# sourceMappingURL=signBusinessAccountIntent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signBusinessAccountIntent.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAAE,CAAC;CACnD,CAAC;AAEF,KAAK,+BAA+B,GAAG;IACrC,MAAM,EAAE,qBAAqB,CAAC;CAC/B,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,qBAAqB,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,yBAAyB,eACxB,+BAA+B,UACnC,aAAa,KACpB,OAAO,CAAC,+BAA+B,CASzC,CAAC;AAEF,KAAK,iCAAiC,GAAG;IACvC;6CACyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;CAC/B,CAAC;AAEF,oEAAoE;AACpE,MAAM,MAAM,iCAAiC,GAAG;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,2BAA2B,4BAInC,iCAAiC,UAC5B,aAAa,KACpB,OAAO,CAAC,iCAAiC,CAY3C,CAAC"}
1
+ {"version":3,"file":"signBusinessAccountIntent.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAAE,CAAC;CACnD,CAAC;AAEF,KAAK,+BAA+B,GAAG;IACrC,MAAM,EAAE,qBAAqB,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,qBAAqB,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,yBAAyB,eACxB,+BAA+B,WACnC,aAAa,KACpB,OAAO,CAAC,+BAA+B,CASzC,CAAC;AAEF,KAAK,iCAAiC,GAAG;IACvC;6CACyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,eAAO,MAAM,2BAA2B,4BAInC,iCAAiC,WAC5B,aAAa,KACpB,OAAO,CAAC,iCAAiC,CAY3C,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import type { DynamicClient } from '../../../../client/types';
2
- import type { BusinessAccountActionRequired, BusinessAccountMember, BusinessAccountMemberRole, TargetIdentity } from '../businessAccounts.types';
2
+ import type { BusinessAccountActionRequired, BusinessAccountMember, BusinessAccountMemberRole, SignedBusinessAccountIntent, TargetIdentity } from '../businessAccounts.types';
3
3
  type AddMemberParams = {
4
+ autoExecute?: boolean;
4
5
  businessAccountId: string;
5
6
  role?: BusinessAccountMemberRole;
7
+ signed?: SignedBusinessAccountIntent;
6
8
  targetIdentity: TargetIdentity;
7
9
  };
8
10
  /**
@@ -16,18 +18,22 @@ type AddMemberParams = {
16
18
  *
17
19
  * When the account governs `addMember`, nothing is written and the 202 body is
18
20
  * returned instead — first the intent to sign, then the proposal collecting
19
- * approvals. Narrow it with `isBusinessAccountActionRequired`.
21
+ * approvals. Narrow it with `isBusinessAccountActionRequired`. Resend with
22
+ * `signed` (from `signBusinessAccountIntent`) to move past `INTENT_REQUIRED`.
20
23
  *
21
24
  * @param params.businessAccountId - The ID of the business account.
22
25
  * @param params.targetIdentity - The member to add (userId, or identifier + identifierType).
23
26
  * @param [params.role] - The member role: a built-in (`admin`, `viewer`) or a
24
27
  * role this account defined. Defaults to `viewer`. `owner` is rejected — use
25
28
  * `transferBusinessAccountOwnership`.
29
+ * @param [params.autoExecute] - Whether to apply on the completing approval.
30
+ * Only meaningful on the first call.
31
+ * @param [params.signed] - A previously-signed intent, to resend past `INTENT_REQUIRED`.
26
32
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
27
33
  * @returns The created business account member, or the outstanding action required.
28
34
  * @throws {UnexpectedConsentResponseError} When a governed account answers 202 with an unrecognized body.
29
35
  * @notInstrumented
30
36
  */
31
- export declare const addBusinessAccountMember: ({ businessAccountId, targetIdentity, role }: AddMemberParams, client?: DynamicClient) => Promise<BusinessAccountActionRequired | BusinessAccountMember>;
37
+ export declare const addBusinessAccountMember: ({ businessAccountId, targetIdentity, role, autoExecute, signed }: AddMemberParams, client?: DynamicClient) => Promise<BusinessAccountActionRequired | BusinessAccountMember>;
32
38
  export {};
33
39
  //# sourceMappingURL=addBusinessAccountMember.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"addBusinessAccountMember.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACf,MAAM,2BAA2B,CAAC;AAGnC,KAAK,eAAe,GAAG;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,wBAAwB,gDACU,eAAe,WACpD,aAAa,KACpB,OAAO,CAAC,6BAA6B,GAAG,qBAAqB,CAqC/D,CAAC"}
1
+ {"version":3,"file":"addBusinessAccountMember.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACf,MAAM,2BAA2B,CAAC;AAInC,KAAK,eAAe,GAAG;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,wBAAwB,qEAC+B,eAAe,WACzE,aAAa,KACpB,OAAO,CAAC,6BAA6B,GAAG,qBAAqB,CAsC/D,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import type { DynamicClient } from '../../../../client/types';
2
- import type { BusinessAccountActionRequired, BusinessAccountDetail } from '../businessAccounts.types';
2
+ import type { BusinessAccountActionRequired, BusinessAccountDetail, SignedBusinessAccountIntent } from '../businessAccounts.types';
3
3
  type AddWalletParams = {
4
+ autoExecute?: boolean;
4
5
  businessAccountId?: string;
6
+ signed?: SignedBusinessAccountIntent;
5
7
  walletId: string;
6
8
  };
7
9
  /**
@@ -15,14 +17,19 @@ type AddWalletParams = {
15
17
  *
16
18
  * When the account governs `linkWallet`, nothing is written and the 202 body is
17
19
  * returned instead — first the intent to sign, then the proposal collecting
18
- * approvals. Narrow it with `isBusinessAccountActionRequired`.
20
+ * approvals. Narrow it with `isBusinessAccountActionRequired`. Resend with
21
+ * `signed` (from `signBusinessAccountIntent`) to move past `INTENT_REQUIRED`.
19
22
  *
20
23
  * @param [params.businessAccountId] - The business account to link to; found-or-created when omitted.
21
24
  * @param params.walletId - The ID of the wallet to link.
25
+ * @param [params.autoExecute] - Whether to apply on the completing approval.
26
+ * Only meaningful on the first call.
27
+ * @param [params.signed] - A previously-signed intent, to resend past `INTENT_REQUIRED`.
22
28
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
23
29
  * @returns The updated business account detail, or the outstanding action required.
30
+ * @throws {UnexpectedConsentResponseError} When a governed account answers 202 with an unrecognized body.
24
31
  * @notInstrumented
25
32
  */
26
- export declare const addWalletToBusinessAccount: ({ businessAccountId, walletId }: AddWalletParams, client?: DynamicClient) => Promise<BusinessAccountActionRequired | BusinessAccountDetail>;
33
+ export declare const addWalletToBusinessAccount: ({ businessAccountId, walletId, autoExecute, signed }: AddWalletParams, client?: DynamicClient) => Promise<BusinessAccountActionRequired | BusinessAccountDetail>;
27
34
  export {};
28
35
  //# sourceMappingURL=addWalletToBusinessAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"addWalletToBusinessAccount.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,eAAe,GAAG;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B,oCACJ,eAAe,WACxC,aAAa,KACpB,OAAO,CAAC,6BAA6B,GAAG,qBAAqB,CA2C/D,CAAC"}
1
+ {"version":3,"file":"addWalletToBusinessAccount.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,2BAA2B,CAAC;AAInC,KAAK,eAAe,GAAG;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,0BAA0B,yDACiB,eAAe,WAC7D,aAAa,KACpB,OAAO,CAAC,6BAA6B,GAAG,qBAAqB,CAkC/D,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { DynamicClient } from '../../../../client/types';
2
+ import type { BusinessAccountProposal } from '../businessAccounts.types';
3
+ type ApproveProposalParams = {
4
+ businessAccountId: string;
5
+ proposal: BusinessAccountProposal;
6
+ };
7
+ /**
8
+ * Signs and records this session's approval of a pending proposal.
9
+ *
10
+ * The signature is over the intent AS STORED on `proposal`, which is why it's
11
+ * read off the proposal rather than rebuilt — a re-derived intent would carry
12
+ * a different `intentId` and fail verification. Run this signed in as the
13
+ * approver: the session key that signs is theirs, and the enclave reads who
14
+ * they are from the bearer token, not from any field here. An initiator can
15
+ * never approve their own proposal.
16
+ *
17
+ * With `autoExecute` on, the approval that completes the quorum also applies
18
+ * the change and the returned proposal reads `status: 'executed'` — the
19
+ * caller's cue to refresh the account rather than inferring readiness from
20
+ * the tally.
21
+ *
22
+ * @param params.businessAccountId - The business account the proposal belongs to.
23
+ * @param params.proposal - The proposal to approve, as returned by
24
+ * `listBusinessAccountProposals` or `getBusinessAccount`.
25
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
26
+ * @returns The proposal after recording this approval.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const pending = await listBusinessAccountProposals({ businessAccountId, status: 'pending' });
31
+ * const updated = await approveBusinessAccountProposal({ businessAccountId, proposal: pending[0] });
32
+ * if (updated.status === 'executed') {
33
+ * // refresh the account — the change is live
34
+ * }
35
+ * ```
36
+ *
37
+ * @see {@link vetoBusinessAccountProposal} for refusing a proposal instead.
38
+ * @see {@link executeBusinessAccountProposal} for applying a satisfied one with `autoExecute` off.
39
+ * @notInstrumented
40
+ */
41
+ export declare const approveBusinessAccountProposal: ({ businessAccountId, proposal }: ApproveProposalParams, client?: DynamicClient) => Promise<BusinessAccountProposal>;
42
+ export {};
43
+ //# sourceMappingURL=approveBusinessAccountProposal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approveBusinessAccountProposal.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,KAAK,qBAAqB,GAAG;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,uBAAuB,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,8BAA8B,oCACR,qBAAqB,WAC9C,aAAa,KACpB,OAAO,CAAC,uBAAuB,CAwBjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { approveBusinessAccountProposal } from './approveBusinessAccountProposal';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/approveBusinessAccountProposal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC"}