Wallets and Transactions

in #utopian-io8 years ago (edited)

Pull Request

Solves Issues:

Huge refactor structuring most of the code in a more sound way

New Features

Wallet

There is a new Wallet class.

private _sbd: number;
private _steem: number;
private _user: User;
private _activeKey: string;
private _danger: boolean;

The danger boolean must be set to true when making transactions (for safety!).
The Wallet is able to either send STEEM directly to another account, or power up another account.

Transactions

With the new Wallet class we can send STEEM or power up another account very easily. This closes #19 #21. This is used with the nowplaying bot in order to pay out all participants of the community instantly.

out

Using this the bot was able to pay the 29-member community in just a few seconds. This is all found in the main, bot, and wallet files.

Now Playing

Check out the #nowplaying community and bot in action here



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Do You broadcast each transaction separately? You can prepare one big transaction one-to-many like we did at SteemNova payouts:
https://steemd.com/tx/8e2e816939ab946bb96b8dee97b8f2117203a2f1

Wow, thanks for the tip! That is very cool and would be great for my use case. How are you doing that in your code? Could you link me? I'm using the steem npm module and I didn't find anything obvious in the api that shows bulk transactions. Will I have to send this as an operation rather than a transfer? Not sure if it makes a difference but I'm powering up users, not sending them STEEM or SBD.

Also SteemNova looks awesome and i'm excited to check it out more in depth tonight!

I have used exactly that steem-python code
http://steem.readthedocs.io/en/latest/examples.html#batching-operations

The clue is to cram multiple transactions into large json structure. Then You sign TransactionBuilder and broadcast it to the network.

Good pot friend

Thank you for the contribution. It has been approved.

Please try to make your contribution more narrative in nature.

You can contact us on Discord.

[utopian-moderator]

Hey @walnut1 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.077
BTC 63768.03
ETH 1675.48
USDT 1.00
SBD 0.41