Hot answers tagged

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 ...


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 ...


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 ...


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 ...


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 ...


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 ...


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 ...


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://...


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 ...


1

Bitpay/Copay use Hierarchical Deterministic wallets so you can find all the adresses that has been generated from your root private key (seed recovery phrase) Here is a guide with more information: https://github.com/OmniLayer/omniwallet/wiki/Finding-and-Exporting-your-private-key-from-Bitpay-Copay


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