BitShares Forum

Main => Stakeholder Proposals => Topic started by: monsterer on December 04, 2014, 06:56:09 pm

Title: how to withdraw delegate pay when amount is unknown? [RESOLVED]
Post by: monsterer on December 04, 2014, 06:56:09 pm
I'm trying to write a script to regularly withdraw pay from my delegate into an account not hosted on my server, for security reasons.

When I do wallet_account_balance I get 0.01 BTS, so I presume the delegate pay isn't listed this way?

wallet_delegate_withdraw_pay requires an amount, but there doesn't appear to be any way to know what the total is. What am I missing?
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: vikram on December 04, 2014, 07:15:33 pm
I'm trying to write a script to regularly withdraw pay from my delegate into an account not hosted on my server, for security reasons.

When I do wallet_account_balance I get 0.01 BTS, so I presume the delegate pay isn't listed this way?

wallet_delegate_withdraw_pay requires an amount, but there doesn't appear to be any way to know what the total is. What am I missing?

Use "wallet_get_account <your_delegate_name>" and you will see the available pay that can be withdrawn.

This should not be a problem after the next hardforking release, which will allow you specify a different key that can produce blocks (and publish feeds) but not withdraw your pay.
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: monsterer on December 04, 2014, 08:23:11 pm
Ok, I've done a wallet_delegate_withdraw_pay to my delegate account, but the balance is still showing 0?
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: toast on December 04, 2014, 08:25:29 pm
Ok, I've done a wallet_delegate_withdraw_pay to my delegate account, but the balance is still showing 0?

Make sure scanning is on:

wallet_set_transaction_scanning true
rescan
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: monsterer on December 04, 2014, 08:38:56 pm
Make sure scanning is on:

wallet_set_transaction_scanning true
rescan

Thanks, that worked.

Any idea how I can send to a public key? Seems wallet_transfer_asset_to_address needs an actual address.
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: jsidhu on December 04, 2014, 08:50:11 pm
Ok, I've done a wallet_delegate_withdraw_pay to my delegate account, but the balance is still showing 0?

Make sure scanning is on:

wallet_set_transaction_scanning true
rescan

Will this keep the wallet up to date as future transactions happen? Is this equivalent to keeping wallet unlocked in this way?
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: Riverhead on December 04, 2014, 09:00:38 pm
Transaction scanning isn't needed for delegate pay since it's public on the blockchain.

This is my solution to the problem: https://github.com/Riverhead/balance_keeper
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: monsterer on December 04, 2014, 09:02:15 pm
Transaction scanning isn't needed for delegate pay since it's public on the blockchain.

This is my solution to the problem: https://github.com/Riverhead/balance_keeper

Oh wow, you are a lifesaver! Many thanks +5% +5%

edit: can this withdraw to an account not in the wallet?
Title: Re: how to withdraw delegate pay when amount is unknown?
Post by: Riverhead on December 04, 2014, 09:17:49 pm
Transaction scanning isn't needed for delegate pay since it's public on the blockchain.

This is my solution to the problem: https://github.com/Riverhead/balance_keeper

Oh wow, you are a lifesaver! Many thanks +5% +5%

edit: can this withdraw to an account not in the wallet?
You're welcome :).

Yes it will send to any registered account.

Sent from my Timex Sinclair.