Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 13:53
    zawasp synchronize #650
  • Jan 31 2019 13:47
    zawasp synchronize #650
  • Jan 31 2019 13:44
    zawasp commented #650
  • Jan 31 2019 13:43
    zawasp commented #650
  • Jan 31 2019 12:25
    NicolasDorier commented #650
  • Jan 31 2019 12:25
    NicolasDorier commented #650
  • Jan 31 2019 10:57
    zawasp synchronize #650
  • Jan 31 2019 10:50
    zawasp synchronize #650
  • Jan 31 2019 10:40
    zawasp synchronize #650
  • Jan 31 2019 10:36
    zawasp opened #650
  • Jan 31 2019 07:47
    NicolasDorier commented #649
  • Jan 31 2019 07:47

    NicolasDorier on v4.1.1.81

    (compare)

  • Jan 31 2019 07:46

    NicolasDorier on master

    bump (compare)

  • Jan 31 2019 07:45
    NicolasDorier commented #649
  • Jan 31 2019 07:45

    NicolasDorier on master

    Fix DivideByZeroException when … (compare)

  • Jan 31 2019 07:45
    NicolasDorier closed #649
  • Jan 31 2019 07:45
    NicolasDorier closed #648
  • Jan 31 2019 00:38
    knocte commented #648
  • Jan 30 2019 17:19
    lontivero commented #648
  • Jan 30 2019 17:19
    lontivero commented #648
victor bolum
@veektorh
@maede71 from that response it shows that transaction 5f513... has been spent, check it on block explorer, if it was used as input for any transaction
Maedeh Zebhi
@maede71
@veektorh, Yes that's right.
When a new transaction is generated:
SomeTimes The "inputs" of the "prev_hash" transaction for the current transaction is equal to the hash of two previous transactions.I got confused
victor bolum
@veektorh

im getting this error while trying to send money from p2sh address

One or more errors occurred.
(You need to provide P2WSH or P2SH redeem script with Coin.ToScriptCoin())

Here is my attempt

         var init = network.CreateTransaction();
            init.Outputs.Add(Money.Coins(0.002m),fromAdd.ScriptPubKey.Hash);
            var coins = init.Outputs.AsCoins().ToArray();
            var scriptcoin = coins[0].ToScriptCoin(fromAdd.ScriptPubKey);

            builder.AddCoins(scriptcoin);
            builder.AddKeys(secret.PrivateKey);
            builder.Send(dest, amount);
            builder.SetChange(fromAdd);
            builder.SendEstimatedFees(new FeeRate(1m));
            var res = builder.BuildTransaction(true);
            var result = builder.Verify(res);
Maedeh Zebhi
@maede71
@veektorh Hi,blockcypher gives a maximum of 50 tx items, can I get them all?
https://api.blockcypher.com/v1/btc/main/addrs/{address}/full/
victor bolum
@veektorh
@maede71 If your returned Address object includes the hasMore attribute, there are more transactions associated with the address than transfered through this endpoint. If this happens, note the block height of the last transaction in the array, and then you can use the before flag to page through results.
victor bolum
@veektorh
@btcpaybot help me out with this error - 'The redeem provided does not match the scriptPubKey of the coin'
            var add1 = "MP3RwwmVDoHw3h25uKHn8PLA8DhjaZtooQ";
            var fromadd = BitcoinAddress.Create(add1, network);

            var add2 = "MVVftwwVt2KputjnVb858n4kzz8Wthrk3B";
            var destadd = BitcoinAddress.Create(add2, network);

            var utxos = GetUnSpentCoins($"{xpubstring}-[p2sh]").Result;

            var realredeem = PayToScriptHashTemplate.Instance.GenerateScriptPubKey(destadd.ScriptPubKey);

          //Error  The redeem provided does not match the scriptPubKey of the coin'
           var utxoScriptCoin = utxos.Select(a => a.ToScriptCoin(realredeem)).ToList();
