Merge pull request #154 from thedawnrider/apidocs

Documentation for the api
This commit is contained in:
Matias Alejo Garcia 2014-08-20 00:39:49 -04:00
commit 9d066f6d71
1 changed files with 34 additions and 0 deletions

View File

@ -166,6 +166,14 @@ The end-points are:
/api/addr/[:addr][?noTxList=1&noCache=1] /api/addr/[:addr][?noTxList=1&noCache=1]
/api/addr/mmvP3mTe53qxHdPqXEvdu8WdC7GfQ2vmx5?noTxList=1 /api/addr/mmvP3mTe53qxHdPqXEvdu8WdC7GfQ2vmx5?noTxList=1
``` ```
### Address Properties
```
/api/addr/[:addr]/balance
/api/addr/[:addr]/totalReceived
/api/addr/[:addr]/totalSent
/api/addr/[:addr]/unconfirmedBalance
```
The response contains the value in Satoshis.
### Unspent Outputs ### Unspent Outputs
``` ```
/api/addr/[:addr]/utxo[?noCache=1] /api/addr/[:addr]/utxo[?noCache=1]
@ -225,6 +233,32 @@ addrs: 2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f
/api/txs/?address=ADDR /api/txs/?address=ADDR
/api/txs/?address=mmhmMNfBiZZ37g1tgg2t8DDbNoEdqKVxAL /api/txs/?address=mmhmMNfBiZZ37g1tgg2t8DDbNoEdqKVxAL
``` ```
### Transaction broadcasting
POST method:
```
/api/tx/send
```
POST params:
```
rawtx: "signed transaction as hex string"
eg
rawtx: 01000000017b1eabe0209b1fe794124575ef807057c77ada2138ae4fa8d6c4de0398a14f3f00000000494830450221008949f0cb400094ad2b5eb399d59d01c14d73d8fe6e96df1a7150deb388ab8935022079656090d7f6bac4c9a94e0aad311a4268e082a725f8aeae0573fb12ff866a5f01ffffffff01f0ca052a010000001976a914cbc20a7664f2f69e5355aa427045bc15e7c6c77288ac00000000
```
POST response:
```
{
txid: [:txid]
}
eg
{
txid: "c7736a0a0046d5a8cc61c8c3c2821d4d7517f5de2bc66a966011aaa79965ffba"
}
```
### Historic blockchain data sync status ### Historic blockchain data sync status
``` ```