Last active
May 17, 2021 04:27
-
-
Save bluepnume/36b7ce0f2a3a38201273f2553d5dd958 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type BlockChainType = {| | |
addBlock : (hashedBlock : string) => Promise<void>, | |
createBlock : (publicKey : string, transactions : Array<string>) => Promise<?string>, | |
getBalances : () => Promise<Counter> | |
|}; | |
export function BlockChain() : BlockChainType { | |
const createBlock = async (publicKey, transactions) : Promise<?string> => { | |
}; | |
const addBlock = async (block : BlockType) => { | |
}; | |
const getBalances = async () : Promise<Counter> => { | |
}; | |
return { | |
addBlock, | |
createBlock, | |
getBalances | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment