Verida Documentation
  • Welcome
  • Network Overview
  • Start Building
  • Verida Wallet
  • Whitepapers
  • Glossary
  • Protocol
    • Core concepts
      • Design Principles
      • Decentralized Identity
      • Confidential Databases
      • Confidential Compute
      • Accounts and Identity
      • Data Storage
      • Application Contexts
      • Messaging
      • Schemas
      • Data Sharing
    • Client SDK
      • Getting Started
      • How It Works
      • Authentication
      • Data
      • Queries
      • Permissions
      • Messaging
      • Account Profiles
      • Events
      • Command Line Tools
      • Configuration
      • React Native
      • Advanced
    • Verida Connect SDK
      • Getting Started
      • WebUser
      • WalletConnect Support
      • Authentication Server
    • Blockchain Bridge
    • Run a Node
      • Database Node
        • Setup
        • Operations
        • FAQ
      • Compute Node
    • Verida Networks
  • Extensions
    • Credentials
      • Verifiable Credentials Developer SDK
      • cheqd Credential Service
      • Privado ID (fmr Polygon ID)
      • zkPass credentials
      • Reclaim Protocol credential
    • Verida URIs
    • Vue Components
Powered by GitBook
On this page
  • Client configuration​
  • Environment Variables​

Was this helpful?

  1. Protocol
  2. Client SDK

Configuration

PreviousCommand Line ToolsNextReact Native

Last updated 7 months ago

Was this helpful?

Client configuration

An options parameter can be passed to the Client object:

import { ClientConfig, Network } from '@verida/types'

const config: ClientConfig = {
  network: Network.BANKSIA,
  didClientConfig: {
    rpcUrl: "https://<your-custom-polygon-url>"
  }
}

const client = new Client(config)

Some key options are:

  • network — Sets default configuration settings for the specified environment. Options are; local, banksia, myrtle

  • didClientConfig.rpcUrl - While optional you may want to set your own RPC instead of using the default RPC of the Client (free and public but may not be reliable)

Environment Variables

As you deploy your application on different environments (Production, test, staging), you may want to set a VERIDA_NETWORK and POLYGON_RPC_URL environment variable in your application to choose the network and RPC to use appropriately. Note that the client does not read the environment variables and so there is no syntax imposed on the naming of the variables. It is up to you to pass the environment variable to the ClientConfig.

For example:

VERIDA_NETWORK=banksia
POLYGON_RPC_URL=https://<your-custom-polygon-url>

Refer to the documentation of your framework, if any, for how to set and use encironment variables.

​
​