Loading video player...
All of you welcome back to yet another
project video. In this project, you're
going to build your first ever private
blockchain where you can able to perform
all the transaction. We have wallet
integration model, open API endpoint for
exploring the transaction. So you can
simply import the network configuration
in your metamar like private key, chain
ID, RPC URL symbol and simply perform
the transaction between the account. So
let me give you a complete walkthrough
about the feature and functionality we
have included in your own private
blockchain. You can see that our
blockchain is running absolutely fine.
When we'll start the application, it
will create a five different account.
And each account will have 10,000 native
currency which we can use it to perform
all the transaction. And here you will
find all the transaction logs, the
transfer of the tokens we have done, the
mining of the block. That's all you will
find. Our blockchain will constantly
look for the block number and whenever
the trigger the event will trigger in
our wallet. It's going to print out and
provide the details about the wallet and
the transaction model. So that's all we
have here. Now let me show you how you
can able to perform the transaction on
your own private blockchain. So I'll
come back to my metamas wallet. I'll
click on my metamas and you will find
that I have already imported our private
blockchain in my metamas and the node is
running absolutely fine. So if I click
here you will find that this is the two
account which I have imported in which I
have the fund which I can use to
transfer to different wallet. So if I
show you my network configuration. So
I'll come back here click here and we
have all the details. So we have the
name, this is the RPC endpoint, this is
the chain ID and this is the PCB I have
given the symbol for our network and
that's what I have saved. Now let's come
back here and let's try to perform the
transaction. So if you come back here in
the account number three, I have this
much token. I'll simply select here and
I'm going to do the transfer. So I'll
simply click here and I'm going to
select the account number. Anyone I can
select to do the transfer. So I can go
with account number one and let's try to
transfer 3,000 tokens and I can click on
this continue and the transaction logs
you will find right up here that how
much gas we are paying. Click on this
confirm and the transaction is in the
pending. So you should simply ignore
this one because we don't have the event
and it's a private network. All you have
to do is to check the balance. So if you
come back here, you will find the
balance went down. Earlier it was 9,400
and right now we have 6,500.
So whenever any user will do the
transfer, we are rewarding the user with
the 100 token as a minor. So that
account is going to be utilized as a
minor as well. So if I come back to my
account number one, you will see this is
the fund. It will go up 3,000 token. We
have got it. If I want to do the
transfer, I can simply select here.
Click on this send and I can come back
here. I can send transfer to the account
number two or any one of this. So I'll
simply select this account number two
and I can transfer let's say 300 3,000
token. I'll click on this continue and
the transfer is happening. You will find
the logs of the final confirmation.
Click on this confirm and the
transaction is in the pending. Simply
ignore this one because we don't have
the event model in the private
blockchain. So I'll simply come back to
the token and you will find that this
went down to 600. It was 3,500. We are
rewarding the world 100 token as a minor
at the same time when he will perform
the transaction. So if I come back here,
go back to my account number two, you
will find that it got 3,000 token back
to his wallet. And if you come back to
the terminal, you can see all the
transaction log. You will find all the
transaction we have done. It's listening
for the event. You can see how much
token we have transferred. It's listen
per the event and it's mind it. So when
the user will mind we are rewarding it
and we are executing the transaction. So
that's all the logs which you will find
right up here. All the transaction model
that's all is there. It's going to
trigger and provide the data whenever
you will perform the transaction. So
here we have transfer 3,000 token again.
You can see we had used the same wallet
to mine the block and that's what we
have. So if you come back here you will
find the data logs which you can
explore. And if you go all the way down,
you will find the latest transaction we
have done and the wallet we have
changed. That's the data is going to
reflect here. So you can see right now
we are on the account number two which
is DB4. So it's also listening for the
event. The moment I will change this
wallet address will change. So this
address will change. So if I come back
to our project and if I switch my
account to account number one or I can
go with account number three. So if I
click here, you will find this will
listen for the event. So if I show you
my wallet address for this, it has let's
say F 94. So if I come back here, you
can see it will listen for the event and
it's going to check the data and display
the data and it's going to allow user to
read from the chain. So here we are
listening for the event and the block.
Now I can come back once again and
perform the transaction. I can come back
here. I can go here and now I can
transfer the fund from let's say account
number four. Here you will see that this
account has 10,000 token. So if I want
to do the transfer, I can do that. I can
use this one. Come back here and I can
transfer to any wallet. So I'll select
this one and I can transfer let's say
5,000 token. Click on this continue. And
the transaction is processed. Click on
confirm. And here we have it's pending.
Simply ignore this one. All you have to
do is to focus here and you will find
that it's went down. And we have used
the same world as a minor. So we have
rewarded them with 100 token. Looks
absolutely fine. You can come back here.
to go back to the account number one
there you will find it's went up so
every single thing is looking absolutely
fine you can see all the data logs we
have read we have done the transfer to
the account number one that's the get
balance model which you will find
because when you will open it's going to
read the data in the metamas and that's
what is displaying if you come back here
here we have done the transaction and
you can see how much we have done it
that's what you will find in the block
number five so this architecture is very
important for you you can see how
transfer we have done this is the
transaction has we have the mine pending
and we have mined this particular block
in which we have stored all the data now
if you want to explore this transaction
we have also included the API endpoint
which is running on local 3000 so let me
show you that how you can able to read
the data all you can do is include a
front end where you can call the API so
this is the one I have which is running
on local 3000 our API so user can read
the data so I can come back to my
browser
And I'll open a new tab. I'll open a new
tab. Click on this local host. And you
will see that here we have this one.
It's call this to be 3001. And I will
paste this one and hit enter. It's going
to give me the data of all the block all
the transaction we have performed. You
can see the height the details that's
all is there. So this project is
absolutely must for every single one of
you those who are interested in core
blockchain development. Then you have to
understand that how the blockchain
exactly work. How you can design your
own architecture to provide the feature
because this kind of project is really
popular when it's come to private
blockchain focusing on health industry,
focusing on the personal finance model.
Most of the private blockchain you will
find follow the exact model. Whether you
talk about the IBM, whether you talk
about the wall street, they have the
exact model where they are allowing user
to perform the transaction on their
private network. So this is the project
we have developed for one of our client.
So I thought let's develop and let's
teach you guys how you can able to build
these kind of project. So I hope you
have understood that what are the
functionality and feature we have
included in this particular private
blockchain. Now let me provide you all
the material all the assets which you
need to build this particular project
and take you through the entire code
structure. So to get the assets and the
final source code you can come back to
the blockchain coder. You can come back
to the blockchain coder. I'll provide
you the link in the description. And you
can click there and you can come back to
this or you can simply go back in the
blockchain coder. Here you will find all
the project we have developed. So make
sure to create your account. Once you
will create you will have the source
code option or you can simply go with
source code option for here as well. So
I'll simply click here and go back to
the source code and here you will find
all the project we have developed. We
have more than 120 plus project we have
developed. So build at least five of
them. When you will develop five project
you will understand that how
decentralized exactly work. How you can
build different architecture. So to get
the assets you can click here, go back
to the recent project and here you have
click here and you will come back here
and here you will find all the assets
all the resources. So the the final code
setup video I'm going to attach here. So
you can click and you can watch till the
end in which I will show you how you can
do the setup of the final source code
which is going to be this video. So make
sure to watch this video till the end.
Click here and you will come back to the
getup and here you will find the entire
structure the project repo which you can
simply clone. So when the complete
project will come we'll simply clone the
repository and we can start falling
straight away. You can check the package
model the architecture we have utilized
for RPC endpoint API call that's all we
have now let me show you that how you
can do the setup of the final source
code once you will take it. So when you
will take it you will give your valuable
contribution to my team to bring more
tutorial like this. So make sure to
click here and take it. Once you will
take the final source code, you will get
the zip file. And when you will extract
this zip file, you will get this folder
in which you will have the complete
source code of the project which you can
see. So I'll simply close this one and
make sure to install a zip extractor.
Then you will get this folder. And this
is the one you have to open in your VS
code. So I'll simply come back here.
Click on my VS code. I'll go back to
open. Go back to desktop. And I have
this folder. I'll select this one and
open. Now let me give you a complete
walkthrough of all the folder and file
structure we have designed for this
project because this one is very
important for you as a developer to
understand the architecture. So the very
first folder you will find is the source
in which you will find the entire
feature we have included and the best
part of this project is that we have
divided into a micro SAS. So the very
first one we have is the blockchain in
which you will find related to all the
blockchain feature like block we have
the chain we have the contract manager
transactional model on the chain that's
what we are providing here so this is
the first micros the next one we have is
the network we have to deal with the
network where we have to provide the
connection to execute the transaction so
we have the API server which allow us to
execute the transaction in the contract
and we have is the P2P server which
allow us to deal the transaction ction
on the chain. So you have the both
model. We have the API as well. You can
call the API to explore the transaction
and we have the actual P2P model which
handle the blockchain transaction
through the crypto wallet. That's what
we have. So let's close this one. We
have the RPC endpoint. We have the
wallet integration model which allow us
to communicate with a different wallet
where you can simply modify and add
multiple feature on top of it based on
your private blockchain. Because in the
private blockchain you have more control
over the feature and functionality which
you want to provide. Now we have the
server file which execute and start our
application and provide all the feature.
So this is the micro SAS we have
developed. You can combine all of this
feature as a one but it's better to
distribute in multiple micros which deal
with particular functionality. So later
you can add more feature and scale your
application. So that's what we have in
the src folder. The next one we have is
the environment variable. And here we
have provided all of this environment
variable. So our application our node
RPC node is going to be run on this
particular port. We have the API port
means when the user will execute the
transaction and if you want to read the
data you can simply visit this
particular port where you can give the
endpoint which I will explain. And here
we have the P2P port. So don't change
anything just keep it as it is. We have
auto mining to false but you can enable
that one as well. And here you will find
our websocket. If you want to connect
with websocket or you can go with the
RPC model, it's totally up to you. Here
you will find the network configuration.
So this is our chain ID. This is the
name I have called. This is the currency
of our network. And here we have the RPC
note provider which we going to import
input in our MetaMask. You will find the
mining difficulties and the reward. So
when we going to validate the
transaction at the time of transaction,
we're going to reward the user 100. And
here we have this particular stop all
server because sometime when you would
perform the transaction some of the
internal server is going to execute. So
it's better to stop all the servers and
then test. So you can simply copy and
run this command. It will stop all the
server. So this is the environment
variable. Just keep it as it is. Don't
need to change anything. Let's close
this one. Now come back to the get
ignore. Here you will find all the data
which you want to push on GitHub. Just
keep it as it is. And here you will find
the Genesis account. So this is the pre
accounts I have given. So you can use
this account which is the exact account
I'm using in my metam mask. Or if you
want to create your new brand account,
you can simply click on this delete. And
what will happen when you will run the
node. So it will look for this
particular file like let me bring it
back. It will look for this particular
file. If this file is there then it's
not going to create a new account. But
if if this file is not available then
it's going to create a new account for
all of your five account and it will
provide you the 10,000 native currency.
But if this file is not here it's going
to recreate new account. So it's better
to delete this one because I want you to
create your new account and it will be
automatically display here. Now if you
come back to the packages some file you
will find that here I have provided all
the information that what are the
packages we are using. These are the
very popular packages which you have to
understand and read. There are multiple
models we have into it and it's very
important for you to understand because
if you really if you want to build your
node models customization adding
multiple feature on top of it you can do
that very easily. So close this one and
here you will find the readme file where
I have given all the information all the
important information which you can have
a look. So just keep it as it is. Don't
need to make any changes. first test the
way I'm doing it after that do all the
experiment so I'll simply close this one
now the very first thing I have to do is
to open up my terminal and right now you
can see that I have I'm in the main
directory in the main directory now I
have to check my node version because
this one is very important make sure you
should be on the same node version
because this node version is very much
compatible with all the package and we
are focusing on stability so no matter
you're building for 5 years 10 years as
long as you follow the package version
and the node version. Every single thing
would be working fine. So this is the
node version. If I show you my npm
version, this is what I have. Looks
great. Got it? Now I have to do the
installation of the package. I'll simply
type npm I or install both will work
fine. Let's hit enter. And you will find
the installation is got started. This
might takes a little bit time depending
on your internet speed and on your
system that how fast your system is. So
just wait, give some time. Don't
interrupt. Once the installation will
complete, we'll start testing and
starting our own blockchain. And
finally, we have done with the
installation. And you can see we are
getting couple of depreciated
depreciated. Don't need to worry about
it. We are focusing on stability. So
these are the couple of warning we are
getting. Ignore that one. And we have no
vulnerability. Now we have to clear our
terminal. We can come back here in our
in our packages file. And this is the
command we have to execute. So if you go
back, this is the start script we have.
So all you have to do is to simply start
the script. I'll simply bring it up and
type npm
start. When you will run this command,
it going to start our private blockchain
the node. And right now I don't have
that genesis account. So it's going to
recreate the five account and it's going
to fund native currency into those
account. So I'll simply hit enter and it
will start our local blockchain. And
here you can see it started. Here you
can see it started. So if you come back
here on top we have executed this
command. You can see it's find there's
no file
which mean it's going to create the
account. So it's created and now you
will find the account initialization. So
this is the five account which is given
which you can import the private key and
you will have this much fun which you
can use to do the transaction. Now if
you come back here here we have the
private blockchain node. So this is the
P2P server node we have and here you
will find the details about the network.
So how you can import the network in
your metam that's all the detail is
given. So this is the details we have to
provide. So this is the RPC URL. This is
the chain ID. You can call whatever you
want to your network but you have to add
this one. So this is the data we have to
add which we going to do it. And here
you will find the interesting part. We
are also providing you the API endpoint.
So if you want to build your own block
explorer to display the data about the
transaction is happening in your network
in your private network user can easily
able to explore. So to get all the
blocks a specific block transaction
pending creation address balance mining
deployment contract information API
that's all is there. So let's first let
me show you how you can add it. So make
sure you should start the blockchain.
Now you can come back to your metamas.
I'll open my metamas and right now
you'll find this account is already
here. I'll first delete this one. So
I'll switch my account. I'll come back
here and make sure to delete this one.
I have deleted this private blockchain.
So I would suggest you. So first you
have to activate the test network in
your metamas. Then you will have the
option of test network. So hostly is
already depreciated. So I'm going to
delete this one. Depreciated. So now I
have to add the network. So I'll click
on this add custom network. And here I
have to provide the exact detail. Come
back here. And this is the details I
have to provide. So I'll get the chain
ID. Chain ID and come back here. And
here I have to provide. So I'll provide
the chain ID which is going to be this.
I'll call this
private
chain. I can give the chain ID. I call
it 1 2 3 4. And you can see our node is
running. That's why it's identifying.
And here I have to give a symbol. I'll
say PBC. This is the symbol I have
selected. PBC private blockchain. I'll
click on save. The moment I will click
on save and if I click on the network,
it will be selected automatically and
you will find that I don't have any fund
in my account one. If I check my account
two, you will find it will become zero.
If I go back to my other account to
account three, it will go back to the
zero.
If I go back to my account four, it will
go back to the zero because this is I
have restarted my blockchain and now
these account don't hold the accounts of
genesis block. So it has zero. Now I can
come back and you will find that these
account which I got it I created it and
it has all the funds. So I'm going to
simply import this account. I'm going to
import this account.mp import the
account. So I'll simply click here. Go
back to my accounts.
I'll click here. Add block. Sorry. add
account and paste it. Click on import
and you will find the fund is going to
be reflecting here. So I got this 1,000
PBC. I'll come back once again. Go back
to my editor and I'll simply copy this
one.
Copy.
I'll come back here
and import the account. Click on this.
Click on this. Import.
And I have the fund in that. Now
transaction. So I'll simply come here.
You can see all the event is happening.
When you will change the account, it
will trigger the event and it's going to
read the data that how much token, how
much balance you have. That's all we are
reading here because we have done the
changes. You can see the events are
working absolutely fine. Now I'm going
to perform the transaction. So right now
we are looking for the blocks the event.
Come back here. Let's do the
transaction. So I'll select this one and
I will try to send to account number one
because it has zero. I'll select this
account number one and let's transfer
let's say 5,000 and click on this
continue and the transaction logs which
you will find that how much you are
transferring which account click on this
confirm and we are getting the spending
simply ignore this one come back here in
the token and you will see the fund will
go down and you will have the fund in
your wallet so it will take a little bit
time if you come back here go back to
the account number one you will find
there it will be the balance now if you
come back and double confirm you can
come back to the editor
Go here and you will see the transaction
we have done. So we got the transaction
blocks, we got the details here. You can
see we have transferred 5,000. We have
mined it to all the recipients. That's
what we will find. All the transaction
has really fine. If you come back here
once again and perform the transaction,
come back here and let's do the
transaction one more time. So this time
I will transfer from account number one
to account number two. So I'll click
here and I'll go back here. Click on the
account number two and I will transfer
let's say 3,000.
Click on this continue. Click on confirm
and the transaction is pending. Simply
ignore this one. Come back here and you
will see it will go down and you're
going to receive the fund or you can
simply come back here and you will see
the fund is going to be reflecting here
3,000. So that's how you can able to
track down. Every single thing is
looking good. This is how you can able
to perform the transaction on your own
private blockchain. This is really
powerful.
And this is really powerful. You can
able to find all the logs, all the
events, model. That's all we have. Now I
want to show you that how you can use
this API to read the data. So this is
the APIs which I have provided. All you
can do is include a front end where you
can call the API. So this is the one I
have which is running on local host 3000
our API. So user can read the data. So I
can come back to my browser and I'll
open a new tab. I'll open a new tab.
Click on this local host and you will
see that here we have this one is call
this to be 3001 and I will paste this
one and hit enter. It's going to give me
the data of all the block all the
transaction we have performed. You can
see the height the details that's all is
there. If you want to go to the specific
block you can do that. So you can check
all the API endpoint. Come back in the
code editor and here you will find all
the API endpoint. So if I want to go to
a specific block I can check that. So I
can come back here. I can go back to
this and let's target the block number.
Block number I can say block number one.
Hit enter and it's going to give me the
detail about the block number one. In
the same way you can go back to the
different block. So this is really
powerful. I hope you have understood
that if you really want to focus on core
blockchain development, this project
will help you a lot. I can use any
account and I can perform the
transaction. And I can go with the
account number five. And if I want to do
the transfer, I can simply click on
this. I can pick an account where I want
to do the transfer. And let's do that.
I'll simply go with this. Click on this.
Confirm. And it's in the pending. Simply
ignore this one. Come back. Here you can
see here you will find that this might
takes a little bit time because we are
doing two transfer. One is going to be
the mining and transfer. So the balance
went down and you can come back to the
account where you can able to find the
transaction or I don't know which
account I have done the transfer that's
all you can find. So it will go up here
we got it 7,000 and we have received 5
5,000. If I come back to my code there
you will find the transaction log about
the transaction we have done the wallet
we have changed for one and we have read
the data and there all the details which
you will find the amount of quantity we
have transferred that's all is there so
it's a really powerful project I hope
you have understood about the feature
functionality we have included and how
it will work if you really want to
master blockchain development then this
is the project which you have to build
and include in your portfolio if You
want to focus on core blockchain
development where you have to deal with
the security protocol, transactional
model, hashing management and building a
blockchain for a private networks where
you can have full control over your
entire system. So that's the only thing
I want to cover. Make sure to get all
the resources and you can simply have a
look that what are the model we have
utilized. Soon the complete project will
come. So you can simply follow the
complete project very easily. And if you
really want to master complete
blockchain development then I would
highly encourage you to take this
blockchain boot camp in which you will
understand every single thing about the
required technology which you have to
know as a blockchain developer
programming language security building
one of the industry ready project. So
this is the huge project we have. You're
going to learn about the important
courses and technology. You're going to
build a complete API. You're going to
learn about the security and model.
That's all we have. try to have a look
and just get into the course so we can
start building and learning every single
thing from scratch. So that's the only
thing I want to cover in this video. I
hope you have understood every single
feature we have included. If you have
any question, make sure to shoot in the
official email. We'll try to help you
and give you faster response. With that,
I'm ending this video. Have a wonderful
Bye-bye.
Source Code: https://www.theblockchaincoders.com/sourceCode/create-your-own-private-blockchain-network-or-mining-+-native-currency-transfer-or-core-blockchain-developer-project Blockchain Course: https://www.theblockchaincoders.com/pro-nft-marketplace All Project Code: https://www.theblockchaincoders.com/SourceCode Donate Please: https://linktr.ee/daulathussain 1 - 1 Consultancy: https://www.theblockchaincoders.com/consultancy Pro Blockchain Courses: https://www.theblockchaincoders.com/ Public Discord: https://discord.gg/Gah6YGuBFS Create Your Own Private Blockchain Network | Mining + Native Currency Transfer | Core Blockchain Developer Project In this Core Blockchain Developer Project, you will learn how to build your own private blockchain network from scratch—complete with mining, wallets, and native currency transfer features. This project is designed to give developers a deep understanding of how a blockchain works internally, beyond smart contracts and frameworks. By the end, you’ll have your own custom blockchain network running locally or across multiple nodes. 📌 Timestamps 00:00:00 ➤ Introduction 00:00:33 ➤ Overview 00:01:02 ➤ Features Demo 00:07:38 ➤ Starter File 00:08:57 ➤ Final Source Code 00:11:14 ➤ Environment Variables 00:14:03 ➤ Installation 00:15:21 ➤ Testing Live 🔥 What You Will Build A fully functional private blockchain Block creation + hashing mechanism Proof-of-Work mining algorithm Transaction pool + validation rules Wallets and native currency transfers Multi-node network using P2P communication Basic consensus implementation 🧑💻 Tech Stack Node.js / JavaScript Crypto (SHA-256) Express.js WebSockets 🚀 Who This Project Is For Blockchain developers Web3 beginners Students building strong Web3 portfolios Developers preparing for blockchain job interviews Anyone who wants to understand the backend of blockchains Save NFT Marketplace PlayList: https://youtube.com/playlist?list=PLWUCKsxdKl0olgEF4OxXVk2B-jwpGqL5d API PlayList: https://youtube.com/playlist?list=PLWUCKsxdKl0oAFAVuRZxQSYC07UTcl_v_ Solidity PlayList: https://youtube.com/playlist?list=PLWUCKsxdKl0oksYr6IG_wRsaSUySQC0ck Complete JavaScript Course: https://youtube.com/playlist?list=PLWUCKsxdKl0qROhA0XO4_ek9bIwZ4j4Xr HTML Course Code: https://www.daulathussain.com/complete-html-course-daulat-hussain/ =================== HOSTING ++++++++++++++++++++ Best Hosting: https://clients.domainracer.com/aff.php?aff=28826 Follow Me: Instagram: https://www.instagram.com/daulathussain92/ Facebook: https://www.facebook.com/daulat.hussain.18 Twitter: https://x.com/TheBCoders Pinterest: https://in.pinterest.com/daulathussainhealthfitness/ Linkedin: https://www.linkedin.com/in/daulat-hussain/ Quora: https://www.quora.com/q/schahkxkdudpgjvh Facebook Group: https://www.facebook.com/groups/59011 Facebook Page: https://www.facebook.com/yourdhfitness Subscribe to My Channel: https://www.youtube.com/channel/UCz6_...