@dynamic-labs/wallet-connector-core 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +7 -7
- package/src/WalletConnectorBase/WalletConnectorBase.cjs +8 -0
- package/src/WalletConnectorBase/WalletConnectorBase.d.ts +4 -0
- package/src/WalletConnectorBase/WalletConnectorBase.js +8 -0
- package/src/WalletConnectorBase/types.d.ts +1 -1
- package/src/index.cjs +0 -2
- package/src/index.d.ts +2 -2
- package/src/index.js +0 -1
- package/src/interfaces/index.d.ts +0 -1
- package/src/utils/index.d.ts +0 -1
- package/src/interfaces/ICoinbaseMPCWalletConnector.d.ts +0 -21
- package/src/utils/isCoinbaseMpcWalletConnector/index.d.ts +0 -1
- package/src/utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.cjs +0 -12
- package/src/utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.d.ts +0 -2
- package/src/utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.5.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.5.0...v4.5.1) (2025-02-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* improve sdk performance ([#7992](https://github.com/dynamic-labs/dynamic-auth/issues/7992)) ([7c541d4](https://github.com/dynamic-labs/dynamic-auth/commit/7c541d498b3afe708e468327e53c839826029490))
|
|
8
|
+
|
|
2
9
|
## [4.5.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.4...v4.5.0) (2025-02-04)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-connector-core",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "Core package for utilities and types for handling multiple wallet/chain support Dynamic SDK",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.607",
|
|
22
|
-
"@dynamic-labs/assert-package-version": "4.5.
|
|
23
|
-
"@dynamic-labs/logger": "4.5.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "4.5.
|
|
25
|
-
"@dynamic-labs/types": "4.5.
|
|
26
|
-
"@dynamic-labs/utils": "4.5.
|
|
27
|
-
"@dynamic-labs/wallet-book": "4.5.
|
|
22
|
+
"@dynamic-labs/assert-package-version": "4.5.1",
|
|
23
|
+
"@dynamic-labs/logger": "4.5.1",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "4.5.1",
|
|
25
|
+
"@dynamic-labs/types": "4.5.1",
|
|
26
|
+
"@dynamic-labs/utils": "4.5.1",
|
|
27
|
+
"@dynamic-labs/wallet-book": "4.5.1",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {}
|
|
@@ -329,6 +329,14 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
|
329
329
|
signMessage(messageToSign, options) {
|
|
330
330
|
return Promise.resolve(undefined);
|
|
331
331
|
}
|
|
332
|
+
/**
|
|
333
|
+
* Returns the array of block explorer URLs available for the current network
|
|
334
|
+
*/
|
|
335
|
+
getBlockExplorerUrlsForCurrentNetwork() {
|
|
336
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
return [];
|
|
338
|
+
});
|
|
339
|
+
}
|
|
332
340
|
/**
|
|
333
341
|
* Whether the wallet supports network switching
|
|
334
342
|
*
|
|
@@ -263,6 +263,10 @@ export declare abstract class WalletConnectorBase<C extends WalletConstructor<an
|
|
|
263
263
|
signMessage(messageToSign: string, options?: {
|
|
264
264
|
address?: string;
|
|
265
265
|
}): Promise<string | undefined>;
|
|
266
|
+
/**
|
|
267
|
+
* Returns the array of block explorer URLs available for the current network
|
|
268
|
+
*/
|
|
269
|
+
getBlockExplorerUrlsForCurrentNetwork(): Promise<string[]>;
|
|
266
270
|
/**
|
|
267
271
|
* List of supported chains for this wallet
|
|
268
272
|
*/
|
|
@@ -321,6 +321,14 @@ class WalletConnectorBase extends EventEmitter {
|
|
|
321
321
|
signMessage(messageToSign, options) {
|
|
322
322
|
return Promise.resolve(undefined);
|
|
323
323
|
}
|
|
324
|
+
/**
|
|
325
|
+
* Returns the array of block explorer URLs available for the current network
|
|
326
|
+
*/
|
|
327
|
+
getBlockExplorerUrlsForCurrentNetwork() {
|
|
328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
return [];
|
|
330
|
+
});
|
|
331
|
+
}
|
|
324
332
|
/**
|
|
325
333
|
* Whether the wallet supports network switching
|
|
326
334
|
*
|
|
@@ -22,7 +22,7 @@ export type NameServiceData = {
|
|
|
22
22
|
name?: string;
|
|
23
23
|
};
|
|
24
24
|
export type InternalWalletConnector = WalletConnectorCore.WalletConnector;
|
|
25
|
-
export type WalletConnector = Pick<InternalWalletConnector, 'canConnectViaCustodialService' | 'canConnectViaQrCode' | 'canConnectViaSocial' | 'chainRpcProviders' | 'connect' | 'connectedChain' | 'createWallet' | 'constructorProps' | 'endSession' | 'getAddress' | 'getAdditionalAddresses' | 'getConnectedAccounts' | 'getDeepLink' | 'getMobileOrInstalledWallet' | 'getNetwork' | 'getSession' | 'initEventListener' | 'isAvailable' | 'isEmbeddedWallet' | 'isInitialized' | 'isInstalledOnBrowser' | 'isTestnet' | 'isWalletConnect' | 'key' | 'metadata' | 'name' | 'parseAddress' | 'proveOwnership' | 'providerResources' | 'supportedChains' | 'supportsNetworkSwitching' | 'switchNetwork' | 'switchNetworkOnlyFromWallet' | 'teardownEventListeners'> & EventEmitter<WalletConnectorEventTypes>;
|
|
25
|
+
export type WalletConnector = Pick<InternalWalletConnector, 'canConnectViaCustodialService' | 'canConnectViaQrCode' | 'canConnectViaSocial' | 'chainRpcProviders' | 'connect' | 'connectedChain' | 'createWallet' | 'constructorProps' | 'endSession' | 'getAddress' | 'getAdditionalAddresses' | 'getConnectedAccounts' | 'getDeepLink' | 'getMobileOrInstalledWallet' | 'getNetwork' | 'getSession' | 'initEventListener' | 'isAvailable' | 'isEmbeddedWallet' | 'isInitialized' | 'isInstalledOnBrowser' | 'isTestnet' | 'isWalletConnect' | 'key' | 'metadata' | 'name' | 'parseAddress' | 'proveOwnership' | 'providerResources' | 'supportedChains' | 'supportsNetworkSwitching' | 'switchNetwork' | 'switchNetworkOnlyFromWallet' | 'teardownEventListeners' | 'getBlockExplorerUrlsForCurrentNetwork'> & EventEmitter<WalletConnectorEventTypes>;
|
|
26
26
|
export interface WalletConnectorConstructor {
|
|
27
27
|
new (props?: any): InternalWalletConnector;
|
|
28
28
|
}
|
package/src/index.cjs
CHANGED
|
@@ -30,7 +30,6 @@ var eventListenerHandlers = require('./utils/eventListenerHandlers.cjs');
|
|
|
30
30
|
var isHex = require('./utils/isHex/isHex.cjs');
|
|
31
31
|
var isPhantomRedirectConnector = require('./utils/isPhantomRedirectConnector/isPhantomRedirectConnector.cjs');
|
|
32
32
|
var getRpcUrlForChain = require('./utils/getRpcUrlForChain/getRpcUrlForChain.cjs');
|
|
33
|
-
var isCoinbaseMpcWalletConnector = require('./utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.cjs');
|
|
34
33
|
var isWalletConnectConnector = require('./utils/isWalletConnectConnector/isWalletConnectConnector.cjs');
|
|
35
34
|
var isSendBalanceWalletConnector = require('./utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.cjs');
|
|
36
35
|
var isSessionKeyCompatibleWallet = require('./utils/isSessionKeyCompatible/isSessionKeyCompatibleWallet/isSessionKeyCompatibleWallet.cjs');
|
|
@@ -77,7 +76,6 @@ exports.eventListenerHandlers = eventListenerHandlers.eventListenerHandlers;
|
|
|
77
76
|
exports.isHex = isHex.isHex;
|
|
78
77
|
exports.isPhantomRedirectConnector = isPhantomRedirectConnector.isPhantomRedirectConnector;
|
|
79
78
|
exports.getRpcUrlForChain = getRpcUrlForChain.getRpcUrlForChain;
|
|
80
|
-
exports.isCoinbaseMpcWalletConnector = isCoinbaseMpcWalletConnector.isCoinbaseMpcWalletConnector;
|
|
81
79
|
exports.isWalletConnectConnector = isWalletConnectConnector.isWalletConnectConnector;
|
|
82
80
|
exports.isSendBalanceWalletConnector = isSendBalanceWalletConnector.isSendBalanceWalletConnector;
|
|
83
81
|
exports.isSessionKeyCompatibleWallet = isSessionKeyCompatibleWallet.isSessionKeyCompatibleWallet;
|
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { walletConnectorEvents } from './events';
|
|
2
|
-
export { type Attestation, type AuthenticatorRecoveryHandler, type AuthenticatorType, type BitcoinSignPsbtRequest, type BitcoinSignPsbtRequestSignature, type BitcoinSignPsbtResponse, type ExportHandler, type
|
|
2
|
+
export { type Attestation, type AuthenticatorRecoveryHandler, type AuthenticatorType, type BitcoinSignPsbtRequest, type BitcoinSignPsbtRequestSignature, type BitcoinSignPsbtResponse, type ExportHandler, type IAccountAbstractionWalletConnector, type IBitcoinWalletConnector, type IEmailOTPWalletConnector, type IEmailWalletConnector, type IHardwareWalletConnector, type IPasskeyWalletConnector, type IPhantomRedirectConnector, type IPhantomRedirectConnectorWithEvents, type ISendBalanceWalletConnector, type ISessionKeyCompatibleWalletConnector, type ISMSWalletConnector, type ITurnkeyWalletConnector, type ITurnkeyWalletConnectorStamper, type IWalletConnectConnector, type IZeroDevConnector, type RecoveryEmailParams, type RecoveryWebAuthnAttestation, type SignAllTransactionsListener, type SignAndSendTransactionListener, type SignMessageListener, type SignTransactionListener, type WebAuthnAttestation, type IEthereumConnector, type IPublicClient, type ISolanaConnection, } from './interfaces';
|
|
3
3
|
export type { AccountChangeEventHandler, ChainChangeEventHandler, DisconnectEventHandler, WalletConnectorCore, WalletMetadata, WalletDeepLinks, WalletDownloadLinks, WalletLimitations, WalletLinks, } from './types';
|
|
4
|
-
export { addHexPrefix, bufferToHex, eventListenerHandlers, getChainInfo, getChainInfoWithOverrides, getDeepLink, getMobileExperience, getRpcUrlForChain, getWalletConnectorByKey, isAccountAbstractionConnector, isBitcoinConnector, isBloctoConnector,
|
|
4
|
+
export { addHexPrefix, bufferToHex, eventListenerHandlers, getChainInfo, getChainInfoWithOverrides, getDeepLink, getMobileExperience, getRpcUrlForChain, getWalletConnectorByKey, isAccountAbstractionConnector, isBitcoinConnector, isBloctoConnector, isEmailOTPWalletConnector, isEmailWalletConnector, isEmbeddedConnector, isHardwareWalletConnector, isHex, isMagicConnector, isPasskeyWalletConnector, isPhantomRedirectConnector, isSameAddress, isSendBalanceWalletConnector, isSessionKeyCompatibleWallet, isSessionKeyCompatibleWalletConnector, isSocialWalletConnector, isTurnkeyWalletConnector, isWalletConnectConnector, isConnectorMethodSupported, isConnectorEventSupported, getWalletMetadataFromWalletBook, getWalletLinks, logger, performPlatformSpecificConnectionMethod, ProviderLookup, setChainInfoOverrides, shouldLowercaseAddress, utf8ToHex, convertWalletToBaseWallet, convertWalletToBaseWalletPartial, type ChainDisplayOverrides, type DeepLinkVariant, type ProviderCondition, } from './utils';
|
|
5
5
|
export { Wallet, type WalletConstructor, type WalletProps } from './Wallet';
|
|
6
6
|
export { Chains, socialProviders, WalletConnectorBase, type Chain, type ChainInfo, type GetAddressOpts, type InternalWalletConnector, type NameServiceData, type PayloadParams, type SocialProvider, type WalletConnector, type WalletConnectorConstructor, type WalletConnectorEventTypes, type WalletConnectorExtension, type WalletConnectorsMethod, } from './WalletConnectorBase';
|
|
7
7
|
export { WalletBookSingleton } from './WalletBookSingleton';
|
package/src/index.js
CHANGED
|
@@ -26,7 +26,6 @@ export { eventListenerHandlers } from './utils/eventListenerHandlers.js';
|
|
|
26
26
|
export { isHex } from './utils/isHex/isHex.js';
|
|
27
27
|
export { isPhantomRedirectConnector } from './utils/isPhantomRedirectConnector/isPhantomRedirectConnector.js';
|
|
28
28
|
export { getRpcUrlForChain } from './utils/getRpcUrlForChain/getRpcUrlForChain.js';
|
|
29
|
-
export { isCoinbaseMpcWalletConnector } from './utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.js';
|
|
30
29
|
export { isWalletConnectConnector } from './utils/isWalletConnectConnector/isWalletConnectConnector.js';
|
|
31
30
|
export { isSendBalanceWalletConnector } from './utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.js';
|
|
32
31
|
export { isSessionKeyCompatibleWallet } from './utils/isSessionKeyCompatible/isSessionKeyCompatibleWallet/isSessionKeyCompatibleWallet.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './IAccountAbstractionWalletConnector';
|
|
2
2
|
export * from './IBitcoinWalletConnector';
|
|
3
|
-
export * from './ICoinbaseMPCWalletConnector';
|
|
4
3
|
export * from './IEmailOTPWalletConnector';
|
|
5
4
|
export * from './IEmailWalletConnector';
|
|
6
5
|
export * from './IHardwareWalletConnector';
|
package/src/utils/index.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ export * from './eventListenerHandlers';
|
|
|
21
21
|
export * from './isHex';
|
|
22
22
|
export * from './isPhantomRedirectConnector';
|
|
23
23
|
export * from './getRpcUrlForChain';
|
|
24
|
-
export * from './isCoinbaseMpcWalletConnector';
|
|
25
24
|
export * from './isWalletConnectConnector';
|
|
26
25
|
export * from './isSendBalanceWalletConnector';
|
|
27
26
|
export * from './isSessionKeyCompatible';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PasswordSourceTypeEnum } from '@dynamic-labs/sdk-api-core';
|
|
2
|
-
import { WalletConnectorBase } from '..';
|
|
3
|
-
export type RawPrivateKey = {
|
|
4
|
-
keyPath: string;
|
|
5
|
-
ecKeyPublic: string;
|
|
6
|
-
ecKeyPrivate: string;
|
|
7
|
-
};
|
|
8
|
-
export type ExtendedPrivateKey = {
|
|
9
|
-
keyPath: string;
|
|
10
|
-
xPrivateKey: string;
|
|
11
|
-
};
|
|
12
|
-
export interface ICoinbaseMPCWalletConnector extends WalletConnectorBase {
|
|
13
|
-
changePasscode(newPasscode: string, oldPasscode?: string): Promise<boolean>;
|
|
14
|
-
exportWalletKeys(): Promise<ExtendedPrivateKey[] | RawPrivateKey[]>;
|
|
15
|
-
generateWallet(source: PasswordSourceTypeEnum, passcode: string): Promise<string | undefined>;
|
|
16
|
-
setAuthTokenFetcher(func: () => Promise<string>): void;
|
|
17
|
-
setBackupCodeFetcher(func: () => Promise<string>): void;
|
|
18
|
-
setPasscodeFetcher(func: () => Promise<string>): void;
|
|
19
|
-
setRequiredPassword(isRequired: boolean): void;
|
|
20
|
-
validatePasscode(passcode: string): Promise<boolean>;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './isCoinbaseMpcWalletConnector';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
const isCoinbaseMpcWalletConnector = (connector) => Boolean(connector) &&
|
|
7
|
-
connector.key === 'coinbasempc' &&
|
|
8
|
-
connector.generateWallet !== undefined &&
|
|
9
|
-
connector.changePasscode !== undefined &&
|
|
10
|
-
connector.exportWalletKeys !== undefined;
|
|
11
|
-
|
|
12
|
-
exports.isCoinbaseMpcWalletConnector = isCoinbaseMpcWalletConnector;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
const isCoinbaseMpcWalletConnector = (connector) => Boolean(connector) &&
|
|
3
|
-
connector.key === 'coinbasempc' &&
|
|
4
|
-
connector.generateWallet !== undefined &&
|
|
5
|
-
connector.changePasscode !== undefined &&
|
|
6
|
-
connector.exportWalletKeys !== undefined;
|
|
7
|
-
|
|
8
|
-
export { isCoinbaseMpcWalletConnector };
|