@countersign-hub/cli 0.1.1 → 0.1.2
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/bin.js +18 -3
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -61296,6 +61296,20 @@ var init_payer2 = __esm(() => {
|
|
|
61296
61296
|
init_known_rails();
|
|
61297
61297
|
});
|
|
61298
61298
|
|
|
61299
|
+
// packages/buyer/src/price-label.ts
|
|
61300
|
+
function railToken(rail2) {
|
|
61301
|
+
return RAIL_TOKENS[rail2] ?? "USDC";
|
|
61302
|
+
}
|
|
61303
|
+
function priceLabel(price, rails) {
|
|
61304
|
+
const tokens = [...new Set(rails.map(railToken))];
|
|
61305
|
+
return `${formatUnits3(BigInt(price), 6)} ${(tokens.length > 0 ? tokens : ["USDC"]).join("/")}`;
|
|
61306
|
+
}
|
|
61307
|
+
var RAIL_TOKENS;
|
|
61308
|
+
var init_price_label = __esm(() => {
|
|
61309
|
+
init__esm();
|
|
61310
|
+
RAIL_TOKENS = { whitechain: "USDT" };
|
|
61311
|
+
});
|
|
61312
|
+
|
|
61299
61313
|
// packages/buyer/src/remote-signer.ts
|
|
61300
61314
|
function assertHubOrigin(hub) {
|
|
61301
61315
|
let url2;
|
|
@@ -61981,7 +61995,7 @@ async function main2() {
|
|
|
61981
61995
|
console.log(`${page.items.length} of ${page.total} listed, ${payable} payable by this agent.`);
|
|
61982
61996
|
} else if (cmd === "discover") {
|
|
61983
61997
|
for (const l of await hub.listOffers()) {
|
|
61984
|
-
console.log([l.offerHash.slice(0, 10), l.offer.title,
|
|
61998
|
+
console.log([l.offerHash.slice(0, 10), l.offer.title, priceLabel(l.offer.price, l.offer.rails), l.offer.rails.join(","), l.online ? "online" : "offline"].join(" "));
|
|
61985
61999
|
}
|
|
61986
62000
|
} else if (cmd === "buy") {
|
|
61987
62001
|
const fromUrl = pos[1] !== undefined ? hubCallOf(pos[1]) : undefined;
|
|
@@ -62147,6 +62161,7 @@ var init_cli = __esm(() => {
|
|
|
62147
62161
|
init_mirror();
|
|
62148
62162
|
init_server();
|
|
62149
62163
|
init_payer2();
|
|
62164
|
+
init_price_label();
|
|
62150
62165
|
init_remote_signer();
|
|
62151
62166
|
init_resume();
|
|
62152
62167
|
init_review();
|
|
@@ -67281,7 +67296,7 @@ async function defaultBalances(address) {
|
|
|
67281
67296
|
}
|
|
67282
67297
|
|
|
67283
67298
|
// packages/cli/src/cli.ts
|
|
67284
|
-
var VERSION = "0.1.
|
|
67299
|
+
var VERSION = "0.1.2";
|
|
67285
67300
|
var DEFAULT_HUB3 = "https://hub-production-e85e.up.railway.app";
|
|
67286
67301
|
var USAGE2 = `countersign ${VERSION}
|
|
67287
67302
|
|
|
@@ -67500,4 +67515,4 @@ run(process.argv.slice(2)).catch((error62) => {
|
|
|
67500
67515
|
process.exitCode = 1;
|
|
67501
67516
|
});
|
|
67502
67517
|
|
|
67503
|
-
//# debugId=
|
|
67518
|
+
//# debugId=2C47F561789D7EFC64756E2164756E21
|