3

Every transaction output locks funds to one specific output script. These scripts can have various spending conditions such as for example requiring a signature of one specific private key (P2KH, P2KH, P2TR key path spend) or fulfillment of an arbitrary script defined by the recipient (P2SH, P2WSH, P2TR script path spend). A common script used in the latter ...


3

Blockcypher API shows only the example of how to compose a transaction with a single input, therefore, it might look like the array of addresses will do the job, but no. If you'll do this by passing addresses into one array of inputs: curl -d '{"inputs":[{"addresses":["addr1", "addr2"]}],"outputs":[{"...


2

Is the difference that for "Sign Message", first a digest is created, which is then signed, while for "Sign Transaction" (in the meaning written above), the input is already a digest, so it shouldn't be hashed again? No. It has nothing to do with the hashing. Furthermore, the input is not already a digest, it must be hashed before signing. Both the message ...


2

If you look closely on blockexplorer.com, you will notice that the site does mention that the transaction was included in block #1484064. The blockexplorer seems to be confused about the height of the blockchaintip, or has some other general issues regarding the confirmation count. For example, it shows all of the transactions in the latest block to have -...


2

After sleeping and looking at your question again, I think I am getting what you were asking. While in Ethereum it is common to have a single address when operating a wallet because there is efficiency of scale that way, the Bitcoin way of transacting is to treat addresses as invoice identifiers. You give out a new address for each payment that you expect to ...


2

I am making the presumption that localbitcoins.com does as many web wallet providers do, amalgamate transactions. Most likely your transaction was combined by the wallet provider with some others before being broadcast. No, you cannot claim the additional value of the transfer.


2

You are on the right track. The address is derived correctly, it is just not encoded with the right version. You need to add the testnet network version to the btc.payments.p2pkh call as well. Something like this should work: console.log(btc.payments.p2pkh({pubkey, network: btc.networks.testnet}).address); The address should then start with m... instead ...


1

Disclaimer: I have not tried this, I just glanced at the API documentation. H/T to eirlis for providing the correct syntax. As the API documentation for Creating Transactions specifies, you provide the addresses that you received your funds to in the inputs parameter. The API documentation has this example using curl: curl -d '{"inputs":[{"...


1

Regarding your title, without knowing the private key, no one can withdraw your BTC, that's for sure. First of all, I would argue it's a bad idea to use a third-party online service to generate and manage your keys. I went to check the blockcypher site, it seemed legit. Did you spend your coins? If so, the money may be moved to a new address because the ...


1

You could try using eccrypto index.js: var crypto = require("crypto"); var eccrypto = require("eccrypto"); // A new random 32-byte private key. var privateKey = Buffer.from('2fd7cab0970c692b4151d77a6aeebcae2a3284556cbfc6f182c571eccfc2424f', 'hex') // Corresponding uncompressed (65-byte) public key. var publicKey = eccrypto.getPublic(privateKey); var buf =...


1

When using a third party, you will be trusting them to give you correct information. This is not just about being dishonest but also about not having bugs. For instance consider the recent cve-2010-5141 vulnerability. If you are running a full node on your own, you can know what is going on and you can upgrade when you find out about it. But if you rely on ...


1

There is a step-by-step guide here and you can also test it on this site. You can also use this python library. import os os.environ['CRYPTOTOOLS_NETWORK'] = 'test' from btctools import PublicKey >>> pub = Publickey.from_hex('yourpubkeyhere') >>> pub.to_address('P2PKH') 'mp9CpH3h25m7FZqsPBf2UfU9Gm4u41j9Eg'


1

Sure, this would work. That said, you are essentially building your own wallet - A wallet is simply a program that hold private keys, keeps track of spendable inputs, and signs transactions. Your system achieves all of the above, so you are essentially building your own wallet.


1

This comes from the code where the checksum of your private key is validated, and suggests that the key is not valid. However, the private key shown in your code seems to pass validation on bitaddress.org, so the Python library you're using might have a bug. (By the way, please don't reveal the private keys to real addresses! It looks like all the coins ...


1

It's the IP address of the node that first sent us the transaction. As transaction broadcast works a bit like gossip, it's not guaranteed to be the original node (it could be a node "in the middle"). However, as BlockCypher is connected to quite a few nodes on the network, so over multiple transactions you're highly likely to be able to identify the right ...


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