@dynamic-labs-sdk/client 1.20.0 → 1.21.1

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 (165) hide show
  1. package/dist/{updateAuthFromVerifyResponse-DGrmo9MJ.native.esm.js → NativeModuleNotLinkedError-DsfdAti9.native.esm.js} +33 -4
  2. package/dist/NativeModuleNotLinkedError-DsfdAti9.native.esm.js.map +1 -0
  3. package/dist/client/createDynamicClient/assertClientProps/assertClientProps.d.ts +16 -0
  4. package/dist/client/createDynamicClient/assertClientProps/assertClientProps.d.ts.map +1 -0
  5. package/dist/client/createDynamicClient/assertClientProps/index.d.ts +2 -0
  6. package/dist/client/createDynamicClient/assertClientProps/index.d.ts.map +1 -0
  7. package/dist/client/createDynamicClient/createDynamicClient.d.ts.map +1 -1
  8. package/dist/client/types/DynamicClientConfig.d.ts +35 -0
  9. package/dist/client/types/DynamicClientConfig.d.ts.map +1 -1
  10. package/dist/consumeMfaTokenIfRequiredForAction-CblIF3QS.esm.js +12 -0
  11. package/dist/consumeMfaTokenIfRequiredForAction-CblIF3QS.esm.js.map +1 -0
  12. package/dist/consumeMfaTokenIfRequiredForAction-CrdEGCJs.cjs +17 -0
  13. package/dist/consumeMfaTokenIfRequiredForAction-CrdEGCJs.cjs.map +1 -0
  14. package/dist/core.cjs +9 -8
  15. package/dist/core.cjs.map +1 -1
  16. package/dist/core.esm.js +6 -5
  17. package/dist/core.esm.js.map +1 -1
  18. package/dist/core.native.esm.js +5 -5
  19. package/dist/errors/WaasLoadFailedError.d.ts +45 -0
  20. package/dist/errors/WaasLoadFailedError.d.ts.map +1 -0
  21. package/dist/exports/index.d.ts +1 -0
  22. package/dist/exports/index.d.ts.map +1 -1
  23. package/dist/exports/waas.d.ts +10 -0
  24. package/dist/exports/waas.d.ts.map +1 -1
  25. package/dist/{getNetworkProviderFromNetworkId-xmoBE1cZ.native.esm.js → getNetworkProviderFromNetworkId-CA5-rcb9.native.esm.js} +2 -3
  26. package/dist/{getNetworkProviderFromNetworkId-xmoBE1cZ.native.esm.js.map → getNetworkProviderFromNetworkId-CA5-rcb9.native.esm.js.map} +1 -1
  27. package/dist/{getNetworkProviderFromNetworkId-DaVOUpiF.cjs → getNetworkProviderFromNetworkId-DksFqRIB.cjs} +48 -13
  28. package/dist/getNetworkProviderFromNetworkId-DksFqRIB.cjs.map +1 -0
  29. package/dist/{getNetworkProviderFromNetworkId-BlBx4Zh2.esm.js → getNetworkProviderFromNetworkId-DlOQ94mF.esm.js} +48 -13
  30. package/dist/getNetworkProviderFromNetworkId-DlOQ94mF.esm.js.map +1 -0
  31. package/dist/{getSignedSessionId-BVc-sgeN.esm.js → getSignedSessionId-BHGXB2ZS.native.esm.js} +3 -3
  32. package/dist/{getSignedSessionId-DlmNVy-g.native.esm.js.map → getSignedSessionId-BHGXB2ZS.native.esm.js.map} +1 -1
  33. package/dist/{getSignedSessionId-3L_aMxVD.cjs → getSignedSessionId-BWTQMtk6.cjs} +2 -17
  34. package/dist/getSignedSessionId-BWTQMtk6.cjs.map +1 -0
  35. package/dist/{getSignedSessionId-DlmNVy-g.native.esm.js → getSignedSessionId-C4igTuKk.esm.js} +3 -12
  36. package/dist/getSignedSessionId-C4igTuKk.esm.js.map +1 -0
  37. package/dist/{getWalletProviderByKey-BilyW5Jr.cjs → getWalletProviderByKey--ChkWHSF.cjs} +2 -2
  38. package/dist/{getWalletProviderByKey-BilyW5Jr.cjs.map → getWalletProviderByKey--ChkWHSF.cjs.map} +1 -1
  39. package/dist/{getWalletProviderByKey-PIO1ygzj.esm.js → getWalletProviderByKey-CXC1EXpO.esm.js} +2 -2
  40. package/dist/{getWalletProviderByKey-PIO1ygzj.esm.js.map → getWalletProviderByKey-CXC1EXpO.esm.js.map} +1 -1
  41. package/dist/{getWalletProviderByKey-Ccx26JsF.native.esm.js → getWalletProviderByKey-CeY5t5tY.native.esm.js} +2 -2
  42. package/dist/{getWalletProviderByKey-Ccx26JsF.native.esm.js.map → getWalletProviderByKey-CeY5t5tY.native.esm.js.map} +1 -1
  43. package/dist/index.cjs +48 -20
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.esm.js +34 -7
  46. package/dist/index.esm.js.map +1 -1
  47. package/dist/index.native.esm.js +34 -7
  48. package/dist/index.native.esm.js.map +1 -1
  49. package/dist/{isDynamicWaasEnabled-C4oPJ0fw.native.esm.js → isDynamicWaasEnabled-CsNM4kzO.native.esm.js} +2 -2
  50. package/dist/{isDynamicWaasEnabled-C4oPJ0fw.native.esm.js.map → isDynamicWaasEnabled-CsNM4kzO.native.esm.js.map} +1 -1
  51. package/dist/{isDynamicWaasEnabled-JpnXC0f7.esm.js → isDynamicWaasEnabled-DwY38pjA.esm.js} +2 -2
  52. package/dist/{isDynamicWaasEnabled-JpnXC0f7.esm.js.map → isDynamicWaasEnabled-DwY38pjA.esm.js.map} +1 -1
  53. package/dist/{isDynamicWaasEnabled-DXVcXa66.cjs → isDynamicWaasEnabled-v7x1B-0g.cjs} +2 -2
  54. package/dist/{isDynamicWaasEnabled-DXVcXa66.cjs.map → isDynamicWaasEnabled-v7x1B-0g.cjs.map} +1 -1
  55. package/dist/{isMfaRequiredForAction-D6rt_Tzn.native.esm.js → isMfaRequiredForAction-C-wDmRZj.native.esm.js} +3 -32
  56. package/dist/isMfaRequiredForAction-C-wDmRZj.native.esm.js.map +1 -0
  57. package/dist/isMfaRequiredForAction-C_a46AcW.esm.js +77 -0
  58. package/dist/isMfaRequiredForAction-C_a46AcW.esm.js.map +1 -0
  59. package/dist/isMfaRequiredForAction-m43LQlLi.cjs +94 -0
  60. package/dist/isMfaRequiredForAction-m43LQlLi.cjs.map +1 -0
  61. package/dist/{isUserOnboardingComplete-diGA1wlX.esm.js → isUserOnboardingComplete-CUZO4avc.esm.js} +44 -4
  62. package/dist/isUserOnboardingComplete-CUZO4avc.esm.js.map +1 -0
  63. package/dist/{isUserOnboardingComplete-DnExOJu7.native.esm.js → isUserOnboardingComplete-CzyupoSE.native.esm.js} +44 -4
  64. package/dist/{isUserOnboardingComplete-CsoV3ae7.cjs.map → isUserOnboardingComplete-CzyupoSE.native.esm.js.map} +1 -1
  65. package/dist/{isUserOnboardingComplete-CsoV3ae7.cjs → isUserOnboardingComplete-D_O53a98.cjs} +49 -3
  66. package/dist/isUserOnboardingComplete-D_O53a98.cjs.map +1 -0
  67. package/dist/{migrateFromFireblocks-BrWXstt8.cjs → migrateFromFireblocks-BbRj_YOv.cjs} +54 -3
  68. package/dist/migrateFromFireblocks-BbRj_YOv.cjs.map +1 -0
  69. package/dist/{migrateFromFireblocks-CqL5l58Q.native.esm.js → migrateFromFireblocks-Vic3tb61.esm.js} +43 -4
  70. package/dist/migrateFromFireblocks-Vic3tb61.esm.js.map +1 -0
  71. package/dist/migrateFromFireblocks-hfh_j7wm.native.esm.js +321 -0
  72. package/dist/migrateFromFireblocks-hfh_j7wm.native.esm.js.map +1 -0
  73. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +25 -0
  74. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -0
  75. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/index.d.ts +2 -0
  76. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/index.d.ts.map +1 -0
  77. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +35 -0
  78. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -0
  79. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/index.d.ts +2 -0
  80. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/index.d.ts.map +1 -0
  81. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +19 -0
  82. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -0
  83. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/index.d.ts +2 -0
  84. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/index.d.ts.map +1 -0
  85. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +184 -0
  86. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -0
  87. package/dist/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.d.ts +16 -0
  88. package/dist/modules/waas/businessAccounts/createBusinessAccount/createBusinessAccount.d.ts.map +1 -0
  89. package/dist/modules/waas/businessAccounts/createBusinessAccount/index.d.ts +2 -0
  90. package/dist/modules/waas/businessAccounts/createBusinessAccount/index.d.ts.map +1 -0
  91. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.d.ts +36 -0
  92. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.d.ts.map +1 -0
  93. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/index.d.ts +2 -0
  94. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/index.d.ts.map +1 -0
  95. package/dist/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.d.ts +15 -0
  96. package/dist/modules/waas/businessAccounts/getBusinessAccount/getBusinessAccount.d.ts.map +1 -0
  97. package/dist/modules/waas/businessAccounts/getBusinessAccount/index.d.ts +2 -0
  98. package/dist/modules/waas/businessAccounts/getBusinessAccount/index.d.ts.map +1 -0
  99. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/getBusinessAccountsClient.d.ts +12 -0
  100. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/getBusinessAccountsClient.d.ts.map +1 -0
  101. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/index.d.ts +2 -0
  102. package/dist/modules/waas/businessAccounts/getBusinessAccountsClient/index.d.ts.map +1 -0
  103. package/dist/modules/waas/businessAccounts/listBusinessAccounts/index.d.ts +2 -0
  104. package/dist/modules/waas/businessAccounts/listBusinessAccounts/index.d.ts.map +1 -0
  105. package/dist/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.d.ts +10 -0
  106. package/dist/modules/waas/businessAccounts/listBusinessAccounts/listBusinessAccounts.d.ts.map +1 -0
  107. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/index.d.ts +2 -0
  108. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/index.d.ts.map +1 -0
  109. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts +33 -0
  110. package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts.map +1 -0
  111. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/index.d.ts +2 -0
  112. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/index.d.ts.map +1 -0
  113. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts +37 -0
  114. package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts.map +1 -0
  115. package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
  116. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  117. package/dist/modules/waas/createWaasProvider/isWaasLoadExhaustionError.d.ts +11 -0
  118. package/dist/modules/waas/createWaasProvider/isWaasLoadExhaustionError.d.ts.map +1 -0
  119. package/dist/modules/waas/waas.types.d.ts +11 -0
  120. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  121. package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts +9 -1
  122. package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts.map +1 -1
  123. package/dist/services/keychain/createKeychainService/utils/withDatabase/withDatabase.d.ts +2 -1
  124. package/dist/services/keychain/createKeychainService/utils/withDatabase/withDatabase.d.ts.map +1 -1
  125. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  126. package/dist/{updateAuthFromVerifyResponse-CVDQVEQM.esm.js → updateAuthFromVerifyResponse-BEoc7f0m.esm.js} +262 -4
  127. package/dist/updateAuthFromVerifyResponse-BEoc7f0m.esm.js.map +1 -0
  128. package/dist/{updateAuthFromVerifyResponse-B0K1VJ8b.cjs → updateAuthFromVerifyResponse-Dg8THxkT.cjs} +289 -19
  129. package/dist/updateAuthFromVerifyResponse-Dg8THxkT.cjs.map +1 -0
  130. package/dist/utils/createTranslateRejection/createTranslateRejection.d.ts +29 -0
  131. package/dist/utils/createTranslateRejection/createTranslateRejection.d.ts.map +1 -0
  132. package/dist/utils/createTranslateRejection/index.d.ts +3 -0
  133. package/dist/utils/createTranslateRejection/index.d.ts.map +1 -0
  134. package/dist/waas.cjs +281 -17
  135. package/dist/waas.cjs.map +1 -1
  136. package/dist/waas.esm.js +273 -18
  137. package/dist/waas.esm.js.map +1 -1
  138. package/dist/waas.native.esm.js +272 -18
  139. package/dist/waas.native.esm.js.map +1 -1
  140. package/dist/waasCore.cjs +291 -170
  141. package/dist/waasCore.cjs.map +1 -1
  142. package/dist/waasCore.esm.js +285 -164
  143. package/dist/waasCore.esm.js.map +1 -1
  144. package/dist/waasCore.native.esm.js +273 -371
  145. package/dist/waasCore.native.esm.js.map +1 -1
  146. package/ios/DynamicClientScreenshotProtection.mm +70 -32
  147. package/package.json +4 -4
  148. package/dist/getNetworkProviderFromNetworkId-BlBx4Zh2.esm.js.map +0 -1
  149. package/dist/getNetworkProviderFromNetworkId-DaVOUpiF.cjs.map +0 -1
  150. package/dist/getSignedSessionId-3L_aMxVD.cjs.map +0 -1
  151. package/dist/getSignedSessionId-BVc-sgeN.esm.js.map +0 -1
  152. package/dist/isMfaRequiredForAction-20E6GsSc.esm.js +0 -336
  153. package/dist/isMfaRequiredForAction-20E6GsSc.esm.js.map +0 -1
  154. package/dist/isMfaRequiredForAction-9bYtZcve.cjs +0 -384
  155. package/dist/isMfaRequiredForAction-9bYtZcve.cjs.map +0 -1
  156. package/dist/isMfaRequiredForAction-D6rt_Tzn.native.esm.js.map +0 -1
  157. package/dist/isUserOnboardingComplete-DnExOJu7.native.esm.js.map +0 -1
  158. package/dist/isUserOnboardingComplete-diGA1wlX.esm.js.map +0 -1
  159. package/dist/migrateFromFireblocks--G-432sl.esm.js +0 -65
  160. package/dist/migrateFromFireblocks--G-432sl.esm.js.map +0 -1
  161. package/dist/migrateFromFireblocks-BrWXstt8.cjs.map +0 -1
  162. package/dist/migrateFromFireblocks-CqL5l58Q.native.esm.js.map +0 -1
  163. package/dist/updateAuthFromVerifyResponse-B0K1VJ8b.cjs.map +0 -1
  164. package/dist/updateAuthFromVerifyResponse-CVDQVEQM.esm.js.map +0 -1
  165. package/dist/updateAuthFromVerifyResponse-DGrmo9MJ.native.esm.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrateFromFireblocks-hfh_j7wm.native.esm.js","names":["REASON_BY_NATIVE_CODE: Record<string, WebViewLoadFailureReason>","reason: WebViewLoadFailureReason","NativeDynamicWebView","messageHandlers: Array<(data: unknown) => void>","errorHandlers: Array<(error: unknown) => void>","subscription: { remove: () => void } | null","createWaasClient: CreateWaasClient","refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/errors/CorruptedKeyShareError.ts","../src/turboModules/NativeDynamicWebView.ts","../src/errors/WebViewLoadFailedError.ts","../src/modules/waas/createWaasClient/translateNativeOpenError.ts","../src/modules/waas/createWaasClient/createNativeWaasSDKContainer.native.ts","../src/modules/waas/createWaasClient/createWaasSDKContainer.native.ts","../src/modules/waas/createWaasClient/createWaasClient.native.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 { BaseError } from './base';\n\ntype CorruptedKeyShareErrorParams = {\n cause?: Error | null;\n};\n\n/**\n * Thrown when a persisted client key share cannot be parsed back into its\n * structured form (e.g. a partially-written or corrupted keychain entry).\n *\n * Surfaced as a typed error rather than swallowed so callers can distinguish\n * \"no key share stored\" (empty result) from \"key share exists but is\n * unreadable\" — the latter must never be silently treated as the former,\n * which could trigger an unintended re-keygen that overwrites recoverable\n * material.\n */\nexport class CorruptedKeyShareError extends BaseError {\n constructor({ cause = null }: CorruptedKeyShareErrorParams = {}) {\n super({\n cause,\n code: 'corrupted_key_share_error',\n details:\n 'The stored client key share could not be parsed. The secure storage entry may be partially written or corrupted.',\n docsUrl: null,\n name: 'CorruptedKeyShareError',\n shortMessage: 'Stored client key share is corrupted and cannot be read.',\n });\n }\n}\n","// This file is a TurboModule spec consumed by React Native codegen.\n// The `interface`, `default export`, and the `react-native` import are hard\n// requirements of the codegen parser and intentionally deviate from the\n// project's conventions. Codegen discovers specs by the `Native*` filename\n// prefix, so this file cannot be renamed to `.native.ts`.\n\nimport { type TurboModule, TurboModuleRegistry } from 'react-native';\nimport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\n\nexport interface Spec extends TurboModule {\n addListener(eventName: string): void;\n close(instanceId: string): void;\n /**\n * Creates a WKWebView for the given instanceId and begins loading `url`.\n *\n * Resolves on `didCommit` — i.e. the first byte of a 2xx/3xx HTTP\n * response has been received and content parsing has started. Page-ready\n * (e.g. the hosted iframe's `iframe-ready-*` handshake) is a separate\n * concern and must be observed by the caller via the message bus; this\n * Promise does not wait for it.\n *\n * Rejects with a `code` of `webview_<reason>` where `<reason>` is one of:\n * - `invalid_url` — URL string was not parseable\n * - `no_host_view` — no foreground window to attach the WebView\n * - `http_error` — response status was >= 400 (userInfo contains `DynamicWebViewStatusCode`)\n * - `navigation_failed` — DNS, TLS, connection failure, or post-commit abort\n * - `cancelled` — `close(instanceId)` was called while this open was pending\n * - `instance_busy` — `open` was called for an instanceId that already has an active WebView\n * - `content_process_terminated` — the WKWebView WebContent process died during load\n * - `unsupported` — the device's Android System WebView is too old to support the secure bridge (Android only)\n *\n * rejection codes into typed `WebViewLoadFailedError` instances.\n */\n open(instanceId: string, url: string): Promise<void>;\n removeListeners(count: number): void;\n sendMessage(instanceId: string, data: UnsafeObject): void;\n}\n\n// eslint-disable-next-line import/no-default-export\nexport default TurboModuleRegistry.get<Spec>('DynamicClientWebView');\n","import { BaseError } from './base/BaseError';\n\n/**\n * Discriminator for `WebViewLoadFailedError`. Identifies the specific\n * failure mode so callers can branch on it (e.g. retry on transient\n * navigation failures, abort on invalid URL, treat HTTP errors distinct\n * from network errors).\n */\nexport type WebViewLoadFailureReason =\n | 'invalid_url'\n | 'no_host_view'\n | 'http_error'\n | 'navigation_failed'\n | 'cancelled'\n | 'instance_busy'\n | 'content_process_terminated'\n | 'unsupported';\n\ntype WebViewLoadFailedErrorParams = {\n cause?: Error | null;\n reason: WebViewLoadFailureReason;\n shortMessage: string;\n /** HTTP response status code. Populated only when `reason === 'http_error'`. */\n statusCode?: number;\n /** Underlying OS-level error description (e.g. `NSURLErrorDomain`\n * localizedDescription). Populated for `reason === 'navigation_failed'`. */\n underlyingError?: string;\n};\n\n/**\n * Thrown when `DynamicWebView.open()` (via the WaaS transport provider)\n * fails to establish a usable load. Inspect `reason` to distinguish the\n * failure mode; `statusCode` and `underlyingError` provide structured\n * metadata for the cases that have it.\n */\nexport class WebViewLoadFailedError extends BaseError {\n readonly reason: WebViewLoadFailureReason;\n readonly statusCode: number | undefined;\n readonly underlyingError: string | undefined;\n\n constructor({\n reason,\n shortMessage,\n cause = null,\n statusCode,\n underlyingError,\n }: WebViewLoadFailedErrorParams) {\n super({\n cause,\n code: 'webview_load_failed_error',\n details: underlyingError,\n docsUrl: null,\n name: 'WebViewLoadFailedError',\n shortMessage,\n });\n this.reason = reason;\n this.statusCode = statusCode;\n this.underlyingError = underlyingError;\n }\n}\n","import {\n WebViewLoadFailedError,\n type WebViewLoadFailureReason,\n} from '../../../errors/WebViewLoadFailedError';\n\n// Maps the native-side RCT reject codes (emitted by DynamicWebView.mm) to the\n// JS-level discriminator on `WebViewLoadFailedError`. Keys must stay in sync\n// with the `Reason.*` strings in DynamicWebViewImpl.swift.\nconst REASON_BY_NATIVE_CODE: Record<string, WebViewLoadFailureReason> = {\n webview_cancelled: 'cancelled',\n webview_content_process_terminated: 'content_process_terminated',\n webview_http_error: 'http_error',\n webview_instance_busy: 'instance_busy',\n webview_invalid_url: 'invalid_url',\n webview_navigation_failed: 'navigation_failed',\n webview_no_host_view: 'no_host_view',\n webview_unsupported: 'unsupported',\n};\n\n// React Native serializes the native NSError's userInfo onto the JS Error as\n// `userInfo`. These keys must stay in sync with the `errorStatusCodeKey` /\n// `errorUnderlyingDescriptionKey` constants in DynamicWebViewImpl.swift.\ntype NativeRejection = {\n code?: string;\n message?: string;\n userInfo?: {\n DynamicWebViewStatusCode?: number;\n DynamicWebViewUnderlying?: string;\n };\n};\n\n/**\n * Translates a native `DynamicWebView.open()` rejection into a typed\n * `WebViewLoadFailedError`. Maps the native RCT reject code to the JS-level\n * `WebViewLoadFailureReason` discriminator (falling back to\n * `navigation_failed` for unrecognized codes) and carries through the\n * structured `statusCode` / `underlyingError` metadata.\n *\n * The `reason` it produces is the contract `createWaasSDKContainer` branches\n * on — notably `emitError` swallows `cancelled` because that code is only ever\n * produced by our own `close()` teardown (verified on both the iOS and Android\n * native sides). Keep `REASON_BY_NATIVE_CODE` in sync with the native reject\n * codes so that branching stays correct.\n *\n * @notInstrumented\n */\nexport const translateNativeOpenError = (\n err: unknown\n): WebViewLoadFailedError => {\n const rejection = (err ?? {}) as NativeRejection;\n\n // Must check the KEYS of REASON_BY_NATIVE_CODE (the `webview_*` native\n // codes), not its values (the JS-level reasons) — this is called with the\n // native code, so checking values made every code fall through to\n // `navigation_failed` and silently broke the `cancelled` swallow.\n const isNativeRejectionCode = (\n code: string | undefined\n ): code is keyof typeof REASON_BY_NATIVE_CODE =>\n code != undefined && code in REASON_BY_NATIVE_CODE;\n\n const reason: WebViewLoadFailureReason = isNativeRejectionCode(rejection.code)\n ? REASON_BY_NATIVE_CODE[rejection.code]\n : 'navigation_failed';\n return new WebViewLoadFailedError({\n cause: err instanceof Error ? err : null,\n reason,\n shortMessage:\n rejection.message ?? `DynamicWebView open failed (${reason}).`,\n statusCode: rejection.userInfo?.DynamicWebViewStatusCode,\n underlyingError: rejection.userInfo?.DynamicWebViewUnderlying,\n });\n};\n","import type { WaasSDKContainer } from '@dynamic-labs-wallet/core';\nimport { NativeEventEmitter } from 'react-native';\n\nimport { NativeModuleNotLinkedError } from '../../../errors/NativeModuleNotLinkedError';\nimport NativeDynamicWebView from '../../../turboModules/NativeDynamicWebView';\nimport { translateNativeOpenError } from './translateNativeOpenError';\n\nconst NATIVE_MODULE_NAME = 'DynamicClientWebView';\nconst MESSAGE_EVENT_NAME = 'dynamicBridgeMessage';\n\ntype BridgeEventPayload = {\n data: unknown;\n instanceId: string;\n};\n\n// The instance ID routes bridge messages to the right container, so it must be\n// globally unique. Use a crypto-random UUID (no Math.random) keyed by timestamp\n// for readability across app reloads.\nconst generateInstanceId = (): string =>\n `${Date.now().toString(36)}-${crypto.randomUUID()}`;\n\n/**\n * Creates a React Native `WaasSDKContainer` backed by a hidden, headless native\n * WebView (WKWebView on iOS, `android.webkit.WebView` on Android) hosted by the\n * `DynamicClientWebView` TurboModule. Each invocation returns an isolated\n * container with its own instance ID, native WebView, and message routing.\n *\n * Used for MPC operations (signing, key-share management) where there is\n * nothing for the user to see. The VISIBLE private-key export display is no\n * longer a native overlay — it is rendered by the `ExportPrivateKey` component\n * (`@dynamic-labs-sdk/react-native-embedded-wallet-export`) on top of\n * `react-native-webview`, so it scrolls and positions like any RN view.\n *\n * @notInstrumented\n */\nexport const createNativeWaasSDKContainer = (): WaasSDKContainer => {\n if (!NativeDynamicWebView) {\n throw new NativeModuleNotLinkedError({ moduleName: NATIVE_MODULE_NAME });\n }\n\n const nativeModule = NativeDynamicWebView;\n const instanceId = generateInstanceId();\n // Construct the emitter against the TurboModule itself — on New Arch,\n // `NativeModules[name]` can be a different compatibility-shim object,\n // and binding `addListener`/`removeListeners` on the wrong instance\n // leaves `startObserving` in the native emitter never firing.\n const emitter = new NativeEventEmitter(\n nativeModule as unknown as ConstructorParameters<typeof NativeEventEmitter>[0]\n );\n\n // IframeManager on the WaaS SDK calls `container.onMessage(handler)` twice\n // on the same container — once to wait for the `iframe-ready-*` handshake,\n // and once later from `setupWaasSDKContainerBridge` to forward transport\n // messages. Both handlers need to receive every message, so the container\n // fans out to all registered handlers instead of enforcing single-register.\n const messageHandlers: Array<(data: unknown) => void> = [];\n const errorHandlers: Array<(error: unknown) => void> = [];\n let subscription: { remove: () => void } | null = null;\n let destroyed = false;\n\n const emitError = (err: unknown): void => {\n if (destroyed) return;\n const translated = translateNativeOpenError(err);\n // `cancelled` is only ever produced by our own `close()` teardown path on\n // the native side. Surfacing it via onError would make consumers like\n // IframeManager interpret their own destroy as a load failure and retry\n // against a provider that no longer exists.\n if (translated.reason === 'cancelled') return;\n for (const handler of errorHandlers) {\n handler(translated);\n }\n };\n\n return {\n destroy() {\n if (destroyed) return;\n destroyed = true;\n\n subscription?.remove();\n subscription = null;\n messageHandlers.length = 0;\n errorHandlers.length = 0;\n nativeModule.close(instanceId);\n },\n\n isAlive: () => !destroyed,\n\n // Signature is dictated by the upstream WaasSDKContainer interface.\n // eslint-disable-next-line custom-rules/require-single-object-param\n onError(handler: (error: unknown) => void) {\n errorHandlers.push(handler);\n return () => {\n const index = errorHandlers.indexOf(handler);\n if (index !== -1) errorHandlers.splice(index, 1);\n };\n },\n\n // Signature is dictated by the upstream WaasSDKContainer interface.\n // eslint-disable-next-line custom-rules/require-single-object-param\n onMessage(handler: (data: unknown) => void) {\n messageHandlers.push(handler);\n\n subscription ??= emitter.addListener(\n MESSAGE_EVENT_NAME,\n (payload: BridgeEventPayload) => {\n if (payload.instanceId !== instanceId) return;\n\n for (const fn of messageHandlers) {\n fn(payload.data);\n }\n }\n );\n\n // WaaS client expects onMessage to return an unsubscribe function —\n // used e.g. to tear down the one-shot handshake handler.\n return () => {\n const index = messageHandlers.indexOf(handler);\n if (index !== -1) messageHandlers.splice(index, 1);\n if (messageHandlers.length === 0) {\n subscription?.remove();\n subscription = null;\n }\n };\n },\n\n sendMessage(data: Record<string, unknown>) {\n nativeModule.sendMessage(instanceId, data);\n },\n /**\n * Hands the URL off to the native WebView and resolves immediately.\n *\n * Per the `WaasSDKContainer` contract (see `@dynamic-labs-wallet/core`\n * types), `setUrl` resolves once the URL has been handed off to the\n * container — NOT when the page has finished loading. Load completion is\n * signalled later via the `iframe-ready-*` message on `onMessage`, and\n * navigation failures surface via `onError`. This dispatch-and-forget\n * shape is load-bearing: the WaaS handshake sequencing expects `setUrl` to\n * resolve before the first message arrives, so the native open is\n * intentionally NOT awaited/returned — its rejection (HTTP errors,\n * navigation failures, preflight errors, etc.) is routed through\n * `emitError` instead. Do not change this to `return nativeModule.open(...)`.\n */\n // Signature is dictated by the upstream WaasSDKContainer interface.\n // eslint-disable-next-line custom-rules/require-single-object-param\n async setUrl(url: string) {\n nativeModule.open(instanceId, url).catch(emitError);\n },\n };\n};\n","import type { WaasSDKContainer } from '@dynamic-labs-wallet/core';\n\nimport { createNativeWaasSDKContainer } from './createNativeWaasSDKContainer.native';\n\n/**\n * Creates a React Native `WaasSDKContainer` backed by a hidden, headless native\n * WebView (WKWebView on iOS, `android.webkit.WebView` on Android) hosted by the\n * `DynamicClientWebView` TurboModule. Used for MPC operations (signing, key-share\n * management) where there is nothing for the user to see.\n *\n * For the private-key export display — where the hosted page must render the\n * key for the user — use the `ExportPrivateKey` component from\n * `@dynamic-labs-sdk/react-native-embedded-wallet-export`, which renders the\n * key inside a `react-native-webview` instead of a native overlay.\n *\n * @notInstrumented\n */\nexport const createWaasSDKContainer = (): WaasSDKContainer =>\n createNativeWaasSDKContainer();\n","import type { AuthMode } from '@dynamic-labs-wallet/browser-wallet-client';\nimport { DynamicWalletClient } from '@dynamic-labs-wallet/browser-wallet-client';\nimport type { SecureStorageAdapter } from '@dynamic-labs-wallet/core';\nimport {\n ACCESSIBLE,\n getGenericPassword,\n resetGenericPassword,\n setGenericPassword,\n} from 'react-native-keychain';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { CorruptedKeyShareError } from '../../../errors/CorruptedKeyShareError';\nimport { CLIENT_SDK_NAME } from '../../apiClient/constants';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport {\n DEFAULT_WAAS_BASE_API_URL,\n DEFAULT_WAAS_BASE_MPC_RELAY_API_URL,\n} from '../constants';\nimport type { CreateWaasClient } from './createWaasClient.types';\nimport { createWaasSDKContainer } from './createWaasSDKContainer.native';\n\n/**\n * Keychain security options for the client key share. The share is wallet\n * key material that cannot be re-derived locally, so the options are pinned\n * explicitly rather than inherited from `react-native-keychain` defaults\n * (which vary across versions and platforms).\n *\n * `WHEN_UNLOCKED_THIS_DEVICE_ONLY` keeps the share readable only while the\n * device is unlocked, excludes it from iCloud Keychain sync, and prevents it\n * migrating to a new device on encrypted-backup restore. It deliberately does\n * NOT set `accessControl` (e.g. biometry) — reads must not surface a Face ID /\n * passcode prompt, since the share is read on routine wallet operations.\n */\nconst KEY_SHARE_KEYCHAIN_OPTIONS = {\n accessible: ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,\n} as const;\n\n/** @notInstrumented */\nexport const createWaasClient: CreateWaasClient = ({ chainName }, client) => {\n const core = getCore(client);\n\n const additionalTrustedOrigins = core.waas?.additionalTrustedOrigins;\n\n // Namespace the keychain service by environment so two environmentIds on the\n // same device (or two dApps that observe the same account) can't collide and\n // mix key shares. The account address alone is not unique across environments.\n const getKeyShareService = (accountAddress: string): string =>\n `${core.environmentId}:${accountAddress}`;\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 environmentId: core.environmentId,\n // On React Native there is no real `window.location.origin`, so the hosted\n // iframe is told the app's universalLink as its host origin. This must be\n // allowlisted in the environment's CORS/allowed origins, just like a web\n // app's domain. Without it the WaaS server rejects the iframe load (400).\n hostOrigin: core.metadata?.universalLink,\n sdkVersion: `${CLIENT_SDK_NAME}/${core.version}`,\n ...(additionalTrustedOrigins == undefined\n ? {}\n : { additionalTrustedOrigins }),\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 createWaasSDKContainer,\n // Typed as the upstream SecureStorageAdapter so the key-share method\n // signatures (and the `shares` payload type) stay compiler-enforced\n // against the WaaS SDK contract rather than re-declared locally.\n secureStorage: {\n getClientKeyShare: async (accountAddress) => {\n const result = await getGenericPassword({\n service: getKeyShareService(accountAddress),\n });\n\n if (!result) {\n return [];\n }\n\n // A corrupted or partially-written keychain entry makes JSON.parse\n // throw mid key-share load. Surface a typed error instead of an\n // unhandled rejection so callers can distinguish \"no share stored\"\n // (empty result above) from \"share exists but is unreadable\".\n try {\n return JSON.parse(result.password);\n } catch (cause) {\n throw new CorruptedKeyShareError({\n cause: cause instanceof Error ? cause : null,\n });\n }\n },\n\n removeClientKeyShare: async (accountAddress) => {\n await resetGenericPassword({\n service: getKeyShareService(accountAddress),\n });\n },\n\n setClientKeyShare: async (accountAddress, shares) => {\n await setGenericPassword(accountAddress, JSON.stringify(shares), {\n ...KEY_SHARE_KEYCHAIN_OPTIONS,\n service: getKeyShareService(accountAddress),\n });\n },\n } satisfies SecureStorageAdapter,\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;;;;;;;;;;;;;;;;ACEN,IAAa,yBAAb,cAA4C,UAAU;CACpD,YAAY,EAAE,QAAQ,SAAuC,EAAE,EAAE;AAC/D,QAAM;GACJ;GACA,MAAM;GACN,SACE;GACF,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;;;;;;ACaN,mCAAe,oBAAoB,IAAU,uBAAuB;;;;;;;;;;ACJpE,IAAa,yBAAb,cAA4C,UAAU;CACpD,AAAS;CACT,AAAS;CACT,AAAS;CAET,YAAY,EACV,QACA,cACA,QAAQ,MACR,YACA,mBAC+B;AAC/B,QAAM;GACJ;GACA,MAAM;GACN,SAAS;GACT,SAAS;GACT,MAAM;GACN;GACD,CAAC;AACF,OAAK,SAAS;AACd,OAAK,aAAa;AAClB,OAAK,kBAAkB;;;;;;ACjD3B,MAAMA,wBAAkE;CACtE,mBAAmB;CACnB,oCAAoC;CACpC,oBAAoB;CACpB,uBAAuB;CACvB,qBAAqB;CACrB,2BAA2B;CAC3B,sBAAsB;CACtB,qBAAqB;CACtB;;;;;;;;;;;;;;;;AA6BD,MAAa,4BACX,QAC2B;CAC3B,MAAM,YAAa,OAAO,EAAE;CAM5B,MAAM,yBACJ,SAEA,QAAQ,UAAa,QAAQ;CAE/B,MAAMC,SAAmC,sBAAsB,UAAU,KAAK,GAC1E,sBAAsB,UAAU,QAChC;AACJ,QAAO,IAAI,uBAAuB;EAChC,OAAO,eAAe,QAAQ,MAAM;E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AC3B,OAAO;AACd,WAAM,IAAI,uBAAuB,EAC/B,OAAO,iBAAiB,QAAQ,QAAQ,MACzC,CAAC;;;GAIN,sBAAsB,OAAO,mBAAmB;AAC9C,UAAM,qBAAqB,EACzB,SAAS,mBAAmB,eAAe,EAC5C,CAAC;;GAGJ,mBAAmB,OAAO,gBAAgB,WAAW;AACnD,UAAM,mBAAmB,gBAAgB,KAAK,UAAU,OAAO,EAAE;KAC/D,GAAG;KACH,SAAS,mBAAmB,eAAe;KAC5C,CAAC;;GAEL;EACF,CACF;;;;;;ACnHH,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"}
@@ -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,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AAoB,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"}