Skip to content

thoschu/ch.techstack.blockchain

Repository files navigation

thoschu/ch.techstack.blockchain

⚠️ UNDER CONSTRUCTION ⚠️

npm install 
or
npm ci

npm start

http://loclahost:300*

npm test

blockchain.js

function Blockchain(currentNodeUrl, nodeIdentifier) {}
Blockchain.prototype.getAddressData = function (address) {}
Blockchain.prototype.getTransactionById = function (transactionId) {}
Blockchain.prototype.getBlockByHash = function (blockHash) {}
Blockchain.prototype.isChainValid = function (blockchain) {}
Blockchain.prototype.currentBlockData = function () {}
Blockchain.prototype.proofOfWork = function (previousBlockHash, currentBlockData) {}
Blockchain.prototype.hashBlock = function (previousBlockHash, currentBlockData, nonce) {}
Blockchain.prototype.hash = function (dataAsString) {}
Blockchain.prototype.createNewTransaction = function(amount, sender, recipient) {}
Blockchain.prototype.addTransactionToPendingTransaction = function(newTransaction) {}
Blockchain.prototype.getLastBlock = function() {}
Blockchain.prototype.createNewBlock = function(nonce, previousBlockHash, hash) {}

server.js

const route = {
    method: 'GET',
    path: '/blockchain',
    handler: (request, h) => {}
};
const route = {
    method: 'GET',
    path: '/blockchain/hash',
    handler: (request, h) => {}
};
const route = {
    method: 'POST',
    path: '/transaction',
    handler: (request, h) => {}
};
const route = {   
    method: 'POST',
    path: '/transaction/broadcast',
    handler: (request, h) => {}
};
const route = {         
    method: 'GET',
    path: '/mine',
    handler: (request, h) => {}
};
const route = {
    method: 'POST',
    path: '/receive-new-block',
    handler: (request, h) => {}
};
const route = {
    method: 'POST',
    path: '/register-and-broadcast-node',
    handler: (request, h) => {}
};
const route = {
    method: 'POST',
    path: '/register-node',
    handler: (request, h) => {}
};
const route = {    
    method: 'POST',
    path: '/register-nodes-bulk',
    handler: (request, h) => {}
};
const route = {    
    method: 'GET',
    path: '/consensus',
    handler: (request, h) => {}
};
const route = {    
    method: 'GET',
    path: '/block/{blockHash?}',
    handler: (request, h) => {}
};
const route = {    
    method: 'GET',
    path: '/transaction/{transactionId?}',
    handler: (request, h) => {}
};
const route = {    
    method: 'GET',
    path: '/address/{addresse?}',
    handler: (request, h) => {}
};

💡

Network

Transaction

Mine

Software made with in Hamburg - Germany.