Ripple - how to properly set flags?

0

At the moment I'm trying to add flags to my custom Ripple transactions that I submit through JSON RPC. However, when I send my request:

{  
   "id":1,
   "method":"sign",
   "params":[  
      {  
         "secret":"sxxxxxxxxxxxxxxxxxxxxx",
         "tx_json":{  
            "Account":"rfESTMcbvbvCBqU1FTvGWiJP8cmUSu4GKg",
            "Amount":"31000000",
            "Destination":"rUD9V5kvnCpwN9HbZQqCwziMv3vtGgswZF",
            "Flags":2.147483648e+09,
            "LastLedgerSequence":7824714,
            "Sequence":63166,
            "TransactionType":"Payment"
         }
      }
   ]
}

I get such responses:

{  
   "result":{  
      "error":"invalidParams",
      "error_code":27,
      "error_message":"Field 'tx_json.Flags' has bad type.",
      "request":{  
         "command":"sign",
         "secret":"sxxxxxxxxxxxxxxxxxxxxx",
         "tx_json":{  
            "Account":"rfESTMcbvbvCBqU1FTvGWiJP8cmUSu4GKg",
            "Amount":"31000000",
            "Destination":"rUD9V5kvnCpwN9HbZQqCwziMv3vtGgswZF",
            "Flags":2147483648,
            "LastLedgerSequence":7824714,
            "Sequence":63166,
            "TransactionType":"Payment"
         }
      },
      "status":"error"
   }
}

Indicating that Flags is a bad type. Is it due to Flags in my request being sent in a float format (even though the response properly interprets it), or is it something else?

ThePiachu

Posted 2014-07-18T20:38:35.433

Reputation: 41 594

Probably wouldn't be that hard to test to find out the issue. You can also use the API tool for testing. https://ripple.com/tools/api/#submit

lid 2014-07-18T23:22:07.840

Answers

2

The error message explains the program. The Flags field has a bad type -- it must be a JSON integer.

David Schwartz

Posted 2014-07-18T20:38:35.433

Reputation: 46 931