easctl 0.1.1 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easctl",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "CLI tool for the Ethereum Attestation Service — create, revoke, and query attestations from the command line",
5
5
  "bin": {
6
6
  "easctl": "./dist/index.js"
@@ -22,8 +22,8 @@ describe('config module', () => {
22
22
  beforeEach(() => vi.clearAllMocks());
23
23
 
24
24
  describe('getConfigPath', () => {
25
- it('returns ~/.eas-cli', () => {
26
- expect(getConfigPath()).toBe('/mock/home/.eas-cli');
25
+ it('returns ~/.easctl', () => {
26
+ expect(getConfigPath()).toBe('/mock/home/.easctl');
27
27
  });
28
28
  });
29
29
 
@@ -61,7 +61,7 @@ describe('config module', () => {
61
61
  vi.mocked(readFileSync).mockReturnValue('{}');
62
62
  setStoredPrivateKey('0xabc123');
63
63
  expect(writeFileSync).toHaveBeenCalledWith(
64
- '/mock/home/.eas-cli',
64
+ '/mock/home/.easctl',
65
65
  JSON.stringify({ privateKey: '0xabc123' }, null, 2) + '\n',
66
66
  { mode: 0o600 },
67
67
  );
@@ -71,7 +71,7 @@ describe('config module', () => {
71
71
  vi.mocked(readFileSync).mockReturnValue('{}');
72
72
  setStoredPrivateKey('abc123');
73
73
  expect(writeFileSync).toHaveBeenCalledWith(
74
- '/mock/home/.eas-cli',
74
+ '/mock/home/.easctl',
75
75
  JSON.stringify({ privateKey: '0xabc123' }, null, 2) + '\n',
76
76
  { mode: 0o600 },
77
77
  );
@@ -3,7 +3,7 @@ import { clearStoredPrivateKey, getStoredPrivateKey } from '../config.js';
3
3
  import { output } from '../output.js';
4
4
 
5
5
  export const clearKeyCommand = new Command('clear-key')
6
- .description('Remove the stored private key from ~/.eas-cli')
6
+ .description('Remove the stored private key from ~/.easctl')
7
7
  .action(() => {
8
8
  if (!getStoredPrivateKey()) {
9
9
  output({ success: true, data: { cleared: false, message: 'No private key is currently stored' } });
@@ -4,7 +4,7 @@ import { setStoredPrivateKey } from '../config.js';
4
4
  import { output, handleError } from '../output.js';
5
5
 
6
6
  export const setKeyCommand = new Command('set-key')
7
- .description('Store your private key in ~/.eas-cli for future use')
7
+ .description('Store your private key in ~/.easctl for future use')
8
8
  .argument('<key>', 'Wallet private key (hex string, with or without 0x prefix)')
9
9
  .action((key: string) => {
10
10
  const normalized = key.startsWith('0x') ? key : `0x${key}`;
package/src/config.ts CHANGED
@@ -7,7 +7,7 @@ interface EASConfig {
7
7
  }
8
8
 
9
9
  export function getConfigPath(): string {
10
- return join(homedir(), '.eas-cli');
10
+ return join(homedir(), '.easctl');
11
11
  }
12
12
 
13
13
  export function readConfig(): EASConfig {