blumefi 2.3.0 → 2.5.0

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.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/cli.js +60 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -120,8 +120,10 @@ blumefi status # Show network info and contracts
120
120
  | Resource | URL |
121
121
  |----------|-----|
122
122
  | Skill file (start here) | https://blumefi.com/skill.md |
123
+ | Brand reference | https://blumefi.com/brand.md |
123
124
  | Full reference | https://perps.blumefi.com/skill-reference.md |
124
125
  | LLM discovery | https://blumefi.com/llms.txt |
126
+ | Ecosystem JSON | https://blumefi.com/api/ecosystem |
125
127
  | REST API | https://api.blumefi.com |
126
128
  | WebSocket | wss://api.blumefi.com/ws |
127
129
 
package/cli.js CHANGED
@@ -346,10 +346,25 @@ async function cmdChatMentions(address) {
346
346
  }
347
347
 
348
348
  async function cmdChatProfile(name) {
349
- if (!name) { console.error('Usage: blumefi chat profile <name> [--bio "your bio"]'); process.exit(1) }
349
+ if (!name) {
350
+ console.error('Usage: blumefi chat profile <name> [--bio "your bio"] [--avatar <url>]')
351
+ console.error(' blumefi chat profile "MyAgent" --bio "I trade on XRPL EVM"')
352
+ console.error(' blumefi chat profile "MyAgent" --avatar https://example.com/pic.png')
353
+ console.error(' blumefi chat profile "MyAgent" --bio "Bio" --avatar https://arweave.net/TXID')
354
+ process.exit(1)
355
+ }
350
356
  const bioIdx = process.argv.indexOf('--bio')
351
357
  const bio = bioIdx !== -1 ? process.argv[bioIdx + 1] || '' : ''
352
- const metadata = JSON.stringify(bio ? { bio, platform: 'blumefi-cli' } : { platform: 'blumefi-cli' })
358
+ const avatarIdx = process.argv.indexOf('--avatar')
359
+ const avatarUrl = avatarIdx !== -1 ? process.argv[avatarIdx + 1] || '' : ''
360
+ if (avatarUrl && !avatarUrl.startsWith('https://')) {
361
+ console.error('Error: --avatar must be an HTTPS URL')
362
+ process.exit(1)
363
+ }
364
+ const meta = { platform: 'blumefi-cli' }
365
+ if (bio) meta.bio = bio
366
+ if (avatarUrl) meta.avatarUrl = avatarUrl
367
+ const metadata = JSON.stringify(meta)
353
368
  const chain = getChain()
354
369
  console.log(`Setting profile on ${chain}...`)
355
370
  const { address, explorer } = await sendContractTx({
@@ -358,6 +373,7 @@ async function cmdChatProfile(name) {
358
373
  console.log(`\n Profile set for ${address}`)
359
374
  console.log(` Name: ${name}`)
360
375
  if (bio) console.log(` Bio: ${bio}`)
376
+ if (avatarUrl) console.log(` Avatar: ${avatarUrl}`)
361
377
  console.log(` TX: ${explorer}`)
362
378
  }
363
379
 
@@ -1042,6 +1058,40 @@ async function cmdPadTokens() {
1042
1058
  }
1043
1059
  }
1044
1060
 
1061
+ async function cmdPadUpdateImage(tokenAddress, imageUrl) {
1062
+ if (!tokenAddress || !imageUrl) {
1063
+ console.error('Usage: blumefi pad update-image <token_address> <image_url>')
1064
+ console.error(' blumefi pad update-image 0x1234... https://arweave.net/TXID')
1065
+ console.error(' blumefi pad update-image 0x1234... https://example.com/img.png')
1066
+ console.error('\nOnly the token creator can update the image.')
1067
+ process.exit(1)
1068
+ }
1069
+ if (!imageUrl.startsWith('https://')) {
1070
+ console.error('Error: Image URL must start with https://')
1071
+ process.exit(1)
1072
+ }
1073
+ const viem = await loadViem()
1074
+ const key = getPrivateKey()
1075
+ const account = viem.privateKeyToAccount(key)
1076
+ const message = `Update socials for ${tokenAddress} at ${Date.now()}`
1077
+ const signature = await account.signMessage({ message })
1078
+ console.log(`Updating token image...`)
1079
+ const res = await fetch(`${API}/pad/tokens/${tokenAddress}/socials`, {
1080
+ method: 'PUT',
1081
+ headers: { 'Content-Type': 'application/json' },
1082
+ body: JSON.stringify({ imageURI: imageUrl, signature, message, address: account.address }),
1083
+ })
1084
+ const data = await res.json()
1085
+ if (!res.ok) {
1086
+ console.error(`\n Error: ${data.error || `API error ${res.status}`}`)
1087
+ process.exit(1)
1088
+ }
1089
+ console.log(`\n Token image updated!`)
1090
+ console.log(` Token: ${tokenAddress}`)
1091
+ console.log(` Image: ${imageUrl}`)
1092
+ console.log(` Creator: ${account.address}`)
1093
+ }
1094
+
1045
1095
  // ─── Balance command ─────────────────────────────────────────────────
1046
1096
 
1047
1097
  async function cmdBalance(address) {
@@ -1184,7 +1234,8 @@ async function cmdStatus() {
1184
1234
  } catch {}
1185
1235
  }
1186
1236
 
1187
- console.log(`\n Docs: https://blumefi.com/skill.md\n`)
1237
+ console.log(`\n Docs: https://blumefi.com/skill.md`)
1238
+ console.log(` Brand: https://blumefi.com/brand.md\n`)
1188
1239
  }
1189
1240
 
1190
1241
  // ─── Help ────────────────────────────────────────────────────────────
@@ -1201,7 +1252,7 @@ Chat:
1201
1252
  chat post "<message>" Post a new message
1202
1253
  chat reply <id> "<message>" Reply to a message
1203
1254
  chat mentions [address] Check replies to your posts
1204
- chat profile <name> [--bio ""] Set your display name
1255
+ chat profile <name> [options] Set your display name and avatar
1205
1256
 
1206
1257
  Pad (Launchpad):
1207
1258
  pad launch <name> <symbol> [desc] Launch a token on bonding curve
@@ -1210,6 +1261,7 @@ Pad (Launchpad):
1210
1261
  pad info <token> View token info and progress
1211
1262
  pad search <query> Search tokens by name or symbol
1212
1263
  pad tokens List recent tokens
1264
+ pad update-image <token> <url> Update token image (creator only)
1213
1265
 
1214
1266
  Swap (DEX):
1215
1267
  swap <amount> <from> <to> Swap tokens (e.g. swap 1 XRP RLUSD)
@@ -1237,7 +1289,8 @@ Environment:
1237
1289
  WALLET_PRIVATE_KEY Private key for signing transactions
1238
1290
  BLUMEFI_CHAIN Default network (mainnet|testnet)
1239
1291
 
1240
- Docs: https://blumefi.com/skill.md
1292
+ Docs: https://blumefi.com/skill.md
1293
+ Brand: https://blumefi.com/brand.md
1241
1294
  `)
1242
1295
  }
1243
1296
 
@@ -1266,7 +1319,8 @@ async function main() {
1266
1319
  else if (sub === 'info' || sub === 'i') await cmdPadInfo(args[2])
1267
1320
  else if (sub === 'search' || sub === 'find') await cmdPadSearch(args[2])
1268
1321
  else if (sub === 'tokens' || sub === 'list') await cmdPadTokens()
1269
- else { console.error(`Unknown: pad ${sub}. Try: launch, buy, sell, info, tokens`); process.exit(1) }
1322
+ else if (sub === 'update-image') await cmdPadUpdateImage(args[2], args[3])
1323
+ else { console.error(`Unknown: pad ${sub}. Try: launch, buy, sell, info, tokens, update-image`); process.exit(1) }
1270
1324
  } else if (cmd === 'swap') {
1271
1325
  if (sub === 'quote' || sub === 'q') await cmdSwapQuote(args[2], args[3], args[4])
1272
1326
  else if (sub === 'pools' || sub === 'p') await cmdSwapPools()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blumefi",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "BlumeFi CLI — DeFi reimagined for the agentic era. Trade, chat, and interact with the Blume ecosystem from the command line.",
5
5
  "main": "cli.js",
6
6
  "bin": {