Exporting transaction history to JSON/CSV from UFVK/seed

Problem: Exporting transaction history to JSON/CSV from UFVK/seed

I have several wallets. Zcashd let me export transactions from one of them, a wallet file. Good. I have several other wallets that have seed phrases, with a mix of transparent and shielded transactions. I have unified viewing keys for them. I can’t import any of these into zcashd. I can import them into apps like Zashi, Ywallet/Zkool, Zingo etc, but they all have really terrible export options - nowhere close to the information you get from zcashd, and also most often the transaction history is incomplete even though they are fully synced (Using Zashi as the benchmark here - it always shows all transactions, but the “tax” export in Zashi contains almost no information, not even txids). I could perhaps do zingo-cli up to a lightwalletd server, but then I have to expose my seed phrase to the cli-tool, and unified viewing keys are apparently not supported (yet?). I did spin up zebrad/zallet, but zallet is alpha stage, I did not get as far as to fetch transaction history via an rpc call. I also tried using viewing keys on cipherscan/zypherscan - did not work as intended. I experimented with the Zcash web wallet tool on testnet also, no success. I exported private data from Zashi and looked at the DB-file to see if I could extract meaningful transaction information from it, no success.

Knowing this background information: Does anyone have any other ideas on how to fetch and export detailed transaction histories (like zcashd) from wallets using unified viewing keys?

1 Like

zingo-cli does support viewkeys, see below

./zingo-cli --chain mainnet --server http://localhost:9067 --data-dir ~/ --viewkey uview1wvwrv... --birthday 121xxxx

Ps use a locally synced zebrad + lwd if your worried about seed phrase. IF really paranoid, create a new wallet after.

eZcash supports view keys as well, should be up to date though I cant access the source rigjt now

Zkool also supports view keys and exporting txs

also zcash-devtool wallet

1 Like

Zenith supports importing UFVKs. The RPC server can produce a JSON array of the transactions, here’s the OpenRPC

1 Like

As a full node, zcashd stores the complete tx down to the raw bytes. Wallets won’t go to this level of detail, therefore you should be more explicit about what you want to see.

Added an exportToJSON script for those who want a quick way to get a JSON from a viewkey or seed phrase using zingo-cli. May have a few bugs but have tested with a few of my accounts and its coming along :smile:

Still working on outgoing sapling and transparent but otherwise is complete.

Oy, amazing. I had completely missed that! Thank you. I also saw your script further down this thread, that might come in handy - thanks!

1 Like

Absolutely, I agree. From a wallet export function I would like to see almost everything that zingo-cli outputs: txid, datetime, kind (send/receive, memo etc), fee, any notes connected, to/from addresses

Most of this becomes easier one there are no “legacy” shielded pools in the mix, I guess. But as I commented to dismad just now I might get this done with zingo-cli using the viewkey import, so that’s good!

@dismad cool scripts
@snacks you can get this stuff from Zkool without programming using the GraphQL API. For instance:

query a {
  transactionsByAccount(idAccount: 1, height: 3000000) {
    account
    fee
    height
    id
    notes {
      address
      diversifier
      height
      memo
      pool
      scope
    }
    outputs {
      address
      id
      memo
      pool
      value
      vout
    }
    spends {
      address
      diversifier
      memo
      height
      pool
      scope
      value
      tx {
        txid
      }
    }
    time
    txid
    value
  }
}

will return a json like

{
  "data": {
    "transactionsByAccount": [
      {
        "account": 1,
        "fee": "0.00010000",
        "height": 3202525,
        "id": 146,
        "notes": [
          {
            "address": "u1kj28z8re9z96tsyt5lf9c8vwkztkrzsx2smd5fjr30nhwyeny93a7f0ql2r6kelk9wdx094v7xgk8mqjj0ljst9p5aucnjyzpsknkdpl",
            "diversifier": "de23d60b3a61a843d1843f",
            "height": 3202525,
            "memo": null,
            "pool": 2,
            "scope": 0
          }
        ],
        "outputs": [
          {
            "address": "u1xuawpx53gr67r5wsp4fvvfq64z9enpwuu8lgt8g5u0t77v0nk3m30zpps8feuxn8hss7td6kh4lk26y4hefsas5h9w3exaz45yw4f76c",
            "id": 83,
            "memo": null,
            "pool": 2,
            "value": "0",
            "vout": 1
          }
        ],
        "spends": [
          {
            "address": "u1kj28z8re9z96tsyt5lf9c8vwkztkrzsx2smd5fjr30nhwyeny93a7f0ql2r6kelk9wdx094v7xgk8mqjj0ljst9p5aucnjyzpsknkdpl",
            "diversifier": "de23d60b3a61a843d1843f",
            "memo": null,
            "height": 3202483,
            "pool": 2,
            "scope": 0,
            "value": "0.00350000",
            "tx": {
              "txid": "ae09430750c9b0e3bd579b4e56e60a0d552dc47742ee44b5bf657235eca6fc20"
            }
          }
        ],
        "time": "2026-01-12T19:00:35",
        "txid": "7db828e65cb7a6862b9ad6046e827dfe6a0d285459501b0711e4e89b6a047af3",
        "value": "-0.00010000"
      },
...
}
2 Likes