-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathCargo.toml
More file actions
117 lines (97 loc) · 4.83 KB
/
Copy pathCargo.toml
File metadata and controls
117 lines (97 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[package]
name = "switchboard-on-demand"
version = "0.10.0"
# docs.rs autobuild has difficulty with ahash dep. Host yuorself at https://tiiny.host/
documentation = "https://docs.rs/switchboard-on-demand/latest/switchboard_on_demand"
edition = "2021"
resolver = "2"
description = "A Rust library to interact with the Switchboard Solana program."
readme = "README.md"
keywords = ["switchboard", "oracle", "solana"]
homepage = "https://switchboard.xyz"
repository = "https://github.com/switchboard-xyz/solana-sdk/tree/main"
license = "MIT"
[lib]
crate-type = ["cdylib", "lib"]
name = "switchboard_on_demand"
doctest = false
[features]
## Default features - enables CPI support with Solana SDK v2
default = ["cpi", "solana-v2"]
## Disables the program entrypoint. Use when building programs that import this crate.
no-entrypoint = []
## Enables Cross-Program Invocation (CPI) support. Implies `no-entrypoint`.
## Use this when you need to call Switchboard from another Solana program.
cpi = ["no-entrypoint"]
## Meta-feature for documentation builds - includes all commonly used features.
all-features = ["cpi", "no-entrypoint", "client"]
## Allows overriding the Switchboard program ID at runtime.
## Only enable for testing purposes.
pid_override = []
## Client functionality for off-chain interactions (Gateway, Crossbar, transaction builders).
## Uses Solana SDK v2 with anchor-client compatibility.
## Includes: RPC client, transaction building, oracle feeds, and Crossbar integration.
client = ["anchor-lang", "anchor-client", "tokio", "tokio-util", "futures", "arc-swap", "reqwest", "prost", "pbjson", "dashmap", "tokio-stream", "base58", "bs58", "lazy_static", "hex", "base64", "serde_json", "switchboard-utils", "solana-v2", "dep:solana-client-v2"]
## Alias for `client` feature - explicitly uses Solana SDK v2.
client-v2 = ["client"]
## Client feature using Solana v3 crates.
client-v3 = ["tokio", "tokio-util", "futures", "arc-swap", "reqwest", "prost", "pbjson", "dashmap", "tokio-stream", "base58", "bs58", "lazy_static", "hex", "base64", "serde_json", "switchboard-utils", "solana-v3", "dep:solana-client-v3"]
## Configures the crate for Solana devnet deployment.
devnet = []
## Enables documentation configuration metadata. Used by docs.rs.
doc_cfg = ["switchboard-common/doc_cfg"]
## Enables Anchor framework support with Solana SDK v2.
## Use when integrating with Anchor programs.
anchor = ["anchor-lang", "solana-v2"]
## Enables Pinocchio optimization for faster on-chain execution.
## Reduces compute units by using optimized account deserialization.
pinocchio = ["dep:pinocchio"]
## **INTERNAL/TESTING ONLY** - Disables signature verification.
## Never use in production.
test_only_ignore_singers = []
## Uses Solana SDK version 2.x (>= 2).
solana-v2 = ["dep:solana-program-v2"]
## Uses Solana SDK version 3.x (>= 3).
solana-v3 = ["dep:solana-program-v3"]
idl-build = ["anchor-lang/idl-build"]
[build-dependencies]
cc = "1.0"
[dependencies]
anchor-client = { version = ">=0.31.1,<0.32", optional = true }
anchor-lang = { version = ">=0.31.1,<0.32", optional = true }
anyhow = "1.0.97"
arc-swap = { version = "1.6", optional = true }
arrayref = "0.3.9"
base58 = { version = "0.2.0", optional = true }
base64 = { version = "0.22", optional = true }
base64ct = "<1.8"
bincode = { version = "^1" }
borsh = { version = "1.5.7" }
bs58 = { version = "0.4", features = ["alloc"], optional = true }
bytemuck = "^1"
dashmap = { version = "6.0.1", optional = true }
faster-hex = "0.10.0"
futures = { version = "0.3.31", optional = true }
hex = { version = "0.4", optional = true }
lazy_static = { version = "1.5.0", optional = true }
libsecp256k1 = "0.7.1"
pbjson = { version = "0.7.0", optional = true }
pinocchio = { version = "0.9.2", features = ["std"], optional = true }
prost = { version = "0.13.1", optional = true }
reqwest = { version = "0.11", features = ["json", "rustls-tls"], default-features = false, optional = true }
rust_decimal = "^1"
serde = { version = "^1", features = ["derive"] }
serde_json = { version = "1.0", optional = true }
sha2 = "0.10.8"
solana-client-v2 = { package = "solana-client", version = ">=2,<3", optional = true }
solana-client-v3 = { package = "solana-client", version = ">=3", optional = true }
solana-commitment-config = "3.0.0"
solana-program-v2 = { package = "solana-program", version = ">=2,<3", optional = true }
solana-program-v3 = { package = "solana-program", version = ">=3", optional = true }
spl-associated-token-account = { version = ">=3", features = ["no-entrypoint"] }
spl-token = { version = ">=4", features = ["no-entrypoint"] }
switchboard-common = { version = "0.11.6", features = [] }
switchboard-utils = { version = "0.9", optional = true }
tokio = { version = "^1.41", features = ["full", "tracing"], optional = true }
tokio-stream = { version = ">=0.1.17", optional = true }
tokio-util = { version = "0.7.10", features = ["time"], optional = true }