@dynamic-labs-sdk/client 1.31.2 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiClient-d2qJyIvx.native.esm.js → apiClient-4r7VAsLC.native.esm.js} +45 -12
- package/dist/apiClient-4r7VAsLC.native.esm.js.map +1 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/core.cjs +79 -76
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +79 -78
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +77 -76
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/AmbiguousWalletChainError.d.ts +7 -9
- package/dist/errors/AmbiguousWalletChainError.d.ts.map +1 -1
- package/dist/errors/ConnectionUriHandlerMissingError.d.ts +10 -12
- package/dist/errors/ConnectionUriHandlerMissingError.d.ts.map +1 -1
- package/dist/errors/NoConnectionOptionAvailableError.d.ts +2 -2
- package/dist/errors/UnexpectedConsentResponseError.d.ts +7 -0
- package/dist/errors/UnexpectedConsentResponseError.d.ts.map +1 -0
- package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts +39 -0
- package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts.map +1 -0
- package/dist/errors/WalletOptionNotFoundError.d.ts +3 -3
- package/dist/exports/core.d.ts +2 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +7 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +2 -1
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js → getNetworkProviderFromNetworkId-BV229QF3.native.esm.js} +107 -14
- package/dist/getNetworkProviderFromNetworkId-BV229QF3.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-D9nx6Od5.esm.js → getNetworkProviderFromNetworkId-D9oRzWA6.esm.js} +111 -18
- package/dist/getNetworkProviderFromNetworkId-D9oRzWA6.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-DueBnAl6.cjs → getNetworkProviderFromNetworkId-DOrcvuFv.cjs} +111 -12
- package/dist/getNetworkProviderFromNetworkId-DOrcvuFv.cjs.map +1 -0
- package/dist/{getSignedSessionId-B5oxmSTs.cjs → getSignedSessionId-4qHh_BOh.cjs} +3 -3
- package/dist/{getSignedSessionId-B5oxmSTs.cjs.map → getSignedSessionId-4qHh_BOh.cjs.map} +1 -1
- package/dist/{getSignedSessionId-5q4uyZsv.native.esm.js → getSignedSessionId-Cd8CCp5d.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-5q4uyZsv.native.esm.js.map → getSignedSessionId-Cd8CCp5d.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BKfQycNo.esm.js → getSignedSessionId-DA-MMsJm.esm.js} +3 -3
- package/dist/{getSignedSessionId-BKfQycNo.esm.js.map → getSignedSessionId-DA-MMsJm.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs → getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs.map → getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-_3MExyld.esm.js → getVerifiedCredentialForWalletAccount-Fr3bEKeU.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-_3MExyld.esm.js.map → getVerifiedCredentialForWalletAccount-Fr3bEKeU.esm.js.map} +1 -1
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts +55 -0
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts.map +1 -0
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts +46 -0
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts.map +1 -0
- package/dist/highLevelFunctions/connectWalletOption/index.d.ts +2 -0
- package/dist/highLevelFunctions/connectWalletOption/index.d.ts.map +1 -0
- package/dist/index.cjs +930 -815
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +925 -814
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +923 -812
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-BDmY2_Sj.esm.js → isMfaRequiredForAction-BdU62usM.esm.js} +3 -9
- package/dist/{isMfaRequiredForAction-BDmY2_Sj.esm.js.map → isMfaRequiredForAction-BdU62usM.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-BrRCSvEX.native.esm.js → isMfaRequiredForAction-DZfEkyIU.native.esm.js} +3 -9
- package/dist/{isMfaRequiredForAction-BrRCSvEX.native.esm.js.map → isMfaRequiredForAction-DZfEkyIU.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DnKzPDZk.cjs → isMfaRequiredForAction-Djd-jkSl.cjs} +3 -9
- package/dist/{isMfaRequiredForAction-DnKzPDZk.cjs.map → isMfaRequiredForAction-Djd-jkSl.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-D1-QluDm.esm.js → isUserOnboardingComplete-BEZOYohA.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-D1-QluDm.esm.js.map → isUserOnboardingComplete-BEZOYohA.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-7GzNYU2g.cjs → isUserOnboardingComplete-Bwvv6Urs.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-7GzNYU2g.cjs.map → isUserOnboardingComplete-Bwvv6Urs.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-BfMMBtkF.native.esm.js → isUserOnboardingComplete-CEUkAzCi.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-BfMMBtkF.native.esm.js.map → isUserOnboardingComplete-CEUkAzCi.native.esm.js.map} +1 -1
- package/dist/{logoutWithReason-C_T7KddM.cjs → logoutWithReason-B-ZF0VmN.cjs} +57 -18
- package/dist/logoutWithReason-B-ZF0VmN.cjs.map +1 -0
- package/dist/{logoutWithReason-3UICYir7.native.esm.js → logoutWithReason-DvnEa2Uv.native.esm.js} +3 -9
- package/dist/{logoutWithReason-3UICYir7.native.esm.js.map → logoutWithReason-DvnEa2Uv.native.esm.js.map} +1 -1
- package/dist/{logoutWithReason-CHyuBHdx.esm.js → logoutWithReason-I6vShLpA.esm.js} +46 -19
- package/dist/logoutWithReason-I6vShLpA.esm.js.map +1 -0
- package/dist/{migrateFromFireblocks-DJt9bktR.native.esm.js → migrateFromFireblocks-6I7lkraQ.native.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-DJt9bktR.native.esm.js.map → migrateFromFireblocks-6I7lkraQ.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-C9Kuke5V.cjs → migrateFromFireblocks-C23-24bK.cjs} +2 -2
- package/dist/{migrateFromFireblocks-C9Kuke5V.cjs.map → migrateFromFireblocks-C23-24bK.cjs.map} +1 -1
- package/dist/{migrateFromFireblocks-BMO3u6rO.esm.js → migrateFromFireblocks-Dtk6t8hN.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-BMO3u6rO.esm.js.map → migrateFromFireblocks-Dtk6t8hN.esm.js.map} +1 -1
- package/dist/modules/funding/coinbase/getCoinbaseAccounts/getCoinbaseAccounts.d.ts +1 -1
- package/dist/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.d.ts +1 -1
- package/dist/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.d.ts +1 -1
- package/dist/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.d.ts +1 -1
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts +95 -0
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +3 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +15 -6
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +7 -3
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +115 -2
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/isBusinessAccountActionRequired.d.ts +27 -0
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/isBusinessAccountActionRequired.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts +13 -6
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
- package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
- package/dist/modules/waas/waas.types.d.ts +5 -2
- package/dist/modules/waas/waas.types.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.d.ts +42 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +7 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.d.ts +27 -0
- package/dist/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +4 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/index.d.ts +3 -0
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.d.ts +35 -0
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +7 -0
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
- package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts +6 -5
- package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts.map +1 -1
- package/dist/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.d.ts +3 -3
- package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts +2 -2
- package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts.map +1 -1
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.d.ts +27 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/index.d.ts +2 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/index.d.ts.map +1 -0
- package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts.map +1 -1
- package/dist/modules/wallets/walletConnectionHandlers.types.d.ts +62 -0
- package/dist/modules/wallets/walletConnectionHandlers.types.d.ts.map +1 -0
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +6 -5
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
- package/dist/services/instrumentation/resolveInstrumentationCore/index.d.ts +2 -0
- package/dist/services/instrumentation/resolveInstrumentationCore/index.d.ts.map +1 -0
- package/dist/services/instrumentation/resolveInstrumentationCore/resolveInstrumentationCore.d.ts +19 -0
- package/dist/services/instrumentation/resolveInstrumentationCore/resolveInstrumentationCore.d.ts.map +1 -0
- package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts +4 -3
- package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts.map +1 -1
- package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts +15 -0
- package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts.map +1 -0
- package/dist/utils/getCurrentPageUrl/index.d.ts +2 -0
- package/dist/utils/getCurrentPageUrl/index.d.ts.map +1 -0
- package/dist/utils/isScreeningBlockedError/index.d.ts +2 -0
- package/dist/utils/isScreeningBlockedError/index.d.ts.map +1 -0
- package/dist/utils/isScreeningBlockedError/isScreeningBlockedError.d.ts +24 -0
- package/dist/utils/isScreeningBlockedError/isScreeningBlockedError.d.ts.map +1 -0
- package/dist/{waas-Bxsd0-HG.cjs → waas-C0IDCf3u.cjs} +81 -18
- package/dist/waas-C0IDCf3u.cjs.map +1 -0
- package/dist/{waas-9QajYGeK.native.esm.js → waas-DJeW02-Y.native.esm.js} +77 -20
- package/dist/waas-DJeW02-Y.native.esm.js.map +1 -0
- package/dist/{waas-T_dHXyI9.esm.js → waas-D_alZrtb.esm.js} +77 -20
- package/dist/waas-D_alZrtb.esm.js.map +1 -0
- package/dist/waas.cjs +5 -4
- package/dist/waas.esm.js +5 -5
- package/dist/waas.native.esm.js +5 -5
- package/dist/waasCore.cjs +8 -6
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +8 -6
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +8 -6
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +5 -4
- package/dist/apiClient-d2qJyIvx.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-D9nx6Od5.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DueBnAl6.cjs.map +0 -1
- package/dist/logoutWithReason-CHyuBHdx.esm.js.map +0 -1
- package/dist/logoutWithReason-C_T7KddM.cjs.map +0 -1
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +0 -18
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map +0 -1
- package/dist/modules/wallets/connectWallet.types.d.ts +0 -35
- package/dist/modules/wallets/connectWallet.types.d.ts.map +0 -1
- package/dist/waas-9QajYGeK.native.esm.js.map +0 -1
- package/dist/waas-Bxsd0-HG.cjs.map +0 -1
- package/dist/waas-T_dHXyI9.esm.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BusinessAccountActionRequired } from '../businessAccounts.types';
|
|
2
|
+
/**
|
|
3
|
+
* Narrows a governed mutation's result to the not-yet-authorized case.
|
|
4
|
+
*
|
|
5
|
+
* A governed action answers 202 with the bytes to sign, or with the proposal
|
|
6
|
+
* collecting approvals — neither is an error, so both come back as a value. Use
|
|
7
|
+
* this to tell them apart from the applied result.
|
|
8
|
+
*
|
|
9
|
+
* @param result - What a governed business-account mutation returned.
|
|
10
|
+
* @returns True when the action still needs a signature or approvals.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const result = await addWalletToBusinessAccount({ walletId });
|
|
15
|
+
* if (isBusinessAccountActionRequired(result)) {
|
|
16
|
+
* await signIntent(result.intent);
|
|
17
|
+
* return;
|
|
18
|
+
* }
|
|
19
|
+
* console.log(result.members.length);
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @see {@link BusinessAccountActionRequired} for the shape this narrows to.
|
|
23
|
+
* @see {@link addWalletToBusinessAccount} for a governed mutation that can return it.
|
|
24
|
+
* @notInstrumented
|
|
25
|
+
*/
|
|
26
|
+
export declare const isBusinessAccountActionRequired: <T extends object>(result: BusinessAccountActionRequired | T) => result is BusinessAccountActionRequired;
|
|
27
|
+
//# sourceMappingURL=isBusinessAccountActionRequired.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBusinessAccountActionRequired.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/isBusinessAccountActionRequired/isBusinessAccountActionRequired.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,+BAA+B,GAAI,CAAC,SAAS,MAAM,UACtD,6BAA6B,GAAG,CAAC,KACxC,MAAM,IAAI,6BAG8B,CAAC"}
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
-
import type {
|
|
3
|
-
/**
|
|
4
|
-
|
|
2
|
+
import type { BuiltInBusinessAccountMemberRole, BusinessAccountMember } from '../businessAccounts.types';
|
|
3
|
+
/**
|
|
4
|
+
* Roles a member can be reassigned to: a built-in other than owner, or one this
|
|
5
|
+
* account defined. Ownership moves only via transferOwnership, which the API
|
|
6
|
+
* refuses `owner` to enforce — the open branch cannot express that exclusion.
|
|
7
|
+
*/
|
|
8
|
+
type AssignableRole = Exclude<BuiltInBusinessAccountMemberRole, 'owner'> | (string & {});
|
|
5
9
|
type UpdateBusinessAccountMemberRoleParams = {
|
|
6
10
|
businessAccountId: string;
|
|
7
11
|
role: AssignableRole;
|
|
8
12
|
userId: string;
|
|
9
13
|
};
|
|
10
14
|
/**
|
|
11
|
-
* Changes an existing member's role
|
|
12
|
-
*
|
|
15
|
+
* Changes an existing member's role (owner-/admin-only) to any role the account
|
|
16
|
+
* defines — a built-in or a custom one, including from one custom role to
|
|
17
|
+
* another. Owner is not assignable here — use
|
|
18
|
+
* `transferBusinessAccountOwnership` for that.
|
|
13
19
|
*
|
|
14
20
|
* @param params.businessAccountId - The business account the member belongs to.
|
|
15
21
|
* @param params.userId - The member whose role changes.
|
|
16
|
-
* @param params.role - The new role (`admin
|
|
22
|
+
* @param params.role - The new role: a built-in (`admin`, `viewer`) or a role
|
|
23
|
+
* this account defined.
|
|
17
24
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
18
25
|
* @returns The updated business account member.
|
|
19
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateBusinessAccountMemberRole.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updateBusinessAccountMemberRole.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EACV,gCAAgC,EAChC,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AAEnC;;;;GAIG;AACH,KAAK,cAAc,GACf,OAAO,CAAC,gCAAgC,EAAE,OAAO,CAAC,GAClD,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,KAAK,qCAAqC,GAAG;IAC3C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,+BAA+B,wCACL,qCAAqC,WAClE,aAAa,KACpB,OAAO,CAAC,qBAAqB,CAmB/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWaasProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasProvider/createWaasProvider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAOzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAQzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAKlD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,uBAAuB;AACvB,eAAO,MAAM,kBAAkB,0BAG5B,wBAAwB,KAAG,
|
|
1
|
+
{"version":3,"file":"createWaasProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasProvider/createWaasProvider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAOzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAQzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAKlD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,uBAAuB;AACvB,eAAO,MAAM,kBAAkB,0BAG5B,wBAAwB,KAAG,YAqxB7B,CAAC"}
|
|
@@ -6,7 +6,7 @@ import type { Chain } from '../chain';
|
|
|
6
6
|
import type { LogoutReason } from '../auth/logoutReason';
|
|
7
7
|
import type { BaseWalletAccount, WalletAccount } from '../wallets/walletAccount';
|
|
8
8
|
import type { WalletProvider } from '../wallets/walletProvider';
|
|
9
|
-
import type { BusinessAccountSignerType, TargetIdentity } from './businessAccounts/businessAccounts.types';
|
|
9
|
+
import type { BusinessAccountActionRequired, BusinessAccountMutationIntent, BusinessAccountSignerType, TargetIdentity } from './businessAccounts/businessAccounts.types';
|
|
10
10
|
export type { ThresholdSignatureScheme } from '@dynamic-labs-wallet/browser-wallet-client';
|
|
11
11
|
/**
|
|
12
12
|
* Contains the share sets returned for a WaaS wallet account.
|
|
@@ -144,6 +144,9 @@ export type WaasProvider = {
|
|
|
144
144
|
}) => Promise<void>;
|
|
145
145
|
reshareToNewSignerShareSet: (args: {
|
|
146
146
|
businessAccountId: string;
|
|
147
|
+
/** Signed proposal for a governed addSigner; opens the proposal. */
|
|
148
|
+
intent?: BusinessAccountMutationIntent;
|
|
149
|
+
intentSignature?: string;
|
|
147
150
|
password?: string;
|
|
148
151
|
signerType?: BusinessAccountSignerType;
|
|
149
152
|
targetSignerIdentity: TargetIdentity;
|
|
@@ -151,7 +154,7 @@ export type WaasProvider = {
|
|
|
151
154
|
walletAccount: WalletAccount;
|
|
152
155
|
}) => Promise<{
|
|
153
156
|
shareSetId: string;
|
|
154
|
-
}>;
|
|
157
|
+
} | BusinessAccountActionRequired>;
|
|
155
158
|
restoreUserShareForWalletAccount: (args: {
|
|
156
159
|
walletAccount: WalletAccount;
|
|
157
160
|
}) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waas.types.d.ts","sourceRoot":"","sources":["../../../src/modules/waas/waas.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,6BAA6B,EAC7B,wBAAwB,EAC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;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC,yBAAyB,EAAE,CAAC,IAAI,EAAE;QAChC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC,IAAI,EAAE;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACjC,cAAc,EAAE,CAAC,IAAI,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAC7C,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../client/types/DynamicClient';
|
|
2
|
+
import type { Chain } from '../../chain';
|
|
3
|
+
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
4
|
+
import type { ConnectionOptionForWalletOption } from '../groupOptionsByWalletOption/groupOptionsByWalletOption';
|
|
5
|
+
import type { WalletConnectionOption } from '../walletOptionsCatalogue.types';
|
|
6
|
+
type BuildWalletBookConnectionOptionsParams = {
|
|
7
|
+
enabledChains: Set<Chain>;
|
|
8
|
+
excludedConnectionOptionTypes: Set<WalletConnectionOption['type']>;
|
|
9
|
+
walletBook: WalletBookSchema;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Builds every wallet-book-sourced connection option — WalletConnect,
|
|
13
|
+
* MetaMask SDK URI and in-app browser — narrowed to the chains this client
|
|
14
|
+
* has an extension for.
|
|
15
|
+
*
|
|
16
|
+
* Each URI-deeplink discriminator has its own builder with its own
|
|
17
|
+
* eligibility filter (WalletConnect requires `sign_v2`; MetaMask SDK URI
|
|
18
|
+
* does not), so excluding one discriminator never gates the other.
|
|
19
|
+
*
|
|
20
|
+
* WalletConnect options are emitted only on the chains with a registered
|
|
21
|
+
* `walletConnect` URI connection starter.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const options = buildWalletBookConnectionOptions(
|
|
26
|
+
* { enabledChains, excludedConnectionOptionTypes: new Set(), walletBook },
|
|
27
|
+
* client
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @param params.enabledChains - Chains the client has an extension for.
|
|
32
|
+
* @param params.excludedConnectionOptionTypes - Connection types to drop.
|
|
33
|
+
* @param params.walletBook - The fetched wallet book.
|
|
34
|
+
* @param client - The Dynamic client instance.
|
|
35
|
+
* @returns Tagged wallet-book options paired with their wallet option keys.
|
|
36
|
+
* @see getWalletOptionsCatalogue
|
|
37
|
+
* @see filterConnectionOptionsByEnabledChains
|
|
38
|
+
* @notInstrumented
|
|
39
|
+
*/
|
|
40
|
+
export declare const buildWalletBookConnectionOptions: ({ enabledChains, excludedConnectionOptionTypes, walletBook, }: BuildWalletBookConnectionOptionsParams, client: DynamicClient) => ConnectionOptionForWalletOption[];
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=buildWalletBookConnectionOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildWalletBookConnectionOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAMtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAChH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E,KAAK,sCAAsC,GAAG;IAC5C,aAAa,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,6BAA6B,EAAE,GAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,gCAAgC,kEAKxC,sCAAsC,UACjC,aAAa,KACpB,+BAA+B,EA2BjC,CAAC"}
|
package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Chain } from '../../chain';
|
|
1
2
|
import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
|
|
2
3
|
import type { ConnectionOptionForWalletOption } from '../groupOptionsByWalletOption/groupOptionsByWalletOption';
|
|
3
4
|
type BuildWalletConnectOptionsParams = {
|
|
4
5
|
walletBook: WalletBookSchema;
|
|
6
|
+
walletConnectChains: Set<Chain>;
|
|
5
7
|
};
|
|
6
8
|
/**
|
|
7
9
|
* Builds the `walletConnect`-discriminator catalogue options from a fetched
|
|
@@ -17,10 +19,14 @@ type BuildWalletConnectOptionsParams = {
|
|
|
17
19
|
* discriminator via `excludedConnectionOptionTypes` doesn't accidentally
|
|
18
20
|
* gate the other.
|
|
19
21
|
*
|
|
22
|
+
* Chains a wallet book entry advertises without a registered WalletConnect
|
|
23
|
+
* starter are filtered out.
|
|
24
|
+
*
|
|
20
25
|
* @param params.walletBook - The fetched wallet book.
|
|
26
|
+
* @param params.walletConnectChains - Chains with a registered `walletConnect` URI connection starter.
|
|
21
27
|
* @returns Tagged `walletConnect` options paired with their wallet option keys.
|
|
22
28
|
* @notInstrumented
|
|
23
29
|
*/
|
|
24
|
-
export declare const buildWalletConnectOptions: ({ walletBook, }: BuildWalletConnectOptionsParams) => ConnectionOptionForWalletOption[];
|
|
30
|
+
export declare const buildWalletConnectOptions: ({ walletBook, walletConnectChains, }: BuildWalletConnectOptionsParams) => ConnectionOptionForWalletOption[];
|
|
25
31
|
export {};
|
|
26
32
|
//# sourceMappingURL=buildWalletConnectOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildWalletConnectOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildWalletConnectOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAGhH,KAAK,+BAA+B,GAAG;IACrC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,mBAAmB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,yBAAyB,yCAGnC,+BAA+B,KAAG,+BAA+B,EA0CnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildWalletOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kEAAkE,CAAC;
|
|
1
|
+
{"version":3,"file":"buildWalletOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kEAAkE,CAAC;AAE1H,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAEzC,KAAK,uBAAuB,GAAG;IAC7B,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iBAAiB,2FAM3B,uBAAuB,KAAG,YA6B5B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Chain } from '../../chain';
|
|
2
|
+
import type { WalletConnectionOption } from '../walletOptionsCatalogue.types';
|
|
3
|
+
type DeriveSupportedChainsParams = {
|
|
4
|
+
connectionOptions: WalletConnectionOption[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Derives the chains a wallet option can be connected on from its connection
|
|
8
|
+
* options, deduped and sorted alphabetically so the order is stable
|
|
9
|
+
* regardless of how the connection options rank.
|
|
10
|
+
*
|
|
11
|
+
* Install-only wallet options have no connection options, so they support no
|
|
12
|
+
* chain until the wallet is installed.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const supportedChains = deriveSupportedChains({ connectionOptions });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param params.connectionOptions - The wallet option's connection options.
|
|
20
|
+
* @returns The chains supported by the wallet option.
|
|
21
|
+
* @see buildWalletOption
|
|
22
|
+
* @see WalletOption
|
|
23
|
+
* @notInstrumented
|
|
24
|
+
*/
|
|
25
|
+
export declare const deriveSupportedChains: ({ connectionOptions, }: DeriveSupportedChainsParams) => Chain[];
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=deriveSupportedChains.d.ts.map
|
package/dist/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deriveSupportedChains.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E,KAAK,2BAA2B,GAAG;IACjC,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,2BAE/B,2BAA2B,KAAG,KAAK,EAQrC,CAAC"}
|
package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ import type { GetWalletOptionsCatalogueParams, WalletOptionsCatalogue } from '..
|
|
|
9
9
|
* client has an extension for — a wallet is only surfaced on chains the
|
|
10
10
|
* customer can actually connect on.
|
|
11
11
|
*
|
|
12
|
+
* WalletConnect surfaces require a registered `walletConnect` URI
|
|
13
|
+
* connection starter, so they only appear once a chain extension that can
|
|
14
|
+
* mint a WalletConnect URI is added to the client.
|
|
15
|
+
*
|
|
12
16
|
* Pass `excludedConnectionOptionTypes` to drop specific connection types
|
|
13
17
|
* from the catalogue (e.g. `['inAppBrowser']` on desktop). Wallets whose
|
|
14
18
|
* only connection was an excluded type fall through to the install-only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWalletOptionsCatalogue.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getWalletOptionsCatalogue.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,+BAA+B,EAG/B,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAIzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,yBAAyB,YAC5B,+BAA+B,wDAEtC,OAAO,CAAC,sBAAsB,CAsEhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/isWalletExtensionInstalled/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,YAAY,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { WalletOption } from '../walletOptionsCatalogue.types';
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for {@link isWalletExtensionInstalled}.
|
|
4
|
+
*
|
|
5
|
+
* @description Describes the wallet option whose provider connections are inspected.
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* isWalletExtensionInstalled({ walletOption });
|
|
9
|
+
* ```
|
|
10
|
+
* @see isWalletExtensionInstalled
|
|
11
|
+
* @see WalletOption
|
|
12
|
+
*/
|
|
13
|
+
export type IsWalletExtensionInstalledParams = {
|
|
14
|
+
walletOption: WalletOption;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Returns true when the wallet option has any `withWalletProvider` connection
|
|
18
|
+
* option, meaning the wallet is available in the page through a browser
|
|
19
|
+
* extension, Wallet Standard announcement, window injection, or an SDK-backed
|
|
20
|
+
* provider registered by a chain extension.
|
|
21
|
+
*
|
|
22
|
+
* @description Detects whether a wallet option is available through a provider
|
|
23
|
+
* registered in the page.
|
|
24
|
+
* @param params.walletOption - The wallet option to inspect.
|
|
25
|
+
* @returns True when the wallet is available in the page.
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const isInstalled = isWalletExtensionInstalled({ walletOption });
|
|
29
|
+
* ```
|
|
30
|
+
* @see getWalletOptionsCatalogue
|
|
31
|
+
* @see WalletOption
|
|
32
|
+
* @notInstrumented
|
|
33
|
+
*/
|
|
34
|
+
export declare const isWalletExtensionInstalled: ({ walletOption, }: IsWalletExtensionInstalledParams) => boolean;
|
|
35
|
+
//# sourceMappingURL=isWalletExtensionInstalled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isWalletExtensionInstalled.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,sBAEpC,gCAAgC,KAAG,OAGnC,CAAC"}
|
|
@@ -12,7 +12,7 @@ type SortWalletOptionsParams = {
|
|
|
12
12
|
* - `'relevance'` (default): bucket wallet options into three tiers, in
|
|
13
13
|
* this order:
|
|
14
14
|
* 1. **Installed provider** — user already has the wallet available
|
|
15
|
-
* (`withWalletProvider`
|
|
15
|
+
* (any `withWalletProvider` connection option).
|
|
16
16
|
* 2. **Connectable** — has at least one connection (URI deeplink
|
|
17
17
|
* or `inAppBrowser`) but no installed provider.
|
|
18
18
|
* 3. **Install-only** — no connection at all; only `installationUrls`.
|
|
@@ -126,6 +126,13 @@ export type WalletOption = {
|
|
|
126
126
|
name: string;
|
|
127
127
|
/** Brand color in hex (e.g. `"#f6851b"`). */
|
|
128
128
|
primaryColor?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Chains this wallet can be connected on, deduped from
|
|
131
|
+
* `connectionOptions` and sorted alphabetically. Empty for install-only
|
|
132
|
+
* wallet options, which carry no connection option until the wallet is
|
|
133
|
+
* installed.
|
|
134
|
+
*/
|
|
135
|
+
supportedChains: Chain[];
|
|
129
136
|
};
|
|
130
137
|
/**
|
|
131
138
|
* Controls how wallet options are ordered in the returned catalogue.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletOptionsCatalogue.types.d.ts","sourceRoot":"","sources":["../../../src/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAEtF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,wBAAwB,GAChC,eAAe,GACf,gBAAgB,GAChB,KAAK,CAAC;AAEV;;;;;;;;;GASG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,wBAAwB,CAAC;IACjC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE;QACT,gDAAgD;QAChD,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,4DAA4D;QAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,IAAI,EAAE,iBAAiB,CAAC;CACzB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAC9B,kCAAkC,GAClC,2BAA2B,GAC3B,4BAA4B,CAAC;AAEjC;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;OAKG;IACH,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"walletOptionsCatalogue.types.d.ts","sourceRoot":"","sources":["../../../src/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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;AAEjC;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;OAKG;IACH,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,eAAe,EAAE,KAAK,EAAE,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,cAAc,CAAC;AAEhE,kDAAkD;AAClD,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;;;;;;;OASG;IACH,6BAA6B,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,EAAE,CAAC;IACjE;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mEAAmE;IACnE,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,YAAY,EAAE,CAAC"}
|
package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DynamicClient } from '../../../client/types';
|
|
2
2
|
import type { UriDeeplinkConnectionOption } from '../../walletOptionsCatalogue/walletOptionsCatalogue.types';
|
|
3
|
-
import type { ConnectionUriHandlerParams } from '../
|
|
3
|
+
import type { ConnectionUriHandlerParams } from '../walletConnectionHandlers.types';
|
|
4
4
|
import type { WalletAccount } from '../walletAccount';
|
|
5
5
|
type ConnectWithUriConnectionOptionParams = {
|
|
6
6
|
addToDynamicWalletAccounts: boolean;
|
|
@@ -13,9 +13,10 @@ type ConnectWithUriConnectionOptionParams = {
|
|
|
13
13
|
* account.
|
|
14
14
|
*
|
|
15
15
|
* Mints the pairing URI with the starter the chain extension registered for
|
|
16
|
-
* the option's chain and URI type, hands
|
|
17
|
-
*
|
|
18
|
-
* app, then waits for the user to approve the pairing on
|
|
16
|
+
* the option's chain and URI type, hands it to `onConnectionUri` as the
|
|
17
|
+
* wallet's deeplink carrying the pairing so the customer can render a QR code
|
|
18
|
+
* or open the wallet app, then waits for the user to approve the pairing on
|
|
19
|
+
* the wallet side.
|
|
19
20
|
*
|
|
20
21
|
* The handler is awaited, so an async handler that fails to open the wallet
|
|
21
22
|
* rejects the connection rather than letting the pairing resolve into an
|
|
@@ -36,7 +37,7 @@ type ConnectWithUriConnectionOptionParams = {
|
|
|
36
37
|
*
|
|
37
38
|
* @param params.addToDynamicWalletAccounts - Whether the connected wallet account should be added to the client's wallet accounts.
|
|
38
39
|
* @param params.connectionOption - The URI deeplink connection option to drive.
|
|
39
|
-
* @param params.onConnectionUri - Called with the pairing URI
|
|
40
|
+
* @param params.onConnectionUri - Called with the pairing URI once it is minted. Awaited before the approval is waited on.
|
|
40
41
|
* @param params.walletKey - The wallet being connected, keyed as in the wallet options catalogue.
|
|
41
42
|
* @param client - The Dynamic client instance.
|
|
42
43
|
* @returns A promise that resolves to the connected wallet account.
|
package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectWithUriConnectionOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AAC7G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"connectWithUriConnectionOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AAC7G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,KAAK,oCAAoC,GAAG;IAC1C,0BAA0B,EAAE,OAAO,CAAC;IACpC,gBAAgB,EAAE,2BAA2B,CAAC;IAC9C,eAAe,CAAC,EAAE,CAChB,MAAM,EAAE,0BAA0B,KAC/B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,8BAA8B,kFAMtC,oCAAoC,UAC/B,aAAa,KACpB,OAAO,CAAC,aAAa,CAoCvB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import type { Chain } from '../../chain';
|
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
13
|
* @see redirectToInAppBrowser
|
|
14
|
-
* @see
|
|
14
|
+
* @see connectWalletOption
|
|
15
15
|
*/
|
|
16
16
|
export type RedirectToInAppBrowserParams = {
|
|
17
17
|
/** The URL of your app for the wallet's browser to open. */
|
|
@@ -36,7 +36,7 @@ export type RedirectToInAppBrowserParams = {
|
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```ts
|
|
39
|
-
* await
|
|
39
|
+
* await connectWalletOption({
|
|
40
40
|
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
41
41
|
* redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey }),
|
|
42
42
|
* walletKey: 'coinbase',
|
|
@@ -52,7 +52,7 @@ export type RedirectToInAppBrowserParams = {
|
|
|
52
52
|
* @throws NoConnectionOptionAvailableError If the wallet exposes no in-app browser on the requested chain.
|
|
53
53
|
* @throws AmbiguousWalletChainError If the wallet exposes an in-app browser on more than one chain and no chain was passed.
|
|
54
54
|
* @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
|
|
55
|
-
* @see
|
|
55
|
+
* @see connectWalletOption
|
|
56
56
|
* @see WalletBrowserRedirectHandlerParams
|
|
57
57
|
* @instrumented
|
|
58
58
|
*/
|
package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type ResolveWalletConnectionOptionParams = {
|
|
|
6
6
|
walletKey: string;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* Picks the connection option `
|
|
9
|
+
* Picks the connection option `connectWalletOption` should drive for a wallet.
|
|
10
10
|
*
|
|
11
11
|
* Reads the wallet options catalogue, keeps the options this client can
|
|
12
12
|
* actually drive — a registered wallet provider, an in-app-browser entry, or
|
|
@@ -28,7 +28,7 @@ export type ResolveWalletConnectionOptionParams = {
|
|
|
28
28
|
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
29
29
|
* @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
|
|
30
30
|
* @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
|
|
31
|
-
* @see
|
|
31
|
+
* @see connectWalletOption
|
|
32
32
|
* @see getWalletOptionsCatalogue
|
|
33
33
|
* @notInstrumented
|
|
34
34
|
*/
|
package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveWalletConnectionOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2DAA2D,CAAC;AAGxG,MAAM,MAAM,mCAAmC,GAAG;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,6BAA6B,yBAClB,mCAAmC,UACjD,aAAa,KACpB,OAAO,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"resolveWalletConnectionOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2DAA2D,CAAC;AAGxG,MAAM,MAAM,mCAAmC,GAAG;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,6BAA6B,yBAClB,mCAAmC,UACjD,aAAa,KACpB,OAAO,CAAC,sBAAsB,CAmDhC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types/DynamicClient';
|
|
2
|
+
import type { Chain } from '../../../chain';
|
|
3
|
+
import type { UriConnectionType } from '../../walletProviderUriConnection.types';
|
|
4
|
+
type GetUriConnectionStarterChainsParams = {
|
|
5
|
+
type: UriConnectionType;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Returns the chains that have a URI connection starter registered for a
|
|
9
|
+
* given URI protocol. An empty set means no chain extension can mint a
|
|
10
|
+
* pairing URI for that protocol, so surfaces driven by it are not
|
|
11
|
+
* reachable on this client.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const chains = getUriConnectionStarterChains({ type: 'walletConnect' }, client);
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param params.type - The URI protocol to look up starters for.
|
|
19
|
+
* @param client - The Dynamic client instance.
|
|
20
|
+
* @returns The chains with a registered starter for the given protocol.
|
|
21
|
+
* @see getUriConnectionStarterRegistry
|
|
22
|
+
* @see UriConnectionType
|
|
23
|
+
* @notInstrumented
|
|
24
|
+
*/
|
|
25
|
+
export declare const getUriConnectionStarterChains: ({ type }: GetUriConnectionStarterChainsParams, client: DynamicClient) => Set<Chain>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=getUriConnectionStarterChains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUriConnectionStarterChains.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,KAAK,mCAAmC,GAAG;IACzC,IAAI,EAAE,iBAAiB,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,6BAA6B,aAC9B,mCAAmC,UACrC,aAAa,KACpB,GAAG,CAAC,KAAK,CAQX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyMessageSignatureOwnership.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,IAAI,qBAAqB,EAE5C,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"verifyMessageSignatureOwnership.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,IAAI,qBAAqB,EAE5C,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAKlF,KAAK,qCAAqC,GAAG;IAC3C,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC7C,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,GAAG,qBAAqB,EAAE,CAAC;CAChD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,2JAYvC,qCAAqC,UAChC,aAAa,KACpB,OAAO,CAAC,cAAc,CAoFxB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Chain } from '../chain';
|
|
2
|
+
/**
|
|
3
|
+
* Handed to `onConnectionUri` when a connection is established through a URI
|
|
4
|
+
* pairing, so the customer can surface it to the user while the connection
|
|
5
|
+
* promise is still pending.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const onConnectionUri = ({ uri }: ConnectionUriHandlerParams) => {
|
|
10
|
+
* if (isMobile()) {
|
|
11
|
+
* window.location.href = uri;
|
|
12
|
+
* return;
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* renderQrCode(uri);
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
* @see connectWalletOption
|
|
19
|
+
* @see ConnectWalletOptionParams
|
|
20
|
+
*/
|
|
21
|
+
export type ConnectionUriHandlerParams = {
|
|
22
|
+
/**
|
|
23
|
+
* The pairing URI to hand to the wallet, either opened as a link on mobile
|
|
24
|
+
* or rendered as a QR code for the user to scan with the wallet on another
|
|
25
|
+
* device.
|
|
26
|
+
*
|
|
27
|
+
* It is the wallet's own deeplink carrying the pairing, with the variant
|
|
28
|
+
* the current platform can open picked for you: the native scheme on
|
|
29
|
+
* mobile, the universal link on desktop, the other one as fallback. For a
|
|
30
|
+
* MetaMask SDK pairing it is the launch link MetaMask minted, which already
|
|
31
|
+
* targets the wallet. Wallets the wallet book publishes no deeplink for
|
|
32
|
+
* fall back to the bare pairing URI.
|
|
33
|
+
*/
|
|
34
|
+
uri: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Handed to `handleWalletBrowserRedirect` when the wallet can only be
|
|
38
|
+
* connected through its own in-app browser, so the customer can leave for it
|
|
39
|
+
* with `redirectToInAppBrowser`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const handleWalletBrowserRedirect = ({
|
|
44
|
+
* chain,
|
|
45
|
+
* walletKey,
|
|
46
|
+
* }: WalletBrowserRedirectHandlerParams) =>
|
|
47
|
+
* redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey });
|
|
48
|
+
* ```
|
|
49
|
+
* @see connectWalletOption
|
|
50
|
+
* @see redirectToInAppBrowser
|
|
51
|
+
*/
|
|
52
|
+
export type WalletBrowserRedirectHandlerParams = {
|
|
53
|
+
/** The chain the wallet's in-app browser was resolved for. */
|
|
54
|
+
chain: Chain;
|
|
55
|
+
/**
|
|
56
|
+
* The wallet to open, keyed as in the wallet options catalogue. Hand it to
|
|
57
|
+
* `redirectToInAppBrowser` along with the URL of your app for the wallet's
|
|
58
|
+
* browser to open.
|
|
59
|
+
*/
|
|
60
|
+
walletKey: string;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=walletConnectionHandlers.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletConnectionHandlers.types.d.ts","sourceRoot":"","sources":["../../../src/modules/wallets/walletConnectionHandlers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;;;;;;;;;OAWG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,8DAA8D;IAC9D,KAAK,EAAE,KAAK,CAAC;IACb;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -6,11 +6,12 @@ type InstrumentFunctionParams<Args extends unknown[], Result> = {
|
|
|
6
6
|
/** Human-readable name recorded in every emitted event. */
|
|
7
7
|
functionName: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Resolves the `DynamicCore` instance from the wrapped function's invocation
|
|
10
|
+
* arguments, or returns `undefined` when the SDK has not yet been
|
|
11
|
+
* initialised. Instrumentation is skipped when this returns `undefined` or
|
|
12
|
+
* when `core.instrumentation.config.enabled` is `false`.
|
|
12
13
|
*/
|
|
13
|
-
getCore: () => DynamicCore | undefined;
|
|
14
|
+
getCore: (args: Args) => DynamicCore | undefined;
|
|
14
15
|
/**
|
|
15
16
|
* Optional explicit payload selectors. When provided, their returned
|
|
16
17
|
* {@link SafePayload} is attached to the corresponding event. When omitted,
|
|
@@ -49,7 +50,7 @@ type InstrumentFunctionParams<Args extends unknown[], Result> = {
|
|
|
49
50
|
* const transfer = instrumentFunction({
|
|
50
51
|
* fn: rawTransfer,
|
|
51
52
|
* functionName: 'transfer',
|
|
52
|
-
* getCore: () =>
|
|
53
|
+
* getCore: (args) => resolveInstrumentationCore(args),
|
|
53
54
|
* selectors: {
|
|
54
55
|
* // `args` is the argument tuple the wrapped function was called with.
|
|
55
56
|
* started: ([{ chainId, amount }]) => ({ amount, chainId }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentFunction.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/instrumentFunction/instrumentFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAO1E,OAAO,KAAK,EAGV,+BAA+B,EAEhC,MAAM,0BAA0B,CAAC;AAiFlC,KAAK,wBAAwB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,MAAM,IAAI;IAC9D,qCAAqC;IACrC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB
|
|
1
|
+
{"version":3,"file":"instrumentFunction.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/instrumentFunction/instrumentFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAO1E,OAAO,KAAK,EAGV,+BAA+B,EAEhC,MAAM,0BAA0B,CAAC;AAiFlC,KAAK,wBAAwB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,MAAM,IAAI;IAC9D,qCAAqC;IACrC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,GAAG,SAAS,CAAC;IACjD;;;;OAIG;IACH,SAAS,CAAC,EAAE,+BAA+B,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,eAAO,MAAM,kBAAkB,GAAI,IAAI,SAAS,OAAO,EAAE,EAAE,MAAM,6CAK9D,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,KAAG,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,CAgFrE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/resolveInstrumentationCore/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|