2

I am using this library to make a wallet service that runs on a web browser. I use the library and browserify it so its compatible with the rest of my jquery. Now this tells me how to make and sign a transaction. This specifies the parameters used to make a utxo but I don't understand how to get the data for it.

It says

It can take outputs straight out of bitcoind's getunspent RPC call

My understanding is that the UTXO can be obtained only when running a full node and not from the browser, so my plan is

1) Send amount, receiver and sender public address to the server using browserfiy, bitcore-lib and jquery

2) Server then finds UTXO (how?) and returns the raw transaction to the browser

3) Browser then prompts using to enter his private key, which is used to sign the transaction and sent to the server

4) Server then pushes this onto the blockchain and returns the transaction hash

I am not able to achieve point 2. Now I understand that a lot of online wallets would have a similar structure but I am unable to achieve this. The blockchain used is Bitcoin, server side language is entirely in nodejs.

Could someone please help me out/ tag relevant links.

2 Answers 2

2

You can use bitcore explorers module to use Insight send transaction and get utxos data.

Check further https://github.com/bitpay/bitcore-explorers

1
  • This works for public blockchain not a private one. However, in this month I have written my own set of APIs and parsers that replicate what Insight does to a desired extent by setting up listeners and interacting with the JSON-RPC calls in a full bitcoin node Commented Jun 13, 2017 at 8:17
1

I know that I am late to respond you but link helped me allot

1
  • My question is for a private network not the public bitcoin one that bitpay-bitcore offers. Either way, I wrote my own block listener that prepares a soft wallet for each address and maps it to users based on their private keys. It maintains its own mempool, utxo and miner reward list , combines them all to provide a soft wallet for any address Commented Oct 11, 2017 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.