Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cosme12/SimpleCoin
/ functions
Functions
17 in github.com/cosme12/SimpleCoin
⨍
Functions
17
◇
Types & classes
1
↳
Endpoints
2
↓ 1 callers
Function
check_transactions
Retrieve the entire blockchain. With this you can check your wallets balance. If the blockchain is to long, it may take some time to load.
simpleCoin/wallet.py:91
↓ 1 callers
Function
consensus
(blockchain)
simpleCoin/miner.py:157
↓ 1 callers
Function
create_genesis_block
To create each block, it needs the hash of the previous one. First block has no previous, so it must be created manually (with index zero and
simpleCoin/miner.py:47
↓ 1 callers
Function
find_new_chains
()
simpleCoin/miner.py:141
↓ 1 callers
Function
generate_ECDSA_keys
This function takes care of creating your private and public (your address) keys. It's very important you don't lose any of them or those wallets
simpleCoin/wallet.py:103
↓ 1 callers
Method
hash_block
Creates the unique hash for the block. It uses sha256.
simpleCoin/miner.py:40
↓ 1 callers
Function
proof_of_work
(last_proof, blockchain)
simpleCoin/miner.py:68
↓ 1 callers
Function
send_transaction
Sends your transaction to different nodes. Once any of the nodes manage to mine a block, your transaction will be added to the blockchain. Despite
simpleCoin/wallet.py:62
↓ 1 callers
Function
sign_ECDSA_msg
Sign the message to be sent private_key: must be hex return signature: base64 (to make it shorter) message: str
simpleCoin/wallet.py:124
↓ 1 callers
Function
validate_blockchain
Validate the submitted chain. If hashes are not correct, return false block(str): json
simpleCoin/miner.py:176
↓ 1 callers
Function
validate_signature
Verifies if the signature is correct. This is used to prove it's you (and not someone else) trying to do a transaction with your address. Call
simpleCoin/miner.py:236
↓ 1 callers
Function
wallet
()
simpleCoin/wallet.py:28
↓ 1 callers
Function
welcome_msg
()
simpleCoin/miner.py:251
Method
__init__
Returns a new Block object. Each block is "chained" to its previous by calling its unique hash. Args: index (int): Block
simpleCoin/miner.py:16
Function
get_blocks
()
simpleCoin/miner.py:184
Function
mine
(a, blockchain, node_pending_transactions)
simpleCoin/miner.py:87
Function
transaction
Each transaction sent to this node gets validated and submitted. Then it waits to be added to the blockchain. Transactions only move coins, th
simpleCoin/miner.py:207