Skip to main content
6 votes

Using PHP with RPC and cookie

Not sure if you're still looking for an answer, but I just stumbled upon this myself and for the benefit of anyone running into this. Even though it's called cookie based authentication, you still ...
tsak's user avatar
  • 61
5 votes
Accepted

Is there a way to generate new addresses for someone else's wallet?

Bob can provide Alice with an extended public key (xpub). This will allow Alice to generate as many addresses as required, all of which will be accessible to Bob via the corresponding extended private ...
Raghav Sood's user avatar
  • 17.3k
4 votes
Accepted

Raw Transaction Fee - 256: absurdly-high-fee error

The fee is calculated from the difference between vin and vout. Here you are sending a very small amount to an addresses but you have not specified an output to receive the change. The client sees ...
Nikos Kostoulas's user avatar
4 votes

How can I accept Bitcoin as a payment without a 3rd party gateway

There are several solutions out there and currently the most hyped one is probably BTC-Pay. It also supports lightning, so you should be pretty future-ready.
Giszmo's user avatar
  • 304
4 votes

convert private key to bitcoin address using python or php

I think this video will explain it in details (python): https://youtu.be/tX-XokHf_nI Using the code from video, pip packages ecdsa , hashlib and base58: import ecdsa import hashlib import base58 # ...
Tony Sanak's user avatar
  • 1,719
4 votes

Actively display wallet funds on web page - how?

I already have bitcoind running with a 4GB pruned database, and I'm hoping that will be enough. It is! By running bitcoin-core, you can pull this data in an easy, trustless way. I would recommend ...
chytrik's user avatar
  • 18.4k
3 votes

How To Calculate Merkle Root?

This is the correct way to double hash two tx's. First you need to convert them into little endian, and then convert into raw binary data before hashing. <?php function le_raw ($str) { return ...
mpapec's user avatar
  • 131
3 votes
Accepted

How to integrate Blockchain Wallet API V2 to php

You need to run a local nodejs service. From there you can then integrate with php. As of January 2016 Blockchain.info made changes to the wallet API service that now require you to run a local ...
m1xolyd1an's user avatar
  • 5,676
3 votes

How to send bitcoins with commission extracted from payment in PHP or bitcoind

Here is the algorythm without the code: createrawtransaction with amount that you want to send assuming that fees are 0 fundrawtransaction to let your bitcoind construct final transaction, put your ...
Denis Matafonov's user avatar
3 votes
Accepted

Why a flip a bin before hashing in this script?

Hashes are big endian by standard, and most computers use little endian, so it's probably just for convenience. See Why does the Bitcoin protocol use the little-endian notation?
JBaczuk's user avatar
  • 7,428
3 votes
Accepted

What is scriptpubkey for in the coinbase transaction ? (and more..)

The mined Bitcoin "goes" to the scriptPubKey(s) in the coinbase transaction. Bitcoin operates on spending transaction outputs. Submitting a block does not magically cause a transaction ...
Ava Chow's user avatar
  • 72.1k
2 votes

Can I sign a text with a Bitcoin address using PHP only?

A bit late but I created a PHP library for cryptocurrency. You can use this library to achieve what you want. You can use it like this: require('CryptoPHP.php'); $wif_key = '...
user2298995's user avatar
2 votes

Generating Bitcoin Public and Private Keys

Bitcoin uses point multiplication on the Elliptic Curve secp256k1 to generate a public key from a private key. Basically, this curve has a defined Generator point G, and a method for 'adding' two ...
meshcollider's user avatar
  • 11.9k
2 votes
Accepted

Connect to Bitcoin Node behind tor network

The RPC interface is not exposed over Tor. The only thing that goes over Tor is the P2P connection. To access the RPC server, you need to connect directly to the node's IP address, not connect to it ...
Ava Chow's user avatar
  • 72.1k
2 votes
Accepted

PHP - Bitcoind sets up wrong transaction fee

The value you specify for custom fee is in fee per kilobyte. Until recently, the "size" for fee computations was always rounded up to 1 kilobyte anyway, leading some people to believe that the amount ...
Pieter Wuille's user avatar
2 votes

How to generate addresses in PHP

Full instruction based on response of @Farghaly: Ubuntu 16 Install dependencies sudo apt-get install php-bcmath php-gmp composer require bitwasp/bitcoin And then in fiel app.php <?php require '...
Daniel's user avatar
  • 133
2 votes

send bitcoin to mobile number or email address

First of all: You do not really send the bitcoins to an email-adress or a phone number. You can only transfer them from one bitcoin adress to another one. My understanding: The internetsite / (...
hardfork's user avatar
  • 2,127
2 votes

jsonRPC calling createrawtransaction in PHP

you should pass parameters as an array. try like that: $bitcoin->createrawtransaction( array( array( "txid"=>"...
Tailer's user avatar
  • 3,689
2 votes
Accepted

Sweeping a bitcoin private key using PHP

No MVP PHP code, but some bits that could help. verify the private key Assuming you want a private key to be in the secp256k1 ECDSA range. You could check if the key is any number between ...
0xb10c's user avatar
  • 1,460
2 votes

How to connect to a public node through json RPC?

Not all nodes will have the JSON-RPC enabled, and especially without private credentials. You will probably find a block explorer API much more accessible, because they are built to handle public ...
JBaczuk's user avatar
  • 7,428
2 votes

How can I extract my bitcoin public address from my bitcoin private key using PHP for Nodejs?

Private Key is a 32 bytes data Apply ECDSA or Elliptic Curve Digital Signature Algorithm to the private key. The above step dervies the public key,. (Legacy)Now append 0x04 to the start of the public ...
Nvest Campus's user avatar
1 vote

how to get change address using derived BIP44 publicKey?

I guess I've found the answer as explained in bip43 m / purpose' / * Apostrophe indicates that BIP32 hardened derivation is used. We encourage different schemes to apply for assigning a separate BIP ...
Tailer's user avatar
  • 3,689
1 vote

Port 8333 and Issues to have a connection

You are conflating the two ports that Bitcoin Core opens and uses. There is the Bitcoin network port. That is port 8333 by default. You DO NOT want to try to connect to that as it is used for the ...
Ava Chow's user avatar
  • 72.1k
1 vote
Accepted

PHP: is there a way to convert a private ECDSA key to its corresponding public key?

Yeah, you do "need some code which multiplies some coordinates on the elliptic curve" :). If you don't have extensive cryptography experience I would recommend you use library rather than trying to ...
nikib3ro's user avatar
  • 127
1 vote

Creating Payment system using Blockchain API

The question is pretty general in that you may be using Blockchain API in the generic way. Blockchain.info is a company that provides an API to use on the Bitcoin network. If you want to write ...
Dustin Butler's user avatar
1 vote

Dynamic Transaction Hash Confirmation

Submitting transaction ID is not a safe way to verify payments. As you know bitcoin transactions are public and anyone can get see all TXIds. Same reason why even the donor bitcoin address is not a ...
dark knight's user avatar
  • 2,017
1 vote

development of bitcoin-abe like software

output is spent (e.g. if appear in "vin" to some other transaction), I store an indicator. Now single block is processed for 1-2 sec. Implication of this is, if you want to check address ...
Nick's user avatar
  • 211
1 vote

does anyone know how to send the "exp" parameter in an Electrum request

Yes. Use "expiration": "3600" and it'll work.
Vlad's user avatar
  • 111
1 vote

trying to get text of a field in json rpc 2.0 response into ar PHP variable

As you have convert response to array using json_decode so you can access by array element inside result. You can access by echo $result["result"]["address"];
Rushabh Madhu's user avatar
1 vote

trying to get text of a field in json rpc 2.0 response into ar PHP variable

To get the address you would do: $result = json_decode($response, true); $address = $result["result"]["address"];
m1xolyd1an's user avatar
  • 5,676

Only top scored, non community-wiki answers of a minimum length are eligible