Sign Up
Skip to content

Sequence Sidekick 👷‍♂️

Sequence Sidekick provides a fully equipped backend, leveraging Sequence's infrastructure to streamline blockchain interactions for developers. With Sidekick, you can programmatically perform the following operations using your own backend wallet:

  • Pre-configured backend services: Redis, PostgreSQL, Transaction API, and an Indexer—all set up and ready to use.
  • Effortless deployment: Spin up your backend in minutes with a single command to create a Docker container.
  • Flexible wallet options: Use a Sequence Smart Wallet with locally managed private keys or securely integrate AWS/GCP KMS for enhanced security.
  • Seamless contract deployment: Deploy ERC20, ERC721, ERC1155, or custom smart contracts via API calls.
  • Reliable transaction management: Read from and write to any contract for your game or app, with automatic nonce management, gas bumping, and other optimizations ensuring efficient execution.
  • Webhook integration: Leverage our high-performance indexer to fully manage webhooks.
  • Optimized gas pricing: Transactions are submitted at optimal gas prices, with automatic resubmission if not included in the mempool within three blocks.
  • Built-in user rewards system: Set up self-claimed or recurring user rewards (ERC20, ERC721, ERC1155) with a single API call.
  • Built-in Bull MQ Dashboard: Monitor and manage your background jobs.
  • Swagger UI: Explore the API documentation and test the endpoints with the Swagger UI
  • Contract utilities: Easily check contract deployments on different chains.
  • Seamless Sequence Builder integration: Import all your Sequence Builder contracts into the Sidekick backend with one API call, or manually add custom contracts.

About the backend wallet

All transactions executed through Sidekick use a Sequence smart wallet, which is automatically created for the externally owned account (EOA) specified by you, leveraging our infrastructure for optimized and performant execution.

To configure the backend wallet, you can:

  • Declare your EVM_PRIVATE_KEY in the .env file for a local setup (not recommended for production)
  • Use the recommended method: setting up AWS or GCP KMS and adding the necessary credentials in the .env file.

Sidekick is built to integrate seamlessly with AWS and GCP KMS, allowing you to use your KMS signer. We've developed adapters that make AWS/GCP KMS compatible with the ethers signer type, ensuring compatibility with the latest version.

Sequence Sidekick empowers developers with a scalable, plug-and-play backend solution for blockchain-based applications, allowing you to focus on building without backend complexities.

Steps to start your Sidekick backend

Clone the Sidekick repository

git clone https://github.com/0xsequence-demos/sequence-sidekick.git

Setup the required environment variables

Required Environment Variables

VariableDescription
PROJECT_ACCESS_KEYAccess key from Sequence Builder API Keys
SECRET_KEYYour custom secret Sidekick key
SEQUENCE_RPC_URLRPC URL from Sequence
BUILDER_API_SECRET_KEYSecret key from Sequence Builder API Keys
INDEXER_URLIndexer URL based on network
SIGNER_TYPEType of signer to use

Wallet Configuration Variables

Choose one of the following configurations:

Local Wallet:
VariableDescription
EVM_PRIVATE_KEYPrivate key for the EOA used to sign transactions
AWS KMS Configuration:
VariableDescription
AWS_REGIONAWS account region
AWS_ACCESS_KEY_IDAWS access key ID
AWS_SECRET_ACCESS_KEYAWS secret access key
AWS_KMS_KEY_IDID of the KMS key to use
GCP KMS Configuration:
VariableDescription
PROJECTGCP project name
LOCATIONGCP project location
KEY_RINGKey ring name
CRYPTO_KEYCrypto key name
CRYPTO_KEY_VERSIONCrypto key version

Make sure you have Docker installed

Start Sidekick in a Docker container

pnpm docker:start

Make your first API call to get back smart wallet address

curl -X GET 'http://localhost:3000/sidekick/smart-account-address'

Dev mode without Docker

If you want to make changes to the codebase and test them without Docker, you can run the backend locally by following the instructions in the README.

Gas Sponsorship

On testnet, we sponsor all the transactions. However, on mainnet - you will want to ensure that you sponsor the transactions in order to ensure that they process correctly by sponsoring the contract itself. You can take a deeper look at our Gas Sponsorship solution to learn how to do this.