Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: williamj2543 on August 16, 2014, 07:37:40 PM



Title: Altcoin Daemon Problems
Post by: williamj2543 on August 16, 2014, 07:37:40 PM
Hello,
I am writing a automated scripts for people, and for both fluttercoin and dogecoin, sendfrom always returns an error and the script fails. I do the exact same call in the wallet, and it works, but when it is called from another source it doesn't work. It works for things like gettransaction, getinfo, listaccounts, stuff like that, but for sendfrom() it doesn't work. Reading the bitcoin API reference, it says that sendfrom requires an unlocked wallet, but the wallet doesn't have a password on it. Do I need to make a password and then at runtime do walletpassphrase? I know that for a blockchain rpc you need a second password and you need to do walletpassphrase(secondpassword) at runtime to be able to use locked calls.


Title: Re: Altcoin Daemon Problems
Post by: ethought on August 17, 2014, 01:39:15 AM
Hello,
I am writing a automated scripts for people, and for both fluttercoin and dogecoin, sendfrom always returns an error and the script fails. I do the exact same call in the wallet, and it works, but when it is called from another source it doesn't work. It works for things like gettransaction, getinfo, listaccounts, stuff like that, but for sendfrom() it doesn't work. Reading the bitcoin API reference, it says that sendfrom requires an unlocked wallet, but the wallet doesn't have a password on it. Do I need to make a password and then at runtime do walletpassphrase? I know that for a blockchain rpc you need a second password and you need to do walletpassphrase(secondpassword) at runtime to be able to use locked calls.

If the wallet does not have a wallet password used to encrypt your wallet.dat (as opposed to an rpcpassword which all wallet clients need) then you do not need to use walletpassphrase.

I would check your input carefully on you 'sendfrom' call. I have experienced problems from various languages when the rpc input was not exactly what the wallet client was expecting. For example make sure the <amount> input is actually a float etc.

Does 'sendtoaddress' work?


Title: Re: Altcoin Daemon Problems
Post by: williamj2543 on August 17, 2014, 02:57:06 AM
Hello,
I am writing a automated scripts for people, and for both fluttercoin and dogecoin, sendfrom always returns an error and the script fails. I do the exact same call in the wallet, and it works, but when it is called from another source it doesn't work. It works for things like gettransaction, getinfo, listaccounts, stuff like that, but for sendfrom() it doesn't work. Reading the bitcoin API reference, it says that sendfrom requires an unlocked wallet, but the wallet doesn't have a password on it. Do I need to make a password and then at runtime do walletpassphrase? I know that for a blockchain rpc you need a second password and you need to do walletpassphrase(secondpassword) at runtime to be able to use locked calls.

If the wallet does not have a wallet password used to encrypt your wallet.dat (as opposed to an rpcpassword which all wallet clients need) then you do not need to use walletpassphrase.

I would check your input carefully on you 'sendfrom' call. I have experienced problems from various languages when the rpc input was not exactly what the wallet client was expecting. For example make sure the <amount> input is actually a float etc.

Does 'sendtoaddress' work?
Im an idiot. I think it had to be a float. Json rpc client is trash cause it doesn't display an error code. Just can't connect which is misleading