Bitcoin Forum
August 05, 2024, 06:00:54 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Bitcore : Fee is too large expected less than on: March 31, 2018, 09:43:50 AM
I am trying to send 0.52 from my address to address2 and I am passing fees like below

Code:

 var tx = bitcore.Transaction();
 tx.from(utxos);
 tx.to(address2,satoshibits); // 520000
 tx.change(address);
 tx.fee(fees); // 260000 in satoshi
 tx.sign(privateKey);
 tx.serialize();

Error:

      Fee is too large: expected less than 150000 but got 260000

Anyone have an idea if I want to pass max fees then default
2  Bitcoin / Development & Technical Discussion / How to calculate transaction fees ? on: January 25, 2018, 11:14:22 AM
I am using bitcore server https://github.com/bitpay/bitcore and below is the code for making a transaction

Code:

var tx = bitcore.Transaction();
tx.from(utxos);
tx.to(address2,50000);
tx.change(address);
tx.sign(privateKey);
tx.serialize();

How much transaction fees are taken for executing the above transaction.? and I want to check before the transaction goes for the execution.
3  Bitcoin / Development & Technical Discussion / Bitcore synchronization on: December 20, 2017, 04:16:56 AM
I have setup bitcore on my server below here is my server and software configuration

Server :

         Os centos-release-7-4.1708.el7.centos.x86_64
          Space 2TB
          Ram 16 GB

Version :
            Npm 2.15.11
            nvm  0.33.4
            node 4.8.7

All above installation done successfully, also i have install bitcore and also Syncing 100% after that i have face below error

Error :

EXCEPTION: St12out_of_range
CInv::GetCommand(): type=1073741825 unknown type
bitcoin in ProcessMessages()

Any one have idea please guide me

4  Bitcoin / Bitcoin Technical Support / Bitcore installation error on: November 27, 2017, 12:53:22 PM
My configuration :
centos 6
node : v4.8.4.6
npm : 2.15.11
nvm : 0.33.4

I have installed bitcore in my system successfully, but when i try to install on my server i face below error:
npm ERR! node v4.8.6
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE

npm ERR! zmq@2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.15.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.

When i execute the command
npm install -g bitcore
I have same configuration on server 
5  Bitcoin / Development & Technical Discussion / Re: Private/public key generated by bitcore API issue!!! please help on: October 13, 2017, 10:32:34 AM
it is a string "115792089237316195423570985008687907853269984665640564039457584007908834671663" or something else..?

It's the value of the moduli. It is the biggest number in the curve secp256k1 that bitcoin uses.
=2^256-2^32-2^9-2^8-2^7-2^6-2^4-1

If your generated private key is bigger than that, then you have to subtract that number from your generated key as many times as necessary, until it becomes smaller than that number.

The security of bitcoin depends on big numbers. That is the reason why the moduli has to be so big.

https://en.bitcoin.it/wiki/Secp256k1




for example :
Here is my private key ="9c63e8e2f6574c197c0626bad843eb47104adf3f01f2901aad1258936feb007e"
var newprimarykey = (9c63e8e2f6574c197c0626bad843eb47104adf3f01f2901aad1258936feb007e * 36453278) mod 115792089237316195423570985008687907853269984665640564039457584007908834671663 );

console.log('newkey = ',newprimarykey);

If i am executing this one then it'll give error :

var t1 = (9c63e8e2f6574c197c0626bad843eb47104adf3f01f2901aad1258936feb007e * 36453278);
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3



6  Bitcoin / Development & Technical Discussion / Re: Private/public key generated by bitcore API issue!!! please help on: October 13, 2017, 06:03:25 AM
I am a developer and faced below issue in development, so please help me Smiley
How do I create multiple addresses based on same private/public key generated by bitcore API?

You could invent a nice rule on how to generate a new private key from your private key.

Example.
You could take your private key an multiply it by any number (for example: 36453278)  to get the next private key then multiply that to get the next one and so on.  You can do the multiply as many times as you want to. to generate as many addresses as you need.

Just remember that we are dealing with modular arithmetic, so you need to take a mod from the result, so that it wont get bigger than the maximum allowed value.

eg:

(privkey1*36453278) mod 115792089237316195423570985008687907853269984665640564039457584007908834671663

That is basically what HD wallets do to generate many private keys from one. Except, they use a bit more complicated algorithm and sha256 hash on each result so that even a small change will create a completely different private key.

The advantage of this kind of approach is that you only need to backup your original private key and the multiplier, and not a huge list of different private keys.

it is a string "115792089237316195423570985008687907853269984665640564039457584007908834671663" or something else..?
7  Bitcoin / Development & Technical Discussion / Private/public key generated by bitcore API issue!!! please help on: October 12, 2017, 12:06:28 PM
hello all,

I am a developer and faced below issue in development, so please help me Smiley

How do I create multiple addresses based on same private/public key generated by bitcore API?

Thanks in advanced
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!