Installing PW3

Prerequisites

apt-get install libgbm-dev gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

Install Procedure

Clone the git repository,

git clone https://github.com/PKTW3/PktWalletWebWrapper.git

make sure after cloning you have run ‘npm install’ to install all dependencies.

Modify client/web/js/socketurl.js with your intended install location (url of listening web wallet when its running, that clients will reach out to) / details ex:

var socketurl = "http://tailscaleip";
var explorerUrl = "https://explorer.pkt.cash";

Now you’re ready to add the configuration file (config.json), head to the directory of webwallet, a sample configuration is below.

{
  "walletstorage":"C:\\Users\\user\\AppData\\Local\\Pktwallet\\pkt\\",
  "wallet_password":"changeme",
  "qrpassword":"changeme",
  "walletbinpath":"C:\\Users\\user\\pktd-v1.5.0-windows\\bin\\",
  "clientWebPath": "C:\\Users\\user\\PktWalletWebWrapperRPC\\client\\web",
  "explorerUrl": "https://explorer-classic.pkt.cash/",
  "consolePassword": "changemetosomethinglongandrandom",
  "listenport": 80,
  "listenip": "127.0.0.1",
  "unconsolidatedTransationsFold":200,
  "wallet-rpc-address": "127.0.0.1",
  "wallet-rpc-port": 8334,
  "wallet-rpc-user": "rpcuser",
  "wallet-rpc-pass": "changemerpcpassword",
  "enable-setup": true
}
It is highly recommended to run locally or over a private network such as tailscale, no https support is included in this build.

NOTE: While it is possible to modify the port, CORS issues are observed in browsers.  It is recommended to run on a private ip, or localhost on port 80 to avoid these issues.

Then you can run the convenience scripts to get up and running:

node setup/generateconfigjson.js
node setup/generateauthjson.js

After filling out the information and saving, make sure your pkt cli wallet is not running, the program will launch its own instance when you launch it.

You can now launch the web wallet by running “node main.js” from the ‘webwallet’ directory, it is recommended to set this up as an always running service. We recommend using pm2 for this.

after this, you’ll want to visit your wallet via the web at the url you set,
visit http://tailscaleip/qr and it will prompt you for the qr setup password, once provided it’ll show a qr code you can scan for google authenticator or similar 2fa apps.

from there you should be all set to use the PW3 interface at http://tailscaleip/

Updated 09/01/2024