@net-protocol/cli 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/README.md +137 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -354,6 +354,128 @@ netp token info \
354
354
  --json
355
355
  ```
356
356
 
357
+ #### Profile Command
358
+
359
+ Profile operations for managing your Net Protocol profile.
360
+
361
+ **Available Subcommands:**
362
+
363
+ - `profile get` - Get profile data for an address
364
+ - `profile set-picture` - Set your profile picture URL
365
+ - `profile set-x-username` - Set your X (Twitter) username
366
+
367
+ ##### Profile Get
368
+
369
+ Read profile data for any address.
370
+
371
+ ```bash
372
+ netp profile get \
373
+ --address <wallet-address> \
374
+ [--chain-id <8453|1|...>] \
375
+ [--rpc-url <custom-rpc>] \
376
+ [--json]
377
+ ```
378
+
379
+ **Profile Get Arguments:**
380
+
381
+ - `--address` (required): Wallet address to get profile for
382
+ - `--chain-id` (optional): Chain ID. Can also be set via `NET_CHAIN_ID` environment variable
383
+ - `--rpc-url` (optional): Custom RPC URL. Can also be set via `NET_RPC_URL` environment variable
384
+ - `--json` (optional): Output in JSON format
385
+
386
+ **Example:**
387
+
388
+ ```bash
389
+ # Human-readable output
390
+ netp profile get \
391
+ --address 0x1234567890abcdef1234567890abcdef12345678 \
392
+ --chain-id 8453
393
+
394
+ # JSON output
395
+ netp profile get \
396
+ --address 0x1234567890abcdef1234567890abcdef12345678 \
397
+ --chain-id 8453 \
398
+ --json
399
+ ```
400
+
401
+ ##### Profile Set Picture
402
+
403
+ Set your profile picture URL.
404
+
405
+ ```bash
406
+ netp profile set-picture \
407
+ --url <image-url> \
408
+ [--private-key <0x...>] \
409
+ [--chain-id <8453|1|...>] \
410
+ [--rpc-url <custom-rpc>] \
411
+ [--encode-only]
412
+ ```
413
+
414
+ **Profile Set Picture Arguments:**
415
+
416
+ - `--url` (required): Image URL for profile picture (HTTPS, IPFS, etc.)
417
+ - `--private-key` (optional): Private key. Can also be set via `NET_PRIVATE_KEY` environment variable
418
+ - `--chain-id` (optional): Chain ID. Can also be set via `NET_CHAIN_ID` environment variable
419
+ - `--rpc-url` (optional): Custom RPC URL. Can also be set via `NET_RPC_URL` environment variable
420
+ - `--encode-only` (optional): Output transaction data as JSON instead of executing
421
+
422
+ **Example:**
423
+
424
+ ```bash
425
+ # Set profile picture
426
+ netp profile set-picture \
427
+ --url "https://example.com/my-avatar.jpg" \
428
+ --chain-id 8453
429
+
430
+ # Encode-only (get transaction data without executing)
431
+ netp profile set-picture \
432
+ --url "https://example.com/my-avatar.jpg" \
433
+ --chain-id 8453 \
434
+ --encode-only
435
+ ```
436
+
437
+ ##### Profile Set X Username
438
+
439
+ Set your X (Twitter) username for your profile.
440
+
441
+ **Note:** The username is stored without the @ prefix. If you provide @ it will be stripped automatically.
442
+
443
+ ```bash
444
+ netp profile set-x-username \
445
+ --username <x-username> \
446
+ [--private-key <0x...>] \
447
+ [--chain-id <8453|1|...>] \
448
+ [--rpc-url <custom-rpc>] \
449
+ [--encode-only]
450
+ ```
451
+
452
+ **Profile Set X Username Arguments:**
453
+
454
+ - `--username` (required): Your X (Twitter) username (with or without @, stored without @)
455
+ - `--private-key` (optional): Private key. Can also be set via `NET_PRIVATE_KEY` environment variable
456
+ - `--chain-id` (optional): Chain ID. Can also be set via `NET_CHAIN_ID` environment variable
457
+ - `--rpc-url` (optional): Custom RPC URL. Can also be set via `NET_RPC_URL` environment variable
458
+ - `--encode-only` (optional): Output transaction data as JSON instead of executing
459
+
460
+ **Example:**
461
+
462
+ ```bash
463
+ # Set X username (@ is optional, will be stripped before storage)
464
+ netp profile set-x-username \
465
+ --username "myusername" \
466
+ --chain-id 8453
467
+
468
+ netp profile set-x-username \
469
+ --username "@myusername" \
470
+ --chain-id 8453
471
+
472
+ # Encode-only
473
+ netp profile set-x-username \
474
+ --username "myusername" \
475
+ --chain-id 8453 \
476
+ --encode-only
477
+ ```
478
+
357
479
  #### Info Command
358
480
 
359
481
  Show contract info and stats.
@@ -429,13 +551,21 @@ src/
429
551
  │ ├── index.ts # Main entry point, sets up commander program
430
552
  │ └── shared.ts # Shared option parsing and validation
431
553
  ├── commands/
432
- └── storage/ # Storage command module
433
- ├── index.ts # Storage command definition
434
- ├── core/ # Upload and preview logic
435
- ├── storage/ # Storage operations
436
- ├── transactions/ # Transaction handling
437
- ├── utils.ts # Storage-specific utilities
438
- └── types.ts # Storage-specific types
554
+ ├── storage/ # Storage command module
555
+ ├── index.ts # Storage command definition
556
+ ├── core/ # Upload and preview logic
557
+ ├── storage/ # Storage operations
558
+ ├── transactions/ # Transaction handling
559
+ ├── utils.ts # Storage-specific utilities
560
+ └── types.ts # Storage-specific types
561
+ │ ├── profile/ # Profile command module
562
+ │ │ ├── index.ts # Profile command definition
563
+ │ │ ├── get.ts # Profile get logic
564
+ │ │ ├── set-picture.ts # Set profile picture
565
+ │ │ ├── set-username.ts # Set X username
566
+ │ │ └── types.ts # Profile-specific types
567
+ │ ├── message/ # Message command module
568
+ │ └── token/ # Token command module
439
569
  └── shared/ # Shared utilities across commands
440
570
  └── types.ts # Common types (CommonOptions, etc.)
441
571
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@net-protocol/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "CLI tool for Net Protocol",
5
5
  "type": "module",
6
6
  "bin": {