How to build a bitcoin delegation server?

0

2

Actually, I know there are already have blockchain.info and its own api. But I want to build my own server which can provide basic API like:

    1. Generate a wallet by use password and username.
    1. User can login/logout(Optional)
    1. User can do transaction (send/receive to/from someone's address)

But, I have google for a while. The only way to create a wallet is configure the bitcoin.conf before run the bitcoind server. I don't know how can this works, I know there are also a way call multisig, But I don't know how to connect it with the wallet. I mean how to make each user has his/her own wallets.

Anyone help?

Frank AK

Posted 2018-07-27T06:22:55.480

Reputation: 141

Answers

1

Let's break it down a little.

Things you need a node for:

  1. Receiving new transactions and blocks
  2. Indexing transactions
  3. Building transactions
  4. Broadcasting transactions

Things you don't need a node for:

  1. Generating keys
  2. Signing transactions

You could, in theory, just build a program that generates your keys and multisig redeem scripts, and converts them to addresses for your users. Then, you can use insight or blockchain.info or any one of several explorers to look up transactions for the addresses you generate, and build outgoing transactions.

Once you have the outgoing transaction, your program can sign it with the keys you previously generated, and then broadcast it via an explorer API.

Alternatively, you could run your own bitcoind node, and index incoming transactions yourself.

A wallet and a node are two separate concepts. Bitcoind can act as both, but it's core function is that of a node. Many people run bitcoind with absolutely no keys on it, and use light clients like Electrum or hardware wallets to store their actual BTC.

Raghav Sood

Posted 2018-07-27T06:22:55.480

Reputation: 10 897

Could you please draw an architectural diagram, I really newbie at this area.Frank AK 2018-07-27T06:37:46.743

It's not possible to design an architecture without a lot more detail, and that's unfortunately more effort than I'd be willing to put in on a volunteer site. There are too many different ways you could build this.Raghav Sood 2018-07-27T06:59:23.953

Oh, I understand how's going on. because I still believe there are must be need a centre server exists. I have review your answer and got your point! I want to build a DAPP instead a normally app! Thanks bro.Frank AK 2018-07-27T12:39:35.177

1

You'll need to be running a full Bitcoin node and on top of that some sort of API that stores information on blocks/transactions/addresses in a database (e.g. the insight api).

You could then have another API on top of that handles wallet generation and key handling (something like Bitcore Wallet Service).

Nikos Kostoulas

Posted 2018-07-27T06:22:55.480

Reputation: 111