@heyamiko/amiko-cli 0.5.11 → 0.5.13

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 (2) hide show
  1. package/dist/index.js +11 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -75660,14 +75660,15 @@ function registerSwapCommand(program2) {
75660
75660
  try {
75661
75661
  const config2 = loadConfig();
75662
75662
  const auth = resolveAuth(config2);
75663
- const solanaAgentWallet = config2.agentWallets?.find((w5) => w5.chain === "solana" && w5.source === "agent")?.address;
75664
- const wallet = opts.wallet || config2.wallet || solanaAgentWallet;
75665
- if (!wallet) {
75666
- console.error(error("No Solana wallet found. Provide --wallet or run: amiko connect"));
75663
+ if (auth.mode === "none") {
75664
+ console.error(error("Not connected. Set up .amiko.json or run: amiko connect"));
75667
75665
  process.exit(1);
75668
75666
  }
75669
- if (auth.mode === "none") {
75670
- console.error(error("Not connected. Run: amiko connect"));
75667
+ const allWallets = auth.agentWallets || config2.agentWallets || [];
75668
+ const solanaAgentWallet = allWallets.find((w5) => w5.chain === "solana")?.address;
75669
+ const wallet = opts.wallet || solanaAgentWallet || config2.wallet;
75670
+ if (!wallet) {
75671
+ console.error(error("No Solana wallet found. Provide --wallet <address>"));
75671
75672
  process.exit(1);
75672
75673
  }
75673
75674
  const input = resolveToken(fromToken);
@@ -75709,11 +75710,11 @@ function registerSwapCommand(program2) {
75709
75710
  }
75710
75711
  }
75711
75712
  const swapSpinner = ora("Executing swap via Crossmint...").start();
75712
- const billingToken = auth.platformKey || auth.privyToken;
75713
- const billingBase2 = auth.billingBase;
75714
- if (!billingBase2 || !billingToken) {
75713
+ const billingToken = auth.platformKey || auth.twinToken || auth.privyToken;
75714
+ const billingBase2 = auth.billingBase || "https://billing.heyamiko.com";
75715
+ if (!billingToken) {
75715
75716
  swapSpinner.stop();
75716
- console.error(error("No billing credentials. Run: amiko connect"));
75717
+ console.error(error("No auth token available for swap"));
75717
75718
  process.exit(1);
75718
75719
  }
75719
75720
  const swapRes = await fetch(`${billingBase2}/api/crossmint/wallets/${encodeURIComponent(wallet)}/swap`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyamiko/amiko-cli",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
5
5
  "type": "module",
6
6
  "bin": {