Maedeh Zebhi
@maede71
@veektorh thanks,When the number of transactions is high It gets very slow.
How can it not be a problem for an address with a lot of transactions?
victor bolum
@veektorh
@maede71 its not advisable to use one address for lot of transactions, so you really should be using one address per transaction
Maedeh Zebhi
@maede71
@veektorh
Can you help me more?
I did not catch
My users transfer all their account balances into the main wallet.
Then I want to withdraw money from this wallet at the request of users.
We may have a high number of transactions,
the acquisition of unspent coins will slow down.
victor bolum
@veektorh
their main wallet can derive an unlimited number of addresses
so you should be generating a new one whenever a user wants to receive money
all the address still belong to a wallet, so when you want to withdraw, if you're using nbxplorer you get all transactions using the derivation scheme that's already being tracked
Lucien
@luusluus
Hi, I've been trying to add the altcoin Blocknet to NBitcoin. I've made everything, but have an issue I can't seem to figure out. When running any altcoin test (e.g. HasCorrectGenesisBlock) the blocknet daemon refuses a connection. The exception message is No connection could be made because the target machine actively refused it.. I'm running visual studio 2019 in administrator mode and I've check the firewall ports, yet it is still refusing. Does it mean another daemon is running at the rpc port used?
Before I did this, I'd restarted my computer and there should not be another process running at the blocknet regtest rpc port
Lucien
@luusluus
Hm I tested litecoin and the respective port and rpc port for regtest is 19444 and 19443 respectively. I see that the actual port and rpc port are generated and these ports used to run the daemon. While for blocknet the port and rpc port for regtest is 41489 and 41499 respectively, however the code tries to connect to the generated port and rpc port while the daemons are ran w/ 41489 and 41499
Lucien
@luusluus
think it might be an issue w/ blocknet daemon
Lucien
@luusluus
Hm the daemon with overridden port and rpc port works if the rpcport and port are put under a [regtest] section in the bitcoin.conf. Right now the configuration file is generated differently in NodeBuilder.cs StartAsync
Lucien
@luusluus
ok fixed it w/ setting UseSectionInConfigFile to true
Prayank
@prayankgahlot_twitter

If I have used 3 public keys to create a multisig address and redeem script with NBitcoin. What should I use in .AddKeys when creating a spending tx using TransactionBuilder?

Any resource to read more about all the methods and their usage available in TransactionBuilder class?

btcpaybot
@btcpaybot
[mattermost - Kukks]you need the required number of private keys which you give to AddKeys
Prayank
@prayankgahlot_twitter
Yeah I thought it will accept only private keys from the error I got in VS but was not sure. So should I use .SignTransaction instead of .AddKeys?
Basically trying to implement caravan using NBitcoin
First part is done: Creating multisig address and redeem script
Now I need to create transaction, sign it and broadcast it imo
Prayank
@prayankgahlot_twitter
gather signatures
signatures
btcpaybot
@btcpaybot
[mattermost - nicolasdorier]@prayankgahlot_twitter I think you should just base your program on this API https://github.com/dgarage/NBXplorer which do the heavy lifting for you
[mattermost - nicolasdorier]NBXplorer allows you to create a PSBT. Then you can add your signature to the PSBT and finalize it
[mattermost - nicolasdorier]it can generate addresses and all
Prayank
@prayankgahlot_twitter
Thanks. Will try tonight.
kodxana
@kodxana
Hi guys :)
I have question how do I test my fork on Linux?
kodxana
@kodxana
Anyone?
btcpaybot
@btcpaybot
[mattermost - nicolasdorier]@kodxana fork of nbitcoin?
[mattermost - nicolasdorier]well this is a normal dotnet project
[mattermost - nicolasdorier]should be able to build with dotnet build/ dotnet test or visual studio code
kodxana
@kodxana
@btcpaybot yup
I get errors about installing Developer Pack (SDK/Targeting Pack)
kodxana
@kodxana
For me testing went ok just want to someone else to test it so we know its working for all MetacoSA/NBitcoin#905
kodxana
@kodxana
I also made explorer integration https://github.com/kodxana/NBXplorer
kodxana
@kodxana
I do not know why running dotnet testNBitcoin.Tests.csproj --filter "Altcoins=Altcoins" downloads node binary files and starts it but it's just stuck with 59,4 MB ram used
btcpaybot
@btcpaybot
[mattermost - nicolasdorier]@kodxana all tests depends on bitcoin core node, it takes time to download
[mattermost - nicolasdorier]that's probably what it is stuck
kodxana
@kodxana
So you are saying that I need to have full bitcoin node to test it?
even if this is altcoin :?
btcpaybot
@btcpaybot
[mattermost - Kukks]it downloads the altcoin node depending on your test setup*
kodxana
@kodxana
So do I need bitcoin node or not to test fork altcoin?
kodxana
@kodxana
Is mattermost private only?
btcpaybot
@btcpaybot
[mattermost - britttttk]@kodxana You should be able to create a username and password here https://chat.btcpayserver.org/