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.3K
All Categories
9.5K
Mining
573
Pool Discussion
374
Promotional
1.4K
General Project Discussion (non-technical)
485
Education
810
Protocol and Client discussion
169
web3-js
29
Whisper
16
Swarm
3
RLP
303
IoT & Hardware
1.2K
Smart Contracts and Dapps
28
Serpent
359
Solidity
664
Projects
1.2K
Reference clients code and builds
249
Eth & AlethZero- Cpp Implementation
470
Geth - Go Implementation
242
Mist
15
Node.js Implementation
36
Python Implementation
49
Mix
36
Other Implementations
170
Meetups
40
Other Events
225
Jobs & Skills
281
Press and Articles
75
Audio/Video
296
Ether Sale
1.2K
Other Languages
96
Chinese
255
German
33
Italian
111
French
3
Hebrew
42
Japanese
75
Portugese
46
Romanian
184
Russian
230
Spanish
47
Turkish
125
Watercooler
27
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.