@dynamic-labs-sdk/client 1.19.1 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/dist/{updateAuthFromVerifyResponse-D4au3jUv.native.esm.js → NativeModuleNotLinkedError-Ds_t3AZQ.native.esm.js} +158 -27
  2. package/dist/NativeModuleNotLinkedError-Ds_t3AZQ.native.esm.js.map +1 -0
  3. package/dist/client/core/createCore/getInitialState.d.ts.map +1 -1
  4. package/dist/client/createDynamicClient/assertClientProps/assertClientProps.d.ts +16 -0
  5. package/dist/client/createDynamicClient/assertClientProps/assertClientProps.d.ts.map +1 -0
  6. package/dist/client/createDynamicClient/assertClientProps/index.d.ts +2 -0
  7. package/dist/client/createDynamicClient/assertClientProps/index.d.ts.map +1 -0
  8. package/dist/client/createDynamicClient/createDynamicClient.d.ts.map +1 -1
  9. package/dist/client/types/DynamicClientConfig.d.ts +88 -6
  10. package/dist/client/types/DynamicClientConfig.d.ts.map +1 -1
  11. package/dist/consumeMfaTokenIfRequiredForAction-CWVbmQ2A.cjs +17 -0
  12. package/dist/consumeMfaTokenIfRequiredForAction-CWVbmQ2A.cjs.map +1 -0
  13. package/dist/consumeMfaTokenIfRequiredForAction-C_IvLTH6.esm.js +12 -0
  14. package/dist/consumeMfaTokenIfRequiredForAction-C_IvLTH6.esm.js.map +1 -0
  15. package/dist/core.cjs +13 -12
  16. package/dist/core.cjs.map +1 -1
  17. package/dist/core.esm.js +6 -5
  18. package/dist/core.esm.js.map +1 -1
  19. package/dist/core.native.esm.js +5 -5
  20. package/dist/errors/WaasLoadFailedError.d.ts +45 -0
  21. package/dist/errors/WaasLoadFailedError.d.ts.map +1 -0
  22. package/dist/exports/index.d.ts +1 -0
  23. package/dist/exports/index.d.ts.map +1 -1
  24. package/dist/exports/waas.d.ts +10 -0
  25. package/dist/exports/waas.d.ts.map +1 -1
  26. package/dist/{getNetworkProviderFromNetworkId-DmH039jx.cjs → getNetworkProviderFromNetworkId-5V4Cf8A_.cjs} +150 -70
  27. package/dist/getNetworkProviderFromNetworkId-5V4Cf8A_.cjs.map +1 -0
  28. package/dist/{getNetworkProviderFromNetworkId-Ct6nH2tC.esm.js → getNetworkProviderFromNetworkId-DhS1snCk.esm.js} +149 -68
  29. package/dist/getNetworkProviderFromNetworkId-DhS1snCk.esm.js.map +1 -0
  30. package/dist/{getNetworkProviderFromNetworkId-DL6OXPUn.native.esm.js → getNetworkProviderFromNetworkId-DudGvTmd.native.esm.js} +151 -146
  31. package/dist/getNetworkProviderFromNetworkId-DudGvTmd.native.esm.js.map +1 -0
  32. package/dist/{getSignedSessionId-Dz4U61DG.cjs → getSignedSessionId-E6FIx5aj.cjs} +2 -17
  33. package/dist/getSignedSessionId-E6FIx5aj.cjs.map +1 -0
  34. package/dist/{getSignedSessionId-CPautem1.native.esm.js → getSignedSessionId-ekp3lswQ.esm.js} +3 -12
  35. package/dist/getSignedSessionId-ekp3lswQ.esm.js.map +1 -0
  36. package/dist/{getSignedSessionId-CAQwZYYk.esm.js → getSignedSessionId-xZGFa4nS.native.esm.js} +3 -3
  37. package/dist/{getSignedSessionId-CPautem1.native.esm.js.map → getSignedSessionId-xZGFa4nS.native.esm.js.map} +1 -1
  38. package/dist/{getWalletProviderByKey-CSVSMios.cjs → getWalletProviderByKey-BwivhTYu.cjs} +2 -2
  39. package/dist/{getWalletProviderByKey-CSVSMios.cjs.map → getWalletProviderByKey-BwivhTYu.cjs.map} +1 -1
  40. package/dist/{getWalletProviderByKey-DTBGx_qd.esm.js → getWalletProviderByKey-CS299i1V.esm.js} +2 -2
  41. package/dist/{getWalletProviderByKey-DTBGx_qd.esm.js.map → getWalletProviderByKey-CS299i1V.esm.js.map} +1 -1
  42. package/dist/{getWalletProviderByKey-BKveb5Rh.native.esm.js → getWalletProviderByKey-CYGDw6-5.native.esm.js} +2 -2
  43. package/dist/{getWalletProviderByKey-BKveb5Rh.native.esm.js.map → getWalletProviderByKey-CYGDw6-5.native.esm.js.map} +1 -1
  44. package/dist/index.cjs +58 -39
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.esm.js +36 -18
  47. package/dist/index.esm.js.map +1 -1
  48. package/dist/index.native.esm.js +36 -18
  49. package/dist/index.native.esm.js.map +1 -1
  50. package/dist/{isDynamicWaasEnabled-Dmbdiybh.cjs → isDynamicWaasEnabled-BEVAshnS.cjs} +2 -3
  51. package/dist/{isDynamicWaasEnabled-Dmbdiybh.cjs.map → isDynamicWaasEnabled-BEVAshnS.cjs.map} +1 -1
  52. package/dist/{isDynamicWaasEnabled-gu-9QF8-.native.esm.js → isDynamicWaasEnabled-C8Fb1xHn.native.esm.js} +2 -2
  53. package/dist/{isDynamicWaasEnabled-gu-9QF8-.native.esm.js.map → isDynamicWaasEnabled-C8Fb1xHn.native.esm.js.map} +1 -1
  54. package/dist/{isDynamicWaasEnabled-Bb9e8w3u.esm.js → isDynamicWaasEnabled-D5e2K02u.esm.js} +2 -2
  55. package/dist/{isDynamicWaasEnabled-Bb9e8w3u.esm.js.map → isDynamicWaasEnabled-D5e2K02u.esm.js.map} +1 -1
  56. package/dist/{isMfaRequiredForAction-BkrwKqo1.native.esm.js → isMfaRequiredForAction-A02NFVt8.esm.js} +3 -32
  57. package/dist/isMfaRequiredForAction-A02NFVt8.esm.js.map +1 -0
  58. package/dist/isMfaRequiredForAction-D4TSMQ4m.native.esm.js +77 -0
  59. package/dist/isMfaRequiredForAction-D4TSMQ4m.native.esm.js.map +1 -0
  60. package/dist/isMfaRequiredForAction-odpvykkm.cjs +94 -0
  61. package/dist/isMfaRequiredForAction-odpvykkm.cjs.map +1 -0
  62. package/dist/{isUserOnboardingComplete-CruwjMvs.cjs → isUserOnboardingComplete-CEVSIxJC.cjs} +49 -4
  63. package/dist/isUserOnboardingComplete-CEVSIxJC.cjs.map +1 -0
  64. package/dist/{isUserOnboardingComplete-DAesufca.esm.js → isUserOnboardingComplete-Cgkw21XZ.esm.js} +44 -4
  65. package/dist/isUserOnboardingComplete-Cgkw21XZ.esm.js.map +1 -0
  66. package/dist/{isUserOnboardingComplete-BLm0JQ_z.native.esm.js → isUserOnboardingComplete-CvQShE05.native.esm.js} +44 -4
  67. package/dist/{isUserOnboardingComplete-CruwjMvs.cjs.map → isUserOnboardingComplete-CvQShE05.native.esm.js.map} +1 -1
  68. package/dist/migrateFromFireblocks-BMtelH1a.native.esm.js +321 -0
  69. package/dist/migrateFromFireblocks-BMtelH1a.native.esm.js.map +1 -0
  70. package/dist/{migrateFromFireblocks-DrHwloUB.cjs → migrateFromFireblocks-CLUkVcFT.cjs} +54 -3
  71. package/dist/migrateFromFireblocks-CLUkVcFT.cjs.map +1 -0
  72. package/dist/{migrateFromFireblocks-Do4mQTl7.native.esm.js → migrateFromFireblocks-DcKrquTE.esm.js} +43 -4
  73. package/dist/migrateFromFireblocks-DcKrquTE.esm.js.map +1 -0
  74. package/dist/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.d.ts.map +1 -1
  75. package/dist/modules/storageSync/schema.d.ts +0 -2
  76. package/dist/modules/storageSync/schema.d.ts.map +1 -1
  77. package/dist/modules/storageSync/syncStateWithStorage/syncStateWithStorage.d.ts.map +1 -1
  78. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +25 -0
  79. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -0
  80. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/index.d.ts +2 -0
  81. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/index.d.ts.map +1 -0
  82. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +35 -0
  83. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -0
  84. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/index.d.ts +2 -0
  85. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/index.d.ts.map +1 -0
  86. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +19 -0
  87. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -0
  88. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/index.d.ts +2 -0
  89. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/index.d.ts.map +1 -0
  90. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +184 -0
  91. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -0
  92. package/dist/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.d.ts +16 -0
  93. package/dist/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.d.ts.map +1 -0
  94. package/dist/modules/waas/businessAccounts/createBusinessAccount/index.d.ts +2 -0
  95. package/dist/modules/waas/businessAccounts/createBusinessAccount/index.d.ts.map +1 -0
  96. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.d.ts +36 -0
  97. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.d.ts.map +1 -0
  98. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/index.d.ts +2 -0
  99. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/index.d.ts.map +1 -0
  100. package/dist/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.d.ts +15 -0
  101. package/dist/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.d.ts.map +1 -0
  102. package/dist/modules/waas/businessAccounts/getBusinessAccount/index.d.ts +2 -0
  103. package/dist/modules/waas/businessAccounts/getBusinessAccount/index.d.ts.map +1 -0
  104. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/getBusinessAccountsClient.d.ts +12 -0
  105. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/getBusinessAccountsClient.d.ts.map +1 -0
  106. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/index.d.ts +2 -0
  107. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/index.d.ts.map +1 -0
  108. package/dist/modules/waas/businessAccounts/listBusinessAccounts/index.d.ts +2 -0
  109. package/dist/modules/waas/businessAccounts/listBusinessAccounts/index.d.ts.map +1 -0
  110. package/dist/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.d.ts +10 -0
  111. package/dist/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.d.ts.map +1 -0
  112. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/index.d.ts +2 -0
  113. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/index.d.ts.map +1 -0
  114. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts +33 -0
  115. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts.map +1 -0
  116. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/index.d.ts +2 -0
  117. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/index.d.ts.map +1 -0
  118. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts +37 -0
  119. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts.map +1 -0
  120. package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
  121. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  122. package/dist/modules/waas/createWaasProvider/isWaasLoadExhaustionError.d.ts +11 -0
  123. package/dist/modules/waas/createWaasProvider/isWaasLoadExhaustionError.d.ts.map +1 -0
  124. package/dist/modules/waas/waas.types.d.ts +11 -0
  125. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  126. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts +4 -0
  127. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts.map +1 -1
  128. package/dist/modules/wallets/networks/networkDataSchema/index.d.ts +2 -0
  129. package/dist/modules/wallets/networks/networkDataSchema/index.d.ts.map +1 -0
  130. package/dist/modules/wallets/networks/networkDataSchema/networkDataSchema.d.ts +23 -0
  131. package/dist/modules/wallets/networks/networkDataSchema/networkDataSchema.d.ts.map +1 -0
  132. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts +2 -0
  133. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts.map +1 -1
  134. package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts +9 -1
  135. package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts.map +1 -1
  136. package/dist/services/keychain/createKeychainService/utils/withDatabase/withDatabase.d.ts +2 -1
  137. package/dist/services/keychain/createKeychainService/utils/withDatabase/withDatabase.d.ts.map +1 -1
  138. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  139. package/dist/{updateAuthFromVerifyResponse-CY0xTIXF.cjs → updateAuthFromVerifyResponse-CSqnGlh3.cjs} +427 -43
  140. package/dist/updateAuthFromVerifyResponse-CSqnGlh3.cjs.map +1 -0
  141. package/dist/{updateAuthFromVerifyResponse-inxvMWJB.esm.js → updateAuthFromVerifyResponse-C_YKKAIX.esm.js} +354 -27
  142. package/dist/updateAuthFromVerifyResponse-C_YKKAIX.esm.js.map +1 -0
  143. package/dist/utils/createTranslateRejection/createTranslateRejection.d.ts +29 -0
  144. package/dist/utils/createTranslateRejection/createTranslateRejection.d.ts.map +1 -0
  145. package/dist/utils/createTranslateRejection/index.d.ts +3 -0
  146. package/dist/utils/createTranslateRejection/index.d.ts.map +1 -0
  147. package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts +7 -5
  148. package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts.map +1 -1
  149. package/dist/utils/getNonce/getNonce.d.ts +10 -4
  150. package/dist/utils/getNonce/getNonce.d.ts.map +1 -1
  151. package/dist/utils/getNonce/noncePoolStorage/schema.d.ts +19 -0
  152. package/dist/utils/getNonce/noncePoolStorage/schema.d.ts.map +1 -0
  153. package/dist/utils/getNonce/noncePoolStorage/updateNoncePoolStorage/updateNoncePoolStorage.d.ts +18 -0
  154. package/dist/utils/getNonce/noncePoolStorage/updateNoncePoolStorage/updateNoncePoolStorage.d.ts.map +1 -0
  155. package/dist/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.d.ts.map +1 -1
  156. package/dist/utils/getNonce/state.d.ts +5 -9
  157. package/dist/utils/getNonce/state.d.ts.map +1 -1
  158. package/dist/waas.cjs +281 -18
  159. package/dist/waas.cjs.map +1 -1
  160. package/dist/waas.esm.js +273 -18
  161. package/dist/waas.esm.js.map +1 -1
  162. package/dist/waas.native.esm.js +272 -18
  163. package/dist/waas.native.esm.js.map +1 -1
  164. package/dist/waasCore.cjs +291 -170
  165. package/dist/waasCore.cjs.map +1 -1
  166. package/dist/waasCore.esm.js +285 -164
  167. package/dist/waasCore.esm.js.map +1 -1
  168. package/dist/waasCore.native.esm.js +273 -371
  169. package/dist/waasCore.native.esm.js.map +1 -1
  170. package/ios/DynamicClientScreenshotProtection.mm +70 -32
  171. package/package.json +5 -5
  172. package/dist/getNetworkProviderFromNetworkId-Ct6nH2tC.esm.js.map +0 -1
  173. package/dist/getNetworkProviderFromNetworkId-DL6OXPUn.native.esm.js.map +0 -1
  174. package/dist/getNetworkProviderFromNetworkId-DmH039jx.cjs.map +0 -1
  175. package/dist/getSignedSessionId-CAQwZYYk.esm.js.map +0 -1
  176. package/dist/getSignedSessionId-Dz4U61DG.cjs.map +0 -1
  177. package/dist/isMfaRequiredForAction-BkrwKqo1.native.esm.js.map +0 -1
  178. package/dist/isMfaRequiredForAction-CHeYEkjj.cjs +0 -430
  179. package/dist/isMfaRequiredForAction-CHeYEkjj.cjs.map +0 -1
  180. package/dist/isMfaRequiredForAction-DxJQm48x.esm.js +0 -343
  181. package/dist/isMfaRequiredForAction-DxJQm48x.esm.js.map +0 -1
  182. package/dist/isUserOnboardingComplete-BLm0JQ_z.native.esm.js.map +0 -1
  183. package/dist/isUserOnboardingComplete-DAesufca.esm.js.map +0 -1
  184. package/dist/migrateFromFireblocks-C-lXWvvo.esm.js +0 -65
  185. package/dist/migrateFromFireblocks-C-lXWvvo.esm.js.map +0 -1
  186. package/dist/migrateFromFireblocks-Do4mQTl7.native.esm.js.map +0 -1
  187. package/dist/migrateFromFireblocks-DrHwloUB.cjs.map +0 -1
  188. package/dist/updateAuthFromVerifyResponse-CY0xTIXF.cjs.map +0 -1
  189. package/dist/updateAuthFromVerifyResponse-D4au3jUv.native.esm.js.map +0 -1
  190. package/dist/updateAuthFromVerifyResponse-inxvMWJB.esm.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrateFromFireblocks-DcKrquTE.esm.js","names":["createWaasClient: CreateWaasClient","logoutWithReason","refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/modules/waas/createWaasClient/createWaasClient.ts","../src/modules/waas/getWaasChainNameFromChain/getWaasChainNameFromChain.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.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 type { AuthMode } from '@dynamic-labs-wallet/browser-wallet-client';\nimport { DynamicWalletClient } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { CLIENT_SDK_NAME } from '../../apiClient/constants';\nimport { logoutWithReason } from '../../auth/logoutWithReason';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { getSignedSessionId } from '../../sessionKeys/getSignedSessionId';\nimport type { CreateWaasClient } from './createWaasClient.types';\nimport {\n DEFAULT_WAAS_BASE_API_URL,\n DEFAULT_WAAS_BASE_MPC_RELAY_API_URL,\n} from '../constants';\n\n/** @notInstrumented */\nexport const createWaasClient: CreateWaasClient = ({ chainName }, client) => {\n const core = getCore(client);\n\n const additionalTrustedOrigins = core.waas?.additionalTrustedOrigins;\n\n const baseClientKeysharesRelayApiUrl =\n client.projectSettings?.sdk.waas?.customKeyshareRelayBaseUrl;\n\n return new DynamicWalletClient(\n {\n authMode: (isCookieEnabled(client) ? 'cookie' : 'header') as AuthMode,\n authToken: client.token || '',\n baseApiUrl: (core.apiBaseUrl || DEFAULT_WAAS_BASE_API_URL).replace(\n '/api/v0',\n ''\n ),\n baseMPCRelayApiUrl:\n client.projectSettings?.sdk.waas?.relayUrl ||\n DEFAULT_WAAS_BASE_MPC_RELAY_API_URL,\n chainName,\n // Opt into the SDK self-driving eager key-share recovery on auth-token\n // arrival, so the client no longer restores shares itself on login.\n eagerlyRecoverKeyShares: true,\n environmentId: core.environmentId,\n sdkVersion: `${CLIENT_SDK_NAME}/${core.version}`,\n ...(additionalTrustedOrigins == undefined\n ? {}\n : { additionalTrustedOrigins }),\n ...(baseClientKeysharesRelayApiUrl == undefined\n ? {}\n : { baseClientKeysharesRelayApiUrl }),\n ...(core.waas?.loadTimeoutMs == undefined\n ? {}\n : { iframeLoadTimeout: core.waas.loadTimeoutMs }),\n ...(core.waas?.maxLoadRetries == undefined\n ? {}\n : { maxRetryAttempts: core.waas.maxLoadRetries }),\n },\n {\n // Lets the iframe mint a fresh signed session id over the reverse channel,\n // which the SDK's eager key-share recovery needs.\n getSignedSessionId: () =>\n getSignedSessionId(client).then(({ signature }) => signature),\n // When the WaaS iframe's own backend call returns 401 (e.g. a forcibly\n // revoked token), the iframe notifies the host via the reverse channel\n // and this fires — log the user out. Mirrors the session-expiry\n // middleware that covers the SDK's own direct API 401s.\n onUnauthorized: () => {\n void logoutWithReason(\n { reason: 'session-refresh-unauthorized' },\n client\n ).catch((error) => {\n core.logger.error(\n 'Failed to log out after WaaS unauthorized response',\n error\n );\n });\n },\n }\n );\n};\n","import type { Chain } from '../../chain';\nimport { CHAINS_INFO_MAP } from '../../wallets/constants';\n\n/** @notInstrumented */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const getWaasChainNameFromChain = (chain: Chain): string => {\n return CHAINS_INFO_MAP[chain].waasChainNameOverride || chain;\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 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;;;;;;;ACCN,MAAaA,oBAAsC,EAAE,aAAa,WAAW;CAC3E,MAAM,OAAO,QAAQ,OAAO;CAE5B,MAAM,2BAA2B,KAAK,MAAM;CAE5C,MAAM,iCACJ,OAAO,iBAAiB,IAAI,MAAM;AAEpC,QAAO,IAAI,oBACT;EACE,UAAW,gBAAgB,OAAO,GAAG,WAAW;EAChD,WAAW,OAAO,SAAS;EAC3B,aAAa,KAAK,cAAc,2BAA2B,QACzD,WACA,GACD;EACD,oBACE,OAAO,iBAAiB,IAAI,MAAM,YAClC;EACF;EAGA,yBAAyB;EACzB,eAAe,KAAK;EACpB,YAAY,GAAG,gBAAgB,GAAG,KAAK;EACvC,GAAI,4BAA4B,SAC5B,EAAE,GACF,EAAE,0BAA0B;EAChC,GAAI,kCAAkC,SAClC,EAAE,GACF,EAAE,gCAAgC;EACtC,GAAI,KAAK,MAAM,iBAAiB,SAC5B,EAAE,GACF,EAAE,mBAAmB,KAAK,KAAK,eAAe;EAClD,GAAI,KAAK,MAAM,kBAAkB,SAC7B,EAAE,GACF,EAAE,kBAAkB,KAAK,KAAK,gBAAgB;EACnD,EACD;EAGE,0BACE,mBAAmB,OAAO,CAAC,MAAM,EAAE,gBAAgB,UAAU;EAK/D,sBAAsB;AACpB,GAAKC,2BACH,EAAE,QAAQ,gCAAgC,EAC1C,OACD,CAAC,OAAO,UAAU;AACjB,SAAK,OAAO,MACV,sDACA,MACD;KACD;;EAEL,CACF;;;;;;ACrEH,MAAa,6BAA6B,UAAyB;AACjE,QAAO,gBAAgB,OAAO,yBAAyB;;;;;;ACMzD,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;;;;;;;;;;;;;;;;;;;;;;;ACgCT,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,OAAMC,sBAAY,OAAO;AAEzB,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"hydrateStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,uBAAuB;AACvB,eAAO,MAAM,uBAAuB,WAC1B,aAAa,KACpB,OAAO,CAAC,IAAI,CAiEd,CAAC"}
1
+ {"version":3,"file":"hydrateStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,uBAAuB;AACvB,eAAO,MAAM,uBAAuB,WAC1B,aAAa,KACpB,OAAO,CAAC,IAAI,CA4Dd,CAAC"}
@@ -1,8 +1,6 @@
1
1
  import type { ProjectSettings, SdkUser } from '@dynamic-labs/sdk-api-core';
2
2
  export declare const stateStorageKeySchema: import("../../services/storage").StorageKeySchema<{
3
3
  apiVersion: string;
4
- prefetchedNonces: string[];
5
- prefetchedNoncesExpiration: number | null;
6
4
  projectSettings: ProjectSettings | null;
7
5
  unverifiedWalletAccounts: {
8
6
  address: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/storageSync/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;EAWhC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EA4DlC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/storageSync/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAShC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EA4DlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"syncStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/syncStateWithStorage/syncStateWithStorage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,uBAAuB;AACvB,eAAO,MAAM,oBAAoB,WAAY,aAAa,SAmCzD,CAAC"}
1
+ {"version":3,"file":"syncStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/syncStateWithStorage/syncStateWithStorage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,uBAAuB;AACvB,eAAO,MAAM,oBAAoB,WAAY,aAAa,SAqCzD,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { BusinessAccountMember, BusinessAccountMemberRole, BusinessAccountSignerIdentifierType } from '../businessAccounts.types';
2
+ type AddMemberParams = {
3
+ businessAccountId: string;
4
+ identifier?: string;
5
+ identifierType?: BusinessAccountSignerIdentifierType;
6
+ role?: BusinessAccountMemberRole;
7
+ userId?: string;
8
+ };
9
+ /**
10
+ * Adds a member to an existing business account. Identify the target by a known
11
+ * `userId`, or by `identifier` + `identifierType` (e.g. an email — the user is
12
+ * created if absent).
13
+ *
14
+ * @param params.businessAccountId - The ID of the business account.
15
+ * @param [params.userId] - The ID of the user to add as a member.
16
+ * @param [params.identifier] - The identifier value (e.g. an email address).
17
+ * @param [params.identifierType] - The identifier type (e.g. `email`).
18
+ * @param [params.role] - The member role (`admin` or `viewer`). Defaults server-side.
19
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
20
+ * @returns The created business account member.
21
+ * @notInstrumented
22
+ */
23
+ export declare const addBusinessAccountMember: ({ businessAccountId, userId, identifier, identifierType, role, }: AddMemberParams, client?: import("../../../../exports").DynamicClient) => Promise<BusinessAccountMember>;
24
+ export {};
25
+ //# sourceMappingURL=addBusinessAccountMember.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addBusinessAccountMember.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,mCAAmC,EACpC,MAAM,2BAA2B,CAAC;AAGnC,KAAK,eAAe,GAAG;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,mCAAmC,CAAC;IACrD,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,qEAOhC,eAAe,2DAEjB,OAAO,CAAC,qBAAqB,CAU/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { addBusinessAccountMember } from './addBusinessAccountMember';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addBusinessAccountMember/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { WalletAccount } from '../../../wallets/walletAccount';
2
+ import type { BusinessAccountSignerType, TargetSignerIdentity } from '../businessAccounts.types';
3
+ type AddSignerParams = {
4
+ businessAccountId?: string;
5
+ password?: string;
6
+ signerType?: BusinessAccountSignerType;
7
+ targetSignerIdentity: TargetSignerIdentity;
8
+ walletAccount: WalletAccount;
9
+ walletId?: string;
10
+ };
11
+ /**
12
+ * Adds a signer to a business-account wallet via the reshare ceremony, minting
13
+ * the new signer's share set. Identify the target by `userId`, or `identifier`
14
+ * + `identifierType` (the user is created if absent).
15
+ *
16
+ * Omit `businessAccountId` to add a signer to a wallet that isn't in a business
17
+ * account yet: the wallet's per-account is found-or-created first (idempotent —
18
+ * converts the personal wallet, seating its owner as the first signer), then
19
+ * the new signer is reshared in.
20
+ *
21
+ * @param params.walletAccount - The wallet account to add the signer to.
22
+ * @param [params.businessAccountId] - The business account; found-or-created when omitted.
23
+ * @param [params.walletId] - The wallet UUID to link when finding-or-creating; defaults to `walletAccount.verifiedCredentialId`.
24
+ * @param params.targetSignerIdentity - The signer to add (userId, or identifier + identifierType).
25
+ * @param [params.signerType] - `endUser` (default) or `server`.
26
+ * @param [params.password] - Password for the reshare, if the wallet is password-encrypted.
27
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
28
+ * @returns The new signer's share set id.
29
+ * @notInstrumented
30
+ */
31
+ export declare const addBusinessAccountSigner: ({ walletAccount, businessAccountId, walletId, targetSignerIdentity, signerType, password, }: AddSignerParams, client?: import("../../../../exports").DynamicClient) => Promise<{
32
+ shareSetId: string;
33
+ }>;
34
+ export {};
35
+ //# sourceMappingURL=addBusinessAccountSigner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addBusinessAccountSigner.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAGnC,KAAK,eAAe,GAAG;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB,gGAQhC,eAAe,2DAEjB,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAgDhC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { addBusinessAccountSigner } from './addBusinessAccountSigner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addBusinessAccountSigner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { BusinessAccountDetail } from '../businessAccounts.types';
2
+ type AddWalletParams = {
3
+ businessAccountId?: string;
4
+ walletId: string;
5
+ };
6
+ /**
7
+ * Links an existing wallet to a business account. Omit `businessAccountId` to
8
+ * find-or-create the per-wallet business account (the server seats the wallet's
9
+ * owner as the first member/signer).
10
+ *
11
+ * @param [params.businessAccountId] - The business account to link to; found-or-created when omitted.
12
+ * @param params.walletId - The ID of the wallet to link.
13
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
14
+ * @returns The updated business account detail.
15
+ * @notInstrumented
16
+ */
17
+ export declare const addWalletToBusinessAccount: ({ businessAccountId, walletId }: AddWalletParams, client?: import("../../../../exports").DynamicClient) => Promise<BusinessAccountDetail>;
18
+ export {};
19
+ //# sourceMappingURL=addWalletToBusinessAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addWalletToBusinessAccount.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,KAAK,eAAe,GAAG;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,oCACJ,eAAe,2DAE/C,OAAO,CAAC,qBAAqB,CAO/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { addWalletToBusinessAccount } from './addWalletToBusinessAccount';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/addWalletToBusinessAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * A business account — the top-level container that groups members (users who
3
+ * can manage the account), signers (identities that hold key shares for the
4
+ * account's wallets), and the wallets themselves. This is the summary shape
5
+ * returned by list/create operations; fetch a single account with
6
+ * `getBusinessAccount` to get the fully-expanded `BusinessAccountDetail`.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const account: BusinessAccount = await createBusinessAccount({
11
+ * request: { name: 'Acme Treasury' },
12
+ * });
13
+ * console.log(account.id, account.name);
14
+ * ```
15
+ *
16
+ * @see BusinessAccountDetail
17
+ * @see createBusinessAccount
18
+ * @see listBusinessAccounts
19
+ */
20
+ export type BusinessAccount = {
21
+ createdAt?: Date;
22
+ externalRef?: string | null;
23
+ id: string;
24
+ metadata?: object;
25
+ name?: string | null;
26
+ projectEnvironmentId: string;
27
+ updatedAt?: Date;
28
+ };
29
+ /**
30
+ * A member of a business account: a user granted a management `role` on the
31
+ * account (`owner` / `admin` / `viewer`). Members control the account; they are
32
+ * distinct from signers, which hold the key shares used to sign transactions.
33
+ * Returned in `BusinessAccountDetail.members` and by `addBusinessAccountMember`.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const member: BusinessAccountMember = await addBusinessAccountMember({
38
+ * businessAccountId: account.id,
39
+ * identifier: 'ops@acme.example',
40
+ * identifierType: 'email',
41
+ * role: 'admin',
42
+ * });
43
+ * console.log(member.userId, member.role);
44
+ * ```
45
+ *
46
+ * @see BusinessAccountDetail
47
+ * @see BusinessAccountMemberRole
48
+ * @see addBusinessAccountMember
49
+ */
50
+ export type BusinessAccountMember = {
51
+ addedByUserId?: string | null;
52
+ businessAccountId: string;
53
+ createdAt?: Date;
54
+ id: string;
55
+ role: string;
56
+ userId: string;
57
+ };
58
+ /**
59
+ * A signer attached to a business account's wallet: an identity (`endUser` or
60
+ * `server`) that holds a key share (`shareSetId`) for a specific `walletId` and
61
+ * can therefore participate in signing. Signers are distinct from members —
62
+ * a signer signs, a member administers. Returned in
63
+ * `BusinessAccountDetail.signers` and by `addBusinessAccountSigner`.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const detail: BusinessAccountDetail = await getBusinessAccount({
68
+ * businessAccountId: account.id,
69
+ * });
70
+ * const signer: BusinessAccountSigner | undefined = detail.signers[0];
71
+ * console.log(signer?.walletId, signer?.type);
72
+ * ```
73
+ *
74
+ * @see BusinessAccountDetail
75
+ * @see BusinessAccountSignerType
76
+ * @see addBusinessAccountSigner
77
+ */
78
+ export type BusinessAccountSigner = {
79
+ businessAccountId: string;
80
+ createdAt?: Date;
81
+ id: string;
82
+ shareSetId?: string | null;
83
+ type: string;
84
+ userId?: string | null;
85
+ walletId: string;
86
+ };
87
+ /**
88
+ * A compact summary of a wallet owned by a business account: just the wallet
89
+ * `id`, its `chain`, and its `publicKey` (the on-chain address). Embedded in
90
+ * `BusinessAccountDetail.wallets`; use `addWalletToBusinessAccount` to attach a
91
+ * wallet to an account.
92
+ *
93
+ * @example
94
+ * ```ts
95
+ * const detail: BusinessAccountDetail = await getBusinessAccount({
96
+ * businessAccountId: account.id,
97
+ * });
98
+ * const wallet: BusinessAccountWalletSummary | undefined = detail.wallets?.[0];
99
+ * console.log(wallet?.chain, wallet?.publicKey);
100
+ * ```
101
+ *
102
+ * @see BusinessAccountDetail
103
+ * @see addWalletToBusinessAccount
104
+ */
105
+ export type BusinessAccountWalletSummary = {
106
+ chain: string;
107
+ id: string;
108
+ publicKey: string;
109
+ };
110
+ /**
111
+ * The fully-expanded view of a single business account: everything on
112
+ * `BusinessAccount` plus its embedded `members`, `signers`, and (optionally)
113
+ * `wallets`. Returned by `getBusinessAccount` and by the mutating operations
114
+ * that need to hand back the refreshed account state (e.g.
115
+ * `addWalletToBusinessAccount`).
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * const detail: BusinessAccountDetail = await getBusinessAccount({
120
+ * businessAccountId: account.id,
121
+ * });
122
+ * console.log(detail.members.length, detail.signers.length);
123
+ * ```
124
+ *
125
+ * @see BusinessAccount
126
+ * @see getBusinessAccount
127
+ * @see addWalletToBusinessAccount
128
+ */
129
+ export type BusinessAccountDetail = BusinessAccount & {
130
+ members: BusinessAccountMember[];
131
+ signers: BusinessAccountSigner[];
132
+ wallets?: BusinessAccountWalletSummary[];
133
+ };
134
+ /**
135
+ * A page of business accounts: the `items` for the current page plus an
136
+ * optional `nextCursor` to fetch the following page. This is the shape returned
137
+ * by `listBusinessAccounts`; each item is a summary `BusinessAccount`.
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * const page: BusinessAccountList = await listBusinessAccounts();
142
+ * for (const account of page.items ?? []) {
143
+ * console.log(account.id, account.name);
144
+ * }
145
+ * ```
146
+ *
147
+ * @see BusinessAccount
148
+ * @see listBusinessAccounts
149
+ */
150
+ export type BusinessAccountList = {
151
+ items?: BusinessAccount[];
152
+ nextCursor?: string;
153
+ };
154
+ export type BusinessAccountMemberRole = 'owner' | 'admin' | 'viewer';
155
+ export type BusinessAccountSignerType = 'endUser' | 'server';
156
+ export type BusinessAccountSignerIdentifierType = 'email' | 'phoneNumber' | 'externalUserId' | 'socialUsername' | 'socialAccountId' | 'id';
157
+ export type TargetSignerIdentity = {
158
+ identifier?: string;
159
+ identifierType?: BusinessAccountSignerIdentifierType;
160
+ userId?: string;
161
+ };
162
+ export type BusinessAccountsApi = {
163
+ addMember: (params: {
164
+ businessAccountId: string;
165
+ identifier?: string;
166
+ identifierType?: BusinessAccountSignerIdentifierType;
167
+ role?: BusinessAccountMemberRole;
168
+ userId?: string;
169
+ }) => Promise<BusinessAccountMember>;
170
+ addWalletToBusinessAccount: (params: {
171
+ businessAccountId?: string;
172
+ walletId: string;
173
+ }) => Promise<BusinessAccountDetail>;
174
+ createBusinessAccount: (args?: {
175
+ request?: {
176
+ name?: string | null;
177
+ };
178
+ }) => Promise<BusinessAccount>;
179
+ getBusinessAccount: (params: {
180
+ businessAccountId: string;
181
+ }) => Promise<BusinessAccountDetail>;
182
+ listBusinessAccounts: () => Promise<BusinessAccountList>;
183
+ };
184
+ //# sourceMappingURL=businessAccounts.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"businessAccounts.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/businessAccounts/businessAccounts.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG;IACpD,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,4BAA4B,EAAE,CAAC;CAC1C,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7D,MAAM,MAAM,mCAAmC,GAC3C,OAAO,GACP,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,IAAI,CAAC;AAIT,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,mCAAmC,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,CAAC,MAAM,EAAE;QAClB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,mCAAmC,CAAC;QACrD,IAAI,CAAC,EAAE,yBAAyB,CAAC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrC,0BAA0B,EAAE,CAAC,MAAM,EAAE;QACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrC,qBAAqB,EAAE,CAAC,IAAI,CAAC,EAAE;QAC7B,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;KACpC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/B,kBAAkB,EAAE,CAAC,MAAM,EAAE;QAC3B,iBAAiB,EAAE,MAAM,CAAC;KAC3B,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrC,oBAAoB,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC1D,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { BusinessAccount } from '../businessAccounts.types';
2
+ type CreateBusinessAccountParams = {
3
+ name?: string;
4
+ };
5
+ /**
6
+ * Creates a new business account.
7
+ *
8
+ * @param [params] - Optional parameters for the business account.
9
+ * @param [params.name] - Optional name for the business account.
10
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
11
+ * @returns The created business account.
12
+ * @notInstrumented
13
+ */
14
+ export declare const createBusinessAccount: (params?: CreateBusinessAccountParams, client?: import("../../../../exports").DynamicClient) => Promise<BusinessAccount>;
15
+ export {};
16
+ //# sourceMappingURL=createBusinessAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createBusinessAccount.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,KAAK,2BAA2B,GAAG;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,YACvB,2BAA2B,2DAEnC,OAAO,CAAC,eAAe,CAMzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createBusinessAccount } from './createBusinessAccount';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/createBusinessAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { Chain } from '../../../chain';
2
+ import type { ThresholdSignatureScheme } from '../../waas.types';
3
+ type CreateWalletForBusinessAccountParams = {
4
+ businessAccountId: string;
5
+ chain: Chain;
6
+ password?: string;
7
+ thresholdSignatureScheme?: ThresholdSignatureScheme;
8
+ };
9
+ /**
10
+ * Creates a WaaS wallet account owned directly by a business account, in one
11
+ * step — the server seats the wallet's signer row against the business account
12
+ * as it is minted, so no separate link call is needed.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const wallet = await createWalletForBusinessAccount({
17
+ * businessAccountId: 'ba-1',
18
+ * chain: 'EVM',
19
+ * });
20
+ * ```
21
+ *
22
+ * @param params.businessAccountId - The business account that will own the wallet.
23
+ * @param params.chain - The chain to create the wallet account for.
24
+ * @param [params.password] - Optional password used to encrypt the user share.
25
+ * @param [params.thresholdSignatureScheme] - The threshold signature scheme to use. (Default: TWO_OF_TWO)
26
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
27
+ * @returns The created wallet account.
28
+ * @notInstrumented
29
+ */
30
+ export declare const createWalletForBusinessAccount: ({ businessAccountId, chain, password, thresholdSignatureScheme, }: CreateWalletForBusinessAccountParams, client?: import("../../../../exports").DynamicClient) => Promise<{
31
+ accountAddress: string;
32
+ publicKeyHex: string;
33
+ rawPublicKey: string | Uint8Array | undefined;
34
+ }>;
35
+ export {};
36
+ //# sourceMappingURL=createWalletForBusinessAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createWalletForBusinessAccount.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,KAAK,oCAAoC,GAAG;IAC1C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,8BAA8B,sEAMtC,oCAAoC;;;;EAUxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createWalletForBusinessAccount } from './createWalletForBusinessAccount';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/createWalletForBusinessAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { BusinessAccountDetail } from '../businessAccounts.types';
2
+ type GetBusinessAccountParams = {
3
+ businessAccountId: string;
4
+ };
5
+ /**
6
+ * Retrieves a business account by ID, including its members, signers, and wallets.
7
+ *
8
+ * @param params.businessAccountId - The ID of the business account to retrieve.
9
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
10
+ * @returns The business account with its members, signers, and wallets.
11
+ * @notInstrumented
12
+ */
13
+ export declare const getBusinessAccount: ({ businessAccountId }: GetBusinessAccountParams, client?: import("../../../../exports").DynamicClient) => Promise<BusinessAccountDetail>;
14
+ export {};
15
+ //# sourceMappingURL=getBusinessAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBusinessAccount.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,KAAK,wBAAwB,GAAG;IAC9B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,0BACN,wBAAwB,2DAE9C,OAAO,CAAC,qBAAqB,CAI/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getBusinessAccount } from './getBusinessAccount';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/getBusinessAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { DynamicClient } from '../../../../client/types/DynamicClient';
2
+ import type { BusinessAccountsApi } from '../businessAccounts.types';
3
+ /**
4
+ * Returns the business accounts API client for the first enabled WaaS chain.
5
+ *
6
+ * @param client - The Dynamic client instance.
7
+ * @returns The business accounts API client.
8
+ * @throws {InvalidParamError} When no WaaS chain configuration is enabled for the project.
9
+ * @notInstrumented
10
+ */
11
+ export declare const getBusinessAccountsClient: (client: DynamicClient) => BusinessAccountsApi;
12
+ //# sourceMappingURL=getBusinessAccountsClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBusinessAccountsClient.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/getBusinessAccountsClient/getBusinessAccountsClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAM5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,WAC5B,aAAa,KACpB,mBAyBF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getBusinessAccountsClient } from './getBusinessAccountsClient';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/getBusinessAccountsClient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { listBusinessAccounts } from './listBusinessAccounts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/listBusinessAccounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { BusinessAccountList } from '../businessAccounts.types';
2
+ /**
3
+ * Lists all business accounts for the current project environment.
4
+ *
5
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
6
+ * @returns A paginated list of business accounts.
7
+ * @notInstrumented
8
+ */
9
+ export declare const listBusinessAccounts: (client?: import("../../../../exports").DynamicClient) => Promise<BusinessAccountList>;
10
+ //# sourceMappingURL=listBusinessAccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listBusinessAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGrE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,4DAE9B,OAAO,CAAC,mBAAmB,CAI7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { removeBusinessAccountMember } from './removeBusinessAccountMember';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/removeBusinessAccountMember/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { DynamicClient } from '../../../../client/types';
2
+ import type { BusinessAccountMember } from '../businessAccounts.types';
3
+ type RemoveMemberParams = {
4
+ businessAccountId: string;
5
+ userId: string;
6
+ };
7
+ /**
8
+ * Removes a member from a business account. Any signer rows the member held on
9
+ * the account's wallets are torn down as part of the removal. The backend
10
+ * refuses to remove the account's last owner.
11
+ *
12
+ * @param params.businessAccountId - The business account to remove the member from.
13
+ * @param params.userId - The id of the user to remove.
14
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
15
+ * @returns The removed member.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const detail = await getBusinessAccount({ businessAccountId });
20
+ * const member = detail.members[0];
21
+ * await removeBusinessAccountMember({
22
+ * businessAccountId,
23
+ * userId: member.userId,
24
+ * });
25
+ * ```
26
+ *
27
+ * @see addBusinessAccountMember
28
+ * @see getBusinessAccount
29
+ * @notInstrumented
30
+ */
31
+ export declare const removeBusinessAccountMember: ({ businessAccountId, userId }: RemoveMemberParams, client?: DynamicClient) => Promise<BusinessAccountMember>;
32
+ export {};
33
+ //# sourceMappingURL=removeBusinessAccountMember.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"removeBusinessAccountMember.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,KAAK,kBAAkB,GAAG;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,2BAA2B,kCACP,kBAAkB,WACzC,aAAa,KACpB,OAAO,CAAC,qBAAqB,CAW/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { removeBusinessAccountSigner } from './removeBusinessAccountSigner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/removeBusinessAccountSigner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { DynamicClient } from '../../../../client/types';
2
+ import type { BusinessAccountSigner } from '../businessAccounts.types';
3
+ type RemoveSignerParams = {
4
+ businessAccountId: string;
5
+ signerId: string;
6
+ walletId: string;
7
+ };
8
+ /**
9
+ * Removes a signer from a business-account wallet. This detaches the signer's
10
+ * share set from the wallet — it does not run an MPC ceremony — so the removed
11
+ * identity can no longer sign for that wallet. The backend refuses to remove
12
+ * the last remaining signer on a wallet.
13
+ *
14
+ * @param params.businessAccountId - The business account the wallet belongs to.
15
+ * @param params.walletId - The wallet the signer is attached to.
16
+ * @param params.signerId - The id of the signer to remove (`BusinessAccountSigner.id`).
17
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
18
+ * @returns The removed signer.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const detail = await getBusinessAccount({ businessAccountId });
23
+ * const signer = detail.signers[0];
24
+ * await removeBusinessAccountSigner({
25
+ * businessAccountId,
26
+ * walletId: signer.walletId,
27
+ * signerId: signer.id,
28
+ * });
29
+ * ```
30
+ *
31
+ * @see addBusinessAccountSigner
32
+ * @see getBusinessAccount
33
+ * @notInstrumented
34
+ */
35
+ export declare const removeBusinessAccountSigner: ({ businessAccountId, walletId, signerId }: RemoveSignerParams, client?: DynamicClient) => Promise<BusinessAccountSigner>;
36
+ export {};
37
+ //# sourceMappingURL=removeBusinessAccountSigner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"removeBusinessAccountSigner.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,KAAK,kBAAkB,GAAG;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,2BAA2B,8CACK,kBAAkB,WACrD,aAAa,KACpB,OAAO,CAAC,qBAAqB,CAY/B,CAAC"}