@rareprotocol/rare-cli 1.2.0 → 1.2.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/README.md +21 -10
- package/dist/client.js +205 -203
- package/dist/index.js +459 -300
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,7 +183,7 @@ rare collection prepare-lazy-mint --contract 0x... --base-uri ipfs://... --amoun
|
|
|
183
183
|
rare collection prepare-lazy-mint --contract 0x... --base-uri ipfs://... --amount 100 --minter 0x...
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
Build token-list Merkle artifacts for offline proof checks
|
|
186
|
+
Build token-list Merkle artifacts for offline proof checks, reusable root inputs, or workflows that want to inspect the root before creating a batch marketplace config. You do not need to run this before `rare listing batch create`, `rare offer batch create`, or `rare auction batch create`; those commands can build/register from CSV or JSON input directly. CSV files should include contract and token ID columns such as `contract_address,token_id`; JSON files can be an array of `{ "contractAddress": "0x...", "tokenId": "1" }` objects or a generated artifact. Pass `--chain-id` or include a `chain_id` column when the artifact should carry chain context.
|
|
187
187
|
|
|
188
188
|
```bash
|
|
189
189
|
rare utils tree build --input batch-tokens.csv --chain-id 11155111 --output batch-token-artifact.json
|
|
@@ -458,10 +458,17 @@ rare listing status --contract 0x... --token-id 1
|
|
|
458
458
|
|
|
459
459
|
### Batch Listings
|
|
460
460
|
|
|
461
|
-
Batch
|
|
462
|
-
|
|
461
|
+
Batch listing roots are built from token sets. For create flows, you can pass a CSV file, a JSON token list, a token tree artifact from `rare utils tree build`, or the older root artifact shape that already includes listing config. Running `rare utils tree build` first is optional; use it when you want a reusable artifact or want to inspect/share the root before registering it.
|
|
462
|
+
Token sets and allowlists must each contain at least two entries because the batch listing contract rejects empty Merkle proofs. If no split is provided, registration defaults to 100% to the connected seller wallet.
|
|
463
463
|
|
|
464
464
|
```bash
|
|
465
|
+
# Register the batch listing directly from CSV
|
|
466
|
+
rare listing batch create \
|
|
467
|
+
--input ./tokens.csv \
|
|
468
|
+
--currency eth \
|
|
469
|
+
--price 0.012 \
|
|
470
|
+
--yes
|
|
471
|
+
|
|
465
472
|
# Build a proof artifact for one token in the root
|
|
466
473
|
rare utils merkle proof \
|
|
467
474
|
--input ./root.json \
|
|
@@ -477,8 +484,12 @@ rare utils merkle proof \
|
|
|
477
484
|
--buyer 0x... \
|
|
478
485
|
--output ./proof.json
|
|
479
486
|
|
|
480
|
-
#
|
|
481
|
-
rare listing batch create
|
|
487
|
+
# Or register from a reusable token tree artifact
|
|
488
|
+
rare listing batch create \
|
|
489
|
+
--input ./token-tree.json \
|
|
490
|
+
--currency usdc \
|
|
491
|
+
--price 25 \
|
|
492
|
+
--yes
|
|
482
493
|
|
|
483
494
|
# Buy one token using a proof artifact
|
|
484
495
|
rare listing batch buy \
|
|
@@ -516,12 +527,12 @@ Named currencies are parsed with chain-aware decimals. Arbitrary ERC20 addresses
|
|
|
516
527
|
|
|
517
528
|
### Batch Offers and Batch Auctions
|
|
518
529
|
|
|
519
|
-
Batch offers and batch auctions use token Merkle roots. You can pass
|
|
530
|
+
Batch offers and batch auctions use token Merkle roots. You can pass CSV, JSON token lists, or token tree artifacts with `--input`, or a known bytes32 root with `--root`. `rare utils tree build` is optional here too; it is useful when you want a saved artifact or root ahead of the write command.
|
|
520
531
|
|
|
521
532
|
```bash
|
|
522
|
-
# Create a batch offer
|
|
533
|
+
# Create a batch offer directly from CSV
|
|
523
534
|
rare offer batch create \
|
|
524
|
-
--input
|
|
535
|
+
--input tokens.csv \
|
|
525
536
|
--price 1 \
|
|
526
537
|
--currency eth \
|
|
527
538
|
--end-time 1778586400 \
|
|
@@ -535,9 +546,9 @@ rare offer batch accept \
|
|
|
535
546
|
--root 0x... \
|
|
536
547
|
--yes
|
|
537
548
|
|
|
538
|
-
# Create a batch reserve auction
|
|
549
|
+
# Create a batch reserve auction directly from CSV
|
|
539
550
|
rare auction batch create \
|
|
540
|
-
--input
|
|
551
|
+
--input tokens.csv \
|
|
541
552
|
--price 0.1 \
|
|
542
553
|
--end-time 1778586400 \
|
|
543
554
|
--yes
|