Provides APIs intended for use in self-service support tools or pages.
Ensure that you have NodeJs v14:
node -v
# v14.17.0
Obtain a copy of this project and install its dependencies:
git clone [email protected]:bguiz/self-service-support.git
cd self-service-support
npm install
Install global dependencies
npm install --global pm2 node-dev
Set up environment variables.
For development:
cp .sample.env .env
# edit .env to save with appropriate values for env vars
For production deployment:
less .sample.env
# set the env vars in the secret management utils used in deployment
You can start the server in 3 different ways.
For development (with hot-reload enabled, via node-dev
):
npm run dev
For a "plain" run of the server:
npm run start
For a production deployment of the server:
npm run prod
ALternatively, use the Dockerfile
provided.
Note: Use
npm run
to see all the run scripts.
Issue the following HTTP request:
GET /api/status
Issue the following HTTP request:
GET /api/v1/rsk-token-bridge/options?fromNetwork=ethereum-mainnet&txHash=0x3985fe2ad509a4588501494a715957506f401364112bd55090529686aa538962&walletName=metamask
Accept: application/json
Use a different Accept
header of text/html
to get a HTML fragment instead of JSON:
GET /api/v1/rsk-token-bridge/options?fromNetwork=ethereum-mainnet&txHash=0x3985fe2ad509a4588501494a715957506f401364112bd55090529686aa538962&walletName=metamask
Accept: application/json
Query Parameters:
fromNetwork
: One of the followingrsk-mainnet
rsk-testnet
ethereum-mainnet
ethereum-testnet
txHash
: Any valid transaction hash for the selected networkwalletName
: One of the followingmetamask
nifty
liquality
GET /api/v1/rsk-address-report/protocol-usage?address=0x8Be2E5Fe4348Ea38777a7c175Abb89050770E854&months=7
Accept: application/json
Query Parameters:
address
: RSK wallet addressmonths
: number of months back from now
An account is deemed to be active if it has sent a transaction within
the past ${days}
number of days.
GET /api/v1/rsk-activity-report/all?days=365
Accept: application/json
Counts the number of deployment transactions, and unique addresses making them within a specified date range.
GET /api/v1/rsk-activity-report/developer-activity?startDate=2022.04.01&endDate=2022.05.01&chain=rsk_testnet
Accept: application/json
Query Parameters:
startDate
: Get stats from and including this dateendDate
: Get stats up to and including this datechain
: Possible values arersk_mainnet
andrsk_testnet
GPL-3.0