Configuration

Installation, environment variables, signing modes, and network defaults.

Installation

You can use npm to install this SDK.

npm install @gensyn-ai/gensyn-delphi-sdk

Generating an API Key

You can generate two types of Delphi API keys: [1] testnet keys and [2] mainnet keys.

Client Initialization

The DelphiClient is configured via environment variables (loaded from .env automatically) or by passing a config object to the constructor.

Constructor options take precedence over env vars:

Environment Variables

There are several core settings set by env vars.

Core Settings

Variable
Description
Default

DELPHI_NETWORK

Network to use: testnet or mainnet

testnet

DELPHI_SIGNER_TYPE

Signing method: cdp_server_wallet or private_key

cdp_server_wallet

DELPHI_API_ACCESS_KEY

REST API key (required for API methods)

DELPHI_API_BASE_URL

Override the REST API base URL

(network default)

DELPHI_APP_URL

Delphi web app base URL, used to build marketUrl

(network default)

DELPHI_GATEWAY_CONTRACT

Override the Gateway contract address

(network default)

GENSYN_RPC_URL

Override the JSON-RPC endpoint

(network default)

GENSYN_CHAIN_ID

Override the chain ID

(network default)

Private Key Signing

For development use with DELPHI_SIGNER_TYPE=private_key:

Variable
Description

WALLET_PRIVATE_KEY

Hex-encoded private key (0x...)

CDP Server Wallet Signing

For production use with DELPHI_SIGNER_TYPE=cdp_server_wallet (default):

Variable
Description

CDP_API_KEY_ID

Coinbase Developer Platform API key ID

CDP_API_KEY_SECRET

Coinbase Developer Platform API key secret

CDP_WALLET_SECRET

CDP Server Wallet secret

CDP_WALLET_ADDRESS

On-chain address of the CDP wallet (0x...)

@coinbase/cdp-sdk is a peer dependency only required when using CDP signing. Private key users do not need it installed.

Network Defaults

You can find testnet and mainnet RPC endpoints, contract addresses, and more by visiting Network Information on the Gensyn Foundation docs.

Testnet
Mainnet

Token (USDC)

0x0724D6079b986F8e44bDafB8a09B60C0bd6A45a1

0x5b32c997211621d55a89Cc5abAF1cC21F3A6ddF5

App URL

https://testnet.delphi.fyi

https://app.delphi.fyi

Signing Modes

Two signing modes are supported, and they both produce the same DelphiSigner interface that is consumed by on-chain methods.

Private Key (for development)

Or you can create a signer directly:

CDP Server Wallet (for production)

To get your CDP credentials, create an account at Coinbase Developer Platform, generate an API key, and set up a server wallet. See the CDP Server Wallet documentation for a full walkthrough. Once you have your credentials, plug them into the environment variables above.

You can also create this directly:

CDP Server Wallets are managed by Coinbase Developer Platform. The SDK uses @coinbase/cdp-sdk under the hood.

Accessing the Signer Directly

You can use this to perform custom contract reads or writes outside the SDK's built-in methods:

Last updated