INTERNAL_WALLET_ERROR using json RPC Wallet API

General discussion of CryptoNote based currencies and issues.

INTERNAL_WALLET_ERROR using json RPC Wallet API

Postby DATAFLEX » Wed May 04, 2016 2:36 pm

Hello
I have one INTERNAL_WALLET_ERROR when trying to send a transaction using Wallet RPC json API
I already implemented others functions that allow me to create wallet, address, read the list of address, delete address, read blockhash etc.. but currently I have a problem with maybe most important API
The error is generic so I cannot understand the reason of it
I show you the Input parameters I send for method sendTransaction

Code: Select all
{  "params" : {"anonymity" : 1 , "fee" : 1000000, "unlockTime" : 0, "paymentId" : "X",  "addresses" : [ [b]"here the external address sender"[/b]] , "transfers" : [{  "amount" : 1000000000 , "address" : [b]"here the address within the Wallet container[/b]" } ], "changeAddress" : ""  } ,  "jsonrpc": "2.0", "id" : "myid" , "method" :"sendTransaction" } 


what I receve back is

Code: Select all
{"error":{"code":-32000,"data":{"application_code":5},"message":"Internal error occurred"},"id":"myid","jsonrpc":"2.0"}


apparently the Input parameters are corrects.
the first address is a generic address not included on wallet address and with that I want to send 10Coins (10*100000000) with 0,01 fee (1000000) to one address that it is included on my open Wallet container addresses.

the error is generic so I don't know what I doing wrong on my input parameters.

maybe need to set the Keys before to send transaction within the Wallet? or init the container in some way before send transaction. Using the esternal Wallet gui I can send coins to that address within container wallet without problems

looking the walletd log there is this message for each try I did
Error while sending transaction: Couldn't add payment id to extra


hope someone can help to understand
regards
User avatar
DATAFLEX
 
Posts: 26
Joined: Fri Nov 20, 2015 5:00 pm
Location: italy

Re: INTERNAL_WALLET_ERROR using json RPC Wallet API

Postby DATAFLEX » Thu May 05, 2016 12:16 pm

i solved the problem, for who can be interested here is how

here I are the input jason parameters that work to send a transaction using WALLETD payments

Code: Select all
     "Content-Type"  "application/json" to iOK

  ( '{  "params" : {"anonymity" : 1 , "fee" : 100000, "unlockTime" : 0, "paymentId" : "852adfb2894f72d204926ced238fbe085885e862c5b394f910242f675a859c71",  "addresses" : [ "%youraddresscoinwallet%"] , "transfers" : [{  "amount" : 20000000000 , "address" : "%coinwalletaddressthatrecievemoney%" } ], "changeAddress" : ""  } ,  "jsonrpc": "2.0", "id" : "myid" , "method" :"sendTransaction" }  ') 
User avatar
DATAFLEX
 
Posts: 26
Joined: Fri Nov 20, 2015 5:00 pm
Location: italy


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest