bitcoin

Java - Convert Big-Endian to Little-Endian

徘徊边缘 提交于 2019-12-24 03:27:45
问题 I have the following hex string: 00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81 but I want it to look like this: 81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000 (Big endian) I think I have to reverse and swap the string, but something like this doesn't give me right result: String hex = "00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81"; hex = new StringBuilder(hex).reverse().toString(); Result:

Bouncy Castle ECDSA Create Public Key from Private Key

谁说我不能喝 提交于 2019-12-23 18:18:50
问题 I am trying to sign a bitcoin transaction in c#. I have 2 bits of code I am trying to complete. I can create a set of private and public keys using Bouncy castle. I can convert this to wallet import format ok. I can also generate a bitcoin address from the ECDSA public key. However, I want to sign a transaction and all I have is my private key. I don't want to have to import into a wallet and sign. So how can I generate the public key, given only the private key? I have found a javascript

How to use pagination at api localbitcoin

丶灬走出姿态 提交于 2019-12-23 03:32:48
问题 I'm developing with localbitcoin API and i am using path “/api/dashboard/closed/” and this is my code: <?php function localbitcoinsquery($path, $nonce,array $req = Array()) { global $random; $key='mykey'; $secret='secretkey'; if ($req) { $get=httpbuildquery($req); $path=$path.'?'.$get; } $postdata=$nonce.$key.$path; $sign = strtoupper(hashhmac('sha256', $postdata, $secret)); $headers = array( 'Apiauth-Signature:'.$sign, 'Apiauth-Key:'.$key, 'Apiauth-Nonce:'.$nonce ); $ch = null; $ch =

How many Bitcoin addresses can I generate through Coinbase API?

南楼画角 提交于 2019-12-22 12:38:12
问题 I use Coinbase API to generate Bitcoin addresses. What are the limits of this API? How many Bitcoin addresses can I generate? 回答1: The API says that: The Coinbase API is rate limited to prevent abuse that would degrade our ability to maintain consistent API performance for all users. By default, each API key or app is rate limited at 10,000 requests per hour. If your requests are being rate limited, HTTP response code 429 will be returned with an rate_limit_exceeded error. So I would reason

Bitstamp - new authentication in C# - signature

拈花ヽ惹草 提交于 2019-12-21 04:28:15
问题 The new authentication of bitstamp says the following: Signature is a HMAC-SHA256 encoded message containing: nonce, client ID and API key. The HMAC-SHA256 code must be generated using a secret key that was generated with your API key. This code must be converted to it's hexadecimal representation (64 uppercase characters).Example (Python): message = nonce + client_id + api_key signature = hmac.new(API_SECRET, msg=message, digestmod=hashlib.sha256).hexdigest().upper() Source: link I've got

How to retrieve a value from a Blockchain using PHP?

风格不统一 提交于 2019-12-20 07:12:34
问题 I'm trying to retrieve a set of values from a Quark blockchain (Quark is cryptocurrency like Bitcoin). To those who don't know, the way that the blockchain works is if the given wallet address is QRHb2CTvGnwwrf6GHrxgQcH2tTAUoGhnC2 the blockchain has a way to display how much in total was received (or spent, or balance). Just click on the link below http://176.221.46.81/chain/Quarkcoin/q/getreceivedbyaddress/QRHb2CTvGnwwrf6GHrxgQcH2tTAUoGhnC2 and you will see it print 41210004.6588 So what I

How to retrieve a value from a Blockchain using PHP?

非 Y 不嫁゛ 提交于 2019-12-20 07:12:07
问题 I'm trying to retrieve a set of values from a Quark blockchain (Quark is cryptocurrency like Bitcoin). To those who don't know, the way that the blockchain works is if the given wallet address is QRHb2CTvGnwwrf6GHrxgQcH2tTAUoGhnC2 the blockchain has a way to display how much in total was received (or spent, or balance). Just click on the link below http://176.221.46.81/chain/Quarkcoin/q/getreceivedbyaddress/QRHb2CTvGnwwrf6GHrxgQcH2tTAUoGhnC2 and you will see it print 41210004.6588 So what I

How to import a bitcoin private key to BigInteger?

好久不见. 提交于 2019-12-13 07:59:03
问题 I use the following codes to try to import a bitcoin private key and compute the public key. The computed ECPublicKey is not equal to bitcoinPublicKey. How to correct? string bitcoinPrivateKeyStr = "cVnb9S9GgHxsBxfaApvGnWvfwqXRYdV8f1Q2CkQeBa4EsWTNmsGS"; BitcoinSecret bs = new BitcoinSecret(bitcoinPrivateKeyStr); byte[] bitcoinPrivateKeyBytes = bs.PrivateKey.ToBytes(); byte[] bitcoinPublicKeybytes = bs.PubKey.Decompress().ToBytes(); X9ECParameters curve = SecNamedCurves.GetByName("secp256k1");

Running parameterized queries

萝らか妹 提交于 2019-12-13 05:08:37
问题 Quite new to this google bigquery sql thing so please bear with me. I'm trying to build a google standardSQL parameterized query. The following sample was used and ran successfully on Google BigQuery WebUI. #standardSQL WITH time AS ( SELECT TIMESTAMP_MILLIS(timestamp) AS trans_time, inputs.input_pubkey_base58 AS input_key, outputs.output_pubkey_base58 AS output_key, outputs.output_satoshis AS satoshis, transaction_id AS trans_id FROM `bigquery-public-data.bitcoin_blockchain.transactions`

Bitcoin-ruby gem generating same address every time?

∥☆過路亽.° 提交于 2019-12-13 02:13:22
问题 I am trying to use the bitcoin-ruby gem to create a new address for payment transactions from my public Bitcoin Address. I am able to use the pubkey_to_address method to do this. However, each time I run the method the resulting address, payment_address , is the same. Services such as blockchain.info return a different address each time which is more consistent with my requirement. Bitcoin-ruby github reference https://github.com/lian/bitcoin-ruby/blob/master/lib/bitcoin.rb#L128 My Code is