Install dependencies using Bun:
bun install
- Fill in the env variables in
.env
with your a url to your database:
cp .env.example .env
- Check the migration status:
bunx prisma migrate status
- If the database schema is not up to date, run the following command:
bunx prisma migrate dev
Generate Prisma client (run after bun install
, schema changes, or to resolve TypeScript type issues):
bunx prisma generate
Write your own configuration based on config.example.json
cp config.example.json config.json
This configuration file is used to set up and customize the service. It consists of four main sections: options
, signers
, alerts
, and networks
.
env
: The environment in which the service is running. Can be either"development"
or"production"
.port
: The port number where the server will run.sentryDSN
: Optional field for sentry logging purposes.
- A list of signer objects, each with a unique
id
. - Each signer can have one of two types of configurations:
privateKey
: A private key for signing.awsKMS
: An AWS Key Management Service (KMS) configuration, which includes:accessKeyId
: The AWS access key ID.secretAccessKeyId
: The secret access key ID.region
: The AWS region.kmsKeyId
: The KMS key ID.
- A list of alert objects, each with a unique
id
. - Each alert can have one or multiple channels configured:
email
: Can be configured using either:smtp
: Withfrom
,host
,port
,secure
, andauth
.smtp
authentication can be done using either:oauth2
: Requiresuser
andaccessToken
.login
: Requiresuser
andpassword
.
webhook
: With a URL.
sms
: Can be configured using either:twilio
: WithaccountSid
,authToken
, andfromNumber
settings in Twilio.webhook
: With a URL.
- Alerts are optional.
- A list of network objects, each with a unique
id
. - Each network can have the following settings:
enabled
: A boolean indicating whether the network is enabled.chainId
: Number of chain ID of the network.jsonRpcEndpoint
: The JSON-RPC endpoint of the network.recoveryModuleAddress
: The address of the recovery module.executeRecoveryRequests
: Controls whether the service will execute the recovery after all required signatures are collected. It has aenabled
boolean field, and requires theid
of asigner
to be specified if enabled.finalizeRecoveryRequests
: Controls whether the service will finalize the recovery after the grace period is over. It has aenabled
boolean field, and requires theid
of asigner
to be specified if enabled.alerts
: Optionally specifies the alert to use for this network with with an alertid
.rateLimit
: Settings to controls the rate limiting:maxPerAccount
: The maximum number of requests allowed per account within the specified period. Can be disabled with"~"
.period
: The time period for which the rate limit is applied. Can be disabled with"~"
.
Tip
The config file supports loading values from .env
. Prefix the value with ENV::
followed by the name of the env variable. Example: privateKey: ENV::PRIVATE_KEY
loads the value of the PRIVATE_KEY
.env variable into the privateKey
field
Start the development server:
bun run dev
or
Start the production server:
bun run start