Savjee / Savjeecoin
Licence: mit
A simple blockchain in Javascript. For educational purposes only.
Stars: ✭ 1,097
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Savjeecoin
Coinonline
A Cryptocurrency/Blockchain wallet app based on React Native
Stars: ✭ 59 (-94.62%)
Mutual labels: blockchain, wallet
Blockchain
Compilation of useful documents and scientific papers about Blockchain & cryptocurrencies.
Stars: ✭ 751 (-31.54%)
Mutual labels: blockchain, cryptography
Stratisbitcoinfullnode
Bitcoin full node in C#
Stars: ✭ 757 (-30.99%)
Mutual labels: blockchain, wallet
Lethean Vpn
Lethean Virtual Private Network (VPN)
Stars: ✭ 29 (-97.36%)
Mutual labels: blockchain, cryptography
Arcbit Android
arcbit - Android bitcoin wallet http://arcbit.io
Stars: ✭ 34 (-96.9%)
Mutual labels: blockchain, wallet
Waves
⛓️ Reference Waves Blockchain Node (client) implementation on Scala
Stars: ✭ 1,077 (-1.82%)
Mutual labels: blockchain, cryptography
Maskbook
The portal to the new, open internet. ([I:b])
Stars: ✭ 691 (-37.01%)
Mutual labels: blockchain, cryptography
Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (-15.86%)
Mutual labels: blockchain, cryptography
Monero
Monero: the secure, private, untraceable cryptocurrency
Stars: ✭ 6,503 (+492.8%)
Mutual labels: blockchain, cryptography
Weiwallet Android
Wei Wallet is an open source Ethereum wallet for Android
Stars: ✭ 20 (-98.18%)
Mutual labels: blockchain, wallet
Firo
The privacy-focused cryptocurrency
Stars: ✭ 528 (-51.87%)
Mutual labels: blockchain, cryptography
Tiny.scatter
Scatter compatible eos injection library
Stars: ✭ 31 (-97.17%)
Mutual labels: blockchain, wallet
Exonum
An extensible open-source framework for creating private/permissioned blockchain applications
Stars: ✭ 1,037 (-5.47%)
Mutual labels: blockchain, cryptography
SavjeeCoin
⚠️ For education purposes only. This is by no means a complete implementation and it is by no means secure!
Features
- Simple proof-of-work algorithm
- Verify blockchain (to prevent tampering)
- Generate wallet (private/public key)
- Sign transactions
🏁 Getting Started
Install library
npm install --save savjeecoin
Generate a keypair
To make transactions on this blockchain you need a keypair. The public key becomes your wallet address and the private key is used to sign transactions.
const EC = require('elliptic').ec;
const ec = new EC('secp256k1');
const myKey = ec.genKeyPair();
The myKey
object now contains your public & private key:
console.log('Public key:', myKey.getPublic('hex'));
console.log('Private key:', myKey.getPrivate('hex'));
Create a blockchain instance
Now you can create a new instance of a Blockchain:
const {Blockchain, Transaction} = require('savjeecoin');
const myChain = new Blockchain();
Adding transactions
// Transfer 100 coins from my wallet to "toAddress"
const tx = new Transaction(myKey.getPublic('hex'), 'toAddress', 100);
tx.signTransaction(myKey);
myChain.addTransaction(tx);
To finalize this transaction, we have to mine a new block. We give this method our wallet address because we will receive a mining reward:
myChain.minePendingTransactions(myKey.getPublic('hex'));
📽 Video tutorial
This source code comes from my video series on YouTube. You can check them here:
Video 1: Simple implementation | Video 2: Adding Proof-of-work |
---|---|
Video 3: Mining rewards & transactions | Video 4: Signing transactions |
Video 5: Building a front-end in Angular | |
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].