NicolasDorier on v4.1.1.81
NicolasDorier on master
bump (compare)
NicolasDorier on master
Fix DivideByZeroException when … (compare)
Good day everyone,
Happy to be here!!
Uhm I've read about HDwallets and understand to a great degree how it works. But ran into a couple of issues, I'd appreciate any suggestion from anyone, thanks in advance.
So the first problem I have is how to generate an xpubkey and xprivkey, I know I have to sum a privateKey and publicKey with a chain code and hash but really don't know how to go about this or know of a library in node or js that can help me. I'd appreciate a recommendation.
The second issue is a design a issue.
I'd love to observe all the public addresses in my wallet app from a single point which was why I chose to use HD wallets.
Now I'm confused as to how I should structure it, I have two implementation I'm considering.
First consideration
User A derivation path -> m/44/0/0/i and m/44/0/1/i
User B derivation path -> m/44/0/1/i and m/44/0/1/i
Second consideration
User A derivation path -> m/44/0/0/i and m/44/0/1/i
User B derivation path -> m/44/0/0/i and m/44/0/1/i
Kukks: would be great to have a mattermost instance that had channels for NBitcoin, BtcPayServer, Wasabi, etc
I agree, though we do use the https://chat.btcpayserver.org/ mattermost instance for everything (we have NBXplorer, NBitcoin, many btcpay channels, etc). A wasabi bridge would be nice but that's up to them :) ping @nopara73
hi
I created a transaction,
I have an error, when broadcast it in the blockcypher:
"StatusCode: BadRequest, Content-Type: application/json, Content-Length: 213)"
"{\"error\": \"Error validating transaction: Transaction 96ac292567476cfd7096b7cba634902031e5d60af9707732b4cdc3b63ecab549 orphaned, missing reference 00000000003767ab1d81bf5e85365b0664d98ca96c6887d27a1e19406a5dab21.\"}"
verified by the Nbitcoin:
var feeRate = new FeeRate((long)32563);
var transactionBuilder = txBuilder
.AddCoins(coins.Select(x => x.ToScriptCoin(secretKey.PubKey.WitHash.ScriptPubKey)).ToList())
.AddKeys(secretKey)
.Send(destination, vm.Amount.ToStringValue())
.SubtractFees()
.SetChange(secretKey.GetAddress(ScriptPubKeyType.SegwitP2SH))
.SendEstimatedFees(feeRate)
.Then();
var tx = transactionBuilder.BuildTransaction(true);
var fee = tx.GetFee(transactionBuilder.FindSpentCoins(tx));
if (!txBuilder.Verify(tx))
return new NBitcoinCreateTransactionResponse
{
Message = MessageResource.DontVerifyTx,
Result = ResultType.Warning
};
BroadcastTransaction(tx);
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
}
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.