Bitcoin Forum
April 24, 2024, 07:36:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Services / 0.25 BTC Rewards! Build a simple C# aspx withdraw form page. on: January 09, 2015, 03:49:25 AM
Hi,

I have a windows server running bitcoin and i need a simple aspx page to display balance and withdraw.

Example:
Code:
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("http://localhost.:8332");
 webRequest.Credentials = new NetworkCredential("user", "pwd");
 /// important, otherwise the service can't desirialse your request properly
 webRequest.ContentType = "application/json-rpc";
 webRequest.Method = "POST";
 
 JObject joe = new JObject();
 joe.Add(new JProperty("jsonrpc", "1.0"));
 joe.Add(new JProperty("id", "1"));
 joe.Add(new JProperty("method", Method));
 // params is a collection values which the method requires..
 if (Params.Keys.Count == 0)
 {
  joe.Add(new JProperty("params", new JArray()));
 }
 else
 {
     JArray props = new JArray();
     // add the props in the reverse order!
     for (int i = Params.Keys.Count - 1; i >= 0; i--)
     {
        .... // add the params
     }
     joe.Add(new JProperty("params", props));
     }
 
     // serialize json for the request
     string s = JsonConvert.SerializeObject(joe);
     byte[] byteArray = Encoding.UTF8.GetBytes(s);
     webRequest.ContentLength = byteArray.Length;
     Stream dataStream = webRequest.GetRequestStream();
     dataStream.Write(byteArray, 0, byteArray.Length);
     dataStream.Close();
 
 
     WebResponse webResponse = webRequest.GetResponse();
 
     ... // deserialze the response

Related links:

http://api-portal.anypoint.mulesoft.com/bitcoin-project/api/bitcoin-api/docs/auth-security
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)

A example of the page needed:

2  Other / Off-topic / bro-coin? on: June 23, 2011, 04:59:28 AM
3  Bitcoin / Bitcoin Discussion / Mtgox's official story could be wrong. The BTC of many accounts was sold. on: June 19, 2011, 09:47:02 PM
I believe a hacker got hold of everyone's account at mtgox. This hacker then executed a looping script that logged into a number of accounts one by one and issued a sales order for the full BTC balance in these select accounts. After 2 minutes, the loop was completed and all BTC held of the mtgox's clients accounts were offered for sale on the mtgox market.

This drove the price of BTC down to almost nothing. mtgox as a withdrawal limit of 1000$ equivalent BTC per 24 hour period. With the price to almost nothing, the hacker could withdraw almost any amount of BTC he wished from different accounts. I think in a few days or weeks some people will learn they have lost a fortune in this attack.

We must face the reality that mtgox is short on BTC. They do not have the BTC they claim they have.


This is just a warning. I am not saying it is the case that this happened. Just that it is a possibility.





4  Bitcoin / Hardware / Will fund ASIC board for mining community. Need Hardware devs. on: June 11, 2011, 05:13:56 AM
Hello,

As the title says I would like to fund an ASIC mining board and make it available to the community. I believe this will not only strengthen the mining network against potential "ASIC institutional attacks" but will also help it scale faster and better with the increasing transactions number. I intend to funnel income from my main company, a DNA testing laboratory, to fund the ASIC board.

I would like to get volunteers who are good with hardware design to help this project out. So, if you are interested in the design of this board, please let me know.


My background: I have completed a bachelor degree in science (then 1 year out of 2 of a masters degree in electrical engineering), and started a high-tech dna testing laboratory 3 years after graduation. I am setting aside almost all of the profits generated by my company to fund an ASIC mining board. The reason I am saying this is because I want to build credibility to this project.

Please join me in this project if you want to help strenghen the bitcoin mining network and make it the strongest hashing network the world has ever seen!
5  Bitcoin / Development & Technical Discussion / How to calculate the target from getwork function? on: June 08, 2011, 04:48:50 AM
Hello, when I call getwork from linux boitcoind, I obtain a target of 00000000000000000000000000000000000000000000002f931d000000000000. I am not sure what preparatory processing I need to do on this value before comparing it to my hash. My miner will take longer than a billion year to find a hash with 0000000000000000000000000000000000000000000000 leading zeros. Therefore I assume it has to be processed somehow.


Code:
./bitcoind getwork
{
    "midstate" : "48d2cf8bf3e3cd13e69656d4aca930bc30ba1db0440dfcedbe2df42a99460042",
    "data" : "000000017d56792f3c95c9efd8af023e4d55e8e86b3005185e623a040000017400000000a76209a8d888c7bee6746a22102cc3b919f77ec52ddd00d8790569b8143681c84deefec11a1d932f00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
    "hash1" : "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
    "target" : "00000000000000000000000000000000000000000000002f931d000000000000"
}
6  Bitcoin / Development & Technical Discussion / Is the data sent by getwork big endian or little endian? on: June 07, 2011, 09:04:29 PM
Satoshi on November 24, 2010 said:
Quote
getwork does the byte-reversing.  midstate, data and hash1 are already big-endian, and you pass data back still big-endian, so you work in big-endian and don't have to do any byte-reversing.  They're the same data that is passed to the ScanHash_ functions.  You can take midstate, data and hash1, put them in 16-byte aligned buffers and pass them to a ScanHash_ function, like ScanHash(pmidstate, pdata + 64, phash1, nHashesDone).  If a nonce is found, patch it into data and call getwork.

My bitcoind client returns this when I call getwork:
Code:
./bitcoind getwork
{
    "midstate" : "923e3f981b6a8c0c9bef7e6779f6b27cf8eaf2865ac6baf853eca0d75d48248e",
    "data" : "00000001fe030434c35a05ac7066dfcf03c774c0c818ebd04f9c0cc700000ed400000000d5d67bdee77028ba4d12b7639063ab1c4f135d60e1a8c5b971eeef444ba848644dee50581a1d932f00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
    "hash1" : "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
    "target" : "00000000000000000000000000000000000000000000002f931d000000000000"
}

The last word of the data field is 80020000. This field indicates the length of the message. However, the length is only correct if we convert 8002000 to big endian. 0x80020000, in big endian, is 0x280. Which in decimal is 640... the length of the message.

So it would appear that data is not big endian.

The same is true with hash1.

I am trying to build a client to understand getwork. Is the data, hash1 and midstate big endian or little endian?
7  Bitcoin / Development & Technical Discussion / Trying to understand the getwork API function on: June 07, 2011, 02:40:35 AM
Hello, I am trying to understand the details about the getwork function and what it returns. When I call getwork, this is an example of what I get from my bitcoin deamon.

Code:
./bitcoind getwork
{
    "midstate" : "34c2cc4192d802888d2204188e80df8133ddbb17fd0db5ea1382096916f35369",
    "data" : "000000013cb5d00bd73e716c2d3c558a52b8c79fe8532b12307a7d91000008ba0000000007b7757adedda569a66c17a870bce5135faa2b3e5f46d22bed6e15d79296178f4ded6d461a1d932f00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
    "hash1" : "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
    "target" : "00000000000000000000000000000000000000000000002f931d000000000000"
}

I understand how to do hashing since I have just completed a basic c++ implementation. What I do not understand is midstate, data and hash1. Why is the midstate supplied? Isn't it the job of the miner to calculate the hash. If so, why does the deamon waste cycle computing the hash for the first half of the data?

The data. Is it already stuffed and precomputed for hashing? It seems that I must do sha256(sha256(data)). I am not sure if the data has been appended a 1 at the end, then zeros, along with the message length.

What is hash1 and what do I use it for?
8  Bitcoin / Development & Technical Discussion / 100% CPU utilisation when not mining as bitcoind (Ubuntu 64bit 1 core) on: June 05, 2011, 11:58:46 PM
Hello,

I am running the bitcoind (launched as sudo ./bitcoind -server) on a amazon micro instance running ubuntu. The problem is that the CPU utilisation is 100% even when my hash/s count is 0! For information, getinfo returns. I want to run the bitcoind on a website and I need every CPU cycle for http requests.

sudo ./bitcoind getinfo
{
    "version" : 32100,
    "balance" : 0.00000000,
    "blocks" : 117966,
    "connections" : 16,
    "proxy" : "",
    "generate" : false,
    "genproclimit" : -1,
    "difficulty" : 82347.22294654,
    "hashespersec" : 0,
    "testnet" : false,
    "keypoololdest" : 1307310377,
    "paytxfee" : 0.00000000,
    "errors" : ""
}
9  Other / Obsolete (selling) / We operate a DNA testing laboratory. Offering: Paternity DNA test for 15BTC on: June 05, 2011, 04:38:50 AM
Hello,

I am the proprietor of the CGML group. We are located in Montreal, Canada and we provide laboratory services related to paternity testing. If you would like confirmation of the biological link between your child and yourself, the best solution is often to perform a dna test. DNA testing provides 100% confirmation. In addition, we can test DNA samples of various origins and obtain a profile for you. To help support the bitcoin economy, we are offering the possibility of purchasing any of our DNA services, at 15BTC for a standard 2 person test.

The DNA can be collected with our mailing kit and returned to our laboratory via traditional mail. We conveniently ship worldwide. All tests can be done privately. Alternatively, we also offer DNA testing for courts (which are performed in front of a witness). All tests that we perform are accredited by ISO 17025.

Here is our website
English : www.dnatestlab.ca
French : www.centredegenetique.ca

If you would like to pay using bitcoin, please do email us with your shipping information and we will forward you a unique bitcoin address to send the funds to. Do not hesitate contact us with any questions, by phone (see website) or email.
10  Other / Obsolete (buying) / Looking to hire up to 3 full-time programmer for Canadian bitcoin startup. (paid on: June 03, 2011, 02:50:54 AM
Hello,

We would like to hire at least 1 (and up to 3) full time programmer in the Gatineau city of Canada, for a Bitcoin startup. This is a paid position. We require strong c++ skills and socket programming skills. If interested let me know and I will arrange an interview.

Conpensation is to be based on experience and skillset.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!