@dynamic-labs-sdk/client 1.33.2 → 1.33.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiClient-B0eCQXEJ.native.esm.js → apiClient-CpfEx6Uc.native.esm.js} +3 -3
- package/dist/{apiClient-B0eCQXEJ.native.esm.js.map → apiClient-CpfEx6Uc.native.esm.js.map} +1 -1
- package/dist/core.cjs +5 -78
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +6 -77
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +8 -79
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/core.d.ts +0 -2
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +13 -1
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs → getNetworkProviderFromNetworkId-Cez8TM-n.cjs} +2 -2
- package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs.map → getNetworkProviderFromNetworkId-Cez8TM-n.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js → getNetworkProviderFromNetworkId-Cf-CfYM4.esm.js} +2 -2
- package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js.map → getNetworkProviderFromNetworkId-Cf-CfYM4.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js → getNetworkProviderFromNetworkId-CuTEQ9dg.native.esm.js} +8 -8
- package/dist/getNetworkProviderFromNetworkId-CuTEQ9dg.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js → getSignedSessionId-Bt4obN3w.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js.map → getSignedSessionId-Bt4obN3w.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-DdMeCIV-.esm.js → getSignedSessionId-Cx7WP4ZJ.esm.js} +3 -3
- package/dist/{getSignedSessionId-DdMeCIV-.esm.js.map → getSignedSessionId-Cx7WP4ZJ.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-KiBgLtda.cjs → getSignedSessionId-DiVxv0qz.cjs} +3 -3
- package/dist/{getSignedSessionId-KiBgLtda.cjs.map → getSignedSessionId-DiVxv0qz.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js → getVerifiedCredentialForWalletAccount-DfKRbqco.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js.map → getVerifiedCredentialForWalletAccount-DfKRbqco.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs → getVerifiedCredentialForWalletAccount-UIcOv7IN.cjs} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs.map → getVerifiedCredentialForWalletAccount-UIcOv7IN.cjs.map} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.esm.js +7 -7
- package/dist/index.native.esm.js +9 -9
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js → isMfaRequiredForAction-CxYft5KR.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js.map → isMfaRequiredForAction-CxYft5KR.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-By7uHgpn.cjs → isMfaRequiredForAction-Czx-uPFY.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-By7uHgpn.cjs.map → isMfaRequiredForAction-Czx-uPFY.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-BLegdReE.esm.js → isMfaRequiredForAction-DS8fcwxO.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-BLegdReE.esm.js.map → isMfaRequiredForAction-DS8fcwxO.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js → isUserOnboardingComplete-COmYFW26.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js.map → isUserOnboardingComplete-COmYFW26.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js → isUserOnboardingComplete-DYnRDLep.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js.map → isUserOnboardingComplete-DYnRDLep.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-DMefkHRY.cjs → isUserOnboardingComplete-FbjleMQm.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-DMefkHRY.cjs.map → isUserOnboardingComplete-FbjleMQm.cjs.map} +1 -1
- package/dist/{logoutWithReason-c1DmyRBx.cjs → logoutWithReason-BKwWBsCT.cjs} +3 -3
- package/dist/{logoutWithReason-c1DmyRBx.cjs.map → logoutWithReason-BKwWBsCT.cjs.map} +1 -1
- package/dist/{logoutWithReason-B-cf-dUs.esm.js → logoutWithReason-DO0kP7nf.esm.js} +3 -3
- package/dist/{logoutWithReason-B-cf-dUs.esm.js.map → logoutWithReason-DO0kP7nf.esm.js.map} +1 -1
- package/dist/{logoutWithReason-C4AgSbjv.native.esm.js → logoutWithReason-DWkIKoLk.native.esm.js} +2 -2
- package/dist/{logoutWithReason-C4AgSbjv.native.esm.js.map → logoutWithReason-DWkIKoLk.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js → migrateFromFireblocks-BwYnNAAh.native.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js.map → migrateFromFireblocks-BwYnNAAh.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-B76sFd7a.esm.js → migrateFromFireblocks-C_cap--b.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-B76sFd7a.esm.js.map → migrateFromFireblocks-C_cap--b.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-RCqy2qOG.cjs → migrateFromFireblocks-ycJIYcrm.cjs} +2 -2
- package/dist/{migrateFromFireblocks-RCqy2qOG.cjs.map → migrateFromFireblocks-ycJIYcrm.cjs.map} +1 -1
- package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts +20 -0
- package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts.map +1 -0
- package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts +2 -0
- package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts.map +1 -0
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts +39 -6
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +9 -3
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +10 -3
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts +43 -0
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +249 -0
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts +45 -0
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts +41 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts +39 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts +30 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts +26 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts +21 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts +26 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts +12 -4
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/resendFields.d.ts +39 -0
- package/dist/modules/waas/businessAccounts/resendFields.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts +49 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts +29 -0
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts +29 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{waas-DIlnOHm6.native.esm.js → waas-C4jtRxx1.native.esm.js} +688 -26
- package/dist/waas-C4jtRxx1.native.esm.js.map +1 -0
- package/dist/{waas-7vSYuH3H.cjs → waas-CioG-_yp.cjs} +764 -24
- package/dist/waas-CioG-_yp.cjs.map +1 -0
- package/dist/{waas-H5xyBfTI.esm.js → waas-DjivkzyT.esm.js} +688 -26
- package/dist/waas-DjivkzyT.esm.js.map +1 -0
- package/dist/waas.cjs +18 -5
- package/dist/waas.esm.js +5 -5
- package/dist/waas.native.esm.js +5 -5
- package/dist/waasCore.cjs +5 -5
- package/dist/waasCore.esm.js +5 -5
- package/dist/waasCore.native.esm.js +5 -5
- package/package.json +3 -4
- package/dist/getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js.map +0 -1
- package/dist/waas-7vSYuH3H.cjs.map +0 -1
- package/dist/waas-DIlnOHm6.native.esm.js.map +0 -1
- package/dist/waas-H5xyBfTI.esm.js.map +0 -1
package/dist/core.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.esm.js","names":["getNetworkId: LastKnownNetworkRegistry['getNetworkId']","setNetworkId: LastKnownNetworkRegistry['setNetworkId']","target: unknown","providers: T[]","target: unknown","getActiveNetworkIdFromLastKnownRegistry: GetActiveNetworkIdFromLastKnownRegistry","switchActiveNetworkInLastKnownRegistry: SwitchActiveNetworkInLastKnownRegistry","eventEmitter: EventEmitter<WalletProviderEvents> | undefined","setupReturnValue: R","EventEmitter","packageName","packageVersion"],"sources":["../src/errors/ArrayMustNotBeEmptyError.ts","../src/errors/ClientsDoNotMatchError.ts","../src/errors/MultipleClientsFoundError.ts","../src/modules/extension/registerExtension/registerExtension.ts","../src/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.ts","../src/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.ts","../src/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.ts","../src/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.ts","../src/modules/wallets/networks/lastKnownNetworkRegistry/createLastKnownNetworkRegistry/schema.ts","../src/modules/wallets/networks/lastKnownNetworkRegistry/createLastKnownNetworkRegistry/createLastKnownNetworkRegistry.ts","../src/modules/wallets/networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry/getLastKnownNetworkRegistry.ts","../src/modules/wallets/utils/formatWalletProviderGroupKey/formatWalletProviderGroupKey.ts","../src/modules/wallets/utils/getAllProvidersFromWindow/getAllProvidersFromWindow.ts","../src/modules/wallets/utils/getInjectedProviderFromWindow/getInjectedProviderFromWindow.ts","../src/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.ts","../src/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.ts","../src/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.ts","../src/services/realtime/createRealtimeChannelSchema/createRealtimeChannelSchema.ts","../src/utils/assertNonEmptyArray/assertNonEmptyArray.ts","../src/utils/bufferToBase64/bufferToBase64.ts","../src/utils/createSequenceQueue/createSequenceQueue.ts","../src/utils/filterDuplicates/filterDuplicates.ts","../src/utils/parseAmountToSmallestUnit/parseAmountToSmallestUnit.ts","../src/errors/ReactNativeOnlyError.ts","../src/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.ts","../src/utils/getNativeLinkScheme/getNativeLinkScheme.ts","../src/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.ts","../src/exports/core.ts"],"sourcesContent":["import { BaseError } from './base';\n\nexport class ArrayMustNotBeEmptyError extends BaseError {\n // eslint-disable-next-line custom-rules/require-single-object-param\n constructor(message: string) {\n super({\n cause: null,\n code: 'array_must_not_be_empty_error',\n docsUrl: null,\n name: 'ArrayMustNotBeEmpty',\n shortMessage: message,\n });\n }\n}\n","import { BaseError } from './base';\n\nexport class ClientsDoNotMatchError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'clients_do_not_match_error',\n docsUrl: null,\n name: 'ClientsDoNotMatchError',\n shortMessage: 'Clients do not match',\n });\n }\n}\n","import { BaseError } from './base';\n\nexport class MultipleClientsFoundError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'multiple_clients_found_error',\n docsUrl: null,\n name: 'MultipleClientsFoundError',\n shortMessage:\n 'Multiple Dynamic clients have been initialized. Please provide the intended client for this action explicitly',\n });\n }\n}\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype RegisterExtensionParams = {\n extensionKey: string;\n};\n\n/**\n * Registers an extension to the client.\n *\n * Other extensions can be aware of which extensions are present,\n * and allows creating dependencies between extensions.\n *\n * @param client - The client instance.\n * @param extensionKey - The key of the extension to register.\n * @returns The client instance.\n * @notInstrumented\n */\nexport const registerExtension = (\n { extensionKey }: RegisterExtensionParams,\n client: DynamicClient\n): void => {\n const core = getCore(client);\n\n core.extensions.add(extensionKey);\n};\n","import type { ProjectSettings } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { FETCH_PROJECT_SETTINGS_TRACKER_KEY } from '../consts';\n\n/** @notInstrumented */\nexport const waitForProjectSettings = async (\n client: DynamicClient\n): Promise<ProjectSettings> => {\n const core = getCore(client);\n\n const projectSettingsTracker = core.initTrack.getTracker<void>(\n FETCH_PROJECT_SETTINGS_TRACKER_KEY\n );\n\n assertDefined(projectSettingsTracker, 'Project settings tracker not found');\n\n await projectSettingsTracker.promise;\n\n assertDefined(\n client.projectSettings,\n 'Project settings still not available after awaiting its tracker'\n );\n\n return client.projectSettings;\n};\n","import { createDeepCanonicalizer } from '@dyn-crypto/proof/canonicalize-browser-safe';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\n// Same algorithm the enclave verifies against — see @dyn-crypto/proof's\n// README for the canonicalization contract.\nconst canonicalizeJson = createDeepCanonicalizer();\n\n/**\n * A business-account intent: a signed statement of what the initiator is asking\n * for. The enclave binds it to the change set actually submitted and verifies\n * the signature against the `sessionPublicKey` claim in the caller's JWT, so a\n * verified intent cannot be paired with a different mutation.\n *\n * There is deliberately no `expiresAt`. How long an intent stays redeemable is\n * the account's governance to decide, measured from `createdAt` — an\n * initiator-chosen expiry would be an initiator-chosen authorization lifetime.\n */\nexport type BusinessAccountIntent = {\n actionType: string;\n businessAccountId: string;\n createdAt: string;\n initiatorUserId: string;\n intentId: string;\n payload: { changeSet: Record<string, unknown>[] };\n};\n\ntype SignBusinessAccountIntentParams = {\n intent: BusinessAccountIntent;\n};\n\n/** The signed intent and the signature over its canonical form. */\nexport type SignBusinessAccountIntentResult = {\n intent: BusinessAccountIntent;\n intentSignature: string;\n};\n\n/**\n * Sign an intent with the session key.\n *\n * The signature is over the CANONICAL form, not over `JSON.stringify(intent)` —\n * the enclave re-canonicalizes before verifying, so a signature over any other\n * byte sequence will not verify. Nothing here chooses that byte sequence\n * freely: it is fixed by `canonicalizeJson`.\n *\n * The private half never enters JS. `keychain.sign` holds a non-extractable\n * key and returns a P1363 hex signature, which is the form the enclave's\n * WebCrypto verify expects.\n *\n * @param params.intent - The intent to sign.\n * @param client - The Dynamic client instance.\n * @returns The intent alongside the P1363 hex signature over its canonical form.\n *\n * @example\n * ```typescript\n * const { intent, intentSignature } = await signBusinessAccountIntent({ intent: draftIntent });\n * ```\n *\n * @see {@link signBusinessAccountApproval} for a co-signer approving this intent.\n * @see {@link BusinessAccountIntent} for the shape being signed.\n * @notInstrumented\n */\nexport const signBusinessAccountIntent = async (\n { intent }: SignBusinessAccountIntentParams,\n client: DynamicClient\n): Promise<SignBusinessAccountIntentResult> => {\n const core = getCore(client);\n\n const intentSignature = await core.keychain.sign(\n 'session',\n canonicalizeJson(intent as unknown as Record<string, unknown>)\n );\n\n return { intent, intentSignature };\n};\n\ntype SignBusinessAccountApprovalParams = {\n /** Defaults to now. Accepted for tests and for a caller that has already\n * recorded when the human consented. */\n approvedAt?: string;\n intent: BusinessAccountIntent;\n};\n\n/** An approval's signature and the timestamp it was signed over. */\nexport type SignBusinessAccountApprovalResult = {\n approvedAt: string;\n signature: string;\n};\n\n/**\n * Sign an approval of someone else's intent.\n *\n * The payload is `{ approvedAt, intent }` rather than the intent alone, so each\n * approver attests WHEN they consented as well as what to. The enclave measures\n * the execution window from the latest of those timestamps, which it could not\n * do from an unsigned value — a caller could simply claim a fresher one.\n *\n * Sent whether or not the account configures an execution window: a signed\n * shape that varied with configuration would mean reading governance before\n * knowing what to sign.\n *\n * @param params.intent - The intent being approved.\n * @param params.approvedAt - When the approver consented. Defaults to now.\n * @param client - The Dynamic client instance.\n * @returns The timestamp signed over, alongside the P1363 hex signature.\n *\n * @example\n * ```typescript\n * const { approvedAt, signature } = await signBusinessAccountApproval({ intent });\n * ```\n *\n * @see {@link signBusinessAccountIntent} for the initiator's own signature over the intent.\n * @see {@link BusinessAccountIntent} for the shape being approved.\n * @notInstrumented\n */\n// eslint-disable-next-line custom-rules/one-function-per-file -- signing an intent and signing an approval OF that intent share the canonical-form contract; separating them invites one changing without the other\nexport const signBusinessAccountApproval = async (\n {\n intent,\n approvedAt = new Date().toISOString(),\n }: SignBusinessAccountApprovalParams,\n client: DynamicClient\n): Promise<SignBusinessAccountApprovalResult> => {\n const core = getCore(client);\n\n const signature = await core.keychain.sign(\n 'session',\n canonicalizeJson({\n approvedAt,\n intent: intent as unknown as Record<string, unknown>,\n })\n );\n\n return { approvedAt, signature };\n};\n","import type { Chain } from '../../../chain';\nimport type {\n BaseNetworkProvider,\n NetworkData,\n} from '../networkProvider/networkProvider.types';\n\n/** @notInstrumented */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const createBaseNetworkProvider = <TChain extends Chain = Chain>(\n chain: TChain,\n networkData: NetworkData\n): Omit<BaseNetworkProvider<TChain>, 'getBalance'> => ({\n blockExplorerUrls: networkData.blockExplorerUrls,\n chain,\n displayName: networkData.displayName,\n iconUrl: networkData.iconUrl,\n id: `${chain}-${networkData.networkId}`,\n name: networkData.name,\n nativeCurrency: networkData.nativeCurrency,\n networkId: networkData.networkId,\n rpcUrls: networkData.rpcUrls,\n testnet: networkData.testnet,\n});\n","import type { DynamicClient } from '../../../../client/types';\nimport type { Chain } from '../../../chain';\nimport { getNetworksData } from '../getNetworksData';\nimport type { NetworkData } from '../networkProvider/networkProvider.types';\n\ntype GetNetworkDataForNetworkIdProps = {\n chain: Chain;\n networkId: string;\n};\n\n/** @notInstrumented */\nexport const getNetworkDataForNetworkId = (\n { networkId, chain }: GetNetworkDataForNetworkIdProps,\n client: DynamicClient\n): NetworkData | undefined => {\n const networksData = getNetworksData(client);\n\n const networkData = networksData.find(\n (networkData) =>\n networkData.networkId === networkId && networkData.chain === chain\n );\n\n return networkData;\n};\n","import * as z from 'zod/mini';\n\nimport { createStorageKeySchema } from '../../../../../services/storage';\n\nexport const networkRegistryStorageKeySchema = createStorageKeySchema({\n key: 'lastKnownNetworkRegistry',\n schema: z.record(z.string(), z.string()),\n});\n","import { getCore } from '../../../../../client/core/getCore';\nimport type { DynamicClient } from '../../../../../client/types';\nimport { NoNetworkProvidersError } from '../../../../../errors/NoNetworkProvidersError';\nimport { assertDefined } from '../../../../../utils/assertDefined';\nimport { getWalletProviderByKey } from '../../../getWalletProviderByKey';\nimport { getNetworkProviders } from '../../getNetworkProviders';\nimport type { LastKnownNetworkRegistry } from '../LastKnownNetworkRegistry.types';\nimport { networkRegistryStorageKeySchema } from './schema';\n\n/**\n * Creates the registry that keeps tabs on which wallet provider is\n * connected to which network.\n *\n * Reminder that this will not be used for chains that have an internal way to\n * switch networks (ex EVM).\n * @notInstrumented\n */\nexport const createLastKnownNetworkRegistry = (\n client: DynamicClient\n): LastKnownNetworkRegistry => {\n const core = getCore(client);\n\n const walletProviderKeyToNetworkId = new Map<string, string>();\n\n const getNetworkId: LastKnownNetworkRegistry['getNetworkId'] = async ({\n walletProviderKey,\n }) => {\n // Priorities:\n // 1. In memory\n // 2. Storage\n // 3. First available network for this wallet's chain\n\n if (walletProviderKeyToNetworkId.has(walletProviderKey)) {\n return {\n networkId: walletProviderKeyToNetworkId.get(\n walletProviderKey\n ) as string,\n };\n }\n\n const storageRecords = await core.storage.getItem(\n networkRegistryStorageKeySchema\n );\n\n if (storageRecords && storageRecords[walletProviderKey]) {\n const networkId = storageRecords[walletProviderKey];\n\n walletProviderKeyToNetworkId.set(walletProviderKey, networkId);\n\n return { networkId };\n }\n\n const walletProvider = getWalletProviderByKey(\n { walletProviderKey },\n client\n );\n\n const networkProviders = getNetworkProviders(client);\n\n if (networkProviders.length === 0) {\n throw new NoNetworkProvidersError();\n }\n\n const defaultNetworkProvider = networkProviders.find(\n (networkProvider) => networkProvider.chain === walletProvider.chain\n );\n\n assertDefined(\n defaultNetworkProvider,\n `No networks found for chain ${walletProvider.chain}`\n );\n\n walletProviderKeyToNetworkId.set(\n walletProviderKey,\n defaultNetworkProvider.networkId\n );\n\n // No need to set in storage, as we're just falling back to the default\n return { networkId: defaultNetworkProvider.networkId };\n };\n\n const setNetworkId: LastKnownNetworkRegistry['setNetworkId'] = async ({\n networkId,\n walletProviderKey,\n }) => {\n walletProviderKeyToNetworkId.set(walletProviderKey, networkId);\n\n await core.storage.setItem(\n networkRegistryStorageKeySchema,\n Object.fromEntries(walletProviderKeyToNetworkId.entries())\n );\n };\n\n return { getNetworkId, setNetworkId };\n};\n","import { createRuntimeServiceAccessKey } from '../../../../../services/runtimeServices';\nimport { createLastKnownNetworkRegistry } from '../createLastKnownNetworkRegistry';\n\nexport const getLastKnownNetworkRegistry = createRuntimeServiceAccessKey(\n 'last-known-network-registry',\n (client) => createLastKnownNetworkRegistry(client)\n);\n","/** @notInstrumented */\nexport const formatWalletProviderGroupKey = (walletName: string): string =>\n walletName.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();\n","/* eslint-disable no-restricted-globals */\n\n/**\n * Retrieves all providers from a window path.\n *\n * Unlike getInjectedProviderFromWindow which returns only the first provider,\n * this function returns ALL providers found at the path, including those\n * in a .providers array if present.\n *\n * This is particularly useful for detecting wallet providers in wallet app\n * in-app browsers, where wallets inject their provider into the window object.\n *\n * @param path - Dot-separated path to traverse (e.g., \"ethereum\")\n * @returns Array of all providers found, or empty array if none\n * @notInstrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const getAllProvidersFromWindow = <T = unknown>(path: string): T[] => {\n if (typeof window === 'undefined') {\n return [];\n }\n\n // Traverse the path safely\n const target: unknown = path.split('.').reduce<unknown>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (acc, key) => (acc == null ? null : (acc as any)[key]),\n window\n );\n\n if (typeof target !== 'object' || target === null) {\n return [];\n }\n\n if (Array.isArray(target)) {\n return target as T[];\n }\n\n const providers: T[] = [];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const providersArray = (target as any).providers;\n\n // If target has a .providers array, return all providers from it\n if (providersArray && Array.isArray(providersArray)) {\n providers.push(...(providersArray as T[]));\n }\n\n // Always include the target itself as a provider (if it's not just a container)\n // This handles the case where window.ethereum is both a provider AND has a providers array\n providers.push(target as T);\n\n return providers;\n};\n","/* eslint-disable no-restricted-globals */\n/** @notInstrumented */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const getInjectedProviderFromWindow = <T = unknown>(\n path: string\n): T | null => {\n if (typeof window === 'undefined') {\n return null;\n }\n\n // Traverse the path safely\n const target: unknown = path.split('.').reduce<unknown>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (acc, key) => (acc == null ? null : (acc as any)[key]),\n window\n );\n\n if (typeof target !== 'object' || target === null) {\n return null;\n }\n\n if (Array.isArray(target)) {\n return target.length > 0 ? (target[0] as T) : null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const providersArray = (target as any).providers;\n\n if (providersArray && Array.isArray(providersArray)) {\n return providersArray.length > 0 ? (providersArray[0] as T) : null;\n }\n\n return target as T;\n};\n","import type { DynamicClient } from '../../../../../client/types/DynamicClient';\nimport { getLastKnownNetworkRegistry } from '../../../networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry/getLastKnownNetworkRegistry';\nimport type { WalletProvider } from '../../walletProvider.types';\n\ntype GetActiveNetworkIdFromLastKnownRegistry = (args: {\n client: DynamicClient;\n walletProviderKey: string;\n}) => ReturnType<WalletProvider['getActiveNetworkId']>;\n\n/** @notInstrumented */\nexport const getActiveNetworkIdFromLastKnownRegistry: GetActiveNetworkIdFromLastKnownRegistry =\n async ({ client, walletProviderKey }) => {\n const networkRegistry = getLastKnownNetworkRegistry(client);\n\n return networkRegistry.getNetworkId({ walletProviderKey });\n };\n","import type { DynamicClient } from '../../../../../client/types/DynamicClient';\nimport { getLastKnownNetworkRegistry } from '../../../networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry/getLastKnownNetworkRegistry';\nimport type { WalletProvider } from '../../walletProvider.types';\n\ntype SwitchActiveNetworkInLastKnownRegistry = (args: {\n client: DynamicClient;\n networkId: string;\n walletProviderKey: string;\n}) => ReturnType<NonNullable<WalletProvider['switchActiveNetwork']>>;\n\n/** @notInstrumented */\nexport const switchActiveNetworkInLastKnownRegistry: SwitchActiveNetworkInLastKnownRegistry =\n async ({ client, networkId, walletProviderKey }) => {\n const networkRegistry = getLastKnownNetworkRegistry(client);\n\n await networkRegistry.setNetworkId({\n networkId,\n walletProviderKey,\n });\n };\n","import EventEmitter from 'eventemitter3';\n\nimport { assertDefined } from '../../../../../utils/assertDefined';\nimport type { WalletProvider } from '../../walletProvider.types';\nimport type { WalletProviderEvents } from '../walletProviderEvents.types';\n\ntype CreateWalletProviderEventEmitterParams<R = void> = {\n /**\n * Callback responsible for removing the listeners from the external wallet provider event emitters\n * to the the Dynamic handlers that will emit the wallet provider events.\n * @notInstrumented\n */\n removeEventListeners: (params: {\n handleAccountsChanged: (params: { addresses: string[] }) => void;\n handleDisconnected: () => void;\n handleNetworkChanged: (params: { networkId: string }) => void;\n /**\n * Value returned by setupEventListeners, particularly useful for cleaning up the event listeners\n */\n setupReturnValue: R;\n }) => void;\n /**\n * Callback responsible for connecting the external wallet provider event emitters\n * to the the Dynamic handlers that will emit the wallet provider events.\n *\n * @returns May return a value that will be later passed to removeEventListeners as `setupReturnValue`\n */\n setupEventListeners: (params: {\n handleAccountsChanged: (params: { addresses: string[] }) => void;\n handleDisconnected: () => void;\n handleNetworkChanged: (params: { networkId: string }) => void;\n }) => R;\n /**\n * List of events that the wallet provider supports listening to.\n * Defaults to all events.\n */\n supportedEvents?: (keyof WalletProviderEvents)[];\n};\n\nexport type WalletProviderEventEmitter = {\n cleanupEventEmitter: () => void;\n getEventEmitter: () => WalletProvider['events'];\n};\n\n/**\n * Takes a callback that registers handlers for the external wallet provider.\n * Returns both a getter of an eventEmitter that can be exposed via the wallet provider\n * and a callback that will be used to destroy the listeners.\n * @notInstrumented\n */\nexport const createWalletProviderEventEmitter = <R = void>({\n removeEventListeners,\n setupEventListeners,\n supportedEvents = ['accountsChanged', 'disconnected', 'networkChanged'],\n}: CreateWalletProviderEventEmitterParams<R>): WalletProviderEventEmitter => {\n let eventEmitter: EventEmitter<WalletProviderEvents> | undefined;\n\n /** Value returned by setupEventListeners */\n let setupReturnValue: R;\n\n const handleAccountsChanged = (params: { addresses: string[] }) => {\n assertDefined(eventEmitter, 'Event emitter not defined');\n eventEmitter.emit('accountsChanged', params);\n };\n\n const handleDisconnected = () => {\n assertDefined(eventEmitter, 'Event emitter not defined');\n eventEmitter.emit('disconnected');\n };\n\n const handleNetworkChanged = (params: { networkId: string }) => {\n assertDefined(eventEmitter, 'Event emitter not defined');\n eventEmitter.emit('networkChanged', params);\n };\n\n const cleanupEventEmitter = () => {\n if (!eventEmitter) {\n return;\n }\n\n removeEventListeners({\n handleAccountsChanged,\n handleDisconnected,\n handleNetworkChanged,\n setupReturnValue,\n });\n\n eventEmitter = undefined;\n };\n\n const getEventEmitter = (): WalletProvider['events'] => {\n if (!eventEmitter) {\n eventEmitter = new EventEmitter<WalletProviderEvents>();\n\n setupReturnValue = setupEventListeners({\n handleAccountsChanged,\n handleDisconnected,\n handleNetworkChanged,\n });\n }\n\n return Object.assign(eventEmitter, { supportedEvents });\n };\n\n return {\n cleanupEventEmitter,\n getEventEmitter,\n };\n};\n","import type * as z from 'zod/mini';\n\nimport type { RealtimeChannelSchema } from '../realtime.types';\n\n/**\n * Defines a typed schema for a realtime channel — analogous to `createStorageKeySchema`\n * for storage. Pairs a channel name with a Zod schema that validates the shape of\n * messages sent and received on that channel. Pass the result to the realtime service's\n * `subscribe` / `unsubscribe` / `publish` methods to get end-to-end type safety.\n * @notInstrumented\n */\nexport const createRealtimeChannelSchema = <T>(params: {\n channel: string;\n schema: z.ZodMiniType<T>;\n}): RealtimeChannelSchema<T> => params;\n","/* eslint-disable func-style -- javascript requires this to be a function */\n\nimport { ArrayMustNotBeEmptyError } from './../../errors/ArrayMustNotBeEmptyError';\n\n/**\n * Asserts that a value is a non-empty array, throwing an error if it is null,\n * undefined, or has zero elements. This function acts as a type guard,\n * narrowing the type to a tuple of at least one element.\n *\n * @template T - The element type of the array being checked\n * @param value - The array (or possibly null/undefined value) to check\n * @param message - The error message to throw if the value is empty or missing\n * @throws Throws an error with the provided message if value is null, undefined, or empty\n * @example\n * ```typescript\n * const maybeNetworks: Network[] | undefined = getNetworks();\n * assertNonEmptyArray(maybeNetworks, 'At least one network is required');\n * // maybeNetworks is now typed as [Network, ...Network[]]\n * const first = maybeNetworks[0]; // safely accessible without `| undefined`\n * ```\n */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport function assertNonEmptyArray<T>(\n value: T[] | null | undefined,\n message: string\n): asserts value is [T, ...T[]] {\n if (!value || value.length === 0) {\n throw new ArrayMustNotBeEmptyError(message);\n }\n}\n","import { getBuffer } from \"../getBuffer\";\n\n/** @notInstrumented */\nexport const bufferToBase64 = (buf: Uint8Array): string => {\n const binstr = Array.prototype.map\n .call(buf, (ch: number) => String.fromCharCode(ch))\n .join('');\n return getBuffer().from(binstr, 'binary').toString('base64');\n};\n","import type { DynamicClient } from '../../client/types';\n\n/** The queue function `createSequenceQueue` returns. */\nexport type SequenceQueue = <T>(\n callback: () => Promise<T>,\n client: DynamicClient\n) => Promise<T>;\n\n/**\n * Creates a queue function that runs every callback passed to it **one at a\n * time, in FIFO order**, relative to every other call made through that same\n * queue function for the same client:\n *\n * - Every queued call runs — this is NOT last-wins/coalescing (see\n * `debouncedMutex` for that behavior instead).\n * - A callback that rejects does not stall the queue: the next queued\n * callback still runs.\n * - Each caller receives its own callback's resolution or rejection,\n * independent of other callers' outcomes.\n * - Different clients never block each other, even through the same queue\n * function.\n *\n * Useful for serializing read-modify-write cycles against a single piece of\n * storage/state so concurrent callers can't race and silently lose an update.\n *\n * @example\n * Without a queue, two concurrent callers incrementing a\n * persisted counter can both read `0`, both write `1`, and lose an update:\n * ```ts\n * const incrementStoredCount = async (client: DynamicClient) => {\n * const current = await storage.get('count'); // both callers read 0\n * await storage.set('count', current + 1); // both callers write 1\n * };\n *\n * await Promise.all([incrementStoredCount(client), incrementStoredCount(client)]);\n * // storage.get('count') === 1, but two increments were requested\n * ```\n *\n * Wrapping the same read-modify-write cycle in a queue forces the second\n * call to wait for the first to finish, so it reads the value the first call\n * just wrote:\n * ```ts\n * const queueCountWrite = createSequenceQueue();\n *\n * const incrementStoredCount = (client: DynamicClient) =>\n * queueCountWrite(async () => {\n * const current = await storage.get('count');\n * await storage.set('count', current + 1);\n * }, client);\n *\n * await Promise.all([incrementStoredCount(client), incrementStoredCount(client)]);\n * // storage.get('count') === 2 — both increments are applied\n * ```\n * @notInstrumented\n */\nexport const createSequenceQueue = (): SequenceQueue => {\n // Tracks the promise of the most recently enqueued callback per client, so\n // each new call can chain onto it and run only once its predecessor settles.\n const queueTails = new WeakMap<DynamicClient, Promise<unknown>>();\n\n // The callback is intentionally a bare positional param (not wrapped in an\n // object) to match the ergonomics of a queue function you call directly,\n // like `setTimeout`/`Promise.then` — wrapping it would obscure the call site.\n // eslint-disable-next-line custom-rules/require-single-object-param\n return <T>(callback: () => Promise<T>, client: DynamicClient): Promise<T> => {\n const previousTail = queueTails.get(client) ?? Promise.resolve();\n\n const result = previousTail.then(callback, callback);\n\n queueTails.set(client, result.catch(() => undefined));\n\n return result;\n };\n};\n","/**\n * Filter duplicates from an array by equality.\n * Uses a Set internally.\n * @notInstrumented\n */\nexport const filterDuplicates = <T>(array: T[]): T[] =>\n Array.from(new Set(array));\n","type ParseAmountToSmallestUnitParams = {\n amount: string;\n decimals: number;\n};\n\n/**\n * Converts a human-readable decimal amount string to the smallest unit\n * representation as a bigint, using string-based arithmetic to avoid\n * floating-point precision loss.\n *\n * @example\n * parseAmountToSmallestUnit({ amount: '1.5', decimals: 9 }) // 1500000000n (1.5 SOL in lamports)\n * parseAmountToSmallestUnit({ amount: '1.5', decimals: 8 }) // 150000000n (1.5 BTC in satoshis)\n * parseAmountToSmallestUnit({ amount: '10.5', decimals: 6 }) // 10500000n (10.5 USDC)\n * parseAmountToSmallestUnit({ amount: '0.1', decimals: 9 }) // 100000000n (no float error)\n *\n * @param params.amount - The amount as a decimal string (e.g. \"1.5\").\n * @param params.decimals - The number of decimal places for the token.\n * @returns The amount in smallest units as a bigint.\n * @notInstrumented\n */\nexport const parseAmountToSmallestUnit = ({\n amount,\n decimals,\n}: ParseAmountToSmallestUnitParams): bigint => {\n const [whole = '0', fraction = ''] = amount.split('.');\n const paddedFraction = fraction.padEnd(decimals, '0').slice(0, decimals);\n return BigInt(whole + paddedFraction);\n};\n","import { BaseError } from './base';\n\ntype ReactNativeOnlyErrorParams = {\n apiName: string;\n};\n\nexport class ReactNativeOnlyError extends BaseError {\n constructor({ apiName }: ReactNativeOnlyErrorParams) {\n super({\n cause: null,\n code: 'react_native_only_error',\n docsUrl: null,\n name: 'ReactNativeOnlyError',\n shortMessage: `${apiName} is only available in React Native environments.`,\n });\n }\n}\n","import { ReactNativeOnlyError } from '../../../errors/ReactNativeOnlyError';\nimport type { ReactNativeManifest } from '../nativeManifest.types';\n\n/**\n * Returns the React Native manifest containing native SDK metadata.\n *\n * This function is only available in React Native environments.\n * On web, it throws a `ReactNativeOnlyError`.\n *\n * @notInstrumented\n */\nexport const getReactNativeManifest = (): ReactNativeManifest => {\n throw new ReactNativeOnlyError({ apiName: 'getReactNativeManifest' });\n};\n","const SCHEME_SEPARATOR = '://';\n\n/** Parameters for {@link getNativeLinkScheme}. */\nexport type GetNativeLinkSchemeParams = {\n /** A native link, e.g. `myapp://wallet/connect`. */\n nativeLink: string | undefined;\n};\n\n/**\n * Reduces a native link to just its URL scheme (e.g.\n * `myapp://wallet/connect` -> `myapp://`), dropping anything after the scheme\n * separator. A native link may be configured with an in-app route, but a\n * consumer that only needs to deep link back into the app (rather than a\n * specific route) should use the scheme alone. Links without a scheme\n * separator are returned unchanged (they cannot carry a route), and\n * `undefined` passes through.\n *\n * @notInstrumented\n */\nexport const getNativeLinkScheme = ({\n nativeLink,\n}: GetNativeLinkSchemeParams): string | undefined => {\n if (nativeLink === undefined) {\n return undefined;\n }\n\n const schemeSeparatorIndex = nativeLink.indexOf(SCHEME_SEPARATOR);\n\n if (schemeSeparatorIndex === -1) {\n return nativeLink;\n }\n\n return nativeLink.slice(0, schemeSeparatorIndex + SCHEME_SEPARATOR.length);\n};\n","import { ReactNativeOnlyError } from '../../../errors/ReactNativeOnlyError';\nimport type { SetScreenshotProtectionParams } from './setScreenshotProtection.types';\n\n/**\n * Web/desktop counterpart of the React Native `setScreenshotProtection` (see\n * `setScreenshotProtection.native.ts`).\n *\n * Screenshot/recording protection is a native window-level capability with no\n * web equivalent. Rather than silently no-op (which would let a desktop caller\n * believe content is protected when it is not), this throws a\n * `ReactNativeOnlyError` so an accidental web/desktop call is loud — the API is\n * intentionally React-Native-only.\n *\n * @notInstrumented\n */\nexport const setScreenshotProtection = ({\n // Destructured to keep an identical signature to the native implementation\n // for the platform-type parity check; unused because this always throws.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enabled,\n}: SetScreenshotProtectionParams): void => {\n throw new ReactNativeOnlyError({ apiName: 'setScreenshotProtection' });\n};\n","import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\n/**\n * @categoryDescription Extension Development\n * Core utilities and functions for building Dynamic SDK extensions.\n * These APIs provide low-level access to the SDK internals and are intended\n * for advanced use cases and extension development. Most applications should\n * use the higher-level APIs exported from the main SDK package instead.\n */\n\n/** @category Extension Development */\nexport { createAppForegroundSubscriber } from '../services/appForeground/createAppForegroundSubscriber';\n/** @category Extension Development */\nexport { getCore } from '../client/core/getCore';\n/** @category Extension Development */\nexport type { DynamicCore, DynamicCoreState } from '../client/core/types';\n/** @category Extension Development */\nexport { getDefaultClient } from '../client/defaultClient';\n/** @category Extension Development */\nexport { APIError } from '../errors/APIError';\n/** @category Extension Development */\nexport { ArrayMustNotBeEmptyError } from '../errors/ArrayMustNotBeEmptyError';\n/** @category Extension Development */\nexport { CannotTrackError } from '../errors/CannotTrackError';\n/** @category Extension Development */\nexport { ClientNotFoundError } from '../errors/ClientNotFoundError';\n/** @category Extension Development */\nexport { ClientsDoNotMatchError } from '../errors/ClientsDoNotMatchError';\n/** @category Extension Development */\nexport { InvalidStorageSet } from '../errors/InvalidStorageSet';\n/** @category Extension Development */\nexport { InvalidWalletProviderKeyError } from '../errors/InvalidWalletProviderKeyError';\n/** @category Extension Development */\nexport { MethodNotImplementedError } from '../errors/MethodNotImplementedError';\n/** @category Extension Development */\nexport { MultipleClientsFoundError } from '../errors/MultipleClientsFoundError';\n/** @category Extension Development */\nexport { NoWalletProviderFoundError } from '../errors/NoWalletProviderFoundError';\n/** @category Extension Development */\nexport { ValueMustBeDefinedError } from '../errors/ValueMustBeDefinedError';\n/** @category Extension Development */\nexport { createApiClient, DYNAMIC_SDK_API_VERSION } from '../modules/apiClient';\n/**\n * Re-exported so a caller using the `Raw` variant of a governed business-account\n * mutation (whose convenience method cannot distinguish a 202 from a normal\n * success) can parse the 202 body without reaching into `@dynamic-labs/sdk-api-core`\n * directly, which `no-restricted-imports` blocks outside this package.\n * @category Extension Development\n */\nexport {\n type AddBusinessAccountMemberSdkRequest,\n BusinessAccountApprovalsPendingFromJSON,\n BusinessAccountApprovalsPendingReasonEnum,\n BusinessAccountProposalStatus,\n type UpdateBusinessAccountMemberRoleSdkRequest,\n} from '@dynamic-labs/sdk-api-core';\n/** @category Extension Development */\nexport { createVisit } from '../modules/auth/createVisit';\n/** @category Extension Development */\nexport { logoutWithReason } from '../modules/auth/logoutWithReason';\n/** @category Extension Development */\nexport { updateAuthFromVerifyResponse } from '../modules/auth/updateAuthFromVerifyResponse';\n/** @category Extension Development */\nexport { consumeCaptchaToken } from '../modules/captcha/consumeCaptchaToken';\n/** @category Extension Development */\nexport { setCaptchaToken } from '../modules/captcha/setCaptchaToken';\n/** @category Extension Development */\nexport { emitEvent } from '../modules/clientEvents';\n/** @category Extension Development */\nexport { hasExtension } from '../modules/extension/hasExtension';\n/** @category Extension Development */\nexport { registerExtension } from '../modules/extension/registerExtension';\n/** @category Extension Development */\nexport { waitForProjectSettings } from '../modules/initializeClient/waitForProjectSettings';\n/** @category Extension Development */\nexport { getElevatedAccessToken } from '../modules/auth/getElevatedAccessToken';\n/** @category Extension Development */\nexport { consumeMfaTokenIfRequiredForAction } from '../modules/mfa/consumeMfaTokenIfRequiredForAction';\n/** @category Extension Development */\nexport { getActionAuthorizationTokens } from '../modules/auth/getActionAuthorizationTokens';\n/** @category Extension Development */\nexport { isCookieEnabled } from '../modules/projectSettings/isCookieEnabled';\n/** @category Extension Development */\nexport { generateSessionKeys } from '../modules/sessionKeys/generateSessionKeys/generateSessionKeys';\n/** @category Extension Development */\nexport { getSessionKeys } from '../modules/sessionKeys/getSessionKeys';\n/** @category Extension Development */\nexport {\n type BusinessAccountIntent,\n signBusinessAccountApproval,\n signBusinessAccountIntent,\n} from '../modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent';\n/** @category Extension Development */\nexport { getSignedSessionId } from '../modules/sessionKeys/getSignedSessionId';\n/** @category Extension Development */\nexport type { SessionKeys } from '../modules/sessionKeys/sessionKeys.types';\n/** @category Extension Development */\nexport { CHAINS_INFO_MAP } from '../modules/wallets/constants';\n/** @category Extension Development */\nexport { emitWalletAccountsChangedEvent } from '../modules/wallets/emitWalletAccountsChangedEvent';\n/** @category Extension Development */\nexport { getWalletProviders } from '../modules/wallets/getWalletProviders';\n/** @category Extension Development */\nexport { createBaseNetworkProvider } from '../modules/wallets/networks/createBaseNetworkProvider';\n/** @category Extension Development */\nexport { getNetworkDataForNetworkId } from '../modules/wallets/networks/getNetworkDataForNetworkId';\n/** @category Extension Development */\nexport { getNetworkProviderFromNetworkId } from '../modules/wallets/networks/getNetworkProviderFromNetworkId';\n/** @category Extension Development */\nexport { getNetworkProviders } from '../modules/wallets/networks/getNetworkProviders';\n/** @category Extension Development */\nexport { getLastKnownNetworkRegistry } from '../modules/wallets/networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry';\n/** @category Extension Development */\nexport type { LastKnownNetworkRegistry } from '../modules/wallets/networks/lastKnownNetworkRegistry/LastKnownNetworkRegistry.types';\n/** @category Extension Development */\nexport type { BaseNetworkProvider } from '../modules/wallets/networks/networkProvider/networkProvider.types';\n/** @category Extension Development */\nexport {\n getNetworkProviderBuilderRegistry,\n type NetworkProviderBuilder,\n type NetworkProviderBuilderRegistry,\n} from '../modules/wallets/networks/networkProviderBuilderRegistry';\n/** @category Extension Development */\nexport {\n getUriConnectionStarterRegistry,\n type StartUriConnectionParams,\n type UriConnectionStarter,\n type UriConnectionStarterRegistry,\n} from '../modules/wallets/uriConnectionStarterRegistry';\n/** @category Extension Development */\nexport { reconcileWalletAccountsAgainstClient } from '../modules/wallets/reconcileWalletAccountsAgainstClient';\n/** @category Extension Development */\nexport { removeUnverifiedWalletAccount } from '../modules/wallets/unverifiedWalletAccounts/removeUnverifiedWalletAccount';\nexport { setUnverifiedWalletAccounts } from '../modules/wallets/unverifiedWalletAccounts/setUnverifiedWalletAccounts';\n/** @category Extension Development */\nexport { formatSignInMessage } from '../modules/wallets/utils/formatSignInMessage';\n/** @category Extension Development */\nexport { formatWalletAccountId } from '../modules/wallets/utils/formatWalletAccountId';\n/** @category Extension Development */\nexport { formatWalletProviderGroupKey } from '../modules/wallets/utils/formatWalletProviderGroupKey';\n/** @category Extension Development */\nexport { formatWalletProviderKey } from '../modules/wallets/utils/formatWalletProviderKey';\n/** @category Extension Development */\nexport { getAllProvidersFromWindow } from '../modules/wallets/utils/getAllProvidersFromWindow';\n/** @category Extension Development */\nexport { getInjectedProviderFromWindow } from '../modules/wallets/utils/getInjectedProviderFromWindow';\n/** @category Extension Development */\nexport { getVerifiedCredentialForWalletAccount } from '../modules/wallets/utils/getVerifiedCredentialForWalletAccount';\n/** @category Extension Development */\nexport { getWalletProviderFromWalletAccount } from '../modules/wallets/utils/getWalletProviderFromWalletAccount';\n/** @category Extension Development */\nexport { normalizeWalletNameWithChain } from '../modules/wallets/utils/normalizeWalletNameWithChain';\n/** @category Extension Development */\nexport { verifyMessageSignatureOwnership } from '../modules/wallets/verifyMessageSignatureOwnership';\n/** @category Extension Development */\nexport type { BaseWalletAccount } from '../modules/wallets/walletAccount';\n/** @category Extension Development */\nexport type {\n ConfirmTransactionParams,\n ExecuteSwapTransactionParams,\n ExecuteSwapTransactionResult,\n ExecuteYieldTransactionParams,\n ExecuteYieldTransactionResult,\n TransferAmountParams,\n WalletProvider,\n WalletProviderConnectAddress,\n} from '../modules/wallets/walletProvider';\n/** @category Extension Development */\nexport { getActiveNetworkIdFromLastKnownRegistry } from '../modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry';\n/** @category Extension Development */\nexport { switchActiveNetworkInLastKnownRegistry } from '../modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry';\n/** @category Extension Development */\nexport { createWalletProviderEventEmitter } from '../modules/wallets/walletProvider/events/createWalletProviderEventEmitter';\nexport type { WalletProviderEventEmitter } from '../modules/wallets/walletProvider/events/createWalletProviderEventEmitter';\n/** @category Extension Development */\nexport { splitWalletProviderKey } from '../modules/wallets/walletProvider/splitWalletProviderKey';\n/** @category Extension Development */\nexport {\n getWalletProviderRegistry,\n WalletProviderPriority,\n} from '../modules/wallets/walletProviderRegistry';\n/** @category Extension Development */\nexport type {\n AsyncProcessEntry,\n AsyncProcessStatus,\n AsyncTrack,\n AsyncTrackEmitter,\n} from '../services/asyncTrack/asyncTrack.types';\n/** @category Extension Development */\nexport { createCrossTabBroadcast } from '../services/crossTabBroadcast/createCrossTabBroadcast';\n/** @category Extension Development */\nexport type {\n CrossTabBroadcast,\n CrossTabBroadcastMessage,\n} from '../services/crossTabBroadcast';\n/** @category Extension Development */\nexport { CrossTabBroadcastMessageSchema } from '../services/crossTabBroadcast';\n/** @category Extension Development */\nexport { createRealtimeChannelSchema } from '../services/realtime/createRealtimeChannelSchema';\n/** @category Extension Development */\nexport { createRealtimeService } from '../services/realtime/createRealtimeService';\n/** @category Extension Development */\nexport type {\n RealtimeChannelSchema,\n RealtimeConnectionState,\n RealtimeService,\n} from '../services/realtime';\n/** @category Extension Development */\nexport { createLogger } from '../services/logger/createLogger';\n/** @category Extension Development */\nexport type { Logger, LogLevel } from '../services/logger/logger.types';\n/** @category Extension Development */\nexport { createKeychainService } from '../services/keychain';\n/** @category Extension Development */\nexport type { KeychainService } from '../services/keychain';\n/** @category Extension Development */\nexport type { PasskeyService } from '../services/passkey';\n/** @category Extension Development */\nexport {\n createRuntimeServiceAccessKey,\n type RuntimeServices,\n} from '../services/runtimeServices';\n/** @category Extension Development */\nexport {\n createLocalStorageAdapter,\n createStorage,\n createStorageKeySchema,\n type Storage,\n type StorageAdapter,\n type StorageAdapterOptions,\n type StorageKeySchema,\n type StorageKeySchemaConfig,\n type StorageTier,\n} from '../services/storage';\n/** @category Extension Development */\nexport type { ExtendParameters } from '../types/ExtendParameters';\n/** @category Extension Development */\nexport { assertDefined } from '../utils/assertDefined';\n/** @category Extension Development */\nexport { assertSafeNavigationUrl } from '../utils/assertSafeNavigationUrl';\n/** @category Extension Development */\nexport { UnsafeNavigationUrlError } from '../errors/UnsafeNavigationUrlError';\n/** @category Extension Development */\nexport { assertNonEmptyArray } from '../utils/assertNonEmptyArray';\n/** @category Extension Development */\nexport { bufferToBase64 } from '../utils/bufferToBase64';\n/** @category Extension Development */\nexport type { DebouncedMutex } from '../utils/debouncedMutex/debouncedMutex.types';\n/** @category Extension Development */\nexport { createSequenceQueue } from '../utils/createSequenceQueue';\n/** @category Extension Development */\nexport type { SequenceQueue } from '../utils/createSequenceQueue';\n/** @category Extension Development */\nexport { filterDuplicates } from '../utils/filterDuplicates';\n/** @category Extension Development */\nexport { getBuffer } from '../utils/getBuffer';\n/** @category Extension Development */\nexport { getChainFromVerifiedCredentialChain } from '../utils/getChainFromVerifiedCredentialChain';\n/** @category Extension Development */\nexport { getKeychainIndexedDBName } from '../utils/getKeychainIndexedDBName';\n/** @category Extension Development */\nexport { getNonce } from '../utils/getNonce';\n/** @category Extension Development */\nexport { getPlatform } from '../utils/getPlatform/getPlatform';\n/** @category Extension Development */\nexport type { SdkPlatform } from '../utils/getPlatform/getPlatform.types';\n/** @category Extension Development */\nexport { isServerSideRendering } from '../utils/isServerSideRendering';\n/** @category Extension Development */\nexport { parseAmountToSmallestUnit } from '../utils/parseAmountToSmallestUnit';\n/** @category Extension Development */\nexport type { ObservableState } from '../utils/observable/observable.types';\n/** @category Extension Development */\nexport { createSignInMessageStatement } from '../modules/wallets/utils/getSignInMessage/createSignInMessageStatement';\n/** @category Extension Development */\nexport { subscribeWithSelector } from '../utils/observable/subscribeWithSelector';\n/** @category Extension Development */\nexport { updateWalletProviderKeysForVerifiedCredentials } from '../modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials';\n/** @category Extension Development */\nexport { DYNAMIC_ICONIC_SPRITE_URL } from '../constants';\n/** @category Extension Development */\nexport { createDeferredPromise } from '../utils/deferredPromise';\n/** @category Extension Development */\nexport { getDeviceSigner } from '../modules/deviceRegistration/getDeviceSigner';\n/** @category Extension Development */\nexport { getHeadersForNonceSignedByDeviceSigners } from '../modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners';\n/** @category Extension Development */\nexport { createDeviceSignatureHeadersMiddleware } from '../modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware';\n/** @category Extension Development */\nexport { randomString } from '../utils/randomString';\n/** @category Extension Development */\nexport { getReactNativeManifest } from '../services/nativeManifest/getReactNativeManifest';\n/** @category Extension Development */\nexport type { ReactNativeManifest } from '../services/nativeManifest/nativeManifest.types';\n/** @category Extension Development */\nexport { getAppMetadata } from '../utils/getAppMetadata';\n/** @category Extension Development */\nexport type { AppMetadata } from '../utils/getAppMetadata';\n/** @category Extension Development */\nexport { getNativeLinkScheme } from '../utils/getNativeLinkScheme';\n/** @category Extension Development */\nexport type { GetNativeLinkSchemeParams } from '../utils/getNativeLinkScheme';\n/** @category Extension Development */\nexport { assertSafeDeeplinkUrl } from '../utils/assertSafeDeeplinkUrl';\n/** @category Extension Development */\nexport { setScreenshotProtection } from '../modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection';\n/** @category Extension Development */\nexport type { SetScreenshotProtectionParams } from '../modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.types';\n/** @category Extension Development */\nexport {\n createEventEmitter,\n type EventEmitter,\n} from './../services/eventEmitter';\n"],"mappings":";;;;;;;;;;;;AAEA,IAAa,2BAAb,cAA8C,UAAU;CAEtD,YAAY,SAAiB;AAC3B,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;;;;;;ACTN,IAAa,yBAAb,cAA4C,UAAU;CACpD,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;;;;;;ACRN,IAAa,4BAAb,cAA+C,UAAU;CACvD,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;;;;;;;;;;;;;;;;;ACON,MAAa,qBACX,EAAE,gBACF,WACS;AAGT,CAFa,QAAQ,OAAO,CAEvB,WAAW,IAAI,aAAa;;;;;;AChBnC,MAAa,yBAAyB,OACpC,WAC6B;CAG7B,MAAM,yBAFO,QAAQ,OAAO,CAEQ,UAAU,WAC5C,mCACD;AAED,eAAc,wBAAwB,qCAAqC;AAE3E,OAAM,uBAAuB;AAE7B,eACE,OAAO,iBACP,kEACD;AAED,QAAO,OAAO;;;;;ACnBhB,MAAM,mBAAmB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDlD,MAAa,4BAA4B,OACvC,EAAE,UACF,WAC6C;AAQ7C,QAAO;EAAE;EAAQ,iBALO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;AACnD,KAAI,eAAe,OACjB;CAGF,MAAM,uBAAuB,WAAW,QAAQ,iBAAiB;AAEjE,KAAI,yBAAyB,GAC3B,QAAO;AAGT,QAAO,WAAW,MAAM,GAAG,uBAAuB,EAAwB;;;;;;;;;;;;;;;;;ACjB5E,MAAa,2BAA2B,EAItC,cACyC;AACzC,OAAM,IAAI,qBAAqB,EAAE,SAAS,2BAA2B,CAAC;;;;;ACfxE,qBAAqBC,MAAaC,QAAe"}
|
|
1
|
+
{"version":3,"file":"core.esm.js","names":["getNetworkId: LastKnownNetworkRegistry['getNetworkId']","setNetworkId: LastKnownNetworkRegistry['setNetworkId']","target: unknown","providers: T[]","target: unknown","getActiveNetworkIdFromLastKnownRegistry: GetActiveNetworkIdFromLastKnownRegistry","switchActiveNetworkInLastKnownRegistry: SwitchActiveNetworkInLastKnownRegistry","eventEmitter: EventEmitter<WalletProviderEvents> | undefined","setupReturnValue: R","EventEmitter","packageName","packageVersion"],"sources":["../src/errors/ArrayMustNotBeEmptyError.ts","../src/errors/ClientsDoNotMatchError.ts","../src/errors/MultipleClientsFoundError.ts","../src/modules/extension/registerExtension/registerExtension.ts","../src/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.ts","../src/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.ts","../src/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.ts","../src/modules/wallets/networks/lastKnownNetworkRegistry/createLastKnownNetworkRegistry/schema.ts","../src/modules/wallets/networks/lastKnownNetworkRegistry/createLastKnownNetworkRegistry/createLastKnownNetworkRegistry.ts","../src/modules/wallets/networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry/getLastKnownNetworkRegistry.ts","../src/modules/wallets/utils/formatWalletProviderGroupKey/formatWalletProviderGroupKey.ts","../src/modules/wallets/utils/getAllProvidersFromWindow/getAllProvidersFromWindow.ts","../src/modules/wallets/utils/getInjectedProviderFromWindow/getInjectedProviderFromWindow.ts","../src/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.ts","../src/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.ts","../src/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.ts","../src/services/realtime/createRealtimeChannelSchema/createRealtimeChannelSchema.ts","../src/utils/assertNonEmptyArray/assertNonEmptyArray.ts","../src/utils/bufferToBase64/bufferToBase64.ts","../src/utils/createSequenceQueue/createSequenceQueue.ts","../src/utils/filterDuplicates/filterDuplicates.ts","../src/utils/parseAmountToSmallestUnit/parseAmountToSmallestUnit.ts","../src/errors/ReactNativeOnlyError.ts","../src/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.ts","../src/utils/getNativeLinkScheme/getNativeLinkScheme.ts","../src/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.ts","../src/exports/core.ts"],"sourcesContent":["import { BaseError } from './base';\n\nexport class ArrayMustNotBeEmptyError extends BaseError {\n // eslint-disable-next-line custom-rules/require-single-object-param\n constructor(message: string) {\n super({\n cause: null,\n code: 'array_must_not_be_empty_error',\n docsUrl: null,\n name: 'ArrayMustNotBeEmpty',\n shortMessage: message,\n });\n }\n}\n","import { BaseError } from './base';\n\nexport class ClientsDoNotMatchError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'clients_do_not_match_error',\n docsUrl: null,\n name: 'ClientsDoNotMatchError',\n shortMessage: 'Clients do not match',\n });\n }\n}\n","import { BaseError } from './base';\n\nexport class MultipleClientsFoundError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'multiple_clients_found_error',\n docsUrl: null,\n name: 'MultipleClientsFoundError',\n shortMessage:\n 'Multiple Dynamic clients have been initialized. Please provide the intended client for this action explicitly',\n });\n }\n}\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype RegisterExtensionParams = {\n extensionKey: string;\n};\n\n/**\n * Registers an extension to the client.\n *\n * Other extensions can be aware of which extensions are present,\n * and allows creating dependencies between extensions.\n *\n * @param client - The client instance.\n * @param extensionKey - The key of the extension to register.\n * @returns The client instance.\n * @notInstrumented\n */\nexport const registerExtension = (\n { extensionKey }: RegisterExtensionParams,\n client: DynamicClient\n): void => {\n const core = getCore(client);\n\n core.extensions.add(extensionKey);\n};\n","import type { ProjectSettings } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { FETCH_PROJECT_SETTINGS_TRACKER_KEY } from '../consts';\n\n/** @notInstrumented */\nexport const waitForProjectSettings = async (\n client: DynamicClient\n): Promise<ProjectSettings> => {\n const core = getCore(client);\n\n const projectSettingsTracker = core.initTrack.getTracker<void>(\n FETCH_PROJECT_SETTINGS_TRACKER_KEY\n );\n\n assertDefined(projectSettingsTracker, 'Project settings tracker not found');\n\n await projectSettingsTracker.promise;\n\n assertDefined(\n client.projectSettings,\n 'Project settings still not available after awaiting its tracker'\n );\n\n return client.projectSettings;\n};\n","import type { Chain } from '../../../chain';\nimport type {\n BaseNetworkProvider,\n NetworkData,\n} from '../networkProvider/networkProvider.types';\n\n/** @notInstrumented */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const createBaseNetworkProvider = <TChain extends Chain = Chain>(\n chain: TChain,\n networkData: NetworkData\n): Omit<BaseNetworkProvider<TChain>, 'getBalance'> => ({\n blockExplorerUrls: networkData.blockExplorerUrls,\n chain,\n displayName: networkData.displayName,\n iconUrl: networkData.iconUrl,\n id: `${chain}-${networkData.networkId}`,\n name: networkData.name,\n nativeCurrency: networkData.nativeCurrency,\n networkId: networkData.networkId,\n rpcUrls: networkData.rpcUrls,\n testnet: networkData.testnet,\n});\n","import type { DynamicClient } from '../../../../client/types';\nimport type { Chain } from '../../../chain';\nimport { getNetworksData } from '../getNetworksData';\nimport type { NetworkData } from '../networkProvider/networkProvider.types';\n\ntype GetNetworkDataForNetworkIdProps = {\n chain: Chain;\n networkId: string;\n};\n\n/** @notInstrumented */\nexport const getNetworkDataForNetworkId = (\n { networkId, chain }: GetNetworkDataForNetworkIdProps,\n client: DynamicClient\n): NetworkData | undefined => {\n const networksData = getNetworksData(client);\n\n const networkData = networksData.find(\n (networkData) =>\n networkData.networkId === networkId && networkData.chain === chain\n );\n\n return networkData;\n};\n","import * as z from 'zod/mini';\n\nimport { createStorageKeySchema } from '../../../../../services/storage';\n\nexport const networkRegistryStorageKeySchema = createStorageKeySchema({\n key: 'lastKnownNetworkRegistry',\n schema: z.record(z.string(), z.string()),\n});\n","import { getCore } from '../../../../../client/core/getCore';\nimport type { DynamicClient } from '../../../../../client/types';\nimport { NoNetworkProvidersError } from '../../../../../errors/NoNetworkProvidersError';\nimport { assertDefined } from '../../../../../utils/assertDefined';\nimport { getWalletProviderByKey } from '../../../getWalletProviderByKey';\nimport { getNetworkProviders } from '../../getNetworkProviders';\nimport type { LastKnownNetworkRegistry } from '../LastKnownNetworkRegistry.types';\nimport { networkRegistryStorageKeySchema } from './schema';\n\n/**\n * Creates the registry that keeps tabs on which wallet provider is\n * connected to which network.\n *\n * Reminder that this will not be used for chains that have an internal way to\n * switch networks (ex EVM).\n * @notInstrumented\n */\nexport const createLastKnownNetworkRegistry = (\n client: DynamicClient\n): LastKnownNetworkRegistry => {\n const core = getCore(client);\n\n const walletProviderKeyToNetworkId = new Map<string, string>();\n\n const getNetworkId: LastKnownNetworkRegistry['getNetworkId'] = async ({\n walletProviderKey,\n }) => {\n // Priorities:\n // 1. In memory\n // 2. Storage\n // 3. First available network for this wallet's chain\n\n if (walletProviderKeyToNetworkId.has(walletProviderKey)) {\n return {\n networkId: walletProviderKeyToNetworkId.get(\n walletProviderKey\n ) as string,\n };\n }\n\n const storageRecords = await core.storage.getItem(\n networkRegistryStorageKeySchema\n );\n\n if (storageRecords && storageRecords[walletProviderKey]) {\n const networkId = storageRecords[walletProviderKey];\n\n walletProviderKeyToNetworkId.set(walletProviderKey, networkId);\n\n return { networkId };\n }\n\n const walletProvider = getWalletProviderByKey(\n { walletProviderKey },\n client\n );\n\n const networkProviders = getNetworkProviders(client);\n\n if (networkProviders.length === 0) {\n throw new NoNetworkProvidersError();\n }\n\n const defaultNetworkProvider = networkProviders.find(\n (networkProvider) => networkProvider.chain === walletProvider.chain\n );\n\n assertDefined(\n defaultNetworkProvider,\n `No networks found for chain ${walletProvider.chain}`\n );\n\n walletProviderKeyToNetworkId.set(\n walletProviderKey,\n defaultNetworkProvider.networkId\n );\n\n // No need to set in storage, as we're just falling back to the default\n return { networkId: defaultNetworkProvider.networkId };\n };\n\n const setNetworkId: LastKnownNetworkRegistry['setNetworkId'] = async ({\n networkId,\n walletProviderKey,\n }) => {\n walletProviderKeyToNetworkId.set(walletProviderKey, networkId);\n\n await core.storage.setItem(\n networkRegistryStorageKeySchema,\n Object.fromEntries(walletProviderKeyToNetworkId.entries())\n );\n };\n\n return { getNetworkId, setNetworkId };\n};\n","import { createRuntimeServiceAccessKey } from '../../../../../services/runtimeServices';\nimport { createLastKnownNetworkRegistry } from '../createLastKnownNetworkRegistry';\n\nexport const getLastKnownNetworkRegistry = createRuntimeServiceAccessKey(\n 'last-known-network-registry',\n (client) => createLastKnownNetworkRegistry(client)\n);\n","/** @notInstrumented */\nexport const formatWalletProviderGroupKey = (walletName: string): string =>\n walletName.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();\n","/* eslint-disable no-restricted-globals */\n\n/**\n * Retrieves all providers from a window path.\n *\n * Unlike getInjectedProviderFromWindow which returns only the first provider,\n * this function returns ALL providers found at the path, including those\n * in a .providers array if present.\n *\n * This is particularly useful for detecting wallet providers in wallet app\n * in-app browsers, where wallets inject their provider into the window object.\n *\n * @param path - Dot-separated path to traverse (e.g., \"ethereum\")\n * @returns Array of all providers found, or empty array if none\n * @notInstrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const getAllProvidersFromWindow = <T = unknown>(path: string): T[] => {\n if (typeof window === 'undefined') {\n return [];\n }\n\n // Traverse the path safely\n const target: unknown = path.split('.').reduce<unknown>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (acc, key) => (acc == null ? null : (acc as any)[key]),\n window\n );\n\n if (typeof target !== 'object' || target === null) {\n return [];\n }\n\n if (Array.isArray(target)) {\n return target as T[];\n }\n\n const providers: T[] = [];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const providersArray = (target as any).providers;\n\n // If target has a .providers array, return all providers from it\n if (providersArray && Array.isArray(providersArray)) {\n providers.push(...(providersArray as T[]));\n }\n\n // Always include the target itself as a provider (if it's not just a container)\n // This handles the case where window.ethereum is both a provider AND has a providers array\n providers.push(target as T);\n\n return providers;\n};\n","/* eslint-disable no-restricted-globals */\n/** @notInstrumented */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const getInjectedProviderFromWindow = <T = unknown>(\n path: string\n): T | null => {\n if (typeof window === 'undefined') {\n return null;\n }\n\n // Traverse the path safely\n const target: unknown = path.split('.').reduce<unknown>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (acc, key) => (acc == null ? null : (acc as any)[key]),\n window\n );\n\n if (typeof target !== 'object' || target === null) {\n return null;\n }\n\n if (Array.isArray(target)) {\n return target.length > 0 ? (target[0] as T) : null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const providersArray = (target as any).providers;\n\n if (providersArray && Array.isArray(providersArray)) {\n return providersArray.length > 0 ? (providersArray[0] as T) : null;\n }\n\n return target as T;\n};\n","import type { DynamicClient } from '../../../../../client/types/DynamicClient';\nimport { getLastKnownNetworkRegistry } from '../../../networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry/getLastKnownNetworkRegistry';\nimport type { WalletProvider } from '../../walletProvider.types';\n\ntype GetActiveNetworkIdFromLastKnownRegistry = (args: {\n client: DynamicClient;\n walletProviderKey: string;\n}) => ReturnType<WalletProvider['getActiveNetworkId']>;\n\n/** @notInstrumented */\nexport const getActiveNetworkIdFromLastKnownRegistry: GetActiveNetworkIdFromLastKnownRegistry =\n async ({ client, walletProviderKey }) => {\n const networkRegistry = getLastKnownNetworkRegistry(client);\n\n return networkRegistry.getNetworkId({ walletProviderKey });\n };\n","import type { DynamicClient } from '../../../../../client/types/DynamicClient';\nimport { getLastKnownNetworkRegistry } from '../../../networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry/getLastKnownNetworkRegistry';\nimport type { WalletProvider } from '../../walletProvider.types';\n\ntype SwitchActiveNetworkInLastKnownRegistry = (args: {\n client: DynamicClient;\n networkId: string;\n walletProviderKey: string;\n}) => ReturnType<NonNullable<WalletProvider['switchActiveNetwork']>>;\n\n/** @notInstrumented */\nexport const switchActiveNetworkInLastKnownRegistry: SwitchActiveNetworkInLastKnownRegistry =\n async ({ client, networkId, walletProviderKey }) => {\n const networkRegistry = getLastKnownNetworkRegistry(client);\n\n await networkRegistry.setNetworkId({\n networkId,\n walletProviderKey,\n });\n };\n","import EventEmitter from 'eventemitter3';\n\nimport { assertDefined } from '../../../../../utils/assertDefined';\nimport type { WalletProvider } from '../../walletProvider.types';\nimport type { WalletProviderEvents } from '../walletProviderEvents.types';\n\ntype CreateWalletProviderEventEmitterParams<R = void> = {\n /**\n * Callback responsible for removing the listeners from the external wallet provider event emitters\n * to the the Dynamic handlers that will emit the wallet provider events.\n * @notInstrumented\n */\n removeEventListeners: (params: {\n handleAccountsChanged: (params: { addresses: string[] }) => void;\n handleDisconnected: () => void;\n handleNetworkChanged: (params: { networkId: string }) => void;\n /**\n * Value returned by setupEventListeners, particularly useful for cleaning up the event listeners\n */\n setupReturnValue: R;\n }) => void;\n /**\n * Callback responsible for connecting the external wallet provider event emitters\n * to the the Dynamic handlers that will emit the wallet provider events.\n *\n * @returns May return a value that will be later passed to removeEventListeners as `setupReturnValue`\n */\n setupEventListeners: (params: {\n handleAccountsChanged: (params: { addresses: string[] }) => void;\n handleDisconnected: () => void;\n handleNetworkChanged: (params: { networkId: string }) => void;\n }) => R;\n /**\n * List of events that the wallet provider supports listening to.\n * Defaults to all events.\n */\n supportedEvents?: (keyof WalletProviderEvents)[];\n};\n\nexport type WalletProviderEventEmitter = {\n cleanupEventEmitter: () => void;\n getEventEmitter: () => WalletProvider['events'];\n};\n\n/**\n * Takes a callback that registers handlers for the external wallet provider.\n * Returns both a getter of an eventEmitter that can be exposed via the wallet provider\n * and a callback that will be used to destroy the listeners.\n * @notInstrumented\n */\nexport const createWalletProviderEventEmitter = <R = void>({\n removeEventListeners,\n setupEventListeners,\n supportedEvents = ['accountsChanged', 'disconnected', 'networkChanged'],\n}: CreateWalletProviderEventEmitterParams<R>): WalletProviderEventEmitter => {\n let eventEmitter: EventEmitter<WalletProviderEvents> | undefined;\n\n /** Value returned by setupEventListeners */\n let setupReturnValue: R;\n\n const handleAccountsChanged = (params: { addresses: string[] }) => {\n assertDefined(eventEmitter, 'Event emitter not defined');\n eventEmitter.emit('accountsChanged', params);\n };\n\n const handleDisconnected = () => {\n assertDefined(eventEmitter, 'Event emitter not defined');\n eventEmitter.emit('disconnected');\n };\n\n const handleNetworkChanged = (params: { networkId: string }) => {\n assertDefined(eventEmitter, 'Event emitter not defined');\n eventEmitter.emit('networkChanged', params);\n };\n\n const cleanupEventEmitter = () => {\n if (!eventEmitter) {\n return;\n }\n\n removeEventListeners({\n handleAccountsChanged,\n handleDisconnected,\n handleNetworkChanged,\n setupReturnValue,\n });\n\n eventEmitter = undefined;\n };\n\n const getEventEmitter = (): WalletProvider['events'] => {\n if (!eventEmitter) {\n eventEmitter = new EventEmitter<WalletProviderEvents>();\n\n setupReturnValue = setupEventListeners({\n handleAccountsChanged,\n handleDisconnected,\n handleNetworkChanged,\n });\n }\n\n return Object.assign(eventEmitter, { supportedEvents });\n };\n\n return {\n cleanupEventEmitter,\n getEventEmitter,\n };\n};\n","import type * as z from 'zod/mini';\n\nimport type { RealtimeChannelSchema } from '../realtime.types';\n\n/**\n * Defines a typed schema for a realtime channel — analogous to `createStorageKeySchema`\n * for storage. Pairs a channel name with a Zod schema that validates the shape of\n * messages sent and received on that channel. Pass the result to the realtime service's\n * `subscribe` / `unsubscribe` / `publish` methods to get end-to-end type safety.\n * @notInstrumented\n */\nexport const createRealtimeChannelSchema = <T>(params: {\n channel: string;\n schema: z.ZodMiniType<T>;\n}): RealtimeChannelSchema<T> => params;\n","/* eslint-disable func-style -- javascript requires this to be a function */\n\nimport { ArrayMustNotBeEmptyError } from './../../errors/ArrayMustNotBeEmptyError';\n\n/**\n * Asserts that a value is a non-empty array, throwing an error if it is null,\n * undefined, or has zero elements. This function acts as a type guard,\n * narrowing the type to a tuple of at least one element.\n *\n * @template T - The element type of the array being checked\n * @param value - The array (or possibly null/undefined value) to check\n * @param message - The error message to throw if the value is empty or missing\n * @throws Throws an error with the provided message if value is null, undefined, or empty\n * @example\n * ```typescript\n * const maybeNetworks: Network[] | undefined = getNetworks();\n * assertNonEmptyArray(maybeNetworks, 'At least one network is required');\n * // maybeNetworks is now typed as [Network, ...Network[]]\n * const first = maybeNetworks[0]; // safely accessible without `| undefined`\n * ```\n */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport function assertNonEmptyArray<T>(\n value: T[] | null | undefined,\n message: string\n): asserts value is [T, ...T[]] {\n if (!value || value.length === 0) {\n throw new ArrayMustNotBeEmptyError(message);\n }\n}\n","import { getBuffer } from \"../getBuffer\";\n\n/** @notInstrumented */\nexport const bufferToBase64 = (buf: Uint8Array): string => {\n const binstr = Array.prototype.map\n .call(buf, (ch: number) => String.fromCharCode(ch))\n .join('');\n return getBuffer().from(binstr, 'binary').toString('base64');\n};\n","import type { DynamicClient } from '../../client/types';\n\n/** The queue function `createSequenceQueue` returns. */\nexport type SequenceQueue = <T>(\n callback: () => Promise<T>,\n client: DynamicClient\n) => Promise<T>;\n\n/**\n * Creates a queue function that runs every callback passed to it **one at a\n * time, in FIFO order**, relative to every other call made through that same\n * queue function for the same client:\n *\n * - Every queued call runs — this is NOT last-wins/coalescing (see\n * `debouncedMutex` for that behavior instead).\n * - A callback that rejects does not stall the queue: the next queued\n * callback still runs.\n * - Each caller receives its own callback's resolution or rejection,\n * independent of other callers' outcomes.\n * - Different clients never block each other, even through the same queue\n * function.\n *\n * Useful for serializing read-modify-write cycles against a single piece of\n * storage/state so concurrent callers can't race and silently lose an update.\n *\n * @example\n * Without a queue, two concurrent callers incrementing a\n * persisted counter can both read `0`, both write `1`, and lose an update:\n * ```ts\n * const incrementStoredCount = async (client: DynamicClient) => {\n * const current = await storage.get('count'); // both callers read 0\n * await storage.set('count', current + 1); // both callers write 1\n * };\n *\n * await Promise.all([incrementStoredCount(client), incrementStoredCount(client)]);\n * // storage.get('count') === 1, but two increments were requested\n * ```\n *\n * Wrapping the same read-modify-write cycle in a queue forces the second\n * call to wait for the first to finish, so it reads the value the first call\n * just wrote:\n * ```ts\n * const queueCountWrite = createSequenceQueue();\n *\n * const incrementStoredCount = (client: DynamicClient) =>\n * queueCountWrite(async () => {\n * const current = await storage.get('count');\n * await storage.set('count', current + 1);\n * }, client);\n *\n * await Promise.all([incrementStoredCount(client), incrementStoredCount(client)]);\n * // storage.get('count') === 2 — both increments are applied\n * ```\n * @notInstrumented\n */\nexport const createSequenceQueue = (): SequenceQueue => {\n // Tracks the promise of the most recently enqueued callback per client, so\n // each new call can chain onto it and run only once its predecessor settles.\n const queueTails = new WeakMap<DynamicClient, Promise<unknown>>();\n\n // The callback is intentionally a bare positional param (not wrapped in an\n // object) to match the ergonomics of a queue function you call directly,\n // like `setTimeout`/`Promise.then` — wrapping it would obscure the call site.\n // eslint-disable-next-line custom-rules/require-single-object-param\n return <T>(callback: () => Promise<T>, client: DynamicClient): Promise<T> => {\n const previousTail = queueTails.get(client) ?? Promise.resolve();\n\n const result = previousTail.then(callback, callback);\n\n queueTails.set(client, result.catch(() => undefined));\n\n return result;\n };\n};\n","/**\n * Filter duplicates from an array by equality.\n * Uses a Set internally.\n * @notInstrumented\n */\nexport const filterDuplicates = <T>(array: T[]): T[] =>\n Array.from(new Set(array));\n","type ParseAmountToSmallestUnitParams = {\n amount: string;\n decimals: number;\n};\n\n/**\n * Converts a human-readable decimal amount string to the smallest unit\n * representation as a bigint, using string-based arithmetic to avoid\n * floating-point precision loss.\n *\n * @example\n * parseAmountToSmallestUnit({ amount: '1.5', decimals: 9 }) // 1500000000n (1.5 SOL in lamports)\n * parseAmountToSmallestUnit({ amount: '1.5', decimals: 8 }) // 150000000n (1.5 BTC in satoshis)\n * parseAmountToSmallestUnit({ amount: '10.5', decimals: 6 }) // 10500000n (10.5 USDC)\n * parseAmountToSmallestUnit({ amount: '0.1', decimals: 9 }) // 100000000n (no float error)\n *\n * @param params.amount - The amount as a decimal string (e.g. \"1.5\").\n * @param params.decimals - The number of decimal places for the token.\n * @returns The amount in smallest units as a bigint.\n * @notInstrumented\n */\nexport const parseAmountToSmallestUnit = ({\n amount,\n decimals,\n}: ParseAmountToSmallestUnitParams): bigint => {\n const [whole = '0', fraction = ''] = amount.split('.');\n const paddedFraction = fraction.padEnd(decimals, '0').slice(0, decimals);\n return BigInt(whole + paddedFraction);\n};\n","import { BaseError } from './base';\n\ntype ReactNativeOnlyErrorParams = {\n apiName: string;\n};\n\nexport class ReactNativeOnlyError extends BaseError {\n constructor({ apiName }: ReactNativeOnlyErrorParams) {\n super({\n cause: null,\n code: 'react_native_only_error',\n docsUrl: null,\n name: 'ReactNativeOnlyError',\n shortMessage: `${apiName} is only available in React Native environments.`,\n });\n }\n}\n","import { ReactNativeOnlyError } from '../../../errors/ReactNativeOnlyError';\nimport type { ReactNativeManifest } from '../nativeManifest.types';\n\n/**\n * Returns the React Native manifest containing native SDK metadata.\n *\n * This function is only available in React Native environments.\n * On web, it throws a `ReactNativeOnlyError`.\n *\n * @notInstrumented\n */\nexport const getReactNativeManifest = (): ReactNativeManifest => {\n throw new ReactNativeOnlyError({ apiName: 'getReactNativeManifest' });\n};\n","const SCHEME_SEPARATOR = '://';\n\n/** Parameters for {@link getNativeLinkScheme}. */\nexport type GetNativeLinkSchemeParams = {\n /** A native link, e.g. `myapp://wallet/connect`. */\n nativeLink: string | undefined;\n};\n\n/**\n * Reduces a native link to just its URL scheme (e.g.\n * `myapp://wallet/connect` -> `myapp://`), dropping anything after the scheme\n * separator. A native link may be configured with an in-app route, but a\n * consumer that only needs to deep link back into the app (rather than a\n * specific route) should use the scheme alone. Links without a scheme\n * separator are returned unchanged (they cannot carry a route), and\n * `undefined` passes through.\n *\n * @notInstrumented\n */\nexport const getNativeLinkScheme = ({\n nativeLink,\n}: GetNativeLinkSchemeParams): string | undefined => {\n if (nativeLink === undefined) {\n return undefined;\n }\n\n const schemeSeparatorIndex = nativeLink.indexOf(SCHEME_SEPARATOR);\n\n if (schemeSeparatorIndex === -1) {\n return nativeLink;\n }\n\n return nativeLink.slice(0, schemeSeparatorIndex + SCHEME_SEPARATOR.length);\n};\n","import { ReactNativeOnlyError } from '../../../errors/ReactNativeOnlyError';\nimport type { SetScreenshotProtectionParams } from './setScreenshotProtection.types';\n\n/**\n * Web/desktop counterpart of the React Native `setScreenshotProtection` (see\n * `setScreenshotProtection.native.ts`).\n *\n * Screenshot/recording protection is a native window-level capability with no\n * web equivalent. Rather than silently no-op (which would let a desktop caller\n * believe content is protected when it is not), this throws a\n * `ReactNativeOnlyError` so an accidental web/desktop call is loud — the API is\n * intentionally React-Native-only.\n *\n * @notInstrumented\n */\nexport const setScreenshotProtection = ({\n // Destructured to keep an identical signature to the native implementation\n // for the platform-type parity check; unused because this always throws.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enabled,\n}: SetScreenshotProtectionParams): void => {\n throw new ReactNativeOnlyError({ apiName: 'setScreenshotProtection' });\n};\n","import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\n/**\n * @categoryDescription Extension Development\n * Core utilities and functions for building Dynamic SDK extensions.\n * These APIs provide low-level access to the SDK internals and are intended\n * for advanced use cases and extension development. Most applications should\n * use the higher-level APIs exported from the main SDK package instead.\n */\n\n/** @category Extension Development */\nexport { createAppForegroundSubscriber } from '../services/appForeground/createAppForegroundSubscriber';\n/** @category Extension Development */\nexport { getCore } from '../client/core/getCore';\n/** @category Extension Development */\nexport type { DynamicCore, DynamicCoreState } from '../client/core/types';\n/** @category Extension Development */\nexport { getDefaultClient } from '../client/defaultClient';\n/** @category Extension Development */\nexport { APIError } from '../errors/APIError';\n/** @category Extension Development */\nexport { ArrayMustNotBeEmptyError } from '../errors/ArrayMustNotBeEmptyError';\n/** @category Extension Development */\nexport { CannotTrackError } from '../errors/CannotTrackError';\n/** @category Extension Development */\nexport { ClientNotFoundError } from '../errors/ClientNotFoundError';\n/** @category Extension Development */\nexport { ClientsDoNotMatchError } from '../errors/ClientsDoNotMatchError';\n/** @category Extension Development */\nexport { InvalidStorageSet } from '../errors/InvalidStorageSet';\n/** @category Extension Development */\nexport { InvalidWalletProviderKeyError } from '../errors/InvalidWalletProviderKeyError';\n/** @category Extension Development */\nexport { MethodNotImplementedError } from '../errors/MethodNotImplementedError';\n/** @category Extension Development */\nexport { MultipleClientsFoundError } from '../errors/MultipleClientsFoundError';\n/** @category Extension Development */\nexport { NoWalletProviderFoundError } from '../errors/NoWalletProviderFoundError';\n/** @category Extension Development */\nexport { ValueMustBeDefinedError } from '../errors/ValueMustBeDefinedError';\n/** @category Extension Development */\nexport { createApiClient, DYNAMIC_SDK_API_VERSION } from '../modules/apiClient';\n/**\n * Re-exported so a caller using the `Raw` variant of a governed business-account\n * mutation (whose convenience method cannot distinguish a 202 from a normal\n * success) can parse the 202 body without reaching into `@dynamic-labs/sdk-api-core`\n * directly, which `no-restricted-imports` blocks outside this package.\n * @category Extension Development\n */\nexport {\n type AddBusinessAccountMemberSdkRequest,\n BusinessAccountApprovalsPendingFromJSON,\n BusinessAccountApprovalsPendingReasonEnum,\n BusinessAccountProposalStatus,\n type UpdateBusinessAccountMemberRoleSdkRequest,\n} from '@dynamic-labs/sdk-api-core';\n/** @category Extension Development */\nexport { createVisit } from '../modules/auth/createVisit';\n/** @category Extension Development */\nexport { logoutWithReason } from '../modules/auth/logoutWithReason';\n/** @category Extension Development */\nexport { updateAuthFromVerifyResponse } from '../modules/auth/updateAuthFromVerifyResponse';\n/** @category Extension Development */\nexport { consumeCaptchaToken } from '../modules/captcha/consumeCaptchaToken';\n/** @category Extension Development */\nexport { setCaptchaToken } from '../modules/captcha/setCaptchaToken';\n/** @category Extension Development */\nexport { emitEvent } from '../modules/clientEvents';\n/** @category Extension Development */\nexport { hasExtension } from '../modules/extension/hasExtension';\n/** @category Extension Development */\nexport { registerExtension } from '../modules/extension/registerExtension';\n/** @category Extension Development */\nexport { waitForProjectSettings } from '../modules/initializeClient/waitForProjectSettings';\n/** @category Extension Development */\nexport { getElevatedAccessToken } from '../modules/auth/getElevatedAccessToken';\n/** @category Extension Development */\nexport { consumeMfaTokenIfRequiredForAction } from '../modules/mfa/consumeMfaTokenIfRequiredForAction';\n/** @category Extension Development */\nexport { getActionAuthorizationTokens } from '../modules/auth/getActionAuthorizationTokens';\n/** @category Extension Development */\nexport { isCookieEnabled } from '../modules/projectSettings/isCookieEnabled';\n/** @category Extension Development */\nexport { generateSessionKeys } from '../modules/sessionKeys/generateSessionKeys/generateSessionKeys';\n/** @category Extension Development */\nexport { getSessionKeys } from '../modules/sessionKeys/getSessionKeys';\n/** @category Extension Development */\nexport { getSignedSessionId } from '../modules/sessionKeys/getSignedSessionId';\n/** @category Extension Development */\nexport type { SessionKeys } from '../modules/sessionKeys/sessionKeys.types';\n/** @category Extension Development */\nexport { CHAINS_INFO_MAP } from '../modules/wallets/constants';\n/** @category Extension Development */\nexport { emitWalletAccountsChangedEvent } from '../modules/wallets/emitWalletAccountsChangedEvent';\n/** @category Extension Development */\nexport { getWalletProviders } from '../modules/wallets/getWalletProviders';\n/** @category Extension Development */\nexport { createBaseNetworkProvider } from '../modules/wallets/networks/createBaseNetworkProvider';\n/** @category Extension Development */\nexport { getNetworkDataForNetworkId } from '../modules/wallets/networks/getNetworkDataForNetworkId';\n/** @category Extension Development */\nexport { getNetworkProviderFromNetworkId } from '../modules/wallets/networks/getNetworkProviderFromNetworkId';\n/** @category Extension Development */\nexport { getNetworkProviders } from '../modules/wallets/networks/getNetworkProviders';\n/** @category Extension Development */\nexport { getLastKnownNetworkRegistry } from '../modules/wallets/networks/lastKnownNetworkRegistry/getLastKnownNetworkRegistry';\n/** @category Extension Development */\nexport type { LastKnownNetworkRegistry } from '../modules/wallets/networks/lastKnownNetworkRegistry/LastKnownNetworkRegistry.types';\n/** @category Extension Development */\nexport type { BaseNetworkProvider } from '../modules/wallets/networks/networkProvider/networkProvider.types';\n/** @category Extension Development */\nexport {\n getNetworkProviderBuilderRegistry,\n type NetworkProviderBuilder,\n type NetworkProviderBuilderRegistry,\n} from '../modules/wallets/networks/networkProviderBuilderRegistry';\n/** @category Extension Development */\nexport {\n getUriConnectionStarterRegistry,\n type StartUriConnectionParams,\n type UriConnectionStarter,\n type UriConnectionStarterRegistry,\n} from '../modules/wallets/uriConnectionStarterRegistry';\n/** @category Extension Development */\nexport { reconcileWalletAccountsAgainstClient } from '../modules/wallets/reconcileWalletAccountsAgainstClient';\n/** @category Extension Development */\nexport { removeUnverifiedWalletAccount } from '../modules/wallets/unverifiedWalletAccounts/removeUnverifiedWalletAccount';\nexport { setUnverifiedWalletAccounts } from '../modules/wallets/unverifiedWalletAccounts/setUnverifiedWalletAccounts';\n/** @category Extension Development */\nexport { formatSignInMessage } from '../modules/wallets/utils/formatSignInMessage';\n/** @category Extension Development */\nexport { formatWalletAccountId } from '../modules/wallets/utils/formatWalletAccountId';\n/** @category Extension Development */\nexport { formatWalletProviderGroupKey } from '../modules/wallets/utils/formatWalletProviderGroupKey';\n/** @category Extension Development */\nexport { formatWalletProviderKey } from '../modules/wallets/utils/formatWalletProviderKey';\n/** @category Extension Development */\nexport { getAllProvidersFromWindow } from '../modules/wallets/utils/getAllProvidersFromWindow';\n/** @category Extension Development */\nexport { getInjectedProviderFromWindow } from '../modules/wallets/utils/getInjectedProviderFromWindow';\n/** @category Extension Development */\nexport { getVerifiedCredentialForWalletAccount } from '../modules/wallets/utils/getVerifiedCredentialForWalletAccount';\n/** @category Extension Development */\nexport { getWalletProviderFromWalletAccount } from '../modules/wallets/utils/getWalletProviderFromWalletAccount';\n/** @category Extension Development */\nexport { normalizeWalletNameWithChain } from '../modules/wallets/utils/normalizeWalletNameWithChain';\n/** @category Extension Development */\nexport { verifyMessageSignatureOwnership } from '../modules/wallets/verifyMessageSignatureOwnership';\n/** @category Extension Development */\nexport type { BaseWalletAccount } from '../modules/wallets/walletAccount';\n/** @category Extension Development */\nexport type {\n ConfirmTransactionParams,\n ExecuteSwapTransactionParams,\n ExecuteSwapTransactionResult,\n ExecuteYieldTransactionParams,\n ExecuteYieldTransactionResult,\n TransferAmountParams,\n WalletProvider,\n WalletProviderConnectAddress,\n} from '../modules/wallets/walletProvider';\n/** @category Extension Development */\nexport { getActiveNetworkIdFromLastKnownRegistry } from '../modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry';\n/** @category Extension Development */\nexport { switchActiveNetworkInLastKnownRegistry } from '../modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry';\n/** @category Extension Development */\nexport { createWalletProviderEventEmitter } from '../modules/wallets/walletProvider/events/createWalletProviderEventEmitter';\nexport type { WalletProviderEventEmitter } from '../modules/wallets/walletProvider/events/createWalletProviderEventEmitter';\n/** @category Extension Development */\nexport { splitWalletProviderKey } from '../modules/wallets/walletProvider/splitWalletProviderKey';\n/** @category Extension Development */\nexport {\n getWalletProviderRegistry,\n WalletProviderPriority,\n} from '../modules/wallets/walletProviderRegistry';\n/** @category Extension Development */\nexport type {\n AsyncProcessEntry,\n AsyncProcessStatus,\n AsyncTrack,\n AsyncTrackEmitter,\n} from '../services/asyncTrack/asyncTrack.types';\n/** @category Extension Development */\nexport { createCrossTabBroadcast } from '../services/crossTabBroadcast/createCrossTabBroadcast';\n/** @category Extension Development */\nexport type {\n CrossTabBroadcast,\n CrossTabBroadcastMessage,\n} from '../services/crossTabBroadcast';\n/** @category Extension Development */\nexport { CrossTabBroadcastMessageSchema } from '../services/crossTabBroadcast';\n/** @category Extension Development */\nexport { createRealtimeChannelSchema } from '../services/realtime/createRealtimeChannelSchema';\n/** @category Extension Development */\nexport { createRealtimeService } from '../services/realtime/createRealtimeService';\n/** @category Extension Development */\nexport type {\n RealtimeChannelSchema,\n RealtimeConnectionState,\n RealtimeService,\n} from '../services/realtime';\n/** @category Extension Development */\nexport { createLogger } from '../services/logger/createLogger';\n/** @category Extension Development */\nexport type { Logger, LogLevel } from '../services/logger/logger.types';\n/** @category Extension Development */\nexport { createKeychainService } from '../services/keychain';\n/** @category Extension Development */\nexport type { KeychainService } from '../services/keychain';\n/** @category Extension Development */\nexport type { PasskeyService } from '../services/passkey';\n/** @category Extension Development */\nexport {\n createRuntimeServiceAccessKey,\n type RuntimeServices,\n} from '../services/runtimeServices';\n/** @category Extension Development */\nexport {\n createLocalStorageAdapter,\n createStorage,\n createStorageKeySchema,\n type Storage,\n type StorageAdapter,\n type StorageAdapterOptions,\n type StorageKeySchema,\n type StorageKeySchemaConfig,\n type StorageTier,\n} from '../services/storage';\n/** @category Extension Development */\nexport type { ExtendParameters } from '../types/ExtendParameters';\n/** @category Extension Development */\nexport { assertDefined } from '../utils/assertDefined';\n/** @category Extension Development */\nexport { assertSafeNavigationUrl } from '../utils/assertSafeNavigationUrl';\n/** @category Extension Development */\nexport { UnsafeNavigationUrlError } from '../errors/UnsafeNavigationUrlError';\n/** @category Extension Development */\nexport { assertNonEmptyArray } from '../utils/assertNonEmptyArray';\n/** @category Extension Development */\nexport { bufferToBase64 } from '../utils/bufferToBase64';\n/** @category Extension Development */\nexport type { DebouncedMutex } from '../utils/debouncedMutex/debouncedMutex.types';\n/** @category Extension Development */\nexport { createSequenceQueue } from '../utils/createSequenceQueue';\n/** @category Extension Development */\nexport type { SequenceQueue } from '../utils/createSequenceQueue';\n/** @category Extension Development */\nexport { filterDuplicates } from '../utils/filterDuplicates';\n/** @category Extension Development */\nexport { getBuffer } from '../utils/getBuffer';\n/** @category Extension Development */\nexport { getChainFromVerifiedCredentialChain } from '../utils/getChainFromVerifiedCredentialChain';\n/** @category Extension Development */\nexport { getKeychainIndexedDBName } from '../utils/getKeychainIndexedDBName';\n/** @category Extension Development */\nexport { getNonce } from '../utils/getNonce';\n/** @category Extension Development */\nexport { getPlatform } from '../utils/getPlatform/getPlatform';\n/** @category Extension Development */\nexport type { SdkPlatform } from '../utils/getPlatform/getPlatform.types';\n/** @category Extension Development */\nexport { isServerSideRendering } from '../utils/isServerSideRendering';\n/** @category Extension Development */\nexport { parseAmountToSmallestUnit } from '../utils/parseAmountToSmallestUnit';\n/** @category Extension Development */\nexport type { ObservableState } from '../utils/observable/observable.types';\n/** @category Extension Development */\nexport { createSignInMessageStatement } from '../modules/wallets/utils/getSignInMessage/createSignInMessageStatement';\n/** @category Extension Development */\nexport { subscribeWithSelector } from '../utils/observable/subscribeWithSelector';\n/** @category Extension Development */\nexport { updateWalletProviderKeysForVerifiedCredentials } from '../modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials';\n/** @category Extension Development */\nexport { DYNAMIC_ICONIC_SPRITE_URL } from '../constants';\n/** @category Extension Development */\nexport { createDeferredPromise } from '../utils/deferredPromise';\n/** @category Extension Development */\nexport { getDeviceSigner } from '../modules/deviceRegistration/getDeviceSigner';\n/** @category Extension Development */\nexport { getHeadersForNonceSignedByDeviceSigners } from '../modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners';\n/** @category Extension Development */\nexport { createDeviceSignatureHeadersMiddleware } from '../modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware';\n/** @category Extension Development */\nexport { randomString } from '../utils/randomString';\n/** @category Extension Development */\nexport { getReactNativeManifest } from '../services/nativeManifest/getReactNativeManifest';\n/** @category Extension Development */\nexport type { ReactNativeManifest } from '../services/nativeManifest/nativeManifest.types';\n/** @category Extension Development */\nexport { getAppMetadata } from '../utils/getAppMetadata';\n/** @category Extension Development */\nexport type { AppMetadata } from '../utils/getAppMetadata';\n/** @category Extension Development */\nexport { getNativeLinkScheme } from '../utils/getNativeLinkScheme';\n/** @category Extension Development */\nexport type { GetNativeLinkSchemeParams } from '../utils/getNativeLinkScheme';\n/** @category Extension Development */\nexport { assertSafeDeeplinkUrl } from '../utils/assertSafeDeeplinkUrl';\n/** @category Extension Development */\nexport { setScreenshotProtection } from '../modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection';\n/** @category Extension Development */\nexport type { SetScreenshotProtectionParams } from '../modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.types';\n/** @category Extension Development */\nexport {\n createEventEmitter,\n type EventEmitter,\n} from './../services/eventEmitter';\n"],"mappings":";;;;;;;;;;;AAEA,IAAa,2BAAb,cAA8C,UAAU;CAEtD,YAAY,SAAiB;AAC3B,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;;;;;;ACTN,IAAa,yBAAb,cAA4C,UAAU;CACpD,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;;;;;;ACRN,IAAa,4BAAb,cAA+C,UAAU;CACvD,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;;;;;;;;;;;;;;;;;ACON,MAAa,qBACX,EAAE,gBACF,WACS;AAGT,CAFa,QAAQ,OAAO,CAEvB,WAAW,IAAI,aAAa;;;;;;AChBnC,MAAa,yBAAyB,OACpC,WAC6B;CAG7B,MAAM,yBAFO,QAAQ,OAAO,CAEQ,UAAU,WAC5C,mCACD;AAED,eAAc,wBAAwB,qCAAqC;AAE3E,OAAM,uBAAuB;AAE7B,eACE,OAAO,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AAaC,QAAe"}
|
package/dist/core.native.esm.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { $ as createLocalStorageAdapter, Ct as getCore, D as WalletProviderPriority, Dt as name, E as getWalletProviders, F as formatWalletProviderKey, H as InvalidWalletProviderKeyError, I as normalizeWalletNameWithChain, J as getDeviceSigner, K as createDeviceSignatureHeadersMiddleware, L as getChainFromVerifiedCredentialChain, N as createRuntimeServiceAccessKey, O as getWalletProviderRegistry, Ot as version, Q as createStorageKeySchema, R as CHAINS_INFO_MAP, St as ClientNotFoundError, V as splitWalletProviderKey, Y as getNonce, _t as getElevatedAccessToken, bt as getDefaultClient, f as updateAuthFromVerifyResponse, ft as SDK_API_CORE_VERSION, gt as ValueMustBeDefinedError, ht as assertDefined, k as emitEvent, mt as isCookieEnabled, n as NoWalletProviderFoundError, pt as getSessionKeys, q as getHeadersForNonceSignedByDeviceSigners, r as createApiClient, st as APIError, t as getWalletProviderFromWalletAccount, ut as DYNAMIC_ICONIC_SPRITE_URL, v as emitWalletAccountsChangedEvent, vt as randomString, wt as BaseError, yt as getPlatform, z as formatWalletAccountId } from "./apiClient-
|
|
2
|
-
import { A as createLogger, D as createKeychainService, E as assertSafeDeeplinkUrl, F as createDeferredPromise, G as subscribeWithSelector, I as createAppForegroundSubscriber, J as InvalidStorageSet, L as FETCH_PROJECT_SETTINGS_TRACKER_KEY, M as createCrossTabBroadcast, N as CrossTabBroadcastMessageSchema, O as assertSafeNavigationUrl, P as CannotTrackError, S as NoNetworkProvidersError, T as createRealtimeService, U as isServerSideRendering, W as getBuffer, a as removeUnverifiedWalletAccount, c as reconcileWalletAccountsAgainstClient, d as createVisit, f as getUriConnectionStarterRegistry, g as consumeCaptchaToken, h as __setCaptchaToken_wrapped, i as verifyMessageSignatureOwnership, j as createEventEmitter, k as UnsafeNavigationUrlError, l as updateWalletProviderKeysForVerifiedCredentials, m as hasExtension, n as getNetworkProviders, o as createSignInMessageStatement, p as getNetworkProviderBuilderRegistry, q as createStorage, r as getNetworksData, s as formatSignInMessage, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as getAppMetadata, w as getKeychainIndexedDBName, y as MethodNotImplementedError } from "./getNetworkProviderFromNetworkId-
|
|
3
|
-
import { c as getWalletProviderByKey, n as generateSessionKeys, s as getVerifiedCredentialForWalletAccount, t as __logoutWithReason_wrapped } from "./logoutWithReason-
|
|
4
|
-
import { i as NativeModuleNotLinkedError } from "./isMfaRequiredForAction-
|
|
5
|
-
import { n as getActionAuthorizationTokens, r as consumeMfaTokenIfRequiredForAction, t as getSignedSessionId } from "./getSignedSessionId-
|
|
1
|
+
import { $ as createLocalStorageAdapter, Ct as getCore, D as WalletProviderPriority, Dt as name, E as getWalletProviders, F as formatWalletProviderKey, H as InvalidWalletProviderKeyError, I as normalizeWalletNameWithChain, J as getDeviceSigner, K as createDeviceSignatureHeadersMiddleware, L as getChainFromVerifiedCredentialChain, N as createRuntimeServiceAccessKey, O as getWalletProviderRegistry, Ot as version, Q as createStorageKeySchema, R as CHAINS_INFO_MAP, St as ClientNotFoundError, V as splitWalletProviderKey, Y as getNonce, _t as getElevatedAccessToken, bt as getDefaultClient, f as updateAuthFromVerifyResponse, ft as SDK_API_CORE_VERSION, gt as ValueMustBeDefinedError, ht as assertDefined, k as emitEvent, mt as isCookieEnabled, n as NoWalletProviderFoundError, pt as getSessionKeys, q as getHeadersForNonceSignedByDeviceSigners, r as createApiClient, st as APIError, t as getWalletProviderFromWalletAccount, ut as DYNAMIC_ICONIC_SPRITE_URL, v as emitWalletAccountsChangedEvent, vt as randomString, wt as BaseError, yt as getPlatform, z as formatWalletAccountId } from "./apiClient-CpfEx6Uc.native.esm.js";
|
|
2
|
+
import { A as createLogger, D as createKeychainService, E as assertSafeDeeplinkUrl, F as createDeferredPromise, G as subscribeWithSelector, I as createAppForegroundSubscriber, J as InvalidStorageSet, L as FETCH_PROJECT_SETTINGS_TRACKER_KEY, M as createCrossTabBroadcast, N as CrossTabBroadcastMessageSchema, O as assertSafeNavigationUrl, P as CannotTrackError, S as NoNetworkProvidersError, T as createRealtimeService, U as isServerSideRendering, W as getBuffer, a as removeUnverifiedWalletAccount, c as reconcileWalletAccountsAgainstClient, d as createVisit, f as getUriConnectionStarterRegistry, g as consumeCaptchaToken, h as __setCaptchaToken_wrapped, i as verifyMessageSignatureOwnership, j as createEventEmitter, k as UnsafeNavigationUrlError, l as updateWalletProviderKeysForVerifiedCredentials, m as hasExtension, n as getNetworkProviders, o as createSignInMessageStatement, p as getNetworkProviderBuilderRegistry, q as createStorage, r as getNetworksData, s as formatSignInMessage, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as getAppMetadata, w as getKeychainIndexedDBName, y as MethodNotImplementedError } from "./getNetworkProviderFromNetworkId-CuTEQ9dg.native.esm.js";
|
|
3
|
+
import { c as getWalletProviderByKey, n as generateSessionKeys, s as getVerifiedCredentialForWalletAccount, t as __logoutWithReason_wrapped } from "./logoutWithReason-DWkIKoLk.native.esm.js";
|
|
4
|
+
import { i as NativeModuleNotLinkedError } from "./isMfaRequiredForAction-CxYft5KR.native.esm.js";
|
|
5
|
+
import { n as getActionAuthorizationTokens, r as consumeMfaTokenIfRequiredForAction, t as getSignedSessionId } from "./getSignedSessionId-Bt4obN3w.native.esm.js";
|
|
6
6
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
7
7
|
import { BusinessAccountApprovalsPendingFromJSON, BusinessAccountApprovalsPendingReasonEnum, BusinessAccountProposalStatus } from "@dynamic-labs/sdk-api-core";
|
|
8
8
|
import * as z from "zod/mini";
|
|
9
9
|
import { TurboModuleRegistry } from "react-native";
|
|
10
|
-
import
|
|
11
|
-
import { createDeepCanonicalizer } from "@dyn-crypto/proof/canonicalize-browser-safe";
|
|
10
|
+
import EventEmitter3 from "eventemitter3";
|
|
12
11
|
|
|
13
12
|
//#region src/errors/ArrayMustNotBeEmptyError.ts
|
|
14
13
|
var ArrayMustNotBeEmptyError = class extends BaseError {
|
|
@@ -79,76 +78,6 @@ const waitForProjectSettings = async (client) => {
|
|
|
79
78
|
return client.projectSettings;
|
|
80
79
|
};
|
|
81
80
|
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region src/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.ts
|
|
84
|
-
const canonicalizeJson = createDeepCanonicalizer();
|
|
85
|
-
/**
|
|
86
|
-
* Sign an intent with the session key.
|
|
87
|
-
*
|
|
88
|
-
* The signature is over the CANONICAL form, not over `JSON.stringify(intent)` —
|
|
89
|
-
* the enclave re-canonicalizes before verifying, so a signature over any other
|
|
90
|
-
* byte sequence will not verify. Nothing here chooses that byte sequence
|
|
91
|
-
* freely: it is fixed by `canonicalizeJson`.
|
|
92
|
-
*
|
|
93
|
-
* The private half never enters JS. `keychain.sign` holds a non-extractable
|
|
94
|
-
* key and returns a P1363 hex signature, which is the form the enclave's
|
|
95
|
-
* WebCrypto verify expects.
|
|
96
|
-
*
|
|
97
|
-
* @param params.intent - The intent to sign.
|
|
98
|
-
* @param client - The Dynamic client instance.
|
|
99
|
-
* @returns The intent alongside the P1363 hex signature over its canonical form.
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```typescript
|
|
103
|
-
* const { intent, intentSignature } = await signBusinessAccountIntent({ intent: draftIntent });
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* @see {@link signBusinessAccountApproval} for a co-signer approving this intent.
|
|
107
|
-
* @see {@link BusinessAccountIntent} for the shape being signed.
|
|
108
|
-
* @notInstrumented
|
|
109
|
-
*/
|
|
110
|
-
const signBusinessAccountIntent = async ({ intent }, client) => {
|
|
111
|
-
return {
|
|
112
|
-
intent,
|
|
113
|
-
intentSignature: await getCore(client).keychain.sign("session", canonicalizeJson(intent))
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Sign an approval of someone else's intent.
|
|
118
|
-
*
|
|
119
|
-
* The payload is `{ approvedAt, intent }` rather than the intent alone, so each
|
|
120
|
-
* approver attests WHEN they consented as well as what to. The enclave measures
|
|
121
|
-
* the execution window from the latest of those timestamps, which it could not
|
|
122
|
-
* do from an unsigned value — a caller could simply claim a fresher one.
|
|
123
|
-
*
|
|
124
|
-
* Sent whether or not the account configures an execution window: a signed
|
|
125
|
-
* shape that varied with configuration would mean reading governance before
|
|
126
|
-
* knowing what to sign.
|
|
127
|
-
*
|
|
128
|
-
* @param params.intent - The intent being approved.
|
|
129
|
-
* @param params.approvedAt - When the approver consented. Defaults to now.
|
|
130
|
-
* @param client - The Dynamic client instance.
|
|
131
|
-
* @returns The timestamp signed over, alongside the P1363 hex signature.
|
|
132
|
-
*
|
|
133
|
-
* @example
|
|
134
|
-
* ```typescript
|
|
135
|
-
* const { approvedAt, signature } = await signBusinessAccountApproval({ intent });
|
|
136
|
-
* ```
|
|
137
|
-
*
|
|
138
|
-
* @see {@link signBusinessAccountIntent} for the initiator's own signature over the intent.
|
|
139
|
-
* @see {@link BusinessAccountIntent} for the shape being approved.
|
|
140
|
-
* @notInstrumented
|
|
141
|
-
*/
|
|
142
|
-
const signBusinessAccountApproval = async ({ intent, approvedAt = (/* @__PURE__ */ new Date()).toISOString() }, client) => {
|
|
143
|
-
return {
|
|
144
|
-
approvedAt,
|
|
145
|
-
signature: await getCore(client).keychain.sign("session", canonicalizeJson({
|
|
146
|
-
approvedAt,
|
|
147
|
-
intent
|
|
148
|
-
}))
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
|
|
152
81
|
//#endregion
|
|
153
82
|
//#region src/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.ts
|
|
154
83
|
/** @notInstrumented */
|
|
@@ -325,7 +254,7 @@ const createWalletProviderEventEmitter = ({ removeEventListeners, setupEventList
|
|
|
325
254
|
};
|
|
326
255
|
const getEventEmitter = () => {
|
|
327
256
|
if (!eventEmitter) {
|
|
328
|
-
eventEmitter = new
|
|
257
|
+
eventEmitter = new EventEmitter3();
|
|
329
258
|
setupReturnValue = setupEventListeners({
|
|
330
259
|
handleAccountsChanged,
|
|
331
260
|
handleDisconnected,
|
|
@@ -563,5 +492,5 @@ const setScreenshotProtection = ({ enabled }) => {
|
|
|
563
492
|
assertPackageVersion(name, version);
|
|
564
493
|
|
|
565
494
|
//#endregion
|
|
566
|
-
export { APIError, ArrayMustNotBeEmptyError, BusinessAccountApprovalsPendingFromJSON, BusinessAccountApprovalsPendingReasonEnum, BusinessAccountProposalStatus, CHAINS_INFO_MAP, CannotTrackError, ClientNotFoundError, ClientsDoNotMatchError, CrossTabBroadcastMessageSchema, DYNAMIC_ICONIC_SPRITE_URL, SDK_API_CORE_VERSION as DYNAMIC_SDK_API_VERSION, InvalidStorageSet, InvalidWalletProviderKeyError, MethodNotImplementedError, MultipleClientsFoundError, NoWalletProviderFoundError, UnsafeNavigationUrlError, ValueMustBeDefinedError, WalletProviderPriority, assertDefined, assertNonEmptyArray, assertSafeDeeplinkUrl, assertSafeNavigationUrl, bufferToBase64, consumeCaptchaToken, consumeMfaTokenIfRequiredForAction, createApiClient, createAppForegroundSubscriber, createBaseNetworkProvider, createCrossTabBroadcast, createDeferredPromise, createDeviceSignatureHeadersMiddleware, createEventEmitter, createKeychainService, createLocalStorageAdapter, createLogger, createRealtimeChannelSchema, createRealtimeService, createRuntimeServiceAccessKey, createSequenceQueue, createSignInMessageStatement, createStorage, createStorageKeySchema, createVisit, createWalletProviderEventEmitter, emitEvent, emitWalletAccountsChangedEvent, filterDuplicates, formatSignInMessage, formatWalletAccountId, formatWalletProviderGroupKey, formatWalletProviderKey, generateSessionKeys, getActionAuthorizationTokens, getActiveNetworkIdFromLastKnownRegistry, getAllProvidersFromWindow, getAppMetadata, getBuffer, getChainFromVerifiedCredentialChain, getCore, getDefaultClient, getDeviceSigner, getElevatedAccessToken, getHeadersForNonceSignedByDeviceSigners, getInjectedProviderFromWindow, getKeychainIndexedDBName, getLastKnownNetworkRegistry, getNativeLinkScheme, getNetworkDataForNetworkId, getNetworkProviderBuilderRegistry, getNetworkProviderFromNetworkId, getNetworkProviders, getNonce, getPlatform, getReactNativeManifest, getSessionKeys, getSignedSessionId, getUriConnectionStarterRegistry, getVerifiedCredentialForWalletAccount, getWalletProviderFromWalletAccount, getWalletProviderRegistry, getWalletProviders, hasExtension, isCookieEnabled, isServerSideRendering, __logoutWithReason_wrapped as logoutWithReason, normalizeWalletNameWithChain, parseAmountToSmallestUnit, randomString, reconcileWalletAccountsAgainstClient, registerExtension, removeUnverifiedWalletAccount, __setCaptchaToken_wrapped as setCaptchaToken, setScreenshotProtection, setUnverifiedWalletAccounts,
|
|
495
|
+
export { APIError, ArrayMustNotBeEmptyError, BusinessAccountApprovalsPendingFromJSON, BusinessAccountApprovalsPendingReasonEnum, BusinessAccountProposalStatus, CHAINS_INFO_MAP, CannotTrackError, ClientNotFoundError, ClientsDoNotMatchError, CrossTabBroadcastMessageSchema, DYNAMIC_ICONIC_SPRITE_URL, SDK_API_CORE_VERSION as DYNAMIC_SDK_API_VERSION, InvalidStorageSet, InvalidWalletProviderKeyError, MethodNotImplementedError, MultipleClientsFoundError, NoWalletProviderFoundError, UnsafeNavigationUrlError, ValueMustBeDefinedError, WalletProviderPriority, assertDefined, assertNonEmptyArray, assertSafeDeeplinkUrl, assertSafeNavigationUrl, bufferToBase64, consumeCaptchaToken, consumeMfaTokenIfRequiredForAction, createApiClient, createAppForegroundSubscriber, createBaseNetworkProvider, createCrossTabBroadcast, createDeferredPromise, createDeviceSignatureHeadersMiddleware, createEventEmitter, createKeychainService, createLocalStorageAdapter, createLogger, createRealtimeChannelSchema, createRealtimeService, createRuntimeServiceAccessKey, createSequenceQueue, createSignInMessageStatement, createStorage, createStorageKeySchema, createVisit, createWalletProviderEventEmitter, emitEvent, emitWalletAccountsChangedEvent, filterDuplicates, formatSignInMessage, formatWalletAccountId, formatWalletProviderGroupKey, formatWalletProviderKey, generateSessionKeys, getActionAuthorizationTokens, getActiveNetworkIdFromLastKnownRegistry, getAllProvidersFromWindow, getAppMetadata, getBuffer, getChainFromVerifiedCredentialChain, getCore, getDefaultClient, getDeviceSigner, getElevatedAccessToken, getHeadersForNonceSignedByDeviceSigners, getInjectedProviderFromWindow, getKeychainIndexedDBName, getLastKnownNetworkRegistry, getNativeLinkScheme, getNetworkDataForNetworkId, getNetworkProviderBuilderRegistry, getNetworkProviderFromNetworkId, getNetworkProviders, getNonce, getPlatform, getReactNativeManifest, getSessionKeys, getSignedSessionId, getUriConnectionStarterRegistry, getVerifiedCredentialForWalletAccount, getWalletProviderFromWalletAccount, getWalletProviderRegistry, getWalletProviders, hasExtension, isCookieEnabled, isServerSideRendering, __logoutWithReason_wrapped as logoutWithReason, normalizeWalletNameWithChain, parseAmountToSmallestUnit, randomString, reconcileWalletAccountsAgainstClient, registerExtension, removeUnverifiedWalletAccount, __setCaptchaToken_wrapped as setCaptchaToken, setScreenshotProtection, setUnverifiedWalletAccounts, splitWalletProviderKey, subscribeWithSelector, switchActiveNetworkInLastKnownRegistry, updateAuthFromVerifyResponse, updateWalletProviderKeysForVerifiedCredentials, verifyMessageSignatureOwnership, waitForProjectSettings };
|
|
567
496
|
//# sourceMappingURL=core.native.esm.js.map
|