@unicitylabs/sphere-sdk 0.7.1-dev.3 → 0.7.2
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 +5 -77
- package/dist/core/index.cjs +536 -26
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +113 -1
- package/dist/core/index.d.ts +113 -1
- package/dist/core/index.js +535 -26
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/browser/ipfs.cjs.map +1 -1
- package/dist/impl/browser/ipfs.js.map +1 -1
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +631 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +233 -1
- package/dist/index.d.ts +233 -1
- package/dist/index.js +615 -26
- package/dist/index.js.map +1 -1
- package/dist/l1/index.cjs.map +1 -1
- package/dist/l1/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,91 +32,19 @@ Choose your platform:
|
|
|
32
32
|
|----------|-------|----------|----------|
|
|
33
33
|
| **Browser** | [QUICKSTART-BROWSER.md](docs/QUICKSTART-BROWSER.md) | SDK only | IPFS sync (built-in) |
|
|
34
34
|
| **Node.js** | [QUICKSTART-NODEJS.md](docs/QUICKSTART-NODEJS.md) | SDK + `ws` | IPFS sync (built-in) |
|
|
35
|
-
| **CLI** |
|
|
35
|
+
| **CLI** | [@unicity-sphere/cli](https://github.com/unicity-sphere/sphere-cli) | Separate package | - |
|
|
36
36
|
| **dApp integration** | [CONNECT.md](docs/CONNECT.md) | SDK only | Sphere extension |
|
|
37
37
|
|
|
38
38
|
## CLI (Command Line Interface)
|
|
39
39
|
|
|
40
|
-
The
|
|
40
|
+
The CLI has moved to a dedicated package: [`@unicity-sphere/cli`](https://github.com/unicity-sphere/sphere-cli).
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
# Initialize new wallet on testnet
|
|
47
|
-
npm run cli -- init --network testnet
|
|
48
|
-
|
|
49
|
-
# Initialize with nametag (mints token on-chain)
|
|
50
|
-
npm run cli -- init --network testnet --nametag alice
|
|
51
|
-
|
|
52
|
-
# Import existing wallet
|
|
53
|
-
npm run cli -- init --mnemonic "your 24 words here"
|
|
54
|
-
|
|
55
|
-
# Check wallet status
|
|
56
|
-
npm run cli -- status
|
|
57
|
-
|
|
58
|
-
# Check balance
|
|
59
|
-
npm run cli -- balance
|
|
60
|
-
|
|
61
|
-
# Fetch pending transfers and finalize unconfirmed tokens
|
|
62
|
-
npm run cli -- balance --finalize
|
|
63
|
-
|
|
64
|
-
# Check for incoming transfers
|
|
65
|
-
npm run cli -- receive
|
|
66
|
-
|
|
67
|
-
# Check for incoming transfers and finalize unconfirmed tokens
|
|
68
|
-
npm run cli -- receive --finalize
|
|
69
|
-
|
|
70
|
-
# Send tokens (instant mode, default)
|
|
71
|
-
npm run cli -- send @alice 1 UCT --instant
|
|
72
|
-
|
|
73
|
-
# Send tokens (conservative mode — collect all proofs first)
|
|
74
|
-
npm run cli -- send @alice 1 UCT --conservative
|
|
75
|
-
|
|
76
|
-
# Request test tokens from faucet
|
|
77
|
-
npm run cli -- topup
|
|
78
|
-
|
|
79
|
-
# Register nametag
|
|
80
|
-
npm run cli -- nametag myname
|
|
81
|
-
|
|
82
|
-
# Show transaction history
|
|
83
|
-
npm run cli -- history 10
|
|
84
|
-
|
|
85
|
-
# Verify tokens against aggregator (detect spent tokens)
|
|
86
|
-
npm run cli -- verify-balance
|
|
43
|
+
npm install -g @unicity-sphere/cli
|
|
44
|
+
sphere --help
|
|
87
45
|
```
|
|
88
46
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
| Category | Command | Description |
|
|
92
|
-
|----------|---------|-------------|
|
|
93
|
-
| **Wallet** | `init [--network <net>] [--mnemonic "<words>"] [--nametag <name>]` | Create or import wallet |
|
|
94
|
-
| | `status` | Show wallet identity |
|
|
95
|
-
| | `config` | Show/set configuration |
|
|
96
|
-
| **Profiles** | `wallet list` | List all wallet profiles |
|
|
97
|
-
| | `wallet use <name>` | Switch to a wallet profile |
|
|
98
|
-
| | `wallet create <name> [--network <net>]` | Create a new wallet profile |
|
|
99
|
-
| | `wallet delete <name>` | Delete a wallet profile |
|
|
100
|
-
| | `wallet current` | Show current wallet profile |
|
|
101
|
-
| **Balance** | `balance [--finalize]` | Show L3 token balance (--finalize: fetch pending + resolve) |
|
|
102
|
-
| | `tokens` | List all tokens with details |
|
|
103
|
-
| | `l1-balance` | Show L1 (ALPHA) balance |
|
|
104
|
-
| | `topup [<amount> <symbol>]` | Request test tokens from faucet |
|
|
105
|
-
| | `verify-balance [--remove] [-v]` | Verify tokens against aggregator |
|
|
106
|
-
| **Transfers** | `send <to> <amount> <symbol> [--instant\|--conservative]` | Send tokens |
|
|
107
|
-
| | `receive [--finalize]` | Check for incoming transfers |
|
|
108
|
-
| | `history [limit]` | Show transaction history |
|
|
109
|
-
| **Nametags** | `nametag <name>` | Register a nametag |
|
|
110
|
-
| | `nametag-info <name>` | Lookup nametag info |
|
|
111
|
-
| | `my-nametag` | Show current nametag |
|
|
112
|
-
| | `nametag-sync` | Re-publish nametag with chainPubkey |
|
|
113
|
-
| **Utils** | `generate-key` | Generate random key |
|
|
114
|
-
| | `to-human <amount>` | Convert to human readable |
|
|
115
|
-
| | `parse-wallet <file>` | Parse wallet file |
|
|
116
|
-
|
|
117
|
-
CLI data is stored in `./.sphere-cli/` directory.
|
|
118
|
-
|
|
119
|
-
> **Shell completion:** Run `npm link && sphere-cli completions bash >> ~/.bashrc` for tab-completion of all commands. See [CLI Quickstart](docs/QUICKSTART-CLI.md) for details.
|
|
47
|
+
See [docs/QUICKSTART-CLI.md](docs/QUICKSTART-CLI.md) for the full command reference.
|
|
120
48
|
|
|
121
49
|
## Quick Start
|
|
122
50
|
|