back to methods summary

The getSpendKeys method returns your spend keys.

  • The spendPublicKey is a “View Only” key, you can't do any transaction with a spendPublicKey only.
  • The spendSecretKey is a “Full” key, you can generate any transaction with a spendSecretKey.

Input :

ArgumentMandatoryDescriptionFormatExample
addressYesValid and existing address in containerstring ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j

Output :

ArgumentDescriptionFormatExample
spendSecretKeyPrivate spend keystringefbc77f9da0df26c818b34c2e9a0bdc7a404403e74d94b5ce06604a9154d1360
spendPublicKeyPublic spend keystring82ba95954959d01497d5aa2269408830e39401f55b9c179feaffd50564caa00e

Input Example:

{  
  "params":{  
    "address":"ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j"
    },
    "jsonrpc":"2.0",
    "id":"test",
    "method":"getSpendKeys"
}

$ curl -s -X POST -d '{"params":{"address":"ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j"},"jsonrpc":"2.0","id":"test","method":"getSpendKeys"}' localhost:14101/json_rpc | jq

Return example:

{
  "id": "test",
  "jsonrpc": "2.0",
  "result": {
    "spendPublicKey": "efbc77f9da0df26c818b34c2e9a0bdc7a404403e74d94b5ce06604a9154d1360",
    "spendSecretKey": "82ba95954959d01497d5aa2269408830e39401f55b9c179feaffd50564caa00e"
  }
}

back to methods summary