Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to `@bankofai/sun-cli` are documented in this file. Format
All notable changes to `@sun-protocol/sun-cli` are documented in this file. Format
loosely follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this
project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Expand Down Expand Up @@ -88,7 +88,7 @@ All write commands go through `writeAction`: wallet check → signed summary →

### Companion release

[`sunpump-agent-skill`](https://github.com/BofAI/skills/tree/main/sunpump-agent-skill)
[`sunpump-agent-skill`](https://github.com/sun-protocol/skills/tree/main/sunpump-agent-skill)
**v1.2.0** ships in parallel — pins this CLI version, documents the new
`buy/sell/quote-*/state` commands as the pre-launch trade path with `sun swap`
as the post-launch path, and updates pre-validation checklists to enforce
Expand All @@ -97,6 +97,6 @@ as the post-launch path, and updates pre-validation checklists to enforce
Install:

```bash
npm install -g @bankofai/sun-cli@^1.2.0
npx skills add BofAI/skills
npm install -g @sun-protocol/sun-cli@^1.2.0
npx skills add sun-protocol/skills
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2026 BOA
Copyright (c) 2026 SUN Protocol

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

> A CLI for AI-driven and human-operated DeFi workflows on TRON via the **SUN.IO / SUNSWAP** ecosystem.

`@bankofai/sun-cli` connects your terminal, scripts, or AI agents to SUN.IO. Use it to **query** prices, pools, farms, and history; **quote** swap routes; and **execute** swaps, liquidity ops, and contract calls — all with machine-friendly output for automation.
`@sun-protocol/sun-cli` connects your terminal, scripts, or AI agents to SUN.IO. Use it to **query** prices, pools, farms, and history; **quote** swap routes; and **execute** swaps, liquidity ops, and contract calls — all with machine-friendly output for automation.

---

Expand Down Expand Up @@ -54,7 +54,7 @@
## Installation

```bash
npm install -g @bankofai/sun-cli
npm install -g @sun-protocol/sun-cli
```

Requires Node.js **20+**.
Expand Down
72 changes: 25 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bankofai/sun-cli",
"version": "1.2.1",
"name": "@sun-protocol/sun-cli",
"version": "1.2.2",
"description": "CLI tool for SUN.IO / SUNSWAP on TRON — for humans and AI agents",
"main": "dist/bin.js",
"type": "commonjs",
Expand Down Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@bankofai/agent-wallet": "^2.3.0",
"@bankofai/sun-kit": "^1.1.0",
"@sun-protocol/sun-kit": "^1.2.0",
"@scure/bip32": "^2.0.1",
"@scure/bip39": "^2.0.1",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/liquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
WTRX_MAINNET,
WTRX_NILE,
createReadonlyTronWeb,
} from '@bankofai/sun-kit'
} from '@sun-protocol/sun-kit'

const V2_ROUTERS: Record<string, string> = {
mainnet: SUNSWAP_V2_MAINNET_ROUTER,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getNetwork } from '../lib/context'
import { readApiAction } from '../lib/command'
import { formatUsd, formatPct, formatTime } from '../lib/output'
import { tryResolveTokenAddress } from '../lib/tokens'
import { TRX_ADDRESS, WTRX_MAINNET, WTRX_NILE } from '@bankofai/sun-kit'
import { TRX_ADDRESS, WTRX_MAINNET, WTRX_NILE } from '@sun-protocol/sun-kit'

function resolveTokenForPoolQuery(input: string | undefined, network: string): string | undefined {
if (!input) return undefined
Expand Down
10 changes: 4 additions & 6 deletions src/commands/sunpump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ const holderTable = {
return [
h.holderAddress ?? h.address ?? h.userAddress ?? '-',
h.holderType ?? '-',
h.decimals ? formatAmount(h.amount ?? h.balance, h.decimals) : fmtNum(h.balance ?? h.amount, 2),
h.decimals
? formatAmount(h.amount ?? h.balance, h.decimals)
: fmtNum(h.balance ?? h.amount, 2),
pct,
]
},
Expand Down Expand Up @@ -601,7 +603,6 @@ export function registerSunpumpCommands(program: Command) {
})
})


// -------------------------- launch (agent token launch) ------------------
sp.command('launch')
.description(
Expand Down Expand Up @@ -702,9 +703,7 @@ export function registerSunpumpCommands(program: Command) {

// -------------------------- trade (buy/sell/quote/state) -----------------
sp.command('state <tokenAddress>')
.description(
'Show SunPump token state (0 NOT_EXIST, 1 TRADING, 2 READY_TO_LAUNCH, 3 LAUNCHED)',
)
.description('Show SunPump token state (0 NOT_EXIST, 1 TRADING, 2 READY_TO_LAUNCH, 3 LAUNCHED)')
.action(async (tokenAddress: string) => {
try {
const network = getNetwork()
Expand Down Expand Up @@ -941,5 +940,4 @@ export function registerSunpumpCommands(program: Command) {
},
})
})

}
12 changes: 6 additions & 6 deletions src/lib/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Command helpers — eliminate boilerplate in write/read command handlers.
*/

import type { SunKit, SunAPI } from '@bankofai/sun-kit'
import type { SunKit, SunAPI } from '@sun-protocol/sun-kit'
import { getKit, getApi, ensureWallet } from './context'
import {
output,
Expand Down Expand Up @@ -188,16 +188,16 @@ export interface WriteActionOpts<T> {

export async function writeAction<T>(opts: WriteActionOpts<T>): Promise<void> {
try {
await ensureWallet()
const kit = await getKit()
const network =
typeof opts.summary.Network === 'string' ? String(opts.summary.Network) : undefined

if (_dryRun) {
output({ dryRun: true, action: opts.title, params: opts.summary })
return
}

await ensureWallet()
const kit = await getKit()
const network =
typeof opts.summary.Network === 'string' ? String(opts.summary.Network) : undefined

printSummary(opts.title, opts.summary)

const confirmed = await confirm(opts.confirmMsg)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Global application context — lazily initializes SunAPI, SunKit, and wallet.
*/

import { SunAPI, SunKit } from '@bankofai/sun-kit'
import { SunAPI, SunKit } from '@sun-protocol/sun-kit'
import { initWallet, getWallet, isWalletConfigured } from './wallet'

let _api: SunAPI | null = null
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Provides a unified way to resolve token symbols to addresses across all commands.
*/

import { TRX_ADDRESS, WTRX_MAINNET, WTRX_NILE } from '@bankofai/sun-kit'
import { TRX_ADDRESS, WTRX_MAINNET, WTRX_NILE } from '@sun-protocol/sun-kit'

export interface TokenInfo {
symbol: string
Expand Down
4 changes: 2 additions & 2 deletions src/lib/wallet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Wallet } from '@bankofai/sun-kit'
import { createReadonlyTronWeb } from '@bankofai/sun-kit'
import type { Wallet } from '@sun-protocol/sun-kit'
import { createReadonlyTronWeb } from '@sun-protocol/sun-kit'
import {
resolveWalletProvider,
type Wallet as BaseWallet,
Expand Down
2 changes: 0 additions & 2 deletions test/bin.test.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion test/bin.test.d.ts.map

This file was deleted.

106 changes: 0 additions & 106 deletions test/bin.test.js

This file was deleted.

1 change: 0 additions & 1 deletion test/bin.test.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions test/commands/registration.test.d.ts

This file was deleted.

Loading
Loading