Account Service

The Account Service provides functionalities related to user accounts on the Frequency network. It includes endpoints for managing user authentication, account details, delegation, keys, and handles.

API Reference

Configuration

ℹ️ Feel free to adjust your environment variables to taste. This application recognizes the following environment variables:

NameDescriptionRange/TypeRequired?Default
API_PORTHTTP port that the application listens on1025 - 655353000
BLOCKCHAIN_SCAN_INTERVAL_SECONDSHow many seconds to delay between successive scans of the chain for new content (after end of chain is reached)> 012
CACHE_KEY_PREFIXPrefix to use for Redis cache keysstringY
CAPACITY_LIMITMaximum amount of provider capacity this app is allowed to use (per epoch) type: 'percentage' 'amount' value: number (may be percentage, ie '80', or absolute amount of capacity)JSON (example)Y
SIWF_NODE_RPC_URLBlockchain node address resolvable from the client browser, used for SIWFhttp(s): URLY
FREQUENCY_API_WS_URLBlockchain API Websocket URLws(s): URLY
FREQUENCY_TIMEOUT_SECSFrequency chain connection timeout limit; app will terminate if disconnected longerinteger10
HEALTH_CHECK_MAX_RETRIESNumber of /health endpoint failures allowed before marking the provider webhook service down>= 020
HEALTH_CHECK_MAX_RETRY_INTERVAL_SECONDSNumber of seconds to retry provider webhook /health endpoint when failing> 064
HEALTH_CHECK_SUCCESS_THRESHOLDMinimum number of consecutive successful calls to the provider webhook /health endpoint before it is marked up again> 010
PROVIDER_ACCESS_TOKENAn optional bearer token authentication to the provider webhookstring
PROVIDER_ACCOUNT_SEED_PHRASESeed phrase for provider MSA control keystringY
PROVIDER_IDProvider MSA IdintegerY
REDIS_URLConnection URL for RedisURLY
TRUST_UNFINALIZED_BLOCKSWhether to examine blocks that have not been finalized when tracking extrinsic completionbooleanfalse
WEBHOOK_BASE_URLBase URL for provider webhook endpointsURLY
WEBHOOK_FAILURE_THRESHOLDNumber of failures allowed in the provider webhook before the service is marked down> 03
WEBHOOK_RETRY_INTERVAL_SECONDSNumber of seconds between provider webhook retry attempts when failing> 010
GRAPH_ENVIRONMENT_TYPEGraph environment type.Mainnet|TestnetPaseoY
API_TIMEOUT_MSApi timeout limit in milliseconds> 05000
API_BODY_JSON_LIMITApi json body size limit in string (some examples: 100kb or 5mb or etc)string1mb
SIWF_URLSIWF v1: URL for Sign In With Frequency V1 UIURLhttps://ProjectLibertyLabs.github.io/siwf/v1/ui
SIWF_V2_URLSIWF v2: URL for Sign In With Frequency V2 Redirect URLURLFrequency Access
SIWF_V2_URI_VALIDATIONSIWF v2: Domain (formatted as URI) to validate signin requests (*Required if using Sign In with Frequency v2)Domain (Examples: https://www.your-app.com, example://login, localhost)*

Best Practices

  • Secure Authentication: Always use secure methods (e.g., JWT tokens) for authentication to protect user data.
  • Validate Inputs: Ensure all input data is validated to prevent injection attacks and other vulnerabilities.
  • Rate Limiting: Implement rate limiting to protect the service from abuse and ensure fair usage.