nansen-cli 1.13.0 → 1.13.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 +6 -0
- package/package.json +1 -1
- package/src/api.js +1 -6
- package/src/chain-ids.js +11 -0
- package/src/ens.js +1 -6
- package/src/schema.json +2 -0
- package/src/wallet.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#225](https://github.com/nansen-ai/nansen-cli/pull/225) [`051e4a3`](https://github.com/nansen-ai/nansen-cli/commit/051e4a353641d000facd2133810c059981b9ac7f) Thanks [@TimNooren](https://github.com/TimNooren)! - Remove "recommended, lower fees" label from Base network in wallet create output
|
|
8
|
+
|
|
3
9
|
## 1.13.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { fileURLToPath } from 'url';
|
|
9
|
+
import { EVM_CHAINS } from './chain-ids.js';
|
|
9
10
|
|
|
10
11
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
12
|
|
|
@@ -255,12 +256,6 @@ const ADDRESS_PATTERNS = {
|
|
|
255
256
|
bitcoin: /^(1|3|bc1)[a-zA-HJ-NP-Z0-9]{25,62}$/,
|
|
256
257
|
};
|
|
257
258
|
|
|
258
|
-
const EVM_CHAINS = [
|
|
259
|
-
'ethereum', 'arbitrum', 'base', 'bnb', 'polygon', 'optimism',
|
|
260
|
-
'avalanche', 'linea', 'scroll', 'mantle', 'ronin',
|
|
261
|
-
'sei', 'plasma', 'sonic', 'monad', 'hyperevm', 'iotaevm'
|
|
262
|
-
];
|
|
263
|
-
|
|
264
259
|
/**
|
|
265
260
|
* Validate address format for a given chain
|
|
266
261
|
* @param {string} address - The address to validate
|
package/src/chain-ids.js
CHANGED
|
@@ -17,3 +17,14 @@ export const EVM_CHAIN_IDS = {
|
|
|
17
17
|
zksync: 324,
|
|
18
18
|
mantle: 5000,
|
|
19
19
|
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* All EVM chain names recognised by this CLI.
|
|
23
|
+
* Used for address-format validation (0x...) and ENS resolution gating.
|
|
24
|
+
* Import from here instead of defining an inline list per file.
|
|
25
|
+
*/
|
|
26
|
+
export const EVM_CHAINS = [
|
|
27
|
+
'ethereum', 'arbitrum', 'base', 'bnb', 'polygon', 'optimism',
|
|
28
|
+
'avalanche', 'linea', 'scroll', 'zksync', 'mantle', 'ronin',
|
|
29
|
+
'sei', 'plasma', 'sonic', 'unichain', 'monad', 'hyperevm', 'iotaevm',
|
|
30
|
+
];
|
package/src/ens.js
CHANGED
|
@@ -6,15 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
import https from 'https';
|
|
8
8
|
import { keccak256 } from './crypto.js';
|
|
9
|
+
import { EVM_CHAINS } from './chain-ids.js';
|
|
9
10
|
|
|
10
11
|
const ENS_PATTERN = /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.eth$/;
|
|
11
12
|
|
|
12
|
-
const EVM_CHAINS = [
|
|
13
|
-
'ethereum', 'base', 'optimism', 'arbitrum', 'polygon', 'bnb',
|
|
14
|
-
'avalanche', 'fantom', 'gnosis', 'linea', 'scroll', 'zksync',
|
|
15
|
-
'blast', 'mantle', 'ronin', 'sei', 'plasma', 'sonic', 'unichain', 'monad', 'hyperevm', 'iotaevm'
|
|
16
|
-
];
|
|
17
|
-
|
|
18
13
|
/**
|
|
19
14
|
* Check if a string looks like an ENS name
|
|
20
15
|
*/
|
package/src/schema.json
CHANGED
package/src/wallet.js
CHANGED
|
@@ -546,7 +546,7 @@ export function buildWalletCommands(deps = {}) {
|
|
|
546
546
|
if (result.isDefault) log(` ★ Set as default wallet`);
|
|
547
547
|
log('');
|
|
548
548
|
log(' Fund this wallet to start making API calls or trading:');
|
|
549
|
-
log(` Base
|
|
549
|
+
log(` Base: send USDC to ${result.evm}`);
|
|
550
550
|
log(` Solana: send USDC to ${result.solana}`);
|
|
551
551
|
log('');
|
|
552
552
|
if (password === null) {
|