We recommend setting SEQUENCE_PROJECT_ACCESS_KEY as well but for testing purposes we provide a default one, you can get yours from Sequence Builder.
Backend wallet
Sidekick creates a Sequence Smart Contract Wallet based on theBACKEND_WALLET_PV_KEY
or AWS / GCP KMS
signer you provide, this allows gas-sponsorship, batching and other optimizations.
To configure the backend wallet, you can:
- Declare your BACKEND_WALLET_PV_KEY in the .env file for a local setup (not recommended for production) or don’t provide it and get a random one generated for you, you can find it in the auto generated
dev.key
file. - Use the recommended method: setting up AWS or GCP KMS and adding the necessary credentials in the .env file.
To find out what are the required credentials for local, AWS, or GCP wallet configurations, please refer to the env.example file.
Make sure you choose the correct key types in AWS KMS and GCP KMS.
- AWS KMS:
ECC_NIST_P256_KEY_ALIAS
- GCP KMS:
GCP_KEY_RING_NAME
Start Sidekick in dev mode
1
Clone the Sidekick repository
2
Setup the required environment variables
Required Environment Variables
Variable | Description |
---|---|
PROJECT_ACCESS_KEY | Access key from Sequence Builder API Keys |
Optional Environment Variables
Variable | Description |
---|---|
BACKEND_WALLET_PV_KEY | Private key for the EOA used to sign transactions |
PORT | Port for the Sidekick server (default: 7500) |
HOST | Host address for the server (default: 0.0.0.0) |
REDIS_HOST | Redis server host (default: localhost) |
REDIS_PORT | Redis server port (default: 6379) |
REDIS_PASSWORD | Password for Redis server (optional) |
DATABASE_URL | PostgreSQL connection string for Sidekick database |
SIDEKICK_API_SECRET_KEY | Secret key required for write access to the Sidekick API |
ETHERSCAN_API_KEY | API key for Etherscan to enable contract verification |
VERIFY_CONTRACT_ON_DEPLOY | Enable automatic contract verification on deployment (set to true to enable) |
DEBUG | Enable debug logging (set to true for verbose output) |
SIGNER_TYPE | Type of signer to use (local, aws_kms, google_kms) |
AWS_REGION | AWS account region |
AWS_ACCESS_KEY_ID | AWS access key ID |
AWS_SECRET_ACCESS_KEY | AWS secret access key |
AWS_KMS_KEY_ID | ID of the KMS key to use |
PROJECT | GCP project name |
LOCATION | GCP project location |
KEY_RING | Key ring name |
CRYPTO_KEY | Crypto key name |
CRYPTO_KEY_VERSION | Crypto key version |
Wallet Configuration Variables
Choose one of the following configurations:For local wallet:
Variable | Description | |
---|---|---|
SIGNER_TYPE | local | |
BACKEND_WALLET_PV_KEY | 0x… | (optional) |
For AWS KMS:
Variable | Description |
---|---|
SIGNER_TYPE | aws_kms |
AWS_REGION | AWS account region |
AWS_ACCESS_KEY_ID | AWS access key ID |
AWS_SECRET_ACCESS_KEY | AWS secret access key |
AWS_KMS_KEY_ID | ID of the KMS key to use |
For GCP KMS:
Variable | Description |
---|---|
SIGNER_TYPE | google_kms |
PROJECT | GCP project name |
LOCATION | GCP project location |
KEY_RING | Key ring name |
CRYPTO_KEY | Crypto key name |
CRYPTO_KEY_VERSION | Crypto key version |
3
Make sure you have Docker installed
Get it from here
4
Start Sidekick in a Docker container
5
Check your backend wallet address