@net-protocol/cli 0.1.6 → 0.1.8
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/README.md +132 -0
- package/dist/cli/index.mjs +467 -35
- package/dist/cli/index.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -363,6 +363,9 @@ Profile operations for managing your Net Protocol profile.
|
|
|
363
363
|
- `profile get` - Get profile data for an address
|
|
364
364
|
- `profile set-picture` - Set your profile picture URL
|
|
365
365
|
- `profile set-x-username` - Set your X (Twitter) username
|
|
366
|
+
- `profile set-bio` - Set your profile bio
|
|
367
|
+
- `profile set-canvas` - Set your profile canvas (HTML content)
|
|
368
|
+
- `profile get-canvas` - Get profile canvas for an address
|
|
366
369
|
|
|
367
370
|
##### Profile Get
|
|
368
371
|
|
|
@@ -476,6 +479,135 @@ netp profile set-x-username \
|
|
|
476
479
|
--encode-only
|
|
477
480
|
```
|
|
478
481
|
|
|
482
|
+
##### Profile Set Bio
|
|
483
|
+
|
|
484
|
+
Set your profile bio (max 280 characters).
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
netp profile set-bio \
|
|
488
|
+
--bio <bio-text> \
|
|
489
|
+
[--private-key <0x...>] \
|
|
490
|
+
[--chain-id <8453|1|...>] \
|
|
491
|
+
[--rpc-url <custom-rpc>] \
|
|
492
|
+
[--encode-only]
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
**Profile Set Bio Arguments:**
|
|
496
|
+
|
|
497
|
+
- `--bio` (required): Your profile bio (max 280 characters, no control characters)
|
|
498
|
+
- `--private-key` (optional): Private key. Can also be set via `NET_PRIVATE_KEY` environment variable
|
|
499
|
+
- `--chain-id` (optional): Chain ID. Can also be set via `NET_CHAIN_ID` environment variable
|
|
500
|
+
- `--rpc-url` (optional): Custom RPC URL. Can also be set via `NET_RPC_URL` environment variable
|
|
501
|
+
- `--encode-only` (optional): Output transaction data as JSON instead of executing
|
|
502
|
+
|
|
503
|
+
**Example:**
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
# Set bio
|
|
507
|
+
netp profile set-bio \
|
|
508
|
+
--bio "Building cool stuff on Net Protocol" \
|
|
509
|
+
--chain-id 8453
|
|
510
|
+
|
|
511
|
+
# Encode-only
|
|
512
|
+
netp profile set-bio \
|
|
513
|
+
--bio "Building cool stuff on Net Protocol" \
|
|
514
|
+
--chain-id 8453 \
|
|
515
|
+
--encode-only
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
##### Profile Set Canvas
|
|
519
|
+
|
|
520
|
+
Set your profile canvas (HTML content, max 60KB). Canvas content is stored using ChunkedStorage with gzip compression.
|
|
521
|
+
|
|
522
|
+
```bash
|
|
523
|
+
netp profile set-canvas \
|
|
524
|
+
--file <path> | --content <html> \
|
|
525
|
+
[--private-key <0x...>] \
|
|
526
|
+
[--chain-id <8453|1|...>] \
|
|
527
|
+
[--rpc-url <custom-rpc>] \
|
|
528
|
+
[--encode-only]
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
**Profile Set Canvas Arguments:**
|
|
532
|
+
|
|
533
|
+
- `--file` (optional): Path to file containing canvas content (HTML, images, etc.)
|
|
534
|
+
- `--content` (optional): HTML content for canvas (inline). Must provide either `--file` or `--content`, but not both.
|
|
535
|
+
- `--private-key` (optional): Private key. Can also be set via `NET_PRIVATE_KEY` environment variable
|
|
536
|
+
- `--chain-id` (optional): Chain ID. Can also be set via `NET_CHAIN_ID` environment variable
|
|
537
|
+
- `--rpc-url` (optional): Custom RPC URL. Can also be set via `NET_RPC_URL` environment variable
|
|
538
|
+
- `--encode-only` (optional): Output transaction data as JSON instead of executing
|
|
539
|
+
|
|
540
|
+
**Notes:**
|
|
541
|
+
- Maximum canvas size is 60KB
|
|
542
|
+
- Binary files (images) are automatically converted to data URIs
|
|
543
|
+
- Content is compressed using gzip before storage
|
|
544
|
+
|
|
545
|
+
**Example:**
|
|
546
|
+
|
|
547
|
+
```bash
|
|
548
|
+
# Set canvas from file
|
|
549
|
+
netp profile set-canvas \
|
|
550
|
+
--file ./my-canvas.html \
|
|
551
|
+
--chain-id 8453
|
|
552
|
+
|
|
553
|
+
# Set canvas from inline content
|
|
554
|
+
netp profile set-canvas \
|
|
555
|
+
--content "<html><body><h1>My Profile</h1></body></html>" \
|
|
556
|
+
--chain-id 8453
|
|
557
|
+
|
|
558
|
+
# Encode-only
|
|
559
|
+
netp profile set-canvas \
|
|
560
|
+
--file ./my-canvas.html \
|
|
561
|
+
--chain-id 8453 \
|
|
562
|
+
--encode-only
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
##### Profile Get Canvas
|
|
566
|
+
|
|
567
|
+
Get profile canvas for an address.
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
netp profile get-canvas \
|
|
571
|
+
--address <wallet-address> \
|
|
572
|
+
[--output <path>] \
|
|
573
|
+
[--chain-id <8453|1|...>] \
|
|
574
|
+
[--rpc-url <custom-rpc>] \
|
|
575
|
+
[--json]
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
**Profile Get Canvas Arguments:**
|
|
579
|
+
|
|
580
|
+
- `--address` (required): Wallet address to get canvas for
|
|
581
|
+
- `--output` (optional): Write canvas content to file instead of stdout
|
|
582
|
+
- `--chain-id` (optional): Chain ID. Can also be set via `NET_CHAIN_ID` environment variable
|
|
583
|
+
- `--rpc-url` (optional): Custom RPC URL. Can also be set via `NET_RPC_URL` environment variable
|
|
584
|
+
- `--json` (optional): Output in JSON format (includes metadata like size and type)
|
|
585
|
+
|
|
586
|
+
**Notes:**
|
|
587
|
+
- Binary content (data URIs) is automatically converted to binary files when using `--output`
|
|
588
|
+
- JSON output includes: canvas content, filename, size, and whether it's a data URI
|
|
589
|
+
|
|
590
|
+
**Example:**
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
# Output to stdout
|
|
594
|
+
netp profile get-canvas \
|
|
595
|
+
--address 0x1234567890abcdef1234567890abcdef12345678 \
|
|
596
|
+
--chain-id 8453
|
|
597
|
+
|
|
598
|
+
# Save to file
|
|
599
|
+
netp profile get-canvas \
|
|
600
|
+
--address 0x1234567890abcdef1234567890abcdef12345678 \
|
|
601
|
+
--output ./canvas.html \
|
|
602
|
+
--chain-id 8453
|
|
603
|
+
|
|
604
|
+
# JSON output
|
|
605
|
+
netp profile get-canvas \
|
|
606
|
+
--address 0x1234567890abcdef1234567890abcdef12345678 \
|
|
607
|
+
--chain-id 8453 \
|
|
608
|
+
--json
|
|
609
|
+
```
|
|
610
|
+
|
|
479
611
|
#### Info Command
|
|
480
612
|
|
|
481
613
|
Show contract info and stats.
|