Skip to content

Commit ae883b5

Browse files
authored
docs:(PRO-237) release punchlist (#193)
* docs: add getPaymentInstruction to TS SDK * docs: update CONFIGURATION.md * update reference to payment addresses and signers * docs: update Quick Start Guide * docs: update MONITORING.md * docs: update SIGNERS.md * docs: update CLAUDE.md
1 parent 76707ee commit ae883b5

File tree

7 files changed

+204
-96
lines changed

7 files changed

+204
-96
lines changed

CLAUDE.md

Lines changed: 27 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
### Branches & Commits
88
- **Main branch**: `main` (protected, requires PRs)
9+
- **Release branch**: `release/{id}` (requires PRs)
910
- **Commit format**: Use conventional commits for automatic releases
1011
- `feat:` → minor version bump (1.0.3 → 1.1.0)
1112
- `fix:` → patch version bump (1.0.3 → 1.0.4)
@@ -187,47 +188,32 @@ make test-integration
187188
make run
188189

189190
# Run with test configuration (for integration testing)
190-
cargo run -p kora-cli --bin kora -- --config tests/common/fixtures/kora-test.toml --rpc-url http://127.0.0.1:8899 rpc start --private-key ./tests/common/local-keys/fee-payer-local.json
191+
cargo run -p kora --bin kora -- --config tests/common/fixtures/kora-test.toml --rpc-url http://127.0.0.1:8899 rpc --signers-config tests/common/fixtures/signers.toml
191192

192193
# Run with debug logging
193-
RUST_LOG=debug cargo run -p kora-cli --bin kora -- rpc start
194+
RUST_LOG=debug cargo run -p kora --bin kora -- rpc start
194195

195196
# Run RPC server with all parameters
196-
cargo run -p kora-cli --bin kora -- --config kora.toml --rpc-url https://api.devnet.solana.com rpc start \
197+
cargo run -p kora --bin kora -- --config kora.toml --rpc-url https://api.devnet.solana.com rpc start \
197198
--port 8080 \
198199
--logging-format standard
199200

200201
# Run with Turnkey signer
201-
cargo run -p kora-cli --bin kora -- rpc start \
202-
--with-turnkey-signer \
203-
--turnkey-api-public-key $TURNKEY_API_PUBLIC_KEY \
204-
--turnkey-api-private-key $TURNKEY_API_PRIVATE_KEY \
205-
--turnkey-organization-id $TURNKEY_ORGANIZATION_ID \
206-
--turnkey-private-key-id $TURNKEY_PRIVATE_KEY_ID \
207-
--turnkey-public-key $TURNKEY_PUBLIC_KEY \
208-
--port 8080
202+
cargo run -p kora --bin kora -- rpc start --signers-config path/to/turnkey-signers.toml
209203

210204
# Run with Privy signer
211-
cargo run -p kora-cli --bin kora -- rpc start \
212-
--with-privy-signer \
213-
--privy-app-id $PRIVY_APP_ID \
214-
--privy-app-secret $PRIVY_APP_SECRET \
215-
--privy-wallet-id $PRIVY_WALLET_ID
205+
cargo run -p kora --bin kora -- rpc start --signers-config path/to/privy-signers.toml
216206

217207
# Run with Vault signer
218-
cargo run -p kora-cli --bin kora -- rpc start \
219-
--vault-signer \
220-
--vault-addr $VAULT_ADDR \
221-
--vault-token $VAULT_TOKEN \
222-
--vault-key-name $VAULT_KEY_NAME \
223-
--vault-pubkey $VAULT_PUBKEY
208+
cargo run -p kora --bin kora -- rpc start \
209+
--signers-config path/to/vault-signers.toml
224210

225211
# Configuration validation commands
226-
cargo run -p kora-cli --bin kora -- config validate
227-
cargo run -p kora-cli --bin kora -- config validate-with-rpc
212+
cargo run -p kora --bin kora -- config validate
213+
cargo run -p kora --bin kora -- config validate-with-rpc
228214

229215
# Generate OpenAPI documentation
230-
cargo run -p kora-cli --bin kora --features docs -- openapi -o openapi.json
216+
cargo run -p kora --bin kora --features docs -- openapi -o openapi.json
231217
```
232218

233219
### TypeScript SDK Development
@@ -244,12 +230,13 @@ pnpm run format
244230

245231
### Core Library (`kora-lib/src/`)
246232

247-
- **signer/** - Abstraction layer supporting multiple signer types:
233+
- **signer/** - Abstraction layer supporting multiple signer types (configured in `signers.toml`)
248234
- `SolanaMemorySigner` - Local keypair signing
249235
- `VaultSigner` - HashiCorp Vault integration
250236
- `TurnkeySigner` - Turnkey API integration
251237
- `PrivySigner` - Privy API integration
252238
- Unified `KoraSigner` enum with trait implementation
239+
- optionally, `--no-signer` flag to run Kora without a signer
253240

254241
- **transaction/** - Transaction processing pipeline:
255242
- Fee estimation and calculation
@@ -289,6 +276,8 @@ pnpm run format
289276
- `getConfig` - Return server configuration
290277
- `getSupportedTokens` - List accepted payment tokens
291278
- `signTransactionIfPaid` - Conditional signing based on payment verification
279+
- `getPayerSigner` - Get the payer signer and payment destination
280+
- (client-only) `getPaymentInstruction` - Get a payment instruction for a transaction
292281

293282
- **openapi/** - Auto-generated API documentation using `utoipa`
294283
- **args.rs** - RPC-specific command line arguments
@@ -298,31 +287,25 @@ pnpm run format
298287
- Unified command-line interface with subcommands:
299288
- `kora config validate` - Validate configuration file
300289
- `kora config validate-with-rpc` - Validate configuration with RPC calls
301-
- `kora rpc` - Start the RPC server with all signer options
290+
- `kora rpc start` - Start the RPC server with all signer options (kora.toml & signers.toml in cwd)
291+
- `kora --config path/to/kora.toml rpc start --signers-config path/to/signers.toml` - Start the RPC server with specific config and signers
302292
- `kora openapi` - Generate OpenAPI documentation
303293
- Global arguments (rpc-url, config) separated from RPC-specific arguments
304294
- All signer types supported for RPC server mode
305295

306296
**Example CLI usage:**
307297
```bash
308298
# Validate configuration
309-
cargo run -p kora-cli --bin kora -- --config kora.toml config validate
299+
cargo run -p kora --bin kora -- --config kora.toml config validate
310300

311301
# Start RPC server with local private key
312-
cargo run -p kora-cli --bin kora -- --config kora.toml --rpc-url https://api.devnet.solana.com rpc start \
313-
--private-key your_base58_private_key
302+
cargo run -p kora --bin kora -- --config path/to/kora.toml --rpc-url https://api.devnet.solana.com rpc start --signers-config path/to/signers.toml
314303

315304
# Start RPC server with Turnkey signer
316-
cargo run -p kora-cli --bin kora -- rpc start \
317-
--with-turnkey-signer \
318-
--turnkey-api-public-key $TURNKEY_API_PUBLIC_KEY \
319-
--turnkey-api-private-key $TURNKEY_API_PRIVATE_KEY \
320-
--turnkey-organization-id $TURNKEY_ORGANIZATION_ID \
321-
--turnkey-private-key-id $TURNKEY_PRIVATE_KEY_ID \
322-
--turnkey-public-key $TURNKEY_PUBLIC_KEY
305+
cargo run -p kora --bin kora -- rpc start --signers-config path/to/turnkey-signers.toml
323306

324307
# Generate OpenAPI documentation
325-
cargo run -p kora-cli --bin kora --features docs -- openapi -o openapi.json
308+
cargo run -p kora --bin kora --features docs -- openapi -o openapi.json
326309
```
327310

328311
### Signer Integrations
@@ -378,31 +361,7 @@ allow_token2022_transfers = true # Allow fee payer to be source in Token2022 tra
378361
allow_assign = true # Allow fee payer to use Assign instruction
379362
```
380363

381-
### Environment Variables
382-
383-
**Turnkey Integration:**
384-
```bash
385-
TURNKEY_API_PUBLIC_KEY=your_api_public_key
386-
TURNKEY_API_PRIVATE_KEY=your_api_private_key
387-
TURNKEY_ORGANIZATION_ID=your_org_id
388-
TURNKEY_PRIVATE_KEY_ID=your_private_key_id
389-
TURNKEY_PUBLIC_KEY=your_public_key
390-
```
391-
392-
**Privy Integration:**
393-
```bash
394-
PRIVY_APP_ID=your_app_id
395-
PRIVY_APP_SECRET=your_app_secret
396-
PRIVY_WALLET_ID=your_wallet_id
397-
```
398-
399-
**HashiCorp Vault Integration:**
400-
```bash
401-
VAULT_ADDR=https://vault.example.com
402-
VAULT_TOKEN=your_vault_token
403-
VAULT_KEY_NAME=your_key_name
404-
VAULT_PUBKEY=your_base58_public_key
405-
```
364+
### Environment Variables set in `signers.toml`
406365

407366
**General:**
408367
```bash
@@ -439,24 +398,24 @@ The fee payer policy is configured via the `[validation.fee_payer_policy]` secti
439398

440399
## Private Key Formats
441400

442-
Kora supports multiple private key formats for enhanced usability and compatibility with different tooling:
401+
Kora supports multiple private key formats for enhanced usability and compatibility with different tooling, each specified in `signers.toml`
443402

444-
### 1. Base58 Format (Default)
403+
### 1. Base58 Format
445404
Traditional Solana private key format - base58-encoded 64-byte private key:
446405
```bash
447-
--private-key FEE_PAYER_KEYPAIR_BASE58_STRING
406+
KORA_PRIVATE_KEY=your_base58_private_key
448407
```
449408

450409
### 2. U8Array Format
451410
Comma-separated byte array format compatible with Solana CLI outputs:
452411
```bash
453-
--private-key "[123,45,67,89,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56]"
412+
KORA_PRIVATE_KEY="[123,45,67,89,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56,78,90,12,34,56]"
454413
```
455414

456415
### 3. JSON File Path
457416
Path to a JSON file containing the private key:
458417
```bash
459-
--private-key "/path/to/keypair.json"
418+
KORA_PRIVATE_KEY="/path/to/keypair.json"
460419
```
461420

462421
### Format Detection

docs/getting-started/QUICK_START.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Kora Quick Start Guide
22

3+
*Last Updated: 2025-08-22*
4+
35
## Kora Basics
46

57
Kora is a JSON-RPC server that provides fee payment services for Solana transactions. It allows users to pay transaction fees with SPL tokens instead of SOL, enabling better UX for applications where users may not hold SOL.
@@ -25,7 +27,7 @@ This quick start will launch a local Kora RPC server and demonstrate client inte
2527

2628
- [Solana CLI](https://solana.com/docs/intro/installation) v2.2.x or greater
2729
- [Rust/Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) (for Kora RPC installation)
28-
- [Node.js v24+](https://nodejs.org/en/download) and a package manager (e.g., [pnpm](https://pnpm.io/), npm)
30+
- [Node.js v22+](https://nodejs.org/en/download) and a package manager (e.g., [pnpm](https://pnpm.io/), npm)
2931

3032
## Install Kora RPC
3133

@@ -54,6 +56,7 @@ The demo contains three main components:
5456

5557
**Server Directory (`server/`)**
5658
- `kora.toml` - Kora RPC configuration defining validation rules, allowed tokens, and fee parameters
59+
- `signers.toml` - Signers configuration defining signers for the Kora server
5760

5861
**Shared Configuration**
5962
- `.env` - Environment variables for keypairs and addresses (create `.env` in root - `demo/.env`). The environment variables will be created by the setup script.
@@ -63,6 +66,7 @@ The demo contains three main components:
6366
First, create .env for your environment :
6467

6568
```bash
69+
# Create .env file (will be populated by setup script)
6670
touch .env
6771
```
6872

@@ -99,6 +103,11 @@ The Kora server requires configuration to specify which tokens can be used for f
99103

100104
For now, let's leave the default values--you can come back here and change these later (for more information on the configuration options, see the [Kora Configuration](../operators/CONFIGURATION.md) documentation).
101105

106+
### Setup Signers
107+
108+
Open `server/signers.toml` and note the signers section. Here we can specify which signers will be used to sign transactions and (if using multiple signers) a strategy for selecting which signer to use. For now, let's use a single-signer using the default values--you can come back here and change these later (for more information on the signers configuration, see the [Signers Guide](../operators/SIGNERS.md) documentation).
109+
110+
102111
## Test Server
103112

104113
Open three terminals and run the following commands:
@@ -203,10 +212,12 @@ This confirms your Kora server is running and properly configured!
203212
Once you have the basic setup working, explore additional Kora RPC methods:
204213
205214
- `estimateTransactionFee` - Calculate fees for transactions
215+
- `getPayerSigner` - Get the payer signer and payment destination
206216
- `getSupportedTokens` - Returns an array of supported payment tokens
207217
- `signTransaction` - Sign transactions with the Kora feepayer
208218
- `transferTransaction` - Create transfer SOL or SPL token transfer transactions (signed by the Kora feepayer)
209219
- `signAndSendTransaction` - Signs a transaction with the Kora feepayer and sends it to the configured Solana RPC
210220
- `signTransactionIfPaid` - Conditionally sign transactions when fees are covered
221+
- `getPaymentInstruction` - Get a payment instruction for a transaction
211222
212223
**Got questions?** Ask questions the [Solana Stack Exchange](https://solana.stackexchange.com/) with a `Kora` tag.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[signer_pool]
2+
strategy = "round_robin"
3+
4+
[[signers]]
5+
name = "main_signer"
6+
type = "memory"
7+
private_key_env = "KORA_PRIVATE_KEY"
8+
weight = 1

docs/operators/CONFIGURATION.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Kora Configuration Reference
2+
*Last Updated: 2025-08-22*
23

34
Your Kora node will be signing transactions for your users, so it is important to configure it to only sign transactions that meet your business requirements. Kora gives you a lot of flexibility in how you configure your node, but it is important to understand the implications of your configuration. `kora.toml` is the control center for your Kora configuration. This document provides a comprehensive reference for configuring your Kora paymaster node through the `kora.toml` configuration file.
45

@@ -74,11 +75,11 @@ rate_limit = 100
7475
payment_address = "YourPaymentAddressPubkey11111111111111111111" # Optional
7576
```
7677

77-
7878
| Option | Description | Required | Type |
7979
|--------|-------------|---------|---------|
8080
| `rate_limit` | Global rate limit (requests per second) across all clients || number |
81-
| `payment_address` | Optional payment address to receive payment tokens (defaults to signer address) || b58-encoded string |
81+
| `payment_address` | Optional payment address to receive payment tokens (defaults to signer address(es) if not specified) || b58-encoded string |
82+
8283

8384
## Kora Authentication
8485

@@ -191,7 +192,7 @@ disallowed_accounts = [
191192
| `allowed_spl_paid_tokens` | SPL tokens accepted as payment for transaction fees || Array of b58-encoded string |
192193
| `disallowed_accounts` | Accounts that are explicitly blocked from transactions || Array of b58-encoded string |
193194

194-
> *Note: Empty arrays are allowed, but you will need to specify at least one whitelisted `allowed_programs`, `allowed_tokens`, `allowed_spl_paid_tokens` for the Kora node to be able to process transactions. You need to specify the System Program or Token Program for the Kora node to be able to process transactions.*
195+
> *Note: Empty arrays are allowed, but you will need to specify at least one whitelisted `allowed_programs`, `allowed_tokens`, `allowed_spl_paid_tokens` for the Kora node to be able to process transactions. You need to specify the System Program or Token Program for the Kora node to be able to process transfers.*
195196
196197
## Token-2022 Extension Blocking
197198

@@ -356,13 +357,13 @@ Here's a production-ready configuration with security best practices:
356357

357358
```toml
358359
# Kora Paymaster Configuration
359-
# Last Updated: 2024-01-15
360+
# Last Updated: 2025-08-22
360361

361362
[kora]
362363
# Rate limiting: 100 requests per second globally
363364
rate_limit = 100
364365

365-
# Optional payment address (defaults to signer address if not specified)
366+
# Optional payment address (defaults to signer address(es) if not specified)
366367
# payment_address = "YourPaymentAddressPubkey11111111111111111111"
367368

368369
[kora.auth]
@@ -440,8 +441,8 @@ allow_approve = false
440441
# Block potentially risky mint extensions
441442
blocked_mint_extensions = [
442443
"transfer_hook", # Custom transfer logic
443-
"pausable", # Can freeze transfers
444-
"permanent_delegate", # Permanent control
444+
"pausable", # Can freeze transfers
445+
"permanent_delegate", # Permanent control
445446
]
446447
# Block complex account extensions
447448
blocked_account_extensions = [
@@ -472,17 +473,41 @@ expiry_seconds = 30
472473
Kora validates your configuration on startup. If you would like to validate your configuration without starting the server, you can use the config validation command:
473474

474475
```bash
475-
kora --config kora.toml config validate
476+
kora --config kora.toml config validate # or validate-with-rpc
476477
```
477478

479+
You can also run the `validate-with-rpc` command to validate your configuration with the RPC server (this validation check is a little bit slower but does more thorough account checks)
480+
478481
## Starting the Server
479482

480483
Once you have configured your `kora.toml` file, you can start the Kora server:
481484

482485
```bash
483-
kora --config path/to/kora.toml rpc # --other-rpc-flags-here
486+
kora --config path/to/kora.toml rpc start --no-load-signer # --other-rpc-flags-here
487+
```
488+
489+
The `--no-load-signer` flag will initialize the server without loading any signers. This is useful for testing your configuration. In order to load signers, you will need to configure the `signers.toml` file. A minimum configuration with a single signer would look like this:
490+
491+
```toml
492+
[signer_pool]
493+
# Selection strategy: round_robin, random, weighted
494+
strategy = "round_robin"
495+
496+
# Primary memory signer
497+
[[signers]]
498+
name = "my-signer"
499+
type = "memory"
500+
private_key_env = "MY_SIGNER_PRIVATE_KEY"
501+
```
502+
503+
This will load a single signer from the `MY_SIGNER_PRIVATE_KEY` environment variable. Then you can start your server with:
504+
505+
```bash
506+
kora --config path/to/kora.toml rpc start --signers-config path/to/signers.toml
484507
```
485508

509+
For more information and advanced signer configuration, see the [Signers Guide](./SIGNERS.md).
510+
486511
## Best Practices
487512

488513
1. **Start Restrictive**: Begin with tight limits and gradually expand
@@ -494,6 +519,7 @@ kora --config path/to/kora.toml rpc # --other-rpc-flags-here
494519
## Need Help?
495520

496521
- Check [Authentication Guide](./AUTHENTICATION.md) for auth setup
522+
- Check [Signers Guide](./SIGNERS.md) for signer configuration
497523
- Check [Operator Guide](./README.md) for more information on how to run a Kora node
498524
- Visit [Solana Stack Exchange](https://solana.stackexchange.com/) with the `kora` tag
499525
- Report issues on [GitHub](https://github.com/solana-foundation/kora/issues)

0 commit comments

Comments
 (0)