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
Veria70
@Veria70
no :D
Key privateKey = new Key(); // generate a random private key
in the book
give me a link about my question pls
var bitcoinPrivateKey = new BitcoinSecret("XXXXXXXXXXXXXXXXXXXXXXXXXX", Network.Main); is it my answer?
Andres G. Aragoneses
@knocte
looks like it
Veria70
@Veria70
but this class give me error "Invalid hash of the base 58 string"
MyPrivateKey is Byte[]
var Base58SecKey = Encoders.Base58.EncodeData(MyPrivateKey);
Key key = new Key();
key.FromBytes(MyPrivateKey);
pantonis
@pantonis
Hello guys.
Can I read and parse local copy of the block files using NBitcoin?
Manolo-Valdes
@Manolo-Valdes
hi guys. there is a way to submitBlock and others mining capabilities using NBitcoin Node class or any implementation in NbitCoin? thanks in advance
Manolo-Valdes
@Manolo-Valdes
hi guys. Does var txids = node.GetMempool(); works? I always got an error like node is not in connected state
            using (var node = Node.ConnectToLocal(Network.TestNet)) //Connect to the node
            {
                var txids = node.GetMempool();
                var txz = node.GetMempoolTransactions();
                Thread.Sleep(500); //Wait a bit
            }
thanks in advance
Prayank
@prayank23

listunspent 0 99999 "[\"tb1qy7vv88mc0nzz8cex0p2fd34v7506xuvmrm6r3f\"]"

This works in bitcoin-cli. What is the correct syntax to do this using NBitcoin?

var rpc = new RPCClient("user3:password3", "localhost:18444", Network.TestNet);
var response = rpc.SendCommand(RPCOperations.listunspent, 0, 0);

Not sure how should I mention the address. Gives error in everything I tried.

roberto-co
@roberto-co
Hello, I'm skimming through some of the examples for NBitcoin but none of them show you how to connect to your own Bitcoin Node, is this possible ? I want to do some playing around but want to connect to my own Bitcoin node
Prayank
@prayank23
@roberto-co yes its possible using the first line mentioned in above code
roberto-co
@roberto-co
@prayank23 thank you, do you have any resources that will show examples on working with your own node?
Mr. Touraj Ostovari
@TourajOstovari
Hello, Can I mine Bitcoin with your library?
magna-nz
@magna-nz
hi there, just have a quick question
im looking at creating BIP-44 HD wallets
does NBitcoin support this? Or just bitcoin? Looking at BIP 44 derivation path m/44'/0'/0'/0/0---n
is this possible with this library?
also is it possible to create hd wallet for other coins?
Manolo-Valdes
@Manolo-Valdes
Hi guys I'm trying to check a low difficulty share with the following function. but always got false. the code is the same of BlockHeader.CheckProofOfWork() but against the wanted difficulty target. can you point me out what is wrong ? thanks in advance
  public static bool TestShareDifficulty(this BlockHeader header , int difficulty)
    {
        var maxD = new BigInteger(0xffff * Math.Pow(2, 208));
        var d = new BigInteger(difficulty);
        var target = maxD / d;
        Target Bits = new Target(target);
        var D = Bits.Difficulty;
        var bits = Bits.ToBigInteger();
        if (bits <= BigInteger.Zero || bits >= BigInteger.Pow(new BigInteger(2), 256))
            return false;
        uint256 uint256 = header.GetPoWHash();
        uint256 bitsuint256 = Bits.ToUInt256();
        return uint256 <= bitsuint256;
    }
It is used with NBitCoin.AltCoins.LiteCoin Network
I guess the Target Class works for bitcoin and litecoin. but not sure
Manolo-Valdes
@Manolo-Valdes
This is a new version of the function. works ok so far...
    public static bool TestShareDifficulty(this BlockHeader header, Network network, int difficulty)
    {
        double maxD = (double)network.Consensus.PowLimit.ToBigInteger();
        double d = difficulty;
        double value = maxD / d;
        var target = new BigInteger(value);
        Target Bits = new Target(target);
        var bits = Bits.ToBigInteger();
        if (bits <= BigInteger.Zero || bits >= BigInteger.Pow(new BigInteger(2), 256))
            return false;
        uint256 uint256 = header.GetPoWHash();
        uint256 bitsuint256 = Bits.ToUInt256();
        return uint256 <= bitsuint256;
    }
Maedeh Zebhi
@maede71

Hi
I use NBitcoin.Altcoins.Dogecoin,
I create a dogecoin transaction and don't verify

when stimatefee:
!txBuilder.Verify(tx, out TransactionPolicyError[] errors)
with error:
"Fee too high, actual is 1.10000000, policy maximum is 0.04360000"

The transaction is not approved for a long time when use blockcypher api, how i can calculate it?

How can fee DogeCoin be calculated?
Maedeh Zebhi
@maede71
resolve it with transactionBuilder.StandardTransactionPolicy.MaxTxFee = null;
Amirhosein Rajabi
@amirh3n
Hi
Can I Use NBitcoin for generate Tron addresses ?
btcpaybot
@btcpaybot
[mattermost - Kukks]Lol no
Oliver Biwer
@soraphis
what is usually the reason for a "TransactionSizePolicyError" message: ('could not create valid transaction Transaction's size is too high. Actual value is 122612, but the maximum is 100000')
one of my users received this error lately. no matter if the money transferred is set to 100.000 or 100.000.000 satoshi
btcpaybot
@btcpaybot
[mattermost - nicolasdorier]@soraphis wow
[mattermost - nicolasdorier]well it means his transaction has too many inputs
[mattermost - nicolasdorier]which may happen if he got lots of low value spammy transaction
Oliver Biwer
@soraphis

I've checked his last outputs and they where around 900.000 satoshis, so my assumption would have been, that he has at least this one coin who is not super small.

we also tested super small transfer amounts. but still the error persisted.

also another question:
we have a program which sends two transactions, those transactions are coupled with a Coin (the first generates an output the second consumes)
sometimes it happens that those transactions are split accross two blocks - i know this can always happen.
But... Is it possible to bundle transactions, such that a node receives them together?

(I tried sending them in reverse order, but the nodes would ignore the first one)

btcpaybot
@btcpaybot
[mattermost - nicolasdorier]not possible
[mattermost - nicolasdorier]@soraphis try this ((DefaultCoinSelector)txbuilder.CoinSelector).MinimumChange = Money.Zero;
[mattermost - nicolasdorier]by default, NBitcoin send more than needed
[mattermost - nicolasdorier]for consolidating utxo
[mattermost - nicolasdorier]so this might help you