Did I find the right examples for you? yes no

All Samples(17)  |  Call(12)  |  Derive(0)  |  Import(5)

        def long_hex(bytes):
  return bytes.encode('hex_codec')
        


src/b/i/bitcointools-HEAD/wallet.py   bitcointools(Download)
from BCDataStream import *
from base58 import public_key_to_bc_address, bc_address_to_hash_160, hash_160
from util import short_hex, long_hex
from deserialize import *
 
            ", Salt: 0x"+ short_hex(d['salt']) +
            ". Passphrase hashed %d times with method %d with other parameters 0x"%(d['nDeriveIterations'], d['nDerivationMethod']) +
            long_hex(d['vchOtherDerivationParameters']))
    elif type == "defaultkey":
      print("Default Key: 0x"+ short_hex(d['key']) + " " + public_key_to_bc_address(d['key']))
      print deserialize_BlockLocator(d)
    elif type == "cscript":
      print("CScript: %s : %s"%(public_key_to_bc_address(d['scriptHash'], "\x01"), long_hex(d['script'])))
    else:
      print "Unknown key type: "+type
      if len(transaction_filter) > 0 and re.search(transaction_filter, tx_value) is None: continue
 
      print("==WalletTransaction== "+long_hex(d['tx_id'][::-1]))
      print(tx_value)
 

src/b/i/bitcoin-abe-HEAD/Abe/deserialize.py   bitcoin-abe(Download)
import socket
import time
from util import short_hex, long_hex
import struct
 
    p = transaction_index[d['prevout_hash']]['txOut'][d['prevout_n']]
    result = "TxIn: value: %f"%(p['value']/1.0e8,)
    result += " prev("+long_hex(d['prevout_hash'][::-1])+":"+str(d['prevout_n'])+")"
  else:
    result = "TxIn: prev("+long_hex(d['prevout_hash'][::-1])+":"+str(d['prevout_n'])+")"

src/a/b/Abe-0.7.2/Abe/deserialize.py   Abe(Download)
import socket
import time
from util import short_hex, long_hex
import struct
 
    p = transaction_index[d['prevout_hash']]['txOut'][d['prevout_n']]
    result = "TxIn: value: %f"%(p['value']/1.0e8,)
    result += " prev("+long_hex(d['prevout_hash'][::-1])+":"+str(d['prevout_n'])+")"
  else:
    result = "TxIn: prev("+long_hex(d['prevout_hash'][::-1])+":"+str(d['prevout_n'])+")"

src/b/i/bitcointools-HEAD/block.py   bitcointools(Download)
from BCDataStream import *
from base58 import public_key_to_bc_address
from util import short_hex, long_hex
from deserialize import *
 
  blockfile.close()
  if do_print:
    print "BLOCK "+long_hex(hash256[::-1])
    print "Next block: "+long_hex(hashNext[::-1])
    print block_string
    type = kds.read_string()
    hash256 = kds.read_bytes(32)
    hash_hex = long_hex(hash256[::-1])
    block_data = _parse_block_index(vds)
 

src/b/i/bitcointools-HEAD/deserialize.py   bitcointools(Download)
import socket
import time
from util import short_hex, long_hex
import struct
 
    p = transaction_index[d['prevout_hash']]['txOut'][d['prevout_n']]
    result = "TxIn: value: %f"%(p['value']/1.0e8,)
    result += " prev("+long_hex(d['prevout_hash'][::-1])+":"+str(d['prevout_n'])+")"
  else:
    result = "TxIn: prev("+long_hex(d['prevout_hash'][::-1])+":"+str(d['prevout_n'])+")"