KopoBlockchain
Python Blockchain Implementation for educational purposes (Dept. of Smart Finance of Korea Polytechnics)
Install / Use
npx skills add wonyongHwang/KopoBlockchainInstalls into whichever agent you are using.
README
KopoBlockchain
Python Blockchain Implementation for educational purposes (Dept. of Smart Finance of Korea Polytechnics) ..
YOU MUST RUN BLOCKCHIAN SERVER BEFORE FOLLOW THESE INSTRUCTIONS BELOW !!!
📖 Contents
🧱 getBlockData
You can get Block data by link down below. (GET Method)
You MUST run myBlockChain.py on pyCharm before click this link.
http://localhost:8666/block/getBlockData
*This is Example Request for getBlockData (curl)
curl --location --request GET 'http://localhost:8666/block/getBlockData'
💡 generateBlock
You should write tx before generate a new block. if you don't write new tx, mining will be aborted.
You can write new tx here -> newTx
You can generate a new block by link down below.
it use GET method to run this function.
http://localhost:8666/block/generateBlock
*This is Example Request for generateBlock (curl)
curl --location --request GET 'http://localhost:8666/block/generateBlock'
⛏ newBlock
You can mine a new block by link down below.
it also use GET method to run this function.
http://localhost:8666/block/mineNewBlock
*This is Example Request for newBlock (curl)
curl --location --request GET 'http://localhost:8666/block/mineNewBlock'
💵 newtx (POST)
Please use Post Method for this Example request.
You have to fill out Headers and Body before when you send requests.
(Content-Type(KEY) : application/json(VALUE), Body = raw, json)
*This is Example Request for newTx (curl, POST Method)
curl --location --request POST 'http://localhost:8666/block/newtx' \
--header 'Content-Type: application/json' \
--data-raw '[{
"sender" : "sender_name",
"amount" : "number_of_amounts",
"receiver" : "receiver_name"
}]'
🔎 validateBlock
You can check that new block is valid or not.
You have to figure out "currentHash", "data", "index", "previousHash", "proof", "timestamp" before validate new block.
Use POST Method same as newTx before.
*This is Example Request for validateBlock (curl, POST Method)
curl --location --request POST 'http://localhost:8666/block/validateBlock' \
--data-raw '[
{
"currentHash": "aad22d5f3bb41eaacda9883106e8770cf9818a710cba5309e11bfd4721dfee6f",
"data": "Genesis Block",
"index": "0",
"previousHash": "0",
"proof": "0",
"timestamp": "1654828634.695756"
}
]'
💎 Diagrams
🌊 Flow chart Image for generateBlock

🌊 Flow chart Image for getBlockData

🌊 Flow chart Image for addNodeData

Related Skills
valuecell
11.0kValueCell is a community-driven, multi-agent platform for financial applications.
QuantDinger
10.4kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
beanquery-mcp
50Beancount MCP Server is an experimental implementation that utilizes the Model Context Protocol (MCP) to enable AI assistants to query and analyze Beancount ledger files using Beancount Query Language (BQL) and the beanquery tool.
finance-skills
3.1kA collection of skills for AI financial analysis.
