btc/ltc/zcash/bcc

476052856 70a09b79e9 bitcoin的listunspent改为异步的缓存,dcr的listunspent和listaccounts弄成异步缓存 6 years ago
bitcointest d3ddd033b0 init 7 years ago
bucashtest d3ddd033b0 init 7 years ago
litetest d3ddd033b0 init 7 years ago
src 70a09b79e9 bitcoin的listunspent改为异步的缓存,dcr的listunspent和listaccounts弄成异步缓存 6 years ago
zcashtest d3ddd033b0 init 7 years ago
README.md d3ddd033b0 init 7 years ago
coinproxy.toml b97c48dddb 增加合并余额接口 6 years ago
coinsapi 70a09b79e9 bitcoin的listunspent改为异步的缓存,dcr的listunspent和listaccounts弄成异步缓存 6 years ago
coinsapi.exe 70a09b79e9 bitcoin的listunspent改为异步的缓存,dcr的listunspent和listaccounts弄成异步缓存 6 years ago
config.go 1b8b3d1b62 dcrwallet 7 years ago
data.go d3ddd033b0 init 7 years ago
db.go d3ddd033b0 init 7 years ago
err.go d3ddd033b0 init 7 years ago
httphandler.go b97c48dddb 增加合并余额接口 6 years ago
httpserver.go d3ddd033b0 init 7 years ago
list.go d3ddd033b0 init 7 years ago
main.go d3ddd033b0 init 7 years ago
makefile d3ddd033b0 init 7 years ago
taskprocess.go 1b8b3d1b62 dcrwallet 7 years ago

README.md

CoinProxy 接口使用说明

1 程序接口设计说明 1.1 创建用户地址 请求方式:post 协议:http url路径: http://ip:port/coinproxy/createaddr Postdata: 关键字 必需 描述 signature 是 Sha1(postdata+timestamp+apikey) timestamp 是 Unix 时间戳 cointype 是 货币类型。Sia 暂定类型为:SC

返回结果: 成功:{“errcode”:0.”address”:”xxxxxx”} 失败:{“errcode”:-xx,”msg”:”xxx”}

1.2 获取的交易输出(入币) 采用http get 方法,定时查询获取。

请求方式:get 协议:http url路径: http://ip:port/coinproxy/query /transinfo Postdata: 关键字 必需 描述 signature 是 Sha1(postdata+timestamp+apikey) timestamp 是 Unix 时间戳 starth 是 启始块链高度 endh 是 尾块链高度 cointype 是 货币类型,sia 币暂定为SC

返回结果: 成功:{ “errcode”:0, “cointype”:”SC” “outputs”[

       {
             "id":"4b5bec08e5280d5b5bee92352ab683a3fbf2b67dcf257ed8adab5cca877b974c",
             "walletaddress":true,
             "address":"1e8314b279863594ba4405475a6243dfe2369d7f87db94a5d304bb721b096e118b9882fbf1f5",
             "value":"98962100000000000000000000"
             "transactionid":"306510bf6a4f8054dd29a65d80fa71764249e5a00d8e70cbef39b5e08d8e780c",
             "confirmationheight":108660,
             "confirmationtimestamp":1496911746
        },      
     ] 

} 失败:{“errcode”:-xx,”msg”:”xxx”}

1.3 SC 币转账 把钱包的余额转账到指定地址上

请求方式:post 协议:http url路径: http://ip:port/coinproxy/sendcoins Postdata: json 关键字 必需 描述 signature 是 Sha1(postdata+timestamp+apikey) timestamp 是 Unix 时间戳 amount 是 转账的数目 address 是 转账的目的地址

返回结果: 成功: {“errcode”:0.”msg”:”xxxxxx”,”transcationids”:[“xxx”,”xxxx”]}

//示例: {“errcode”:0.”msg”:”xxxx",transactionids":["ce3d01e9c4c1476365eaa64c9cf6429b97a248e088dc3f0db42abaf013949aa6","29278ffe74df1b05780a608d201d96c3e5add8ae9018dad0ce8ca75d62a44cbc"]}

失败:{“errcode”:xx,”msg”:”xxx”}

1.4 查询钱包余额 获取钱包余额

请求方式:post 协议:http url路径: http://ip:port/coinproxy/coinbalance postdata: json 关键字 必需 描述 signature 是 Sha1(postdata+timestamp+apikey) timestamp 是 Unix 时间戳 cointype 是 货币类型。Sia 暂定类型为:SC

返回结果: 成功:{“errcode”:0.”confirmedbalance”:”xxxxxx”,”exact”:”xxxxx”,”unconfirmed”:”xxxx”}

//confirmed balance 确认的余额 //exact :精确的余额,bigint 表示。 例如: Confirmed Balance: 986.8 SC Exact: 986770999999999999999999752 H Unconfirmed: -1.5 SC

失败:{“errcode”:xx,”msg”:”xxx”}