Skip to content

Fix help text for 'z_getencryptionaddress'#603

Merged
miketout merged 1 commit intoVerusCoin:masterfrom
who-biz:helptext-getencryptionaddress
Jul 16, 2025
Merged

Fix help text for 'z_getencryptionaddress'#603
miketout merged 1 commit intoVerusCoin:masterfrom
who-biz:helptext-getencryptionaddress

Conversation

@who-biz
Copy link
Copy Markdown

@who-biz who-biz commented Jun 22, 2025

  • Currently this RPC is not documented in help text
  • Help text incorrectly shows a 'z_generateencryptionkey', which does not actually exist

Steps to reproduce:

  1. ./src/verus help shows:
  1. But, calling ./src/verus help z_generateencryptionkey yields:
help: unknown command: z_generateencryptionkey
  1. Further, ./src/verus help z_getencryptionaddress output is also incorrect:
z_generateencryptionkey '{("address":"zaddress present in wallet" | "seed":"wallet seed for address", "hdindex":n - address to derive from seed | "rootkey":"extended private key"),
                          "fromid":"id@ or i-address",
                          "toid":"id@ or i-address",
                          "returnsecret": true | false}'

Returns z-address, viewing key, and optionally an extended secret key.

Arguments:
   "address"          (string, optional) z-address that is present in this wallet
   "seed"             (string, optional) raw wallet seed
   "hdindex"          (number, optional) address to derive from seed (default=0)
   "rootkey"          (string, optional) extended private key
   "fromid"           (string, optional) a key to be used between the fromid and the toid
   "toid"             (string, optional) a key to be used between the fromid and the toid
   "encryptionindex"  (number, optional) can be used as an index to derive the final encryption HD address from the derived seed (default=0)
   "returnsecret"     (bool, optional) if true, returns extended private key - defaults to false


Result:
{
  "extendedviewingkey" : "evk",            (string) "sapling" extended viewing key
  "address" : "encryptionaddress",         (string) The encryption address derived
  "extendedspendingkey" : "encryptionaddress", (string) Spending key for the address, if requested
}

Examples:

Example1 description
> verus z_generateencryptionkey '{"address":"localzaddress","fromid":"bob@","toid":"alice@"}

Example2 description
> verus z_generateencryptionkey '{"address":"localzaddress","fromid":"bob@","toid":"alice@"}

Example3 description
> verus z_generateencryptionkey '{"address":"localzaddress","fromid":"bob@","toid":"alice@"}

Example4 description
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "z_generateencryptionkey", "params": ['{"address":"localzaddress","fromid":"bob@","toid":"alice@"}] }' -H 'content-type: text/plain;' http://127.0.0.1:27486/

- Currently this RPC is not documented in help text
- Help text incorrectly shows a 'z_generateencyrptionkey', which does not actually exist
@miketout miketout merged commit 86904af into VerusCoin:master Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants