Steem-tx | Lightweight JavaScript library for creating and signing transactions on the Steem blockchain



steem-tx.jpg

steem-tx-js

Lightweight JavaScript library for creating, signing, and broadcasting transactions on the Steem blockchain

---

Important: As this post gets older, please check official GitHub repository for the latest instructions and updates.

Why this?

steem-js and dsteem libraries are not easy to integrate and in some cases are incompatible with some frameworks like Nativescript

NativeScript is an open-source framework to develop apps on the Apple iOS and Android platforms. It was originally conceived and developed by Progress. NativeScript apps are built using JavaScript, or by using any language that transpiles to JavaScript, such as TypeScript. - Wikipedia

This library is a solution to such cases when official libraries are not working. And also an alternative for just creating, signing, and broadcasting transactions.

How Steem-tx works:

I'm preparing another post about this library. A full instruction on how to serialize and sign Steem transactions with JavaScript. It will take a few days to be ready.

Installation

npm install steem-tx --save

Usage

Create transaction:

const steemTx = require('steem-tx')
const operations = [
  [
    'vote',
    {
      voter: 'guest123',
      author: 'guest123',
      permlink: '20191107t125713486z-post',
      weight: 9900
    }
  ]
]

const tx = new steemTx.Transaction()
tx.create(operations).then(() => console.log(tx.transaction))

Sign transaction:

(multi signature is supported)

// please use this key just for testing purposes<br>const myKey = '5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg'<br>const privateKey = steemTx.PrivateKey.from(myKey)</p>
<p>tx.sign(privateKey)<br>console.log(tx.signedTransaction)</p>
<pre>
### Broadcast transaction:</pre>
<p>tx.broadcast().then(res => console.log(res)))

Make node call:steemTx.call('condenser_api.get_accounts', [['mahdiyari']]).then(res => console.log(res))*

GitHub: ttps://github.com/mahdiyari/steem-tx-js
npm package: https://www.npmjs.com/package/steem-tx


Feel free to test, use, share!

Future plans?

I'm building different applications mainly for Steem blockchain and I will try to keep this library as light as possible but also, useful with main functions for interacting with Steem blockchain. I believe having more tools will help grow use cases of Steem blockchain.

Many features, like getting posts and accounts are easy to implement with basic api calls. But serializing and signing transactions are a little bit complex to be implemented. That's why I decided to prepare another post about it and explain as much as I can.

Let's hope and work for a better future for the people in the World and on the Steem blockchain ❤

And remember, you can vote for mahdiyari as a witness


Comments 57


I love it! This looks great!

20.11.2019 21:01
5

Neat :) @tipu curate

20.11.2019 22:21
1
20.11.2019 22:22
1

Bookmarking this for later! Thanks. !steem2email

20.11.2019 23:09
1

Emailed 👌


Powered by witness untersatz!

20.11.2019 23:09
0

You have my witness vote too ;)
@untersatz curate 100

20.11.2019 23:11
1
This post has been upvoted by witness @untersatz. You've done a great job!
The @untersatz witness and manual curation is under the guidance of @contrabourdon and @organduo.
20.11.2019 23:12
0

Thank you

21.11.2019 08:20
0

Right when I'm starting to look at developing an Android app. What timing!

21.11.2019 00:03
1

the code looks perfect to me

21.11.2019 03:32
4

looks helpful!

thanks for making & releasing this, it'll for sure be useful for lots of us :^)

21.11.2019 04:28
1

good stuff man

21.11.2019 04:30
2

can't even understand it, but still love it

21.11.2019 06:25
1

At the first look it seems pretty good! 💪

21.11.2019 09:12
1

★★★★★
Get up to 1 BCH, 1 LTC per week

▪️Legit, Auto withdraw direct wallet
▪️No investment needed
▪️No Scam
▪️No Ads
▪️No Captcha

BCH Install now https://t.co/uODZP0sxXu

LTC Install now https://t.co/tFCdKlJYqV

Posted using Partiko Android

21.11.2019 11:58
0

WOW glad to se you getting upvotes from non bid bots . ocdb won! this is crazy cool to see developers getting funded this much at 15 cent steem! ,

i hope to see this formlized this into a develoepr wps, just for developers, i can use SQRL and get us a token and our own proposal system, like imagine , giuthub inside vessel wallet sort of thing :D ok man im so tired g2g but good job!

@mahdiyari id like to recruit you to work with telos community, not to take you away from steem just to enhance it... please come check out https://t.me/hellotelos id love to gfet your helpo with cross chain work, telos is a land of opportunity and IBC i can help steem with telos and this is great stuff i will send u 1 TLOSP right now with @banjo bot by inertia :0

21.11.2019 13:38
0

Thank you
but, I usually work for myself

21.11.2019 17:43
1

well thats what im talking about.... you would make your own proposals and get funding on telos...

