@moonpay/cli 0.2.4 → 0.2.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.
- package/dist/index.js +73 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/skills/moonpay-auth/SKILL.md +64 -0
- package/skills/moonpay-buy-crypto/SKILL.md +44 -0
- package/skills/moonpay-check-wallet/SKILL.md +45 -0
- package/skills/moonpay-discover-tokens/SKILL.md +54 -0
- package/skills/moonpay-env/SKILL.md +57 -0
- package/skills/moonpay-portfolio-report/SKILL.md +49 -0
- package/skills/moonpay-rug-check/SKILL.md +59 -0
- package/skills/moonpay-swap-tokens/SKILL.md +73 -0
- package/skills/moonpay-token-brief/SKILL.md +47 -0
- package/skills/moonpay-virtual-account/SKILL.md +173 -0
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-auth
|
|
3
|
+
description: Authenticate and manage local wallets with MoonPay CLI. Use when you need to log in, check auth state, or manage wallets for signing transactions.
|
|
4
|
+
tags: [setup]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MoonPay auth
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Set up authentication and local wallet management for the MoonPay CLI (`mp`).
|
|
12
|
+
|
|
13
|
+
## Auth commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Log in (opens browser for OAuth)
|
|
17
|
+
mp login
|
|
18
|
+
|
|
19
|
+
# Check current user
|
|
20
|
+
mp user retrieve
|
|
21
|
+
|
|
22
|
+
# Log out
|
|
23
|
+
mp logout
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Local wallet management
|
|
27
|
+
|
|
28
|
+
The CLI manages local Solana wallets stored in `~/.config/moonpay/wallets/`. Private keys never leave the machine — transactions are signed locally.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Create a new wallet
|
|
32
|
+
mp wallet create --name "my-wallet"
|
|
33
|
+
|
|
34
|
+
# Import from a base58 private key
|
|
35
|
+
mp wallet import --name "imported" --privateKey <base58-key>
|
|
36
|
+
|
|
37
|
+
# List all local wallets
|
|
38
|
+
mp wallet list
|
|
39
|
+
|
|
40
|
+
# Get wallet details (by name or address)
|
|
41
|
+
mp wallet retrieve --wallet "my-wallet"
|
|
42
|
+
mp wallet retrieve --wallet <address>
|
|
43
|
+
|
|
44
|
+
# Delete a wallet (irreversible)
|
|
45
|
+
mp wallet delete --wallet "my-wallet" --confirm
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Workflow
|
|
49
|
+
|
|
50
|
+
1. Run `mp user retrieve` to check if authenticated.
|
|
51
|
+
2. If it fails, run `mp login` (opens browser).
|
|
52
|
+
3. Run `mp wallet list` to see local wallets.
|
|
53
|
+
4. If no wallets, create one: `mp wallet create --name "default"`.
|
|
54
|
+
|
|
55
|
+
## Notes
|
|
56
|
+
|
|
57
|
+
- Credentials: `~/.config/moonpay/credentials.json`
|
|
58
|
+
- Wallets: `~/.config/moonpay/wallets/`
|
|
59
|
+
- Tokens auto-refresh on expiry. If refresh fails, run `mp login` again.
|
|
60
|
+
|
|
61
|
+
## Related skills
|
|
62
|
+
|
|
63
|
+
- **moonpay-env** — Environment and PATH setup.
|
|
64
|
+
- **moonpay-swap-tokens** — Swap tokens using local wallets.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-buy-crypto
|
|
3
|
+
description: Buy crypto with fiat via MoonPay. Returns a checkout URL to complete the purchase in a browser.
|
|
4
|
+
tags: [trading]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Buy crypto with fiat
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Generate a MoonPay checkout URL for buying crypto with a credit card or bank transfer. The user completes the purchase in their browser.
|
|
12
|
+
|
|
13
|
+
## Command
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
mp buy \
|
|
17
|
+
--token <currency-code> \
|
|
18
|
+
--amount <amount> \
|
|
19
|
+
--wallet <destination-address> \
|
|
20
|
+
--email <buyer-email>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Supported tokens
|
|
24
|
+
|
|
25
|
+
`sol`, `usdc_sol`, `eth`, `usdc`, `usdc_base`, `usdc_arbitrum`, `usdc_optimism`, `usdc_polygon`, `eth_polygon`, `eth_optimism`, `eth_base`, `eth_arbitrum`
|
|
26
|
+
|
|
27
|
+
## Example flow
|
|
28
|
+
|
|
29
|
+
1. User: "I want to buy 1 SOL with my credit card."
|
|
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.
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
|
|
35
|
+
- This is fiat-to-crypto (credit card / bank), not a token swap.
|
|
36
|
+
- For token-to-token swaps, use the **moonpay-swap-tokens** skill instead.
|
|
37
|
+
- The `--token` flag uses MoonPay currency codes, not mint addresses.
|
|
38
|
+
- The checkout URL handles KYC and payment processing.
|
|
39
|
+
|
|
40
|
+
## Related skills
|
|
41
|
+
|
|
42
|
+
- **moonpay-swap-tokens** — Swap between tokens (no fiat).
|
|
43
|
+
- **moonpay-discover-tokens** — Search for tokens.
|
|
44
|
+
- **moonpay-auth** — Ensure user is logged in.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-check-wallet
|
|
3
|
+
description: Check wallet balances and holdings. Use for "what's in my wallet", portfolio breakdown, token balances, and USD values.
|
|
4
|
+
tags: [portfolio]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Check wallet
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
List all token balances held in a wallet with current USD values.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# List balances for a Solana wallet
|
|
17
|
+
mp token balance list --wallet <address> --chain solana
|
|
18
|
+
|
|
19
|
+
# List balances for an EVM wallet
|
|
20
|
+
mp token balance list --wallet 0x... --chain ethereum
|
|
21
|
+
mp token balance list --wallet 0x... --chain base
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Supported chains
|
|
25
|
+
|
|
26
|
+
`solana`, `ethereum`, `base`, `polygon`, `arbitrum`, `optimism`
|
|
27
|
+
|
|
28
|
+
## Output handling
|
|
29
|
+
|
|
30
|
+
- Summarize top holdings by USD value.
|
|
31
|
+
- Call out small dust balances separately.
|
|
32
|
+
- Sum `balance.value` across items for total portfolio value.
|
|
33
|
+
|
|
34
|
+
## Example flow
|
|
35
|
+
|
|
36
|
+
1. User: "What's in my wallet?"
|
|
37
|
+
2. Run `mp wallet list` to find the user's wallet address.
|
|
38
|
+
3. Run `mp token balance list --wallet <address> --chain solana`.
|
|
39
|
+
4. Present holdings sorted by value.
|
|
40
|
+
|
|
41
|
+
## Related skills
|
|
42
|
+
|
|
43
|
+
- **moonpay-auth** — Set up wallets if none exist.
|
|
44
|
+
- **moonpay-portfolio-report** — Full report with allocation percentages.
|
|
45
|
+
- **moonpay-rug-check** — Risk-check a token before buying.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-discover-tokens
|
|
3
|
+
description: Search for tokens and retrieve detailed market data. Use to find token addresses, check prices, volume, liquidity, and trading activity.
|
|
4
|
+
tags: [research]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Discover tokens
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Search for tokens by name/symbol and retrieve detailed market data including price, volume, liquidity, and trading activity.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
### Search for tokens
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
mp token search --query "SOL" --chain solana
|
|
19
|
+
mp token search --query "BONK" --chain solana --limit 3
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Returns matching tokens with market data (price, volume, liquidity, trades, buys/sells, unique wallets).
|
|
23
|
+
|
|
24
|
+
### Retrieve token details
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
mp token retrieve --token <mint-address> --chain solana
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Returns token metadata (name, symbol, decimals, image) and market data.
|
|
31
|
+
|
|
32
|
+
## Supported chains
|
|
33
|
+
|
|
34
|
+
`solana`, `ethereum`, `base`, `polygon`, `arbitrum`, `optimism`
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
1. Search by name/symbol with `mp token search`.
|
|
39
|
+
2. Use the returned address to get details with `mp token retrieve`.
|
|
40
|
+
3. Evaluate risk with **moonpay-rug-check** for unknown tokens.
|
|
41
|
+
4. Proceed to buy/swap if desired.
|
|
42
|
+
|
|
43
|
+
## Example flow
|
|
44
|
+
|
|
45
|
+
1. User: "What's the price of BONK?"
|
|
46
|
+
2. Run: `mp token search --query "BONK" --chain solana`
|
|
47
|
+
3. Present: name, symbol, price, 24h change, volume, liquidity.
|
|
48
|
+
|
|
49
|
+
## Related skills
|
|
50
|
+
|
|
51
|
+
- **moonpay-token-brief** — Detailed trading brief for a specific token.
|
|
52
|
+
- **moonpay-rug-check** — Risk assessment for unknown tokens.
|
|
53
|
+
- **moonpay-swap-tokens** — Swap after research.
|
|
54
|
+
- **moonpay-buy-crypto** — Buy with fiat after research.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-env
|
|
3
|
+
description: Ensure the MoonPay CLI environment is set up correctly. Use when commands fail due to PATH or config issues.
|
|
4
|
+
tags: [setup]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MoonPay environment setup
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i -g @moonpay/cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This installs the `mp` (and `moonpay`) binary globally.
|
|
16
|
+
|
|
17
|
+
## Verify installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
mp --version
|
|
21
|
+
mp --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Config locations
|
|
25
|
+
|
|
26
|
+
- **Credentials:** `~/.config/moonpay/credentials.json` (OAuth tokens)
|
|
27
|
+
- **Config:** `~/.config/moonpay/config.json` (base URL, client ID)
|
|
28
|
+
- **Wallets:** `~/.config/moonpay/wallets/` (local keypairs, 0600 permissions)
|
|
29
|
+
|
|
30
|
+
## Environment for scripts/agents
|
|
31
|
+
|
|
32
|
+
If running `mp` from a script or agent subprocess, ensure PATH includes the npm global bin:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
export PATH="$(npm config get prefix)/bin:$PATH"
|
|
36
|
+
mp --version
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Output formats
|
|
40
|
+
|
|
41
|
+
The CLI supports three output formats via `-f`:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
mp -f json wallet list # Pretty JSON (default)
|
|
45
|
+
mp -f compact wallet list # Single-line JSON
|
|
46
|
+
mp -f table wallet list # ASCII table
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Troubleshooting
|
|
50
|
+
|
|
51
|
+
- **"command not found"** — `npm i -g @moonpay/cli` and check PATH.
|
|
52
|
+
- **401 / auth errors** — Run `mp login`.
|
|
53
|
+
- **"fetch failed"** — Check network connectivity to agents.moonpay.com.
|
|
54
|
+
|
|
55
|
+
## Related skills
|
|
56
|
+
|
|
57
|
+
- **moonpay-auth** — Login, logout, wallet management.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-portfolio-report
|
|
3
|
+
description: Generate a portfolio summary with holdings, allocation breakdown, and USD totals. Use when the user asks for a portfolio overview or report.
|
|
4
|
+
tags: [portfolio]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Portfolio report
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Produce a structured portfolio report for a wallet: holdings with USD values, allocation percentages, and total portfolio value.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Get all balances
|
|
17
|
+
mp token balance list --wallet <address> --chain solana
|
|
18
|
+
|
|
19
|
+
# Get details on a specific token (optional)
|
|
20
|
+
mp token retrieve --token <mint-address> --chain solana
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
1. Run `mp wallet list` to find the user's wallet address.
|
|
26
|
+
2. Call `mp token balance list` with the wallet and chain.
|
|
27
|
+
3. Sort holdings by USD value descending.
|
|
28
|
+
4. Calculate allocation percentages (each holding's USD / total USD).
|
|
29
|
+
5. Format into sections: Top Holdings, Dust Balances, Total Value.
|
|
30
|
+
|
|
31
|
+
## Example flow
|
|
32
|
+
|
|
33
|
+
1. User: "Generate a portfolio report."
|
|
34
|
+
2. Run: `mp token balance list --wallet <address> --chain solana`
|
|
35
|
+
3. Present:
|
|
36
|
+
- **Total value:** $168.05
|
|
37
|
+
- **SOL** — 0.61 ($51.87) — 30.9%
|
|
38
|
+
- **WBTC** — 0.00127 ($85.48) — 50.9%
|
|
39
|
+
- **USDC** — 29.81 ($29.81) — 17.7%
|
|
40
|
+
- **Dust:** none
|
|
41
|
+
|
|
42
|
+
## Output formats
|
|
43
|
+
|
|
44
|
+
Use `mp -f table token balance list ...` for a quick table view, or `mp -f json ...` for programmatic processing.
|
|
45
|
+
|
|
46
|
+
## Related skills
|
|
47
|
+
|
|
48
|
+
- **moonpay-check-wallet** — Quick balance check (this skill builds on it).
|
|
49
|
+
- **moonpay-discover-tokens** — Research specific tokens in the portfolio.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-rug-check
|
|
3
|
+
description: Analyze a token for rug pull risk indicators. Use when the user asks "is this token safe?" or wants to evaluate an unknown token before buying.
|
|
4
|
+
tags: [research]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Rug check
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Assess a token's risk profile using available market data. Give the user a clear risk summary before they buy.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Resolve token address
|
|
17
|
+
mp token search --query "BONK" --chain solana
|
|
18
|
+
|
|
19
|
+
# Get market data
|
|
20
|
+
mp token retrieve --token <mint-address> --chain solana
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Risk indicators to check
|
|
24
|
+
|
|
25
|
+
1. **Liquidity** — Low liquidity = easy to manipulate. Under $10K is a red flag.
|
|
26
|
+
2. **Volume pattern** — Compare 5m/1h/4h/24h volume. Sudden spikes with no context = suspicious.
|
|
27
|
+
3. **Buy/sell ratio** — Heavy sell pressure or extremely one-sided trading = dump risk.
|
|
28
|
+
4. **Unique wallets** — Very few unique wallets trading = concentrated activity.
|
|
29
|
+
5. **Market cap vs liquidity** — Huge mcap with tiny liquidity = inflated, hard to exit.
|
|
30
|
+
6. **Price volatility** — Extreme short-term swings (>50% in 1h) = high risk.
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
1. Resolve token via `mp token search` if user provides name/symbol.
|
|
35
|
+
2. Call `mp token retrieve` for market data.
|
|
36
|
+
3. Analyze against risk indicators above.
|
|
37
|
+
4. Present a risk summary with traffic-light ratings.
|
|
38
|
+
|
|
39
|
+
## Example flow
|
|
40
|
+
|
|
41
|
+
1. User: "Is BONK safe to buy?"
|
|
42
|
+
2. Search: `mp token search --query "BONK" --chain solana`
|
|
43
|
+
3. Retrieve: `mp token retrieve --token <address> --chain solana`
|
|
44
|
+
4. Present:
|
|
45
|
+
- Liquidity: $12M (green)
|
|
46
|
+
- Volume 24h: $45M (green)
|
|
47
|
+
- Buy/sell ratio: balanced (green)
|
|
48
|
+
- Unique wallets 24h: 3,200 (green)
|
|
49
|
+
- **Overall: Low risk**
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- This is a heuristic check based on market data, not a smart contract audit.
|
|
54
|
+
- Always recommend caution with unknown tokens regardless of data.
|
|
55
|
+
|
|
56
|
+
## Related skills
|
|
57
|
+
|
|
58
|
+
- **moonpay-discover-tokens** — Token search and research.
|
|
59
|
+
- **moonpay-token-brief** — Detailed market data brief.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-swap-tokens
|
|
3
|
+
description: Swap tokens using the build, sign, execute flow. Use when the user wants to swap token A for token B on Solana.
|
|
4
|
+
tags: [trading]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Swap tokens
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Swap tokens on Solana using the three-step flow: build an unsigned transaction, sign it locally with a wallet, then execute it on-chain.
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
- `token swap build` — Build an unsigned swap transaction (returns base64 tx + quote)
|
|
16
|
+
- `transaction sign` — Sign the transaction with a local wallet
|
|
17
|
+
- `token swap execute` — Submit the signed transaction to Jupiter
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
### 1. Build the swap transaction
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
mp token swap build \
|
|
25
|
+
--input <input-token-mint> \
|
|
26
|
+
--output <output-token-mint> \
|
|
27
|
+
--amount <amount-of-input-token> \
|
|
28
|
+
--wallet <wallet-address>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This returns a `transaction` (base64), `message` (human-readable quote), and `requestId`.
|
|
32
|
+
|
|
33
|
+
### 2. Sign the transaction locally
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
mp transaction sign \
|
|
37
|
+
--transaction <base64-transaction> \
|
|
38
|
+
--wallet <wallet-address>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This returns a signed `transaction` (base64). The private key never leaves the machine.
|
|
42
|
+
|
|
43
|
+
### 3. Execute the swap
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
mp token swap execute \
|
|
47
|
+
--transaction <signed-base64-transaction> \
|
|
48
|
+
--requestId <request-id-from-build>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This returns a `signature` (the on-chain transaction hash).
|
|
52
|
+
|
|
53
|
+
## Example flow
|
|
54
|
+
|
|
55
|
+
1. User: "Swap 1 USDC for WBTC"
|
|
56
|
+
2. Resolve token addresses via `mp token search --query "USDC" --chain solana`.
|
|
57
|
+
3. Build: `mp token swap build --input EPjF...Dt1v --output 3NZ9...cmJh --amount 1 --wallet <addr>`
|
|
58
|
+
4. Show the quote from the `message` field. Ask for confirmation.
|
|
59
|
+
5. Sign: `mp transaction sign --transaction <tx> --wallet <addr>`
|
|
60
|
+
6. Execute: `mp token swap execute --transaction <signed-tx> --requestId <id>`
|
|
61
|
+
7. Return the transaction signature.
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
|
|
65
|
+
- If the user provides token names/symbols, resolve to addresses with `mp token search`.
|
|
66
|
+
- Always show the quote and ask for confirmation before signing.
|
|
67
|
+
- The wallet must be a local wallet (see `mp wallet list`).
|
|
68
|
+
|
|
69
|
+
## Related skills
|
|
70
|
+
|
|
71
|
+
- **moonpay-discover-tokens** — Search for token addresses.
|
|
72
|
+
- **moonpay-check-wallet** — Check balances before swapping.
|
|
73
|
+
- **moonpay-auth** — Set up wallets for signing.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-token-brief
|
|
3
|
+
description: Generate a concise trading brief for a token with market cap, liquidity, volume, momentum, and activity metrics.
|
|
4
|
+
tags: [research]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Token brief
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Given a token address, produce a compact brief with key trading metrics.
|
|
12
|
+
|
|
13
|
+
## Command
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
mp token retrieve --token <mint-address> --chain solana
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## What to include
|
|
20
|
+
|
|
21
|
+
- **Identity:** name, symbol, address
|
|
22
|
+
- **Market data:**
|
|
23
|
+
- Market cap, liquidity, volume (24h)
|
|
24
|
+
- Price change % (5m, 1h, 4h, 12h, 24h)
|
|
25
|
+
- Trades, buys/sells, unique wallets (5m through 24h)
|
|
26
|
+
- **Risk notes:** thin liquidity, cooling volume, extreme swings
|
|
27
|
+
|
|
28
|
+
## Example output format
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
BONK (DezX...pump) — mcap $850M, liq $12M, vol24 $45M
|
|
32
|
+
momentum: 1h +2.3%, 4h -0.5%, 24h +8.1%
|
|
33
|
+
activity: trades24 12,500, wallets24 3,200
|
|
34
|
+
note: healthy volume, broad wallet distribution
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
|
|
39
|
+
1. If user provides name/symbol, resolve with `mp token search`.
|
|
40
|
+
2. Call `mp token retrieve` for the full data.
|
|
41
|
+
3. Format into a brief.
|
|
42
|
+
|
|
43
|
+
## Related skills
|
|
44
|
+
|
|
45
|
+
- **moonpay-discover-tokens** — Search if you only have a name/symbol.
|
|
46
|
+
- **moonpay-rug-check** — Risk assessment for unknown tokens.
|
|
47
|
+
- **moonpay-swap-tokens** — Trade after analysis.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: moonpay-virtual-account
|
|
3
|
+
description: Set up a virtual account for fiat on/off-ramp. Covers KYC, bank accounts, onramp (fiat to stablecoin), offramp (stablecoin to fiat), and wallet registration.
|
|
4
|
+
tags: [defi]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Virtual account (fiat on/off-ramp)
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Set up and use a MoonPay virtual account to convert between fiat (USD/EUR) and stablecoins (USDC/USDT/EURC) on Solana. Covers the full lifecycle: account creation, KYC, bank account registration, onramp, and offramp.
|
|
12
|
+
|
|
13
|
+
## Setup flow
|
|
14
|
+
|
|
15
|
+
### 1. Create account and start KYC
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
mp virtual-account create
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Check account status
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
mp virtual-account retrieve
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The `status` field shows where you are. The `next_step` field tells you what to do next.
|
|
28
|
+
|
|
29
|
+
### 3. Complete KYC verification
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Create a verification link
|
|
33
|
+
mp virtual-account identification create
|
|
34
|
+
|
|
35
|
+
# Check verification status
|
|
36
|
+
mp virtual-account identification retrieve
|
|
37
|
+
|
|
38
|
+
# List all verifications
|
|
39
|
+
mp virtual-account identification list
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 4. Sign required documents
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# List documents needing signature
|
|
46
|
+
mp virtual-account signing required list
|
|
47
|
+
|
|
48
|
+
# Sign a document
|
|
49
|
+
mp virtual-account signing create --contentId <content-id>
|
|
50
|
+
|
|
51
|
+
# List signed documents
|
|
52
|
+
mp virtual-account signing list
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 5. Register a wallet
|
|
56
|
+
|
|
57
|
+
The wallet must be verified via a signed message before it can receive funds.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Create verification message
|
|
61
|
+
mp virtual-account wallet registration-message create --wallet <address>
|
|
62
|
+
|
|
63
|
+
# Sign the message with your local wallet
|
|
64
|
+
mp message sign --wallet <address> --message "<verification-message>"
|
|
65
|
+
|
|
66
|
+
# Register the wallet with the signature
|
|
67
|
+
mp virtual-account wallet register \
|
|
68
|
+
--wallet <address> \
|
|
69
|
+
--message "<verification-message>" \
|
|
70
|
+
--signature <base58-signature>
|
|
71
|
+
|
|
72
|
+
# List registered wallets
|
|
73
|
+
mp virtual-account wallet list
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Onramp (fiat to stablecoin)
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Create an onramp
|
|
80
|
+
mp virtual-account onramp create \
|
|
81
|
+
--name "My Onramp" \
|
|
82
|
+
--fiat USD \
|
|
83
|
+
--stablecoin USDC
|
|
84
|
+
|
|
85
|
+
# Get onramp details (includes bank info for wire/ACH)
|
|
86
|
+
mp virtual-account onramp retrieve --onrampId <id>
|
|
87
|
+
|
|
88
|
+
# List onramps
|
|
89
|
+
mp virtual-account onramp list --status Created
|
|
90
|
+
|
|
91
|
+
# Create an open banking payment
|
|
92
|
+
mp virtual-account onramp payment create \
|
|
93
|
+
--onrampId <id> \
|
|
94
|
+
--amount 100 \
|
|
95
|
+
--fiat USD
|
|
96
|
+
|
|
97
|
+
# Check payment status
|
|
98
|
+
mp virtual-account onramp payment retrieve \
|
|
99
|
+
--onrampId <id> \
|
|
100
|
+
--paymentId <payment-id>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Offramp (stablecoin to fiat)
|
|
104
|
+
|
|
105
|
+
### Register a bank account first
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# USD bank account
|
|
109
|
+
mp virtual-account bank-account usd register \
|
|
110
|
+
--type ACH \
|
|
111
|
+
--accountNumber <number> \
|
|
112
|
+
--routingNumber <number> \
|
|
113
|
+
--address "123 Main St" \
|
|
114
|
+
--email user@example.com \
|
|
115
|
+
--phoneNumber "+1..." \
|
|
116
|
+
--providerCountry US \
|
|
117
|
+
--providerName "Bank Name" \
|
|
118
|
+
--givenName "First" \
|
|
119
|
+
--familyName "Last"
|
|
120
|
+
|
|
121
|
+
# EUR bank account
|
|
122
|
+
mp virtual-account bank-account eur register \
|
|
123
|
+
--iban <iban> \
|
|
124
|
+
--address "123 Main St" \
|
|
125
|
+
--email user@example.com \
|
|
126
|
+
--phoneNumber "+1..." \
|
|
127
|
+
--providerCountry DE \
|
|
128
|
+
--providerName "Bank Name" \
|
|
129
|
+
--givenName "First" \
|
|
130
|
+
--familyName "Last"
|
|
131
|
+
|
|
132
|
+
# List bank accounts
|
|
133
|
+
mp virtual-account bank-account list
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Create and execute offramp
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Create offramp
|
|
140
|
+
mp virtual-account offramp create \
|
|
141
|
+
--name "My Offramp" \
|
|
142
|
+
--fiat USD \
|
|
143
|
+
--stablecoin USDC
|
|
144
|
+
|
|
145
|
+
# Build the send transaction
|
|
146
|
+
mp virtual-account offramp initiate \
|
|
147
|
+
--offrampId <id> \
|
|
148
|
+
--wallet <address> \
|
|
149
|
+
--amount 100
|
|
150
|
+
|
|
151
|
+
# Sign and send the transaction
|
|
152
|
+
mp transaction sign --transaction <base64-tx> --wallet <address>
|
|
153
|
+
mp transaction send --transaction <signed-tx> --message "Offramp 100 USDC"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Other commands
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# List transactions
|
|
160
|
+
mp virtual-account transaction list
|
|
161
|
+
|
|
162
|
+
# Delete account
|
|
163
|
+
mp virtual-account delete
|
|
164
|
+
|
|
165
|
+
# Delete a bank account
|
|
166
|
+
mp virtual-account bank-account delete --bankAccountId <id>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Related skills
|
|
170
|
+
|
|
171
|
+
- **moonpay-auth** — Login and wallet setup (required before virtual account).
|
|
172
|
+
- **moonpay-check-wallet** — Check stablecoin balances.
|
|
173
|
+
- **moonpay-swap-tokens** — Swap stablecoins for other tokens after onramp.
|