New answers tagged

0

correction Nov 15: There is in each block a coinbase transaction and it"s always the first transaction. The mined coins show up and the balance can be seen in the explorers (miners reward plus fees). Not necessarily it's in the first transaction of a block and not necessarily a block needs to contain a miners reward, but in most cases it is there and it's ...


0

You can use an explorer like blockonomics that supports segwit xpubs and also has an API If you want to use blockchain.info only, you need to derive the segwit addresses from the ypub and then lookup these addresses to get the balance. Here is a script. Converting ypub to xpub won't work because bc.info will still generate legacy P2PKH addresses from xpub, ...


1

Raghav Sood: you are right: here the correct code: const addresses = bitcoinjs.address.fromOutputScript(outputScript, bitcoinjs.networks.testnet); Thanks :-)


1

The correct address is 3CD1QW6fjgTwKq3Pj97nty28WZAVkziNom. The individual public keys are only able to access the coins if they act together in a group of at least 2 out of 3. If you derive a regular p2pkh from each individual key, you will end up searching for utxos that likely don't exist. Also note that each individual public key does not necessarily ...


0

Public address is a 20Byte data. Private key is a 32Byte data. They are unequivocal.


0

As the wallet can generate many public addresses from a private address. I'm assuming by 'private address', you actually mean 'private key'. Each private key effectively maps to one Bitcoin address, so for each new address your wallet creates, it will also first create a private key that the address is derived from. If your wallet is a hierarchical ...


2

While exact implementations between wallets might differ, the general approach is usually similar to the following: A wallet generates a private key (or a set of keys) based on an HD wallet, or just individual random keys The public keys for private keys generated in 1. are calculated, and used to create the desired address scripts (p2pkh, p2sh (wrapped ...


2

You are right in noticing that the change from a transaction is linked to the previous input. Address reuse is more for receiving payments than spending them - if you have two clients paying you, giving them separate addresses for the payments creates two completely unlinkable outputs on the chain. Naturally, if you make a future transaction that requires ...


1

Nothing prevents you to send bitcoins to one of your own addresses. I guess I'd just create a new address on my node with bitcoin-cli getnewaddress, and then create a transaction with 2 outputs : one to the address I just got with my whole input amount (minus mining fees) another to a "dummy" address (can be one you generated with the same method, you can't ...


0

You send the change (any amount left over from your input after the fee) to any address you own. You can send it to the same address that is initiating the transaction, or to any other address in your wallet.


1

1111111111111111111114oLvT2 is the P2PKH address derived from a HASH160 consisting of all 0s. mfWxJ45yp2SFn7UciZyNpvDKrzbhyfKrY8 is the same P2PKH address, but in its testnet encoding. These are well known burn addresses, and any coins sent to either of them will be permanently lost. The example you linked uses them as they are easy to search for (which I ...


1

There are, broadly, three types of addresses in use at the moment: P2PKH - Pay to public key hash addresses start with a 1, and should be accepted by essentially any service in the Bitcoin ecosystem P2SH - Pay to script hash addresses are commonly used for multisig, but as of the segwit activation, they are also used for wrapped segwit addresses. These ...


0

Well, the simplest method if you're okay generating a new wallet is using the Bulk Wallet tab on bitaddress.org. You generate a wallet, then use the Bulk Wallet tab to generate as many address/key pairs as you want.


0

Yes, you can generate as many numbers of addresses. Bitcoinjs Library or Iancoleman Resource may be helpful.


1

Yes, once you have an HD wallet which is free you can generate an unlimited amount of receiving addresses. There is lots of services offering HD wallet, hardware, mobile or desktop, electrum is a common one, you just have to download and install it, choose and save your secret phrase then you can begin generating your addresses from your seed: https://...


2

There are a few reasons why a user can lose funds in the lightning network. But to understand why that happens let us look at some of the basic constructs of Lightning Network. Lightning Basics When two parties open a channel in Lightning Network what they essentially do is send some bitcoins to a 2-of-2 multi-sig that they both control (in current specs ...


3

The main difference is that Bitcoin in lightning network channels are in 2of2 multisig wallets. You own a key and your channel peer owns the second key. Your funds are "safe" because you have pre-signed transactions that spend from that multisig wallet (similar to an offline signing of a transaction). As soon as you keep those pre-signed transactions, your ...


1

It is a left over API design from bare multisig transactions. The example you provided is a P2SH multisig - in this, the actual output script has no way of telling Bitcoin Core that it is a multisig output. It can be any script. Thus, Bitcoin Core just decodes it to a regular P2SH address. Although no longer commonly used, there are also bare multisig ...


5

The blockchain does not see wallets at all. It only sees spent and unspent transaction outputs (txouts). A txout is either completely spent or completely unspent - it cannot be "partially" spent and so there is no notion of balance. (If you want to spend less than the full value of a transaction, you create a change output.) In your example, there are ...


Top 50 recent answers are included