createandsendtransaction RPC Query

Hello I just wanted to confirm the parameters required for this RPC

  1. private key (this is the private key of the wallet that is sending prvs?)
  2. payment address (ie incognito address of the receiving wallet or wallets?)
  3. amount of prv (prv amount that we are transferring to the payment address ie receiving wallet)
    Are these parameters correct? Is there any other parameter needed?

Please find the screenshot below
In the above screenshot, the very first parameter is the private key of the wallet that is sending the prvs, followed by payment addresses ie the incognito address of receiving wallets, and the respective prv amount that we want to transfer, is that correct? @Gaurav_Saini @sid

I believe the parameters are correct. For simple PRV transfer, these parameters are sufficient.


Hello Daniel
So we tried to execute the “createandsendtransaction” RPC so that we could transfer prvs from one wallet to other
Let us call them Wallet A and Wallet B
The parameters used were privatekey of wallet A and incognito address of wallet B and the amount of prvs, I want to transfer

We got an error “cannot create tx”. It says “OTA key not synced and cannot get output coin”
Does that mean OTA Key of the wallet from which we are transferring prvs has to be submitted to the full node before using this rpc?
Please find the attached screenshot
createandsendtransaction_cannot create tx_error

This error indicates that the OTA of the sender (i.e, the first param) has not been submitted to the full-node. So you need to do the submission before querying balances or sending funds.

1 Like