23.11.2019 14:24
0

21.11.2019 15:45
0

Java!!!

21.11.2019 17:12
0

I love how this is a minimal, yet complete, Javascript library for Steem. It is very similar to how I would design a Javascript library if we were to move away from steem-js and dsteem. Great job! I hope it gains traction.

21.11.2019 17:49
11

Steem is the present and future of crypto and web3.0
$trdo

Posted using Partiko Android

21.11.2019 17:57
2

Congratulations @pandaparker, you successfuly trended the post shared by @mahdiyari!
@mahdiyari will receive 0.15870938 TRDO & @pandaparker will get 0.10580625 TRDO curation in 3 Days from Post Created Date!

"Call TRDO, Your Comment Worth Something!"

To view or trade TRDO go to steem-engine.com
Join TRDO Discord Channel or Join TRDO Web Site

21.11.2019 17:58
1

Congratulations, this post is now Featured on steemit.com and was tweeted by @steemit to over 100,000 followers! Thanks for your valuable contribution to the Steem ecosystem!

21.11.2019 17:59
0

Is there any example of sending a transaction (STEEM) to multiple people at once?

21.11.2019 18:36
0

Put your transfers inside operations array in the first code snippet just like vote operation
also https://developers.steem.io/apidefinitions/broadcast-ops#broadcast_ops_transfer may help

21.11.2019 18:54
0

Nice post man! :D

21.11.2019 18:36
0

When you want to Flag them but see their Steem power lol

21.11.2019 19:37
2

nice post

22.11.2019 00:00
1

very good poste and i would like to tell you that this information that you have shared with us is really important information and i hope you share this important things with regards to ''steem''

21.11.2019 20:57
0

Hi

Posted using Partiko Android

21.11.2019 20:59
0

it's cool

21.11.2019 22:49
0

I'm planning to join dtube and I think it's an interesting app. There are particular tags where your videos can be shared with, I'm planning to add more of these tags in my videos and you can try it too, it will help your video to be generated with the right audience or people and it's going to be fun. Best of luck to you and me too.

21.11.2019 23:11
0

c2b50a1990874427d40ded688bec40d4

22.11.2019 00:21
0

Somewhat echoing the comments of @vandeberg, I'd love to see similar minimal yet complete Steem libraries for other popular languages.

22.11.2019 02:09
2

Join Palnet, Neoxian, Steemleo, steempeak and other tags to earn tokens for your content! You could have earned a lot more with those tags if they were used at all. Anyways, those are just some ideas. Its nice to see that SteemIt had SMT's and we can earn different tokens now! Nice post btw, its 1 AM but it was still fun to read.

Posted using Partiko iOS

22.11.2019 03:14
0

Paying from 2018 Best Earning Site for Payeer
SignUP Now https://kapitalof.com/index.php?r=653928&language=en

payeer-money.png

22.11.2019 04:41
0

Good writing.

22.11.2019 06:23
0

Very good javacrib

22.11.2019 06:36
0

wow, it's hot !

22.11.2019 08:06
0

i love it.😍😍

22.11.2019 09:04
0

Yes i do

22.11.2019 14:39
0

Blockchain way

22.11.2019 18:02
0

to ppl readin i havent tested it

but steem can use some interestingay on it

its okay
my next target would be
"being able to downvote patrice IF I CHOSE TO DO SO "
we cool

22.11.2019 19:44
0

Thanks @mahdiyari for sharing this info!

Posted using Partiko Android

22.11.2019 23:52
0

Perfect, it looks great !!

23.11.2019 03:34
0

Best post on the blockchain right now! This is where everybody with investment (SP) should upvote right now. This post will pillage all the small posts with under $10 payout, for even greater returns for all curators. Get your upvotes in now!! #NewSteem #HF21

23.11.2019 10:23
0

@mahdiyari, These efforts are really appreciable. An Ecosystem which have diversified Alternatives performs very flexibly and developers like you definitely deserve appreciation and recognition.

Good wishes from my side and have a successful journey ahead. Stay blessed.

Posted using Partiko Android

23.11.2019 11:07
0

I search for wordpress installation singin/login function

23.11.2019 11:52
0

Congratulations @mahdiyari, your post successfully recieved 0.15870938 TRDO from below listed TRENDO callers:

@pandaparker earned : 0.10580625 TRDO curation


To view or trade TRDO go to steem-engine.com
Join TRDO Discord Channel or Join TRDO Web Site

23.11.2019 21:31
0

please follow me

Posted using Partiko Android

24.11.2019 06:55
0

Thanks for the post.

24.11.2019 09:17
0

Amazing!! 🤪🤪

24.11.2019 12:48
0

Great job!!!!

24.11.2019 15:09
1

It is like

24.11.2019 17:10
0

looks great..... love it...😍

24.11.2019 18:51
1