Getting Started
Source Code of PAC Protocol Core can be found under GitHub pacprotocol/pacprotocol
For the following step we're using the user root. For production usage it's recommended to use different user with no admin permission.
#
Install PAC Protocol Core Daemon#
Requirements- Minimum 1GB RAM
- Minimum 25GB Hard Disk
- Ubuntu 18.04 LTS or newer. (Windows and macOS supports it too, but we're focusing on ubuntu)
#
Step 1 - Get/Setup binaries of PAC Protocol CoreWe're pulling the binaries of "PAC Protocol v0.17" and grant permission of "pacprotocold" and "pacprotocol-cli" to make it executeable.
#
Step 2 - Configuring the walletTo configure the PAC Protocol Core, you need to enter following commands.
Following settings in pacprotocol.conf
is recommended to enable RPC JSON HTTP API:
You can find more options under Daemon Options
Save it and back to terminal.
#
Step 3 - Creating systemctl service (optional, recommended)This step is not necessary, but it helps to run PAC Protocol Core in background and it auto-start in case of crashing. It will also start automatically when the machine is turned on.
Skip to Step 4 if you don't want to use systemctl service.
With the following content of pac.service:
Save it and back to terminal.
Enable the service
And start the service
If you want to stop the service (stopping the PAC Protocol Core Daemon instance)
#
Step 4 - Testing if it's working.Now your PAC Protocol Core Daemon is ready to be used for development purpose.
If you skipped the Step 3, you can run daemon by following step:
Wait for a some time and then you can ping the HTTP RPC JSON if it's functional:
The rpcusername
and rpcpassword
is the same as from Step 2
You can validate if the blockchain is fully synced:
If "isBlockchainSynced"
is true
, it means the blockchain on your machine is fully synced!
It can take some time to sync fully. Luckly we have a solution for that in order to sync it faster - please see the following tutorial Install Bootstrap
Congratulation. Now you have a self-hosted PAC Protocol HTTP API which you can use on your language/framework by using HTTP requests!
Please see Client Commands for more information of commands usage & http