bitcoin

How to capture and modify Google Protocol Buffers in a Django view?

旧时模样 提交于 2019-12-08 03:56:17
问题 Here is a link to the proto file. Please can someone help me understand how to make this work: from django.views.decorators.csrf import csrf_exempt from bitchikun import payments_pb2 @csrf_exempt def protoresponse(request): xpo = payments_pb2.Payment.ParseFromString(request) t = type(xpo) xpa = request.PaymentACK xpa.payment = xpo.SerializeToString() xpa.memo = u'success' return HttpResponse(xpa.SerializeToString(), content_type="application/octet-stream") All input appreciated :) 回答1: OK so

Angular4 Error trying to diff '[object Object]'

浪子不回头ぞ 提交于 2019-12-08 00:51:59
问题 I'm trying to display some info in the dom but I get this error: Error: Error trying to diff '[object Object]' What Im trying to do is iterate over this data from https://www.surbtc.com/api/v2/markets/btc-clp/ticker: {"ticker":{"last_price":["1771455.0","CLP"],"min_ask":["1771432.0","CLP"],"max_bid":["1660003.0","CLP"],"volume":["178.37375119","BTC"],"price_variation_24h":"-0.107","price_variation_7d":"-0.115"}} I want to display it in the html like this: <div *ngFor="let price of prices"> {

Access-Control-Allow-Origin header when Origin 'null' when trying to post data to a LOCAL application

五迷三道 提交于 2019-12-08 00:21:30
问题 I'm working on a program which will help interface with your bitcoin wallet via the browser. By setting up the bitcoin client as a server with the following commands in it's .conf file... server=1 rpcuser=test rpcpassword=test rpcallowip=127.0.0.1 It will allow it to run as a server and thus let you post JSON commands at it. I've gotten this to work with the following code below. $.ajax({ url: 'http://test:test@127.0.0.1:29661', type: 'POST', contenType: 'application/json', cache:false,

bitfinex api v2 error, invalid key

痞子三分冷 提交于 2019-12-07 11:07:26
问题 I am trying to make a basic authenticated api call to their new v2 api and getting an invalid api key error returned. I reissued the api key just to verify, same error. from time import time import urllib.request import urllib.parse import hashlib import hmac APIkey = b'myapikeyyouarenotsupposedtosee' secret = b'myceeeeecretkeyyyy' url = 'https://api.bitfinex.com/v2/auth/r/wallets' payload = { #'request':'/auth/r/wallets', 'nonce': int(time() * 1000), } paybytes = urllib.parse.urlencode

How to capture and modify Google Protocol Buffers in a Django view?

余生颓废 提交于 2019-12-07 08:36:28
Here is a link to the proto file . Please can someone help me understand how to make this work: from django.views.decorators.csrf import csrf_exempt from bitchikun import payments_pb2 @csrf_exempt def protoresponse(request): xpo = payments_pb2.Payment.ParseFromString(request) t = type(xpo) xpa = request.PaymentACK xpa.payment = xpo.SerializeToString() xpa.memo = u'success' return HttpResponse(xpa.SerializeToString(), content_type="application/octet-stream") All input appreciated :) OK so I think I understand what is happening now. You have a system which is POSTing a serialized protobuf to

Deriving an ECDSA uncompressed public key from a compressed one

橙三吉。 提交于 2019-12-06 22:32:38
问题 I am currently trying to derive a Bitcoin uncompressed ECDSA public key from a compressed one. According to this link on the Bitcoin wiki, it is possible to do so... But how? To give you more details: as of now I have compressed keys (33-bytes-long) gathered on the bitcoin network. They are of the following format: <1-byte-long prefix><32-bytes-long X>. From there, I would like to obtain an uncompressed key (65-bytes-long) whose format is: <1-byte-long prefix><32-bytes-long X><32-bytes-long Y

centos7安装BitCoin客户端

本秂侑毒 提交于 2019-12-06 11:46:42
一、安装依赖环境 [root@localhost src]# yum install autoconf automake libtool libdb-devel boost-devel libevent-devel -y 二、从github上下载源代码 [root@localhost src]# git clone https://github.com/bitcoin/bitcoin.git 正克隆到 'bitcoin'... remote: Enumerating objects: 2, done. remote: Counting objects: 100% (2/2), done. remote: Total 150662 (delta 1), reused 1 (delta 1), pack-reused 150660 接收对象中: 100% (150662/150662), 134.33 MiB | 33.00 KiB/s, done. 处理 delta 中: 100% (105182/105182), done. [root@localhost src]# 三、运行autogen.sh,生成configure文件 [root@localhost bitcoin]# ./autogen.sh libtoolize: putting auxiliary files in

Access-Control-Allow-Origin header when Origin 'null' when trying to post data to a LOCAL application

我们两清 提交于 2019-12-06 06:06:30
I'm working on a program which will help interface with your bitcoin wallet via the browser. By setting up the bitcoin client as a server with the following commands in it's .conf file... server=1 rpcuser=test rpcpassword=test rpcallowip=127.0.0.1 It will allow it to run as a server and thus let you post JSON commands at it. I've gotten this to work with the following code below. $.ajax({ url: 'http://test:test@127.0.0.1:29661', type: 'POST', contenType: 'application/json', cache:false, dataType:"json", data: '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }', timeout:

Parsing JSON data from a remote server

岁酱吖の 提交于 2019-12-06 03:36:07
问题 I was wondering if there was any way to make a Parser in PHP in which gets the values from this site https://btc-e.com/api/2/btc_usd/ticker and sets them as variables in php code? I have looked at php parsers a bit and the only thing I found was parsers that echo all the information on a website. 回答1: Since that URL returns a JSON response: <?php $content=file_get_contents("https://btc-e.com/api/2/btc_usd/ticker"); $data=json_decode($content); //do whatever with $data now ?> 回答2: You can use

BCH网络升级顺利完成,将创新和开发推向新高度

ⅰ亾dé卋堺 提交于 2019-12-06 02:37:56
在UTC时间2019年11月15日,区块高度609135处BCH网络按计划进行了升级。该区块由AntPool矿池打包,包含306笔交易,总大小90.90 kb。升级新共识之后的BCH,从第一个区块609136开始,就已经开始实施新的共识。 这也意味这从该区块开始,BCH在安全和扩容方面进一步完善,在脚本中强制执行MINIMALDATA、操作码OP_Checkmultisig和OP_Checkmultisigverify也已经接受Schnorr签名。 每六个月,BCH网络都会进行一次升级,旨在成为更好的点对点电子现金,实现其“世界上健全的货币”的目标。到目前为止,BCH已经进行了5次升级,已将BCH区块大小增加到32MB,重新启用了Satoshi操作码,实现了OP_Checkdatasig,添加了Canonical Transaction Ordering(CTOR),以及Schnorr签名支持等。而此次升级也是完全符合其路线图,以提升其安全性和扩展性。 在这一轮升级中,两个共识规则更改生效了。第一个是操作码OP_Checkmultisig和OP_Checkmultisigverify升级为接受Schnorr签名。这是对之前升级的延续,它使Schnorr签名可以与OP_CHECKSIG和OP_CHECKDATASIG一起使用。升级扩展对OP_CHECKMULTISIG的支持