[package]
name = "ephemeral-rollups-sdk"
description = "Ephemeral Rollups Integration SDK"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
documentation = { workspace = true }
homepage = { workspace = true }
keywords = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
readme = "README.md"

[features]
default = ["solana-program", "solana-system-interface"]
anchor = ["anchor-lang"]
access-control = ["num-derive", "num-traits", "thiserror"]
spl = ["spl-associated-token-account-interface", "encryption"]
encryption = [
    "magicblock-delegation-program-api/encryption",
    "magicblock-delegation-program-api/instruction",
]
crank = []
disable-realloc = []
modular-sdk = [
    "solana-account",
    "solana-account-info",
    "solana-cpi",
    "solana-instruction",
    "solana-pubkey",
    "solana-program-error",
    "solana-program-memory",
    "solana-sysvar",
    "solana-system-interface",
]
custom-heap = []
custom-panic = []
anchor-debug = []
serde = []


[dependencies]
anchor-lang = { workspace = true, optional = true }
borsh = { workspace = true }
bincode = { workspace = true }
ephemeral-rollups-sdk-attribute-delegate = { workspace = true }
ephemeral-rollups-sdk-attribute-ephemeral = { workspace = true }
ephemeral-rollups-sdk-attribute-ephemeral-accounts = { workspace = true }
ephemeral-rollups-sdk-attribute-commit = { workspace = true }
ephemeral-rollups-sdk-attribute-action = { workspace = true }
solana-program = { workspace = true, optional = true }
solana-account = { workspace = true, optional = true }
solana-account-info = { workspace = true, optional = true }
solana-cpi = { workspace = true, optional = true }
solana-instruction = { workspace = true, optional = true }
solana-pubkey = { workspace = true, optional = true }
solana-program-error = { workspace = true, optional = true }
solana-program-memory = { workspace = true, optional = true }
solana-system-interface = { workspace = true, optional = true }
solana-sysvar = { workspace = true, optional = true }
spl-associated-token-account-interface = { workspace = true, optional = true }
magicblock-magic-program-api = { workspace = true }
magicblock-delegation-program-api = { workspace = true, default-features = false }
num-derive = { workspace = true, optional = true }
num-traits = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }

# Fix for older toolchain
base64ct = { workspace = true }
getrandom = { version = "^0.2", features = ["custom"] }

[[test]]
name = "integration_test"
path = "../tests/integration_test.rs"

[[test]]
name = "unit_test"
path = "../tests/unit_test.rs"

[[test]]
name = "access_control_test"
path = "../tests/access_control_test.rs"
required-features = ["access-control", "modular-sdk"]

[[test]]
name = "pinocchio_test"
path = "../tests/pinocchio_test.rs"

[[test]]
name = "resolver_test"
path = "../tests/resolver_test.rs"

[[test]]
name = "sdk_test"
path = "../tests/sdk_test.rs"

[[test]]
name = "macros_test"
path = "../tests/macros_test.rs"

[[test]]
name = "spl_test"
path = "../tests/spl_test.rs"
required-features = ["spl", "access-control", "modular-sdk"]

[dev-dependencies]
bincode = { workspace = true }
sdk = { workspace = true }
