I hereby claim:
- I am dvf on github.
- I am dvf (https://keybase.io/dvf) on keybase.
- I have a public key ASDMxnfzs4Am9pp5c7i38JACvJCMGlWHABqecGuzoGqr3Qo
To claim this, I am signing this object:
import hashlib | |
import json | |
from time import time | |
from uuid import uuid4 | |
from flask import Flask, jsonify, request | |
... |
import hashlib | |
import json | |
from textwrap import dedent | |
from time import time | |
from uuid import uuid4 | |
from flask import Flask, jsonify, request | |
... |
class Blockchain(object): | |
def __init__(self): | |
self.chain = [] | |
self.current_transactions = [] | |
def new_block(self): | |
# Creates a new Block and adds it to the chain | |
pass | |
def new_transaction(self): |
function MD5 (input) { | |
var digest = Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, input); | |
var output = ""; | |
for (i = 0; i < digest.length; i++) { | |
var h = digest[i]; | |
if (h < 0) { h += 256; } | |
if (h.toString(16).length == 1) { output += '0'; } | |
output += h.toString(16); | |
} | |
return output; |
class Blockchain(object): | |
... | |
def new_transaction(self, sender, recipient, amount): | |
""" | |
Creates a new transaction to go into the next mined Block | |
:param sender: <str> Address of the Sender | |
:param recipient: <str> Address of the Recipient | |
:param amount: <int> Amount |
import hashlib | |
import json | |
from textwrap import dedent | |
from time import time | |
from uuid import uuid4 | |
class Blockchain(object): | |
def __init__(self): | |
self.current_transactions = [] |
import hashlib | |
import json | |
from time import time | |
from uuid import uuid4 | |
class Blockchain(object): | |
... | |
class Blockchain(object): | |
def __init__(self): | |
self.current_transactions = [] | |
self.chain = [] | |
def new_block(self): | |
# Creates a new Block in the Blockchain | |
pass | |
def new_transaction(self): |
@app.route('/chain', methods=['GET']) | |
def full_chain(): | |
response = { | |
'chain': blockchain.chain, | |
'length': len(blockchain.chain), | |
} | |
return jsonify(response), 200 |
I hereby claim:
To claim this, I am signing this object: