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?

1
  • Probably wouldn't be that hard to test to find out the issue. You can also use the API tool for testing. ripple.com/tools/api/#submit
    – lid
    Jul 18, 2014 at 23:22

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.