How is the payment_id parameter passed in the transfer method


#1

JSON RPC Methods: transfer is available at Wallet RPC Documentation

The link address: Wallet RPC Documentation

The payment_id parameter is passed in the method as documented, but the payment_id value is always 0000000000000000 when viewing the transaction in the blockchain browse

I have tried the following way of passing parameters

Methods a:
{
“jsonrpc”: “2.0”,
“id”: “0”,
“method”: “transfer”,
“params”: {
“destinations”: [
{
“amount”: 10,
“address”: “xxxxxxxx”,
“payment_id”: “xxxxxxxxxx”,
}
],
“mixin”: 4,
“get_tx_key”: true,
“get_tx_hex”: false
}
}

Methods B:
{
“jsonrpc”: “2.0”,
“id”: “0”,
“method”: “transfer”,
“params”: {
“destinations”: [
{
“amount”: 10,
“address”: “xxxxxxxxxxxx”,
}
“payment_id”: “xxxxxxxxxx”,
],
“mixin”: 4,
“get_tx_key”: true,
“get_tx_hex”: false
}
}

But the payment_id parameter value is passed when electroneum-wallet-cliexecutes the transfer command, and the paymet_id value is the value I passed in when I view the transaction in the block browser


#2

Not confirmed but I think it would be:

{
“jsonrpc”: “2.0”,
“id”: “0”,
“method”: “transfer”,
“params”: {
“destinations”: [
{
“amount”: 10,
“address”: “xxxxxxxxxxxx”,
}
],
“payment_id”: “xxxxxxxxxx”,
“mixin”: 4,
“get_tx_key”: true,
“get_tx_hex”: false
}
}

A problem is that the ETN documentation seems derived from this:

But it does not save the structure of lists of the original one. The original one says amount and address are elements of destinations but payment_id is not.


#3

Thank you for your help. I have found the reason