Quick Onboarding Guide
Last updated
Last updated
Application stakes provides Gateway Operators access to the POKT Network for sending traffic.
Create an encryption password for your app stake keys. This password will be used to encrypt/decrypt your app-stake private keys stored in a Postgres database. It can be any combination of plaintext, symbols, letters, etc.
Fill out the .env
variables for the gateway server. This can be done by injecting environment variables directly or using a .env
file.
POKT_RPC_FULL_HOST
Used for dispatching sessions
https://pokt-testnet-rpc.nodies.org
(a complimentary testnet dispatcher URL provided by Nodies)
HTTP_SERVER_PORT
Gateway server port
8080
POKT_RPC_TIMEOUT
Max response time for a POKT node to respond
10s
ALTRUIST_REQUEST_TIMEOUT
Max response time for an altruist backup to respond
10s
ENVIRONMENT_STAGE
Log verbosity
development
, production
SESSION_CACHE_TTL
Duration for sessions to stay in cache
75m
POKT_APPLICATIONS_ENCRYPTION_KEY
User-generated encryption key
a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
DB_CONNECTION_URL
PostgreSQL Database connection URL
postgres://user:password@localhost:5432/postgres
Run the migration script to seed your PostgreSQL database.
Copy and paste the following SQL query to insert app stake private keys into the database:
Note: Replace {private_key} and {encryption_key} in the SQL query with your actual private key and encryption key.
Remember to keep sensitive information secure and follow best practices for handling private keys and passwords.
Here is an that you can use a reference
Copy and paste the following code to compile and run the gateway server. Hit the endpoint with a JSON-RPC payload.
If using testnet, send a request to chain 0007
, . This testnet chain id represents Ethereum Node Operators and Nodies is currently supporting the chain id for reliable testing.
Alternatively, you can leverage our published
Upon startup of the gateway server, nodes within a session take time to be marked as healthy (~10 seconds), therefore the requests will be routed to the altruist (failover) node. It is suggested each chain that you support has a configured altruist. You can learn more about supplying altruist configurations through this.