@heyamiko/amiko-cli 0.5.9 → 0.5.10
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 +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75295,7 +75295,7 @@ function registerCreditsCommand(program2) {
|
|
|
75295
75295
|
}
|
|
75296
75296
|
}
|
|
75297
75297
|
const agentWallets = (auth.agentWallets || []).filter((w5) => w5.source === "agent");
|
|
75298
|
-
if (agentWallets.length > 0 && auth.billingBase) {
|
|
75298
|
+
if (agentWallets.length > 0 && (auth.billingBase || "https://billing.heyamiko.com")) {
|
|
75299
75299
|
const spinner3 = ora("Fetching wallet balances...").start();
|
|
75300
75300
|
const billingAuth = auth.platformKey || auth.twinToken || auth.privyToken;
|
|
75301
75301
|
try {
|
|
@@ -75317,7 +75317,7 @@ function registerCreditsCommand(program2) {
|
|
|
75317
75317
|
continue;
|
|
75318
75318
|
}
|
|
75319
75319
|
try {
|
|
75320
|
-
const balRes = await fetch(`${auth.billingBase}/api/crossmint/wallets/${encodeURIComponent(addr)}/balance?chain=${chain}`, {
|
|
75320
|
+
const balRes = await fetch(`${auth.billingBase || "https://billing.heyamiko.com"}/api/crossmint/wallets/${encodeURIComponent(addr)}/balance?chain=${chain}`, {
|
|
75321
75321
|
headers: {
|
|
75322
75322
|
Authorization: `Bearer ${billingAuth}`
|
|
75323
75323
|
}
|
|
@@ -75362,7 +75362,8 @@ function registerCreditsCommand(program2) {
|
|
|
75362
75362
|
console.error(error("Not connected"));
|
|
75363
75363
|
process.exit(1);
|
|
75364
75364
|
}
|
|
75365
|
-
|
|
75365
|
+
const billingBase2 = auth.billingBase || "https://billing.heyamiko.com";
|
|
75366
|
+
if (!billingBase2) {
|
|
75366
75367
|
spinner.stop();
|
|
75367
75368
|
console.error(error("Billing service not configured. Run: amiko connect"));
|
|
75368
75369
|
process.exit(1);
|
|
@@ -75456,7 +75457,7 @@ function registerCreditsCommand(program2) {
|
|
|
75456
75457
|
}
|
|
75457
75458
|
const TREASURY = "FPiZAf3jEnNfCwfvbv46jdPfHbmSepD4Q6iHiLJDQXvb";
|
|
75458
75459
|
const spinner3 = ora("Transferring tokens to treasury...").start();
|
|
75459
|
-
const transferRes = await fetch(`${auth.billingBase}/api/crossmint/wallets/${encodeURIComponent(walletAddr)}/transfer`, {
|
|
75460
|
+
const transferRes = await fetch(`${auth.billingBase || "https://billing.heyamiko.com"}/api/crossmint/wallets/${encodeURIComponent(walletAddr)}/transfer`, {
|
|
75460
75461
|
method: "POST",
|
|
75461
75462
|
headers: authHeaders2,
|
|
75462
75463
|
body: JSON.stringify({
|
|
@@ -75501,7 +75502,7 @@ function registerCreditsCommand(program2) {
|
|
|
75501
75502
|
process.exit(0);
|
|
75502
75503
|
}
|
|
75503
75504
|
const spinner4 = ora("Verifying and crediting...").start();
|
|
75504
|
-
const verifyRes = await fetch(`${auth.billingBase}/api/user/keys/${keyId}/topup/wallet`, {
|
|
75505
|
+
const verifyRes = await fetch(`${auth.billingBase || "https://billing.heyamiko.com"}/api/user/keys/${keyId}/topup/wallet`, {
|
|
75505
75506
|
method: "POST",
|
|
75506
75507
|
headers: authHeaders2,
|
|
75507
75508
|
body: JSON.stringify({
|