@crossmint/openclaw-wallet 0.2.3 → 0.2.4
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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/crossmint/SKILL.md +89 -6
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -112,6 +112,42 @@ Agent: Use crossmint_wallet_info
|
|
|
112
112
|
|
|
113
113
|
Buy products from Amazon using SOL or USDC from the agent's wallet. Crossmint acts as Merchant of Record, handling payments, shipping, and taxes.
|
|
114
114
|
|
|
115
|
+
### CRITICAL: Product Validation
|
|
116
|
+
|
|
117
|
+
**ALWAYS validate that the product matches what the user requested before completing a purchase.**
|
|
118
|
+
|
|
119
|
+
When a purchase completes, the response includes the product title. The agent MUST:
|
|
120
|
+
|
|
121
|
+
1. **Compare the product title** with what the user asked for
|
|
122
|
+
2. **If there's a mismatch**, inform the user immediately:
|
|
123
|
+
```
|
|
124
|
+
⚠️ The product found doesn't match your request.
|
|
125
|
+
|
|
126
|
+
You asked for: "Celsius Energy Drink"
|
|
127
|
+
Product found: "USB Cable Organizer"
|
|
128
|
+
|
|
129
|
+
This might be the wrong product. Would you like me to:
|
|
130
|
+
1. Search for the correct product on Amazon
|
|
131
|
+
2. Cancel and try a different ASIN
|
|
132
|
+
3. Proceed anyway (if this is actually correct)
|
|
133
|
+
```
|
|
134
|
+
3. **Never assume** - If the user says "buy Celsius" without an ASIN, search Amazon first to find the correct product
|
|
135
|
+
4. **Confirm before payment** - For vague requests, always confirm the exact product before purchasing
|
|
136
|
+
|
|
137
|
+
**Best Practice Flow:**
|
|
138
|
+
```
|
|
139
|
+
User: "Buy me some Celsius energy drinks"
|
|
140
|
+
Agent:
|
|
141
|
+
1. First, search Amazon for "Celsius energy drink" to find the correct ASIN
|
|
142
|
+
2. Present options: "I found these Celsius products:
|
|
143
|
+
- B08P5H1FLX: Celsius Sparkling Orange (12-pack) - ~$25
|
|
144
|
+
- B07GX3GDN5: Celsius Variety Pack (12-pack) - ~$30
|
|
145
|
+
Which one would you like?"
|
|
146
|
+
3. User confirms: "The variety pack"
|
|
147
|
+
4. Agent uses crossmint_buy with the confirmed ASIN
|
|
148
|
+
5. After purchase, verify the product title in the response matches
|
|
149
|
+
```
|
|
150
|
+
|
|
115
151
|
### How It Works (Under the Hood)
|
|
116
152
|
|
|
117
153
|
When you use `crossmint_buy`, the plugin executes a 6-step delegated signer flow:
|
|
@@ -178,6 +214,26 @@ Returns:
|
|
|
178
214
|
- Delivery status
|
|
179
215
|
- Tracking information (when available)
|
|
180
216
|
|
|
217
|
+
### Finding the Right Product
|
|
218
|
+
|
|
219
|
+
When the user doesn't provide an ASIN:
|
|
220
|
+
|
|
221
|
+
1. **Search Amazon first** - Use web search to find the product: `"[product name] site:amazon.com"`
|
|
222
|
+
2. **Extract the ASIN** - Look for the 10-character alphanumeric code (e.g., B08P5H1FLX) in the URL
|
|
223
|
+
3. **Confirm with user** - Show the product name, price estimate, and ask for confirmation
|
|
224
|
+
4. **Then purchase** - Only call `crossmint_buy` after user confirms the correct product
|
|
225
|
+
|
|
226
|
+
**Example:**
|
|
227
|
+
```
|
|
228
|
+
User: "Buy me Celsius energy drinks"
|
|
229
|
+
Agent: Let me search Amazon for Celsius energy drinks...
|
|
230
|
+
[searches "Celsius energy drink site:amazon.com"]
|
|
231
|
+
I found: "CELSIUS Sparkling Orange Fitness Drink (12-pack)" - ASIN: B08P5H1FLX
|
|
232
|
+
Is this what you want? (Yes/No, or tell me a different product)
|
|
233
|
+
User: "Yes"
|
|
234
|
+
Agent: [calls crossmint_buy with B08P5H1FLX]
|
|
235
|
+
```
|
|
236
|
+
|
|
181
237
|
### Amazon Product Locator Formats
|
|
182
238
|
|
|
183
239
|
All of these formats work:
|
|
@@ -319,6 +375,30 @@ Agent:
|
|
|
319
375
|
3. For devnet testing, use Solana faucets to get test SOL
|
|
320
376
|
```
|
|
321
377
|
|
|
378
|
+
### "Wrong product was purchased"
|
|
379
|
+
|
|
380
|
+
The product title doesn't match what the user requested.
|
|
381
|
+
|
|
382
|
+
**Prevention:**
|
|
383
|
+
1. Always search for the correct ASIN before purchasing
|
|
384
|
+
2. Confirm the product with the user before calling `crossmint_buy`
|
|
385
|
+
3. After purchase, compare the product title in the response with user's request
|
|
386
|
+
|
|
387
|
+
**If it happens:**
|
|
388
|
+
```
|
|
389
|
+
Agent:
|
|
390
|
+
⚠️ I notice the product purchased doesn't match your request.
|
|
391
|
+
|
|
392
|
+
You asked for: "Celsius Energy Drink"
|
|
393
|
+
Product purchased: "USB Cable Organizer" (Order ID: xxx)
|
|
394
|
+
|
|
395
|
+
Unfortunately, the payment has already been processed. You may need to:
|
|
396
|
+
1. Contact Crossmint support to request a cancellation/refund
|
|
397
|
+
2. Wait for delivery and return the item
|
|
398
|
+
|
|
399
|
+
I apologize for this error. In the future, I'll confirm the exact product with you before purchasing.
|
|
400
|
+
```
|
|
401
|
+
|
|
322
402
|
### "Order created but no serialized transaction returned"
|
|
323
403
|
|
|
324
404
|
The order was created but payment couldn't be prepared. This usually means:
|
|
@@ -348,12 +428,15 @@ Agent:
|
|
|
348
428
|
|
|
349
429
|
## Best Practices
|
|
350
430
|
|
|
351
|
-
1. **
|
|
352
|
-
2. **
|
|
353
|
-
3. **
|
|
354
|
-
4. **
|
|
355
|
-
5. **
|
|
356
|
-
6. **
|
|
431
|
+
1. **ALWAYS validate products before purchasing** - Never buy without confirming the product matches user intent
|
|
432
|
+
2. **Search Amazon first for vague requests** - If user says "buy X" without an ASIN, search for the correct product first
|
|
433
|
+
3. **Confirm product title after purchase** - Check that the returned product title matches what was requested
|
|
434
|
+
4. **Always check balance before purchasing** - Avoid failed transactions due to insufficient funds
|
|
435
|
+
5. **Confirm shipping address with user** - Double-check addresses for Amazon purchases
|
|
436
|
+
6. **Get devnet tokens for testing** - Use Solana devnet faucets to get test SOL before trying purchases
|
|
437
|
+
7. **One wallet per agent** - Each agent ID gets its own keypair and wallet
|
|
438
|
+
8. **Save the order ID** - Users should note the order ID to track delivery status later
|
|
439
|
+
9. **Verify on-chain** - The explorer link lets users verify the payment transaction on Solana
|
|
357
440
|
|
|
358
441
|
## Supported Currencies
|
|
359
442
|
|