Author

Topic: New to bitcoin programming (Read 570 times)

legendary
Activity: 3388
Merit: 3154
August 17, 2018, 01:21:50 PM
#15
I am new to bitcoin programming. I am using Java Script and need pointers to help me develop code for following:
- Create a bitcoin address
- Send bitcoin from one account to another
- Get balance for a bitcoin account.

I will really appreciate any help or any pointers in this regard.

Jessica

Hello Jessica, i'm a bitcoin coder, i have work in some big projects and learned a lot on the way. What you want to do could be done by 2 ways.

1.-Get an API from a service who rune a bitcoin node, i'm not sure but i think blockchain.info have an API. That wayyou will be able to do those 3 things

2.-(The pro way) install bitcoin core and use a wrapper to call core commands from JS.

Look at this nice tool, for sure will help you https://www.npmjs.com/package/bitcoin-core

With this tool and JS you can make calls like
Quote
client.createRawTransaction([{ txid: '1eb590cd06127f78bf38ab4140c4cdce56ad9eb8886999eb898ddf4d3b28a91d', vout: 0 }], { 'mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe': 0.13 });
client.sendMany('test1', { mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN: 0.1, mgnucj8nYqdrPFh2JfZSB1NmUThUGnmsqe: 0.2 }, 6, 'Example Transaction');
client.sendToAddress('mmXgiR6KAhZCyQ8ndr2BCfEq1wNG2UnyG6', 0.1,  'sendtoaddress example', 'Nemo From Example.com');

const balance = await new Client().getBalance('*', 0);

Hope that info helps and have a happy coding Jessica  Wink
newbie
Activity: 83
Merit: 0
August 14, 2018, 05:35:42 AM
#14
If you are a beginner in bitcoin programming, do not expect that you will learn it overnight.  Crypto or bitcoin is so deep that you have to dig slowly for you to absorb everything about it. You can search and study bitcoin but as they said, experience is the best teacher.  In learning bitcoin, you have lots of adversary, there are hackers and scammers. Beware of them because once you have experienced those things, you cant do anything but to cry. because you can lose everything in just one second. This is one of the most painful experience that can happen. But do not stop but rather improve your knowledge about it so it wont happen again.  Be eager to learn to protect whatever is yours. And time will come, you will see yourself mentoring a newbie in the bitcoin world.
newbie
Activity: 9
Merit: 0
August 10, 2018, 08:12:17 PM
#13
I have tried nodeJs base blockchain programs  which is very fast and with quick setup. If you want start for enterprise level and would like to try quickly, you should go for HyperLedger.
Do you have any reference/ example project to try out with hyperledger ?
newbie
Activity: 10
Merit: 0
August 05, 2018, 11:21:36 PM
#12
I have tried nodeJs base blockchain programs  which is very fast and with quick setup. If you want start for enterprise level and would like to try quickly, you should go for HyperLedger.
newbie
Activity: 98
Merit: 0
August 04, 2018, 01:27:33 AM
#11
Hello, there is telegram group called premium ebooks. You can search them and join. They can provide you a very good JS book which will help you learn very well.
legendary
Activity: 1624
Merit: 2509
August 02, 2018, 10:24:04 AM
#10
Now My question that I hope someone could answer:
Is the reason for possible error are the users use and creates account in results error?


There are several sources of error which can result in lost funds.
The most critical probably are the gathered entropy, the correctness of the implementation, and the storage of the private keys.

Generally, if a user creates an address on your site, your backend server is generating a valid private key and stores it associated to  the users ID in the database.
If your implementation is correct and you are not vulnerable to any form of attacks, it won't result in errors.
But if your implementation is buggy on the other hand, the possibility definitely exists that some malicious actor could trick your system to pay out more funds than it should.
sr. member
Activity: 1036
Merit: 273
August 02, 2018, 10:16:29 AM
#9
I am new to bitcoin programming. I am using Java Script and need pointers to help me develop code for following:
- Create a bitcoin address
- Send bitcoin from one account to another
- Get balance for a bitcoin account.

I will really appreciate any help or any pointers in this regard.

Jessica

User Jessica432  Iam interested in bitcoin and in the world of crypto which means I would love to work with anything that is connected to bitcoin and my point of interest that is programing.

I'am going to study programming this August and I dont want to act that I know all about the things you will do and give tips and suggestions but there is a onething that I notice in a website and that is not good in a site and its project which anytime soon like every week it experience error which users can't access there account.

Which I think the reason could be to many user are creating accounts, So I thought if a programmer is not ready for this because there website is always creating an error which there creator is not a good one that could handle any possible scenario.

Now My question that I hope someone could answer:
Is the reason for possible error, are the users who creates more accounts is the results of error?
legendary
Activity: 1624
Merit: 2509
July 19, 2018, 01:51:42 PM
#8
Is there anything to be careful about while programming bitcoin?

You can't 'program bitcoin'.

But there are definitely quite a few things you have to care about when programming anything which handles sensitive information (in this case: private keys).
What exactly you have to care about depends on what kind of software you are writing.

If you are planning on creating an online service you'll need way more security precautions than when coding a small scrip which querys an API / your node.

So, if you want some advises on what to keep in mind when programming, the best would be to create a new thread describing what your plan is, so people can think of attack vectors / possible bugs.
newbie
Activity: 41
Merit: 0
July 19, 2018, 01:39:18 PM
#7
Is there anything to be careful about while programming bitcoin?
legendary
Activity: 4522
Merit: 3426
July 18, 2018, 02:42:31 PM
#6
This may be very helpful to you.

http://bcoin.io/

It is an implementation of a Bitcoin full node in JS. It is used by Purse.io.

Repo is here: https://github.com/bcoin-org/bcoin
member
Activity: 378
Merit: 13
July 18, 2018, 06:32:59 AM
#5
I am new to bitcoin programming. I am using Java Script and need pointers to help me develop code for following:
- Create a bitcoin address
- Send bitcoin from one account to another
- Get balance for a bitcoin account.

I will really appreciate any help or any pointers in this regard.

Jessica

that is good, i m can help you do that but i can't drop it here so you private chat me or pm me so i take you clear about the program.
copper member
Activity: 85
Merit: 122
July 17, 2018, 05:02:17 AM
#4
Also, you have to set up a bitcoin node for most of those operations, or trust someone else's (not recommended) or hook up to someone's API, like blockchain.info wallet API (easiest for novices, but doesn't teach how to interact with an actual node, and requires trusting API provider).
legendary
Activity: 1624
Merit: 2509
July 17, 2018, 04:43:54 AM
#3
One option would be to learn javascript via free eBooks. Look here (https://github.com/EbookFoundation/free-programming-books/blob/master/free-programming-books.md) for a massive amount of free programming eBooks (just search for 'javascript')

The other (probably more easier option) would be to just use a javascript libary (e.g. bitcoinjs-lib).
Everything is explained very detailed in the readme file.
newbie
Activity: 10
Merit: 4
newbie
Activity: 16
Merit: 1
July 17, 2018, 01:08:00 AM
#1
I am new to bitcoin programming. I am using Java Script and need pointers to help me develop code for following:
- Create a bitcoin address
- Send bitcoin from one account to another
- Get balance for a bitcoin account.

I will really appreciate any help or any pointers in this regard.

Jessica
Jump to: