12 2017 档案
摘要:> 注意,以太坊智能合约里面采用的是公钥非紧凑类型```def gen_secrets_pair(): """ 得到公钥和私钥 :return: """ from coincurve import PrivateKey p = PrivateKey() return p.to_hex(), p.public_key.format(compressed=Fa...
阅读全文
摘要:```pragma solidity ^0.4.16;contract Metadata { // 十六进制字符串转换成bytes function hexStr2bytes(string data)returns (bytes){ uint _ascii_0 = 48; uint _ascii_A = 65; uint _ascii_a = ...
阅读全文
摘要:[比特币白皮书](http://www.8btc.com/wiki/bitcoin-a-peer-to-peer-electronic-cash-system)[以太坊白皮书](https://github.com/ethereum/wiki/wiki/%5B%E4%B8%AD%E6%96%87%5D-%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%99%BD%E7%9A%AE%E4...
阅读全文
摘要:```pythonfrom __future__ import unicode_literalsimport jsonfrom time import sleep, time# 中文编码def encode_str(_str): try: return bytearray(_str, "utf-8").hex() except Exception as e: ...
阅读全文

浙公网安备 33010602011771号