[package]
name        = "smart-account-auth"
description = "Authentication library for smart accounts on various blockchains and their virtual machines"
edition     = { workspace = true }
authors     = { workspace = true }
version     = { workspace = true }
license     = { workspace = true }
readme      = { workspace = true }
repository  = { workspace = true }


[lib]
name        = "smart_account_auth"
path        = "src/lib.rs"
crate-type = ["cdylib", "rlib"]


[dependencies]
saa-auth              = { workspace = true }
saa-curves              = { workspace = true }
saa-schema              = { workspace = true }
saa-common              = { workspace = true }

scale                   = { workspace = true, optional = true }
scale-info              = { workspace = true, optional = true }
borsh                   = { workspace = true, optional = true }
schemars                = { workspace = true, optional = true }
serde                   = { workspace = true }

[features]
default = [
    "std", 
    "ethereum", 
    "cosmos", 
    "ed25519",
    "passkeys",
    "replay",
    "iterator",
]
std = [
    "scale?/std",
    "scale-info?/std",
    "saa-auth/std",
]
native = [
    "saa-auth/native",
]
solana = [
    "borsh/derive",
    "saa-auth/solana",
]
substrate = [
    "dep:scale",
    "dep:scale-info",
    "saa-auth/substrate",
]
cosmwasm = [
    "saa-auth/cosmwasm",
    "wasm",
]
injective = [
    "saa-auth/injective",
    "cosmwasm",
]
secretwasm  = [
    "saa-common/secretwasm",
    "saa-auth/wasm",
    "saa-curves/wasm",
    "wasm",
]
wasm      = [
    "dep:schemars",
]
replay    = [
    "saa-common/replay",
    "storage",
]
iterator  = [
    "saa-common/iterator",
    "storage",
]
storage   = []


# Passkey credential 
passkeys    = []

# Blockchain specific authenticators
ethereum    = []
cosmos      = []

# Enable raw curve credentials without envelops
curves      = []

# Set separately for Solana
ed25519     = []