Ethereum Community Forum
Discussions
Activity
Best Of...
Sign In
·
Register
Home
›
Reference clients code and builds
›
Node.js Implementation
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Quick Links
Categories
Recent Discussions
Activity
Unanswered
Best Of...
Categories
17.2K
All Categories
9.4K
Mining
569
Pool Discussion
342
Promotional
1.4K
General Project Discussion (non-technical)
479
Education
804
Protocol and Client discussion
167
web3-js
29
Whisper
16
Swarm
3
RLP
299
IoT & Hardware
1.2K
Smart Contracts and Dapps
28
Serpent
357
Solidity
645
Projects
1.2K
Reference clients code and builds
249
Eth & AlethZero- Cpp Implementation
469
Geth - Go Implementation
241
Mist
15
Node.js Implementation
36
Python Implementation
49
Mix
36
Other Implementations
169
Meetups
40
Other Events
223
Jobs & Skills
259
Press and Articles
75
Audio/Video
295
Ether Sale
1.2K
Other Languages
94
Chinese
254
German
33
Italian
110
French
3
Hebrew
42
Japanese
75
Portugese
46
Romanian
184
Russian
227
Spanish
47
Turkish
125
Watercooler
26
Meta
Vega Finally Unleashed! Fine-tuned performance and power consumption in a single chassis.
Please provide browser versions of ethereumjs-* libraries.
dankojones
Member
Posts:
4
✭
August 2015
edited August 2015
in
Node.js Implementation
Please provide browser versions of ethereumjs-* libraries.
I need ethereumjs-tx to work inside a website.
0
·
Share on Facebook
Share on Twitter
Comments
dankojones
Member
Posts:
4
✭
August 2015
Maybe its already built... Does this example have to change for in browser use?
var Tx = require('ethereumjs-tx');
var privateKey = new Buffer('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex');
var rawTx = {
nonce: '00',
gasPrice: '09184e72a000',
gasLimit: '2710',
to: '0000000000000000000000000000000000000000',
value: '00',
data: '7f7465737432000000000000000000000000000000000000000000000000000000600057'
};
var tx = new Tx(rawTx);
tx.sign(privateKey);
var serializedTx = tx.serialize();
0
·
Share on Facebook
Share on Twitter
dankojones
Member
Posts:
4
✭
August 2015
NVM
ethereumjs-accounts is what I want to use. It includes ethereumjs-tx.
0
·
Share on Facebook
Share on Twitter
null_radix
Member
Posts:
17
✭
August 2015
@dankojones
you can use browserify with ethereumjs-tx. Or you can build a standalone version using `npm run build` or you can just use
https://github.com/ethereum/ethereumjs-tx/blob/master/dist/ethereumjs-tx.js
0
·
Share on Facebook
Share on Twitter
Sign In
or
Register
to comment.
Comments
var Tx = require('ethereumjs-tx');
var privateKey = new Buffer('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex');
var rawTx = {
nonce: '00',
gasPrice: '09184e72a000',
gasLimit: '2710',
to: '0000000000000000000000000000000000000000',
value: '00',
data: '7f7465737432000000000000000000000000000000000000000000000000000000600057'
};
var tx = new Tx(rawTx);
tx.sign(privateKey);
var serializedTx = tx.serialize();
ethereumjs-accounts is what I want to use. It includes ethereumjs-tx.