Skip to content
Note: This guide targets the main branch of the Kora repository. The integration test harness (harness_context, KoraSpec, and the [[test]] targets) and the just recipes referenced below exist only on main and the beta tags. The v2.0.5 tag has none of them.

​Architecture Overview

Kora uses the external solana-keychain crate for all signing operations. This architecture provides a unified signing interface for signing Solana transactions. To add a new signer to Kora, you’ll need to:
  1. First: Add your signer implementation to the solana-keychain crate
  2. Second: Add configuration support for your signer in Kora

​Step-by-Step Integration Guide

​Quick Integration Checklist

Part 1: Add Signer to solana-keychain Crate Part 2: Add Kora Configuration Support
  • Update Cargo.toml’s dependency so that solana-keychain crate uses the latest version (that includes your signer)
  • Add configuration struct for your signer’s environment variables
  • Update SignerTypeConfig enum in crates/lib/src/signer/config.rs
  • Add validation logic for your signer’s config
  • Add build logic to construct your signer from config
  • Export configuration struct in crates/lib/src/signer/mod.rs
  • (Optional) Add test mock builder in crates/lib/src/tests/config_mock.rs
  • Update example configuration files
  • Update test scripts to include your signer (see below)
  • Update documentation to include your signer (see below)
  • Submit PR to Kora repository

​Add Signer Support in Kora

First, ensure your signer is supported in the solana-keychain crate. If it is not, follow the guide at: https://github.com/solana-foundation/solana-keychain/blob/main/docs/ADDING_SIGNERS.md

​Step 1: Update Cargo.toml

Update Cargo.toml’s dependency so that solana-keychain crate uses the latest version (that includes your signer):
The 2.x series with sdk-v4 is what main uses. The v2.0.5 tag depends on solana-keychain 0.1.0 with sdk-v3.

​Step 2: Define Your Configuration Struct

In crates/lib/src/signer/config.rs, add a new configuration struct for your signer that defines which environment variables are needed. For example:

​Step 3: Add Your Signer to SignerTypeConfig Enum

Add your signer variant to the SignerTypeConfig enum in crates/lib/src/signer/config.rs:

​Step 4: Add Build Logic

In the same file (config.rs), add a method to build your signer from configuration in the SignerConfig implementation:
Note: The method name Signer::from_your_service() should match what you implemented in the solana-keychain crate.

​Step 5: Add Validation Logic

Add validation for your signer’s configuration in the validate_individual_signer_config method:

​Step 6: Export Your Configuration

Add your new config struct to the module exports in crates/lib/src/signer/mod.rs (or at the top of the file if it’s public):

​Testing Your Integration

​Add Test Mock Builder

To make testing easier, add a builder method to SignerPoolConfigBuilder in crates/lib/src/tests/config_mock.rs:
This allows other tests to easily create mock configurations that include your signer:

​Environment Variables

Add the example environment variables to the following files:
  • .env.example (root of the project)
  • .env (root of the project, for local testing)
  • sdks/ts/.env (local only; the TypeScript SDK tests load it when you run them from sdks/ts)

​Integration Tests

Each integration phase is its own [[test]] target in tests/Cargo.toml. Every target boots an embedded surfnet plus a Kora node through harness_context, seeded from scratch. Kora keeps config in process-global state, so a new signer needs a new target rather than a new module in an existing one.

​1. Add a Signer Fixture

Create a signer configuration in tests/src/common/fixtures/:

​2. Add a Test Target

Register the phase in tests/Cargo.toml:
Then create tests/your_service/main.rs. It points the harness at your fixture and must contain at least one #[tokio::test] that exercises the signer:
Add a signTransaction test as well so the signer’s signing path runs, not just key lookup. tests/multi_signer/ is a complete example to copy from.

​3. Running Tests

​Documentation Requirements

When submitting your PR, include:

​1. Update the Signers Guide

Add signer documentation following the ADDING_SIGNERS.md guide, explaining the prerequisites, setup, and usage.

​2. Update README

Add your service to the main README’s signer list.

​Submission Checklist

  • Your signer is supported in the solana-keychain crate
  • Updated solana-keychain dependency in Cargo.toml to latest version
  • Added configuration struct for your signer
  • Added SignerTypeConfig variant
  • Added build logic in build_signer_from_config
  • Added validation logic in validate_individual_signer_config
  • Exported configuration struct in mod.rs
  • (Optional) Added test mock builder method in config_mock.rs
  • Code compiles without warnings
  • All tests pass (just test)
  • Code is formatted (just fmt)
  • Documentation added following ADDING_SIGNERS.md
  • Example configuration files created (.toml and .env.example)
  • No hardcoded values or secrets
  • Error messages are helpful
  • Follows Rust naming conventions (snake_case)
  • Formatting and lint checks pass (just check)
  • Contact the Kora team with API Keys for integration testing

​Getting Help

  • For signer implementation: Open an issue in the solana-keychain repository
  • For Kora integration: Open an issue in the Kora repository for design discussions
  • Join our community channels
  • Review existing signer configurations in crates/lib/src/signer/config.rs (pinned to v2.0.5; see main for the latest)

​Example PR Structure

For Kora repository:
Welcome to the Kora ecosystem. We’re glad to have your key management solution as part of the platform.