@dynamic-labs/eclipse 4.0.0-alpha.25 → 4.0.0-alpha.27
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 +16 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/connectors/{Backpack.cjs → Backpack/Backpack.cjs} +4 -4
- package/src/connectors/{Backpack.js → Backpack/Backpack.js} +4 -4
- package/src/connectors/Backpack/index.d.ts +1 -0
- package/src/connectors/{EclipseWalletConnector.d.ts → EclipseWalletConnector/EclipseWalletConnector.d.ts} +1 -1
- package/src/connectors/EclipseWalletConnector/index.d.ts +1 -0
- package/src/connectors/EclipseWalletConnectors.cjs +10 -0
- package/src/connectors/EclipseWalletConnectors.d.ts +2 -0
- package/src/connectors/EclipseWalletConnectors.js +6 -0
- package/src/connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.cjs +26 -0
- package/src/connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.d.ts +6 -0
- package/src/connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.js +22 -0
- package/src/connectors/EclipseWalletConnectorsWithConfig/index.d.ts +1 -0
- package/src/connectors/index.d.ts +3 -1
- package/src/index.cjs +21 -9
- package/src/index.d.ts +3 -4
- package/src/index.js +8 -5
- package/src/rpc/RpcProviderEclipse/RpcProviderEclipse.cjs +2 -2
- package/src/rpc/RpcProviderEclipse/RpcProviderEclipse.d.ts +2 -2
- package/src/rpc/RpcProviderEclipse/RpcProviderEclipse.js +2 -2
- /package/src/connectors/{Backpack.d.ts → Backpack/Backpack.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.27](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.26...v4.0.0-alpha.27) (2024-11-06)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* allows adding connection configuration for solana connectors ([#7354](https://github.com/dynamic-labs/dynamic-auth/issues/7354)) ([01e35ee](https://github.com/dynamic-labs/dynamic-auth/commit/01e35ee5bfe4605df48e4188a753111efe483048))
|
|
8
|
+
* allows passing solana connection config to dynamic client ([#7357](https://github.com/dynamic-labs/dynamic-auth/issues/7357)) ([6da14ce](https://github.com/dynamic-labs/dynamic-auth/commit/6da14ceb481147aea31d192fe268be43a8af80e9))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* check legacy vs eip1599 tx in global connectivity ([#7341](https://github.com/dynamic-labs/dynamic-auth/issues/7341)) ([b223ea7](https://github.com/dynamic-labs/dynamic-auth/commit/b223ea7a5ed5637e11da1040c631c48bc23ba76d))
|
|
14
|
+
* global connectivity multiple transactions in a row ([#7342](https://github.com/dynamic-labs/dynamic-auth/issues/7342)) ([d13c1af](https://github.com/dynamic-labs/dynamic-auth/commit/d13c1afec6b3680961621d8317f55549b3ed428f))
|
|
15
|
+
|
|
16
|
+
## [4.0.0-alpha.26](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.25...v4.0.0-alpha.26) (2024-11-04)
|
|
17
|
+
|
|
2
18
|
## [4.0.0-alpha.25](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.24...v4.0.0-alpha.25) (2024-11-01)
|
|
3
19
|
|
|
4
20
|
## [4.0.0-alpha.24](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.23...v4.0.0-alpha.24) (2024-10-31)
|
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.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.27",
|
|
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",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@solana/web3.js": "1.92.1",
|
|
22
|
-
"@dynamic-labs/assert-package-version": "4.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "4.0.0-alpha.
|
|
22
|
+
"@dynamic-labs/assert-package-version": "4.0.0-alpha.27",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "4.0.0-alpha.27",
|
|
24
24
|
"@dynamic-labs/sdk-api-core": "0.0.559",
|
|
25
|
-
"@dynamic-labs/solana": "4.0.0-alpha.
|
|
26
|
-
"@dynamic-labs/solana-core": "4.0.0-alpha.
|
|
27
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
30
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
25
|
+
"@dynamic-labs/solana": "4.0.0-alpha.27",
|
|
26
|
+
"@dynamic-labs/solana-core": "4.0.0-alpha.27",
|
|
27
|
+
"@dynamic-labs/types": "4.0.0-alpha.27",
|
|
28
|
+
"@dynamic-labs/utils": "4.0.0-alpha.27",
|
|
29
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.27",
|
|
30
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.27"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {}
|
|
33
33
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var _tslib = require('
|
|
6
|
+
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
7
7
|
var web3_js = require('@solana/web3.js');
|
|
8
8
|
var solana = require('@dynamic-labs/solana');
|
|
9
9
|
var solanaCore = require('@dynamic-labs/solana-core');
|
|
10
10
|
var utils = require('@dynamic-labs/utils');
|
|
11
|
-
var constants = require('
|
|
11
|
+
var constants = require('../constants.cjs');
|
|
12
12
|
|
|
13
13
|
class Backpack extends solana.BackpackConnector {
|
|
14
14
|
constructor(opts) {
|
|
@@ -37,13 +37,13 @@ class Backpack extends solana.BackpackConnector {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
getWalletClient() {
|
|
40
|
-
var _a;
|
|
40
|
+
var _a, _b;
|
|
41
41
|
const [network] = this.eclipseNetworks;
|
|
42
42
|
if (!network) {
|
|
43
43
|
throw new utils.DynamicError('No enabled networks');
|
|
44
44
|
}
|
|
45
45
|
const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
|
|
46
|
-
return new web3_js.Connection(rpcUrl, 'confirmed');
|
|
46
|
+
return new web3_js.Connection(rpcUrl, (_b = this.connectionConfig) !== null && _b !== void 0 ? _b : 'confirmed');
|
|
47
47
|
}
|
|
48
48
|
// the genesis hashes on Eclipse are different than Solana
|
|
49
49
|
getNetwork() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { __awaiter } from '
|
|
2
|
+
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
3
|
import { Connection } from '@solana/web3.js';
|
|
4
4
|
import { BackpackConnector } from '@dynamic-labs/solana';
|
|
5
5
|
import { getGenesisHashLSKey } from '@dynamic-labs/solana-core';
|
|
6
6
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
7
|
-
import { eclipseMainnetHash, eclipseTestnetHash } from '
|
|
7
|
+
import { eclipseMainnetHash, eclipseTestnetHash } from '../constants.js';
|
|
8
8
|
|
|
9
9
|
class Backpack extends BackpackConnector {
|
|
10
10
|
constructor(opts) {
|
|
@@ -33,13 +33,13 @@ class Backpack extends BackpackConnector {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
getWalletClient() {
|
|
36
|
-
var _a;
|
|
36
|
+
var _a, _b;
|
|
37
37
|
const [network] = this.eclipseNetworks;
|
|
38
38
|
if (!network) {
|
|
39
39
|
throw new DynamicError('No enabled networks');
|
|
40
40
|
}
|
|
41
41
|
const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
|
|
42
|
-
return new Connection(rpcUrl, 'confirmed');
|
|
42
|
+
return new Connection(rpcUrl, (_b = this.connectionConfig) !== null && _b !== void 0 ? _b : 'confirmed');
|
|
43
43
|
}
|
|
44
44
|
// the genesis hashes on Eclipse are different than Solana
|
|
45
45
|
getNetwork() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Backpack';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
2
2
|
import { Chain, WalletConnectorBase, WalletMetadata } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
-
import { EclipseWallet } from '
|
|
3
|
+
import { EclipseWallet } from '../../wallet';
|
|
4
4
|
export type EclipseWalletConnectorOpts = {
|
|
5
5
|
walletBook: WalletBookSchema;
|
|
6
6
|
metadata?: WalletMetadata;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EclipseWalletConnector';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var Backpack = require('./Backpack/Backpack.cjs');
|
|
7
|
+
|
|
8
|
+
const EclipseWalletConnectors = () => [Backpack.Backpack];
|
|
9
|
+
|
|
10
|
+
exports.EclipseWalletConnectors = EclipseWalletConnectors;
|
package/src/connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var EclipseWalletConnectors = require('../EclipseWalletConnectors.cjs');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Allows passing in Solana connection configuration to all wallet connectors.
|
|
10
|
+
*/
|
|
11
|
+
const EclipseWalletConnectorsWithConfig = (connectionConfig) => {
|
|
12
|
+
// Idea here is to ensure that all wallet connectors are constructed with
|
|
13
|
+
// the client-provided connection configuration, so we "wrap" the constructors with it.
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
const classWithConfig = (className) => class extends className {
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
constructor(...args) {
|
|
18
|
+
const [opts] = args;
|
|
19
|
+
super(Object.assign(Object.assign({}, opts), { connectionConfig }));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
+
return () => EclipseWalletConnectors.EclipseWalletConnectors().map(classWithConfig);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.EclipseWalletConnectorsWithConfig = EclipseWalletConnectorsWithConfig;
|
package/src/connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ConnectionConfig } from '@solana/web3.js';
|
|
2
|
+
import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
+
/**
|
|
4
|
+
* Allows passing in Solana connection configuration to all wallet connectors.
|
|
5
|
+
*/
|
|
6
|
+
export declare const EclipseWalletConnectorsWithConfig: (connectionConfig: ConnectionConfig) => () => WalletConnectorConstructor[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { EclipseWalletConnectors } from '../EclipseWalletConnectors.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Allows passing in Solana connection configuration to all wallet connectors.
|
|
6
|
+
*/
|
|
7
|
+
const EclipseWalletConnectorsWithConfig = (connectionConfig) => {
|
|
8
|
+
// Idea here is to ensure that all wallet connectors are constructed with
|
|
9
|
+
// the client-provided connection configuration, so we "wrap" the constructors with it.
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
const classWithConfig = (className) => class extends className {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
+
constructor(...args) {
|
|
14
|
+
const [opts] = args;
|
|
15
|
+
super(Object.assign(Object.assign({}, opts), { connectionConfig }));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
return () => EclipseWalletConnectors().map(classWithConfig);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { EclipseWalletConnectorsWithConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EclipseWalletConnectorsWithConfig';
|
package/src/index.cjs
CHANGED
|
@@ -5,24 +5,36 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var assertPackageVersion = require('@dynamic-labs/assert-package-version');
|
|
7
7
|
var _package = require('../package.cjs');
|
|
8
|
+
require('../_virtual/_tslib.cjs');
|
|
9
|
+
require('@solana/web3.js');
|
|
10
|
+
require('@dynamic-labs/solana');
|
|
11
|
+
require('@dynamic-labs/solana-core');
|
|
12
|
+
require('@dynamic-labs/utils');
|
|
8
13
|
require('@dynamic-labs/wallet-connector-core');
|
|
9
14
|
var EclipseWallet = require('./wallet/EclipseWallet.cjs');
|
|
10
15
|
var isEclipseWallet = require('./wallet/isEclipseWallet/isEclipseWallet.cjs');
|
|
11
|
-
var
|
|
16
|
+
var EclipseWalletConnectors = require('./connectors/EclipseWalletConnectors.cjs');
|
|
17
|
+
var EclipseWalletConnectorsWithConfig = require('./connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.cjs');
|
|
12
18
|
require('./rpc/RpcProviderEclipse/RpcProviderEclipse.cjs');
|
|
13
19
|
var rpcProviders = require('@dynamic-labs/rpc-providers');
|
|
14
20
|
var eclipseProvidersSelector = require('./rpc/eclipseProvidersSelector/eclipseProvidersSelector.cjs');
|
|
15
21
|
|
|
16
22
|
assertPackageVersion.assertPackageVersion('@dynamic-labs/eclipse', _package.version);
|
|
17
|
-
const EclipseWalletConnectors = () => [Backpack.Backpack];
|
|
18
23
|
|
|
19
24
|
exports.EclipseWallet = EclipseWallet.EclipseWallet;
|
|
20
25
|
exports.isEclipseWallet = isEclipseWallet.isEclipseWallet;
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
Object.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
exports.EclipseWalletConnectors = EclipseWalletConnectors.EclipseWalletConnectors;
|
|
27
|
+
exports.EclipseWalletConnectorsWithConfig = EclipseWalletConnectorsWithConfig.EclipseWalletConnectorsWithConfig;
|
|
28
|
+
Object.defineProperty(exports, 'ChainRpcProviders', {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return rpcProviders.ChainRpcProviders; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, 'ChainRpcProvidersClass', {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return rpcProviders.ChainRpcProvidersClass; }
|
|
28
35
|
});
|
|
36
|
+
Object.defineProperty(exports, 'ProviderChain', {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return rpcProviders.ProviderChain; }
|
|
39
|
+
});
|
|
40
|
+
exports.eclipseProvidersSelector = eclipseProvidersSelector.eclipseProvidersSelector;
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export declare const EclipseWalletConnectors: () => (typeof Backpack)[];
|
|
1
|
+
export { EclipseWalletConnectors, EclipseWalletConnectorsWithConfig, } from './connectors';
|
|
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';
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { assertPackageVersion } from '@dynamic-labs/assert-package-version';
|
|
3
3
|
import { version } from '../package.js';
|
|
4
|
+
import '../_virtual/_tslib.js';
|
|
5
|
+
import '@solana/web3.js';
|
|
6
|
+
import '@dynamic-labs/solana';
|
|
7
|
+
import '@dynamic-labs/solana-core';
|
|
8
|
+
import '@dynamic-labs/utils';
|
|
4
9
|
import '@dynamic-labs/wallet-connector-core';
|
|
5
10
|
export { EclipseWallet } from './wallet/EclipseWallet.js';
|
|
6
11
|
export { isEclipseWallet } from './wallet/isEclipseWallet/isEclipseWallet.js';
|
|
7
|
-
|
|
12
|
+
export { EclipseWalletConnectors } from './connectors/EclipseWalletConnectors.js';
|
|
13
|
+
export { EclipseWalletConnectorsWithConfig } from './connectors/EclipseWalletConnectorsWithConfig/EclipseWalletConnectorsWithConfig.js';
|
|
8
14
|
import './rpc/RpcProviderEclipse/RpcProviderEclipse.js';
|
|
9
|
-
export
|
|
15
|
+
export { ChainRpcProviders, ChainRpcProvidersClass, ProviderChain } from '@dynamic-labs/rpc-providers';
|
|
10
16
|
export { eclipseProvidersSelector } from './rpc/eclipseProvidersSelector/eclipseProvidersSelector.js';
|
|
11
17
|
|
|
12
18
|
assertPackageVersion('@dynamic-labs/eclipse', version);
|
|
13
|
-
const EclipseWalletConnectors = () => [Backpack];
|
|
14
|
-
|
|
15
|
-
export { EclipseWalletConnectors };
|
|
@@ -9,14 +9,14 @@ rpcProviders.ChainRpcProviders.getEclipseProviderByChainId = (rpcProviders, chai
|
|
|
9
9
|
const provider = (_a = rpcProviders['eclipse']) === null || _a === void 0 ? void 0 : _a.find((rpcProvider) => rpcProvider.chainId === chainId);
|
|
10
10
|
return provider;
|
|
11
11
|
};
|
|
12
|
-
rpcProviders.ChainRpcProviders.registerEclipseProviders = () => {
|
|
12
|
+
rpcProviders.ChainRpcProviders.registerEclipseProviders = (connectionConfig) => {
|
|
13
13
|
rpcProviders.ChainRpcProviders.registerChainProviders(rpcProviders.ProviderChain.ECLIPSE, (config) => {
|
|
14
14
|
const rpcProviders = {};
|
|
15
15
|
if (config === null || config === void 0 ? void 0 : config.eclipse) {
|
|
16
16
|
rpcProviders.eclipse = config.eclipse.map((network) => {
|
|
17
17
|
var _a;
|
|
18
18
|
const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
|
|
19
|
-
const provider = new web3_js.Connection(rpcUrl);
|
|
19
|
+
const provider = new web3_js.Connection(rpcUrl, connectionConfig);
|
|
20
20
|
return {
|
|
21
21
|
chainId: network.chainId.toString(),
|
|
22
22
|
chainName: network.name,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Connection } from '@solana/web3.js';
|
|
1
|
+
import { Connection, ConnectionConfig } from '@solana/web3.js';
|
|
2
2
|
import { RpcProviders } from '@dynamic-labs/rpc-providers';
|
|
3
3
|
type IEclipseRpcProvider = {
|
|
4
4
|
chainId: string;
|
|
@@ -12,7 +12,7 @@ declare module '@dynamic-labs/rpc-providers' {
|
|
|
12
12
|
}
|
|
13
13
|
interface IChainRpcProviders {
|
|
14
14
|
getEclipseProviderByChainId(rpcProviders: RpcProviders, chainId: string): EclipseRpcProvider | undefined;
|
|
15
|
-
registerEclipseProviders(): void;
|
|
15
|
+
registerEclipseProviders(connectionConfig?: ConnectionConfig): void;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
export {};
|
|
@@ -7,14 +7,14 @@ ChainRpcProviders.getEclipseProviderByChainId = (rpcProviders, chainId) => {
|
|
|
7
7
|
const provider = (_a = rpcProviders['eclipse']) === null || _a === void 0 ? void 0 : _a.find((rpcProvider) => rpcProvider.chainId === chainId);
|
|
8
8
|
return provider;
|
|
9
9
|
};
|
|
10
|
-
ChainRpcProviders.registerEclipseProviders = () => {
|
|
10
|
+
ChainRpcProviders.registerEclipseProviders = (connectionConfig) => {
|
|
11
11
|
ChainRpcProviders.registerChainProviders(ProviderChain.ECLIPSE, (config) => {
|
|
12
12
|
const rpcProviders = {};
|
|
13
13
|
if (config === null || config === void 0 ? void 0 : config.eclipse) {
|
|
14
14
|
rpcProviders.eclipse = config.eclipse.map((network) => {
|
|
15
15
|
var _a;
|
|
16
16
|
const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
|
|
17
|
-
const provider = new Connection(rpcUrl);
|
|
17
|
+
const provider = new Connection(rpcUrl, connectionConfig);
|
|
18
18
|
return {
|
|
19
19
|
chainId: network.chainId.toString(),
|
|
20
20
|
chainName: network.name,
|
|
File without changes
|