Skip to main content

Module consts

Module consts 

Source
Expand description

Static constants for the Derive adapter.

EIP-712 domain separators, the Action typehash, and Trade module addresses are sourced from the v3 action-signing reference at https://docs.derive.xyz/authentication/action-signing. Both mainnet and testnet values are populated; per-instance overrides on crate::config::DeriveExecutionClientConfig take precedence.

Constants§

ACTION_TYPEHASH
EIP-712 action typehash, identical across networks in the v3 action-signing reference.
DECIMAL_PRECISION
Maximum fractional precision accepted for v3 financial inputs.
DECIMAL_SCALE
Fixed-point scale used by all on-chain decimal fields (1e18).
DEPOSIT_MODULE_ADDRESS_MAINNET
Deposit module contract address (mainnet).
DEPOSIT_MODULE_ADDRESS_TESTNET
Deposit module contract address (testnet).
DERIVE
Venue identifier string.
DERIVE_ACCOUNT_REGISTRATION_TIMEOUT_SECS
Default timeout for blocking on account registration during execution client connect().
DERIVE_CANDLES_DEFAULT_LIMIT
DERIVE_CANDLES_MAX_PAGES
DERIVE_NAUTILUS_REFERRAL_CODE
Referral code for order attribution (zero additional fees), see https://docs.derive.xyz/reference/api-broker for further details.
DERIVE_TRADES_PAGE_SIZE
DOMAIN_SEPARATOR_MAINNET
EIP-712 domain separator (Ethereum chain 1).
DOMAIN_SEPARATOR_TESTNET
EIP-712 domain separator (Sepolia chain 11155111).
HEADER_DERIVE_SIGNATURE
REST authentication header carrying the session-key signature.
HEADER_DERIVE_TIMESTAMP
REST authentication header carrying the signed timestamp.
HEADER_DERIVE_WALLET
REST authentication header carrying the owner’s EOA or multisig address.
HTTP_TIMEOUT
MIN_SIGNATURE_TTL
Minimum signature TTL the adapter uses for self-custodial orders.
RECONNECT_BACKOFF_FACTOR
RECONNECT_BASE_BACKOFF
RECONNECT_JITTER_MS
RECONNECT_MAX_BACKOFF
RECONNECT_TIMEOUT
REST_URL_MAINNET
REST_URL_TESTNET
TRADE_MODULE_ADDRESS_MAINNET
Trade module contract address (mainnet).
TRADE_MODULE_ADDRESS_TESTNET
Trade module contract address (testnet).
TRANSFER_MODULE_ADDRESS_MAINNET
Transfer module contract address (mainnet).
TRANSFER_MODULE_ADDRESS_TESTNET
Transfer module contract address (testnet).
TRIGGER_ORDER_SIGNATURE_TTL
Signature TTL used for Derive trigger orders.
WITHDRAW_MODULE_ADDRESS_MAINNET
Withdrawal module contract address (mainnet).
WITHDRAW_MODULE_ADDRESS_TESTNET
Withdrawal module contract address (testnet).
WS_DISCONNECT_TIMEOUT
WS_HEARTBEAT_SECS
WS_HEARTBEAT_TIMEOUT
WS_REQUEST_TIMEOUT
Maximum wait for a JSON-RPC response on the WebSocket transport before the request outcome is treated as unknown, so a silent venue cannot hang connect() or an order write. Matches HTTP_TIMEOUT.
WS_URL_MAINNET
WS_URL_TESTNET

Statics§

DERIVE_CLIENT_ID
Static client ID instance.
DERIVE_VENUE
Static venue instance.

Functions§

domain_separator_for
Returns the EIP-712 domain separator constant for the configured environment.
trade_module_address_for
Returns the Trade module contract address constant for the configured environment.