[CLI Feature] TXs List

Add a feature to make a request for all transactions of specific address, something like coda client get-list -address PUBLICKEY

This sounds like a privacy nightmare (I appreciate Coda doesn’t claim to offer privacy). Still, this is really interesting as brings up a lot of questions - I’m guessing if this was stored locally it’s going to have a dramatic effect on storage and if this is produced “on demand” would put a huge strain on archive nodes?

Getting your own transactions i.e. from a known private key seems the next logical step but I notice that the CLI doesn’t have a wallet feature. How are the Receipt-chain-hashes stored on the client for example? Presumably this transaction level stuff is going to be implemented by a front-end wallet vs. the CLI (as in transaction data will be persisted by the front-end client?)

So digging a little deeper here it seems this is possible via the GraphQL API via:

blocks(filter: {relatedTo: public_key}) {
    # return the transactions related to this public key e.g.
    nodes {
      transactions {
        userCommands {
          id
          from
          to
          amount
          fee
          memo
        }
      }
}

I guess this could only run against a node running in archive mode though as from my (limited) understanding normal nodes don’t persist this data.

1 Like

And actually there is a command to Retrieve all the user commands sent by a public key so I guess your initial suggestion would actually be relatively simple to implement.

{
  pooledUserCommands(publicKey: "tNciPrpmzWhLGyXGinWUoBNbRUT4na1m55Qc5sqz7BB2oNSWzkzj3MGFThNfFXvZvH3grZanj4smMvDmgS26Echn64BjLUqNDQRz7sseUr7VieBqmjCLQZRzTvNjP6UGTbLG94GhGBiEbZ") {
    id
    isDelegation
    nonce
    from
    to
    amount
    fee
    memo
  }
}

Edit: turns out the docs were wrong on this one and this command is only for pending transactions. The filtered blocks method above would work though.

2 Likes