[package]
name = "surfpool-core"
description = "Where you train before surfing Solana"
version = { workspace = true }
readme = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
keywords = { workspace = true }
categories = { workspace = true }

[lib]
path = "src/lib.rs"

[dependencies]
agave-feature-set = { workspace = true }
agave-geyser-plugin-interface = { workspace = true }
agave-reserved-account-keys = { workspace = true }
base64 = { workspace = true }
bincode = { workspace = true }
blake3 = { workspace = true }
borsh = { workspace = true }
bytemuck = "1.21"
bs58 = { workspace = true }
chrono = { workspace = true }
convert_case = { workspace = true }
crossbeam = { workspace = true }
crossbeam-channel = { workspace = true }
hex = { workspace = true }
hiro-system-kit = { workspace = true }
ipc-channel = { workspace = true }
itertools = { workspace = true }
json5 = { workspace = true }
jsonrpc-core = { workspace = true }
lazy_static = { workspace = true }
jsonrpc-core-client = { workspace = true, features = ["http"] }
jsonrpc-derive = { workspace = true }
jsonrpc-http-server = { workspace = true }
jsonrpc-pubsub = { workspace = true }
jsonrpc-ws-server = { workspace = true }
libloading = { workspace = true }
litesvm = { workspace = true }
litesvm-token = { workspace = true }
log = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }                                  # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251
serde_json = { workspace = true }
sha2 = { workspace = true }
serde_yaml = "0.9"
solana-account = { workspace = true }
solana-account-decoder = { workspace = true }
solana-address-lookup-table-interface = { workspace = true }
solana-client = { workspace = true }
solana-clock = { workspace = true }
solana-commitment-config = { workspace = true }
solana-compute-budget-interface = { workspace = true }
solana-epoch-info = { workspace = true }
solana-epoch-schedule = { workspace = true }
solana-feature-gate-interface = { workspace = true }
solana-genesis-config = { workspace = true }
solana-hash = { workspace = true }
solana-inflation = { workspace = true }
solana-instruction = { workspace = true }
solana-keypair = { workspace = true }
solana-loader-v3-interface = { workspace = true }
solana-message = { workspace = true }
solana-nonce = { workspace = true }
solana-packet = { workspace = true }
solana-program-option = { workspace = true }
solana-program-pack = { workspace = true }
solana-pubkey = { workspace = true }
solana-rpc-client = { workspace = true }
solana-rpc-client-api = { workspace = true }
solana-runtime = { workspace = true }
solana-sdk-ids = { workspace = true }
solana-signature = { workspace = true, features = ["rand"] }
solana-signer = { workspace = true }
solana-slot-hashes = { workspace = true }
solana-system-interface = { workspace = true }
solana-sysvar = { workspace = true }
solana-sysvar-id = { workspace = true }
solana-transaction = { workspace = true }
solana-transaction-context = { workspace = true }
solana-transaction-error = { workspace = true }
solana-transaction-status = { workspace = true }
solana-version = { workspace = true }
spl-associated-token-account-interface = { workspace = true }
spl-token-interface = { workspace = true }
spl-token-2022-interface = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
uuid = { workspace = true }

surfpool-db = { workspace = true }
surfpool-types = { workspace = true }

anchor-lang-idl = { workspace = true }
txtx-addon-kit = { workspace = true }
txtx-addon-network-svm-types = { workspace = true }
txtx-addon-network-svm = { workspace = true }
opentelemetry = { version = "0.28", default-features = false, features = ["metrics"], optional = true }
opentelemetry_sdk = { version = "0.28", default-features = false, features = ["rt-tokio", "metrics"], optional = true }
opentelemetry-prometheus = { version = "0.28", default-features = false, optional = true }
prometheus = { version = "0.13", default-features = false, optional = true }
axum = { version = "0.8", default-features = false, features = ["tokio", "http1"], optional = true }

[dev-dependencies]
ed25519-dalek = "1.0.1"
test-case = { workspace = true }
env_logger = "0.11"
solana-ed25519-program = { workspace = true }
tempfile = { workspace = true }
spl-token-metadata-interface = { workspace = true }

[features]
default = ["sqlite"]
sqlite = ["surfpool-db/sqlite"]
postgres = ["surfpool-db/postgres"]
ignore_tests_ci = []
register-tracing = ["litesvm/register-tracing"]
prometheus = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-prometheus", "dep:prometheus", "dep:axum"]
