@moonpay/cli 0.3.1 → 0.3.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": "@moonpay/cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -28,7 +28,7 @@ mp buy \
28
28
 
29
29
  1. User: "I want to buy 1 SOL with my credit card."
30
30
  2. Run: `mp buy --token sol --amount 1 --wallet <address> --email user@example.com`
31
- 3. Return the checkout URL for the user to open in their browser.
31
+ 3. Open the returned checkout URL in the user's browser so they can complete the purchase.
32
32
 
33
33
  ## Notes
34
34
 
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: moonpay-missions
3
+ description: A series of missions that walk through every MoonPay CLI capability. Use when the user is new or says "get started", "show me what you can do", or "run the missions".
4
+ tags: [setup]
5
+ ---
6
+
7
+ # MoonPay Missions
8
+
9
+ Walk the user through a series of missions. Complete each one before moving to the next. After each mission, give a brief summary of what they just did and what's next.
10
+
11
+ ## Mission 1: Identity
12
+
13
+ **Goal:** Verify who you are and what wallets you have.
14
+
15
+ ```bash
16
+ mp user retrieve
17
+ mp wallet list
18
+ ```
19
+
20
+ If no wallets exist, create one:
21
+
22
+ ```bash
23
+ mp wallet create --name "my-wallet"
24
+ ```
25
+
26
+ Tell the user their email, wallet address, and that this wallet's private key lives locally on their machine.
27
+
28
+ ## Mission 2: Recon
29
+
30
+ **Goal:** See what's trending and research a token.
31
+
32
+ First, check what's hot:
33
+
34
+ ```bash
35
+ mp token trending list --chain solana --limit 5 --page 1
36
+ ```
37
+
38
+ Present the top trending tokens with price, 24h change, and volume.
39
+
40
+ Then ask the user to pick a token to research (or default to SOL):
41
+
42
+ ```bash
43
+ mp token search --query "<token>" --chain solana
44
+ mp token retrieve --token <address-from-search> --chain solana
45
+ ```
46
+
47
+ Present: name, symbol, price, 24h change, market cap, liquidity, volume, and trading activity. Flag anything interesting (high volume, thin liquidity, etc).
48
+
49
+ ## Mission 3: Portfolio Check
50
+
51
+ **Goal:** See what's in the wallet.
52
+
53
+ ```bash
54
+ mp token balance list --wallet <address> --chain solana
55
+ ```
56
+
57
+ Present holdings as a mini portfolio report: each token, amount, USD value, and % allocation. Give the total portfolio value.
58
+
59
+ ## Mission 4: Swap
60
+
61
+ **Goal:** Build a swap transaction, sign it locally, and show the quote.
62
+
63
+ Pick a small swap based on what the wallet holds (e.g. 0.01 USDC → SOL). If the wallet has no USDC, pick any token pair that makes sense.
64
+
65
+ ```bash
66
+ mp token swap build --input <input-mint> --output <output-mint> --amount <small-amount> --wallet <address>
67
+ ```
68
+
69
+ Show the quote from the `message` field. Ask the user: **"Want to execute this swap?"**
70
+
71
+ If yes:
72
+
73
+ ```bash
74
+ mp transaction sign --transaction <tx> --wallet <address>
75
+ mp token swap execute --transaction <signed-tx> --requestId <id>
76
+ ```
77
+
78
+ If no, move on. Either way, explain what just happened: the transaction was built on the server, signed locally (key never left the machine), and submitted on-chain.
79
+
80
+ ## Mission 5: Buy with Fiat
81
+
82
+ **Goal:** Generate a fiat checkout link and open it.
83
+
84
+ ```bash
85
+ mp buy --token sol --amount 1 --wallet <address> --email <email-from-mission-1>
86
+ ```
87
+
88
+ Present the checkout URL and open it in the user's browser. Explain: this is MoonPay's fiat gateway where they can buy crypto with a card or bank transfer. Tokens get sent directly to their wallet.
89
+
90
+ ## Mission 6: Message Signing
91
+
92
+ **Goal:** Sign a message to prove wallet ownership.
93
+
94
+ ```bash
95
+ mp message sign --wallet <address> --message "I own this wallet"
96
+ ```
97
+
98
+ Present the signature. Explain: this is used for wallet verification (e.g. registering with virtual accounts, proving ownership to dApps).
99
+
100
+ ## Mission 7: Virtual Account (optional)
101
+
102
+ **Goal:** Check if the user has a virtual account for fiat on/off-ramp.
103
+
104
+ ```bash
105
+ mp virtual-account retrieve
106
+ ```
107
+
108
+ If they have one, show the status and next step. If not, explain what a virtual account is (KYC-verified fiat bridge) and that they can set one up with `mp virtual-account create`.
109
+
110
+ ## Mission 8: Skills
111
+
112
+ **Goal:** Show the user what skills are available.
113
+
114
+ ```bash
115
+ mp skill list
116
+ ```
117
+
118
+ Explain: skills are guides that teach agents how to use the CLI. They can install them for Claude Code with `mp skill install`.
119
+
120
+ ## Debrief
121
+
122
+ Summarize everything the user just did:
123
+ - Authenticated and set up a wallet
124
+ - Searched and analyzed tokens
125
+ - Checked portfolio
126
+ - Built and signed a swap (and maybe executed it)
127
+ - Generated a fiat buy link
128
+ - Signed a message
129
+ - Explored virtual accounts
130
+ - Discovered skills
131
+
132
+ End with: "You're oriented. Run `mp --help` to see all commands, or ask me anything."