@hardkas/config 0.2.2-alpha.1 → 0.4.0-alpha

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/index.d.ts CHANGED
@@ -44,6 +44,9 @@ interface HardkasConfig {
44
44
  defaultNetwork?: HardkasNetworkName;
45
45
  networks?: Record<HardkasNetworkName, HardkasNetworkTarget>;
46
46
  accounts?: Record<string, HardkasAccountConfig>;
47
+ l2?: {
48
+ networks?: Record<string, any>;
49
+ };
47
50
  }
48
51
  interface LoadedHardkasConfig {
49
52
  path?: string;
package/dist/index.js CHANGED
@@ -20,10 +20,20 @@ var DEFAULT_HARDKAS_CONFIG = {
20
20
  network: "devnet",
21
21
  rpcUrl: "ws://127.0.0.1:18310"
22
22
  },
23
- testnet10: {
23
+ "testnet-10": {
24
24
  kind: "kaspa-rpc",
25
25
  network: "testnet-10",
26
- rpcUrl: "ws://127.0.0.1:18210"
26
+ rpcUrl: "wss://tn10.kaspa.stream:443"
27
+ },
28
+ "testnet-11": {
29
+ kind: "kaspa-rpc",
30
+ network: "testnet-11",
31
+ rpcUrl: "wss://tn11.kaspa.stream:443"
32
+ },
33
+ "mainnet": {
34
+ kind: "kaspa-rpc",
35
+ network: "mainnet",
36
+ rpcUrl: "wss://kaspa.stream:443"
27
37
  }
28
38
  },
29
39
  accounts: {
@@ -86,7 +96,10 @@ async function loadConfigFile(filePath, cwd) {
86
96
  function resolveNetworkTarget(options) {
87
97
  const { config, network } = options;
88
98
  const name = network || config.defaultNetwork || "simnet";
89
- const networks = config.networks && Object.keys(config.networks).length > 0 ? config.networks : DEFAULT_HARDKAS_CONFIG.networks;
99
+ const networks = {
100
+ ...DEFAULT_HARDKAS_CONFIG.networks,
101
+ ...config.networks || {}
102
+ };
90
103
  const target = networks[name];
91
104
  if (!target) {
92
105
  const available = Object.keys(networks).join(", ");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hardkas/config",
3
- "version": "0.2.2-alpha.1",
3
+ "version": "0.4.0-alpha",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "jiti": "^2.4.2",
20
- "@hardkas/core": "0.2.2-alpha.1"
20
+ "@hardkas/core": "0.4.0-alpha"
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsup": "^8.3.5",