zoa-wallet 0.2.6 → 0.2.7

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.mjs +37 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -48590,10 +48590,10 @@ var COLOR_PRESETS = [
48590
48590
  ];
48591
48591
  function registerWalletCommand(program2) {
48592
48592
  const wallet = program2.command("wallet").description("Manage multiple wallets");
48593
- wallet.command("list").description("List all wallets").action(async () => {
48593
+ wallet.command("list").description("List all wallets").option("--password <password>", "Wallet password (to resolve missing addresses)").action(async (opts) => {
48594
48594
  try {
48595
48595
  await migrateLegacyVaultIfNeeded();
48596
- const wallets = await getWallets();
48596
+ let wallets = await getWallets();
48597
48597
  const active = await getActiveWallet();
48598
48598
  if (wallets.length === 0) {
48599
48599
  output({ wallets: [] }, () => {
@@ -48601,6 +48601,38 @@ function registerWalletCommand(program2) {
48601
48601
  });
48602
48602
  return;
48603
48603
  }
48604
+ const walletsNeedingAddresses = wallets.filter((w) => !w.evmAddress || !w.solanaAddress);
48605
+ if (walletsNeedingAddresses.length > 0) {
48606
+ let password = opts.password;
48607
+ if (!password && !isJsonMode()) {
48608
+ const { pwd } = await inquirer7.prompt([{
48609
+ type: "password",
48610
+ name: "pwd",
48611
+ message: "Enter wallet password to resolve addresses:",
48612
+ mask: "*"
48613
+ }]);
48614
+ password = pwd;
48615
+ }
48616
+ if (password) {
48617
+ const storage = new FileStorage();
48618
+ for (const w of walletsNeedingAddresses) {
48619
+ try {
48620
+ const kr = createKeyring(storage, w.vaultKey);
48621
+ await kr.unlock(password);
48622
+ const accounts = kr.getAccounts();
48623
+ const first = accounts[0];
48624
+ if (first) {
48625
+ await updateWallet(w.id, {
48626
+ evmAddress: first.evmAddress,
48627
+ solanaAddress: first.solanaAddress
48628
+ });
48629
+ }
48630
+ } catch {
48631
+ }
48632
+ }
48633
+ wallets = await getWallets();
48634
+ }
48635
+ }
48604
48636
  output({
48605
48637
  wallets: wallets.map((w) => ({
48606
48638
  ...w,
@@ -49000,7 +49032,7 @@ var zoaGradient2 = gradient2([
49000
49032
  "#c77dff"
49001
49033
  ]);
49002
49034
  var subtleGradient = gradient2(["#6b7280", "#9ca3af", "#6b7280"]);
49003
- var VERSION = "0.2.6";
49035
+ var VERSION = "0.2.7";
49004
49036
  async function displayBanner() {
49005
49037
  const banner = figlet.textSync("ZOA-wallet", { font: "ANSI Shadow" });
49006
49038
  console.log();
@@ -49009,7 +49041,7 @@ async function displayBanner() {
49009
49041
  console.log(subtleGradient(tagline));
49010
49042
  console.log();
49011
49043
  const versionBadge = chalk4.bgHex("#5e60ce").white.bold(` v${VERSION} `);
49012
- const siteLink = chalk4.white("https://") + chalk4.hex("#ff6b35")("wallet") + chalk4.hex("#00bbf9")(".zoa.fun");
49044
+ const siteLink = chalk4.hex("#9ca3af")("https://") + chalk4.hex("#ff6b35")("wallet") + chalk4.hex("#00bbf9")(".zoa.fun");
49013
49045
  const npmBadge = chalk4.hex("#cb3837")("npm") + chalk4.hex("#6b7280")(" zoa-wallet");
49014
49046
  let walletIndicator = "";
49015
49047
  try {
@@ -49038,7 +49070,7 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
49038
49070
  }
49039
49071
  }
49040
49072
  });
49041
- program.name("zoa").description("ZOA Wallet \u2014 API-First Crypto Wallet for Power-traders, Developers, & AI Agents").version("0.2.6");
49073
+ program.name("zoa").description("ZOA Wallet \u2014 API-First Crypto Wallet for Power-traders, Developers, & AI Agents").version("0.2.7");
49042
49074
  registerInitCommand(program);
49043
49075
  registerBalanceCommand(program);
49044
49076
  registerSendCommand(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zoa-wallet",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "API-First Crypto Wallet CLI for Power-traders, Developers, & AI Agents. Manage multi-chain wallets from your terminal.",
5
5
  "type": "module",
6
6
  "license": "MIT",