Express.js proxy between the UI and Master Process
- Create an Infura Account, Create a new project, then make note of the Rinkeby https endpoint.
- Create a Xumm Dev Account. Create a new App, then make note of the API Key and API Secret.
Open a command prompt or Powershell prompt and issue the following commands
git clone https://github.com/ajkagy/xls20-bridge-proxy
-
in the root of the xls20-bridge-proxy directory create a new .env file and add the following text:
API_SERVICE_URL=http://192.168.0.133 API_SERVICE_PORT=9999 SSL_PRIV_KEY_PATH=/etc/privkey.pem SSL_CERT_PATH=/etc/fullchain.pem WHITELIST_URL=bridge.xrplive.com BRIDGE_MASTER_PROCESS_RPC=192.168.0.133 BRIDGE_MASTER_PROCESS_RPC_PORT=63900 BRIDGE_MASTER_PROCESS_API_KEY=7a82091d-3351-492b-9e38-3913b9ed3cc2 XUMM_API_KEY= XUMM_API_SECRET= ETH_ENDPOINT=https://rinkeby.infura.io/[Add your Infura Account URL]
-
Replace the environement variables with your own set values.
API_SERVICE_URL
is the url of your proxy service. This will be http or https depending on which proxy you're running.(http.js
orhttps.js
)API_SERVICE_PORT
is your port the proxy service will run onSSL_PRIV_KEY_PATH
path to your private cert key (only applies when running https)SSL_CERT_PATH
path to your https cert (only applies when running https)WHITELIST_URL
CORS whitelist URL. This is the url that the Bridge Web App will run onBRIDGE_MASTER_PROCESS_RPC
Bridge Master Process IP/DomainBRIDGE_MASTER_PROCESS_RPC_PORT
Bridge Master Process PortBRIDGE_MASTER_PROCESS_API_KEY
a random guid generated that will secure the bridge master process APIXUMM_API_KEY
API Key for your new XUMM app you created in Step 1 in the Getting Started section.XUMM_API_SECRET
API Secret for your new XUMM app you created in Step 1 in the Getting Started section.ETH_ENDPOINT
The Infura Rinkeby https url from Step 1 in the Getting Started section.
-
Install
npm install
-
Start the proxy
node https.js
for SSL enablednode http.js
for SSL disabled