@dynamic-labs/eclipse 4.4.0 → 4.4.2-preview.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/CHANGELOG.md +22 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.d.ts +2 -2
- package/src/connectors/injected/InjectedWalletBase/InjectedWalletBase.cjs +3 -3
- package/src/connectors/injected/InjectedWalletBase/InjectedWalletBase.js +4 -4
- package/src/index.cjs +2 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -0
- package/src/rpc/RpcProviderEclipse/RpcProviderEclipse.cjs +2 -2
- package/src/rpc/RpcProviderEclipse/RpcProviderEclipse.js +2 -2
- package/src/wallet/index.d.ts +1 -0
- package/src/wallet/isLedgerEclipseWallet/index.d.ts +1 -0
- package/src/wallet/isLedgerEclipseWallet/isLedgerEclipseWallet.cjs +16 -0
- package/src/wallet/isLedgerEclipseWallet/isLedgerEclipseWallet.d.ts +5 -0
- package/src/wallet/isLedgerEclipseWallet/isLedgerEclipseWallet.js +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.4.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2-preview.0) (2025-01-28)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add support for 7702 on ZeroDevConnector ([a8c850a](https://github.com/dynamic-labs/dynamic-auth/commit/a8c850ab192d6113ad55a01a594d5d90ab0fbfa6))
|
|
8
|
+
* implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([96853fa](https://github.com/dynamic-labs/dynamic-auth/commit/96853fae170ca2f81cc01ccd6d9886446876412b))
|
|
9
|
+
* implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([d988e88](https://github.com/dynamic-labs/dynamic-auth/commit/d988e88eccd0b04ba5710c8aa437f5dfffeb1d74))
|
|
10
|
+
* implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([597f837](https://github.com/dynamic-labs/dynamic-auth/commit/597f8375bacef1e6a9a064604074c6920955a3e2))
|
|
11
|
+
|
|
12
|
+
### [4.4.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.0...v4.4.1) (2025-01-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* allow override of rpc urls in connectionConfig for Solana and Eclipse ([#7884](https://github.com/dynamic-labs/dynamic-auth/issues/7884)) ([b65cea0](https://github.com/dynamic-labs/dynamic-auth/commit/b65cea0f7f5240c0e021843266c1437feffa51c5))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* close banxa modal when clicking outside of modal ([#7890](https://github.com/dynamic-labs/dynamic-auth/issues/7890)) ([cc5b5a5](https://github.com/dynamic-labs/dynamic-auth/commit/cc5b5a5911615925065411472f7874aeafff0a25))
|
|
23
|
+
|
|
2
24
|
## [4.4.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.3.2...v4.4.0) (2025-01-24)
|
|
3
25
|
|
|
4
26
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/eclipse",
|
|
3
|
-
"version": "4.4.0",
|
|
3
|
+
"version": "4.4.2-preview.0",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@solana/web3.js": "1.92.1",
|
|
22
22
|
"@wallet-standard/base": "1.0.1",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.4.0",
|
|
24
|
-
"@dynamic-labs/rpc-providers": "4.4.0",
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.4.2-preview.0",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "4.4.2-preview.0",
|
|
25
25
|
"@dynamic-labs/sdk-api-core": "0.0.599",
|
|
26
|
-
"@dynamic-labs/solana": "4.4.0",
|
|
27
|
-
"@dynamic-labs/solana-core": "4.4.0",
|
|
28
|
-
"@dynamic-labs/types": "4.4.0",
|
|
29
|
-
"@dynamic-labs/utils": "4.4.0",
|
|
30
|
-
"@dynamic-labs/wallet-book": "4.4.0",
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.4.0"
|
|
26
|
+
"@dynamic-labs/solana": "4.4.2-preview.0",
|
|
27
|
+
"@dynamic-labs/solana-core": "4.4.2-preview.0",
|
|
28
|
+
"@dynamic-labs/types": "4.4.2-preview.0",
|
|
29
|
+
"@dynamic-labs/utils": "4.4.2-preview.0",
|
|
30
|
+
"@dynamic-labs/wallet-book": "4.4.2-preview.0",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.4.2-preview.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {}
|
|
34
34
|
}
|
package/src/connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ConnectionConfig } from '@solana/web3.js';
|
|
2
1
|
import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
+
import { SolanaConnectionConfig } from '@dynamic-labs/solana-core';
|
|
3
3
|
/**
|
|
4
4
|
* Allows passing in Solana connection configuration to all wallet connectors.
|
|
5
5
|
*/
|
|
6
|
-
export declare const EclipseWalletConnectorsWithConfig: (connectionConfig:
|
|
6
|
+
export declare const EclipseWalletConnectorsWithConfig: (connectionConfig: SolanaConnectionConfig) => () => WalletConnectorConstructor[];
|
|
@@ -35,13 +35,13 @@ class InjectedWalletBase extends solana.SolanaInjectedConnector {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
getWalletClient() {
|
|
38
|
-
var _a
|
|
38
|
+
var _a;
|
|
39
39
|
const [network] = this.eclipseNetworks;
|
|
40
40
|
if (!network) {
|
|
41
41
|
throw new utils.DynamicError('No enabled networks');
|
|
42
42
|
}
|
|
43
|
-
const rpcUrl = (
|
|
44
|
-
return new web3_js.Connection(rpcUrl, (
|
|
43
|
+
const rpcUrl = solanaCore.getOverrideRpcUrlForNetwork(this.connectionConfig, network);
|
|
44
|
+
return new web3_js.Connection(rpcUrl, (_a = this.connectionConfig) !== null && _a !== void 0 ? _a : 'confirmed');
|
|
45
45
|
}
|
|
46
46
|
// the genesis hashes on Eclipse are different than Solana
|
|
47
47
|
getNetwork() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
3
3
|
import { Connection } from '@solana/web3.js';
|
|
4
4
|
import { SolanaInjectedConnector } from '@dynamic-labs/solana';
|
|
5
|
-
import { getGenesisHashLSKey } from '@dynamic-labs/solana-core';
|
|
5
|
+
import { getOverrideRpcUrlForNetwork, getGenesisHashLSKey } from '@dynamic-labs/solana-core';
|
|
6
6
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
7
7
|
import { eclipseMainnetHash, eclipseTestnetHash } from '../../constants.js';
|
|
8
8
|
|
|
@@ -31,13 +31,13 @@ class InjectedWalletBase extends SolanaInjectedConnector {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
getWalletClient() {
|
|
34
|
-
var _a
|
|
34
|
+
var _a;
|
|
35
35
|
const [network] = this.eclipseNetworks;
|
|
36
36
|
if (!network) {
|
|
37
37
|
throw new DynamicError('No enabled networks');
|
|
38
38
|
}
|
|
39
|
-
const rpcUrl = (
|
|
40
|
-
return new Connection(rpcUrl, (
|
|
39
|
+
const rpcUrl = getOverrideRpcUrlForNetwork(this.connectionConfig, network);
|
|
40
|
+
return new Connection(rpcUrl, (_a = this.connectionConfig) !== null && _a !== void 0 ? _a : 'confirmed');
|
|
41
41
|
}
|
|
42
42
|
// the genesis hashes on Eclipse are different than Solana
|
|
43
43
|
getNetwork() {
|
package/src/index.cjs
CHANGED
|
@@ -8,6 +8,7 @@ var _package = require('../package.cjs');
|
|
|
8
8
|
require('@dynamic-labs/wallet-connector-core');
|
|
9
9
|
var EclipseWallet = require('./wallet/EclipseWallet.cjs');
|
|
10
10
|
var isEclipseWallet = require('./wallet/isEclipseWallet/isEclipseWallet.cjs');
|
|
11
|
+
var isLedgerEclipseWallet = require('./wallet/isLedgerEclipseWallet/isLedgerEclipseWallet.cjs');
|
|
11
12
|
var EclipseWalletConnectors = require('./connectors/EclipseWalletConnectors.cjs');
|
|
12
13
|
var EclipseWalletConnectorsWithConfig = require('./connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.cjs');
|
|
13
14
|
require('./rpc/RpcProviderEclipse/RpcProviderEclipse.cjs');
|
|
@@ -18,6 +19,7 @@ assertPackageVersion.assertPackageVersion('@dynamic-labs/eclipse', _package.vers
|
|
|
18
19
|
|
|
19
20
|
exports.EclipseWallet = EclipseWallet.EclipseWallet;
|
|
20
21
|
exports.isEclipseWallet = isEclipseWallet.isEclipseWallet;
|
|
22
|
+
exports.isLedgerEclipseWallet = isLedgerEclipseWallet.isLedgerEclipseWallet;
|
|
21
23
|
exports.EclipseWalletConnectors = EclipseWalletConnectors.EclipseWalletConnectors;
|
|
22
24
|
exports.EclipseWalletConnectorsWithConfig = EclipseWalletConnectorsWithConfig.EclipseWalletConnectorsWithConfig;
|
|
23
25
|
Object.defineProperty(exports, 'ChainRpcProviders', {
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { EclipseWalletConnectors, EclipseWalletConnectorsWithConfig, } from './connectors';
|
|
2
2
|
export { ChainRpcProviders, ChainRpcProvidersClass, eclipseProvidersSelector, ProviderChain, type EclipseRpcProvider, type EclipseRpcProviderMethods, type IChainRpcProviders, type RegisteredProviderMethod, type RegisteredProviderMethods, type RpcProviderLookup, type RpcProviders, type RpcProvidersSelector, type SolanaRpcProvider, } from './rpc';
|
|
3
|
-
export { EclipseWallet, isEclipseWallet } from './wallet';
|
|
3
|
+
export { EclipseWallet, isEclipseWallet, isLedgerEclipseWallet, } from './wallet';
|
package/src/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { version } from '../package.js';
|
|
|
4
4
|
import '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
export { EclipseWallet } from './wallet/EclipseWallet.js';
|
|
6
6
|
export { isEclipseWallet } from './wallet/isEclipseWallet/isEclipseWallet.js';
|
|
7
|
+
export { isLedgerEclipseWallet } from './wallet/isLedgerEclipseWallet/isLedgerEclipseWallet.js';
|
|
7
8
|
export { EclipseWalletConnectors } from './connectors/EclipseWalletConnectors.js';
|
|
8
9
|
export { EclipseWalletConnectorsWithConfig } from './connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.js';
|
|
9
10
|
import './rpc/RpcProviderEclipse/RpcProviderEclipse.js';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var web3_js = require('@solana/web3.js');
|
|
5
5
|
var rpcProviders = require('@dynamic-labs/rpc-providers');
|
|
6
|
+
var solanaCore = require('@dynamic-labs/solana-core');
|
|
6
7
|
|
|
7
8
|
rpcProviders.ChainRpcProviders.getEclipseProviderByChainId = (rpcProviders, chainId) => {
|
|
8
9
|
var _a;
|
|
@@ -14,8 +15,7 @@ rpcProviders.ChainRpcProviders.registerEclipseProviders = (connectionConfig) =>
|
|
|
14
15
|
const rpcProviders = {};
|
|
15
16
|
if (config === null || config === void 0 ? void 0 : config.eclipse) {
|
|
16
17
|
rpcProviders.eclipse = config.eclipse.map((network) => {
|
|
17
|
-
|
|
18
|
-
const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
|
|
18
|
+
const rpcUrl = solanaCore.getOverrideRpcUrlForNetwork(connectionConfig, network);
|
|
19
19
|
const provider = new web3_js.Connection(rpcUrl, connectionConfig);
|
|
20
20
|
return {
|
|
21
21
|
chainId: network.chainId.toString(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { Connection } from '@solana/web3.js';
|
|
3
3
|
import { ChainRpcProviders, ProviderChain } from '@dynamic-labs/rpc-providers';
|
|
4
|
+
import { getOverrideRpcUrlForNetwork } from '@dynamic-labs/solana-core';
|
|
4
5
|
|
|
5
6
|
ChainRpcProviders.getEclipseProviderByChainId = (rpcProviders, chainId) => {
|
|
6
7
|
var _a;
|
|
@@ -12,8 +13,7 @@ ChainRpcProviders.registerEclipseProviders = (connectionConfig) => {
|
|
|
12
13
|
const rpcProviders = {};
|
|
13
14
|
if (config === null || config === void 0 ? void 0 : config.eclipse) {
|
|
14
15
|
rpcProviders.eclipse = config.eclipse.map((network) => {
|
|
15
|
-
|
|
16
|
-
const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
|
|
16
|
+
const rpcUrl = getOverrideRpcUrlForNetwork(connectionConfig, network);
|
|
17
17
|
const provider = new Connection(rpcUrl, connectionConfig);
|
|
18
18
|
return {
|
|
19
19
|
chainId: network.chainId.toString(),
|
package/src/wallet/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isLedgerEclipseWallet } from './isLedgerEclipseWallet';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
|
+
var isEclipseWallet = require('../isEclipseWallet/isEclipseWallet.cjs');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Checks if wallet is a Eclipse wallet and it was marked as a Ledger wallet
|
|
11
|
+
*/
|
|
12
|
+
const isLedgerEclipseWallet = (wallet) => isEclipseWallet.isEclipseWallet(wallet) &&
|
|
13
|
+
walletConnectorCore.isHardwareWalletConnector(wallet.connector) &&
|
|
14
|
+
wallet.connector.isHardwareWalletEnabled;
|
|
15
|
+
|
|
16
|
+
exports.isLedgerEclipseWallet = isLedgerEclipseWallet;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { isHardwareWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
+
import { isEclipseWallet } from '../isEclipseWallet/isEclipseWallet.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Checks if wallet is a Eclipse wallet and it was marked as a Ledger wallet
|
|
7
|
+
*/
|
|
8
|
+
const isLedgerEclipseWallet = (wallet) => isEclipseWallet(wallet) &&
|
|
9
|
+
isHardwareWalletConnector(wallet.connector) &&
|
|
10
|
+
wallet.connector.isHardwareWalletEnabled;
|
|
11
|
+
|
|
12
|
+
export { isLedgerEclipseWallet };
|