Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.2 KB

README.md

File metadata and controls

38 lines (30 loc) · 1.2 KB

Interoperability-PHR-protocol

Solana Program

Requirements

  • Install Rust
  • Instal Solana Tool Suite
  • Install Anchor

Build and Deploy

  • cd phr_core
  • anchor build - It will build the program for you
  • anchor deploy - it will deploy program(ensure 4.5 sol balance in your account)

Custodial Wallet and API server

setup

  • Install Postgres in localhost
  • create a Database phr: CREATE DATABASE phr
  • run SQL COMMAND to create table: CREATE TABLE users(id text, name text, profile_type text, public_key text unique, secret_key integer[], phone numeric(10, 0), primary key(id));
  • Create a user postgres with password postgres
  • Grant access to users table; GRANT SELECT, INSERT, UPDATE ON users to postgres
  • solana-keygen new - Creates new keypair if not present at default location
  • cd api : from parent folder
  • npm install

Run

  • cd api : From Parent Folder
  • npm run start : starts the server

User Interface

Setup

  • cd client: From parent Folder
  • npm install

Run

  • cd client: From Parent Folder
  • npm start : Starts the Application