samkim-crypto 683e1071f7 [zk-token-sdk] Implement FromStr for ElGamalPubkey, ElGamalCiphertext, and AeCiphertext (#130)
* add `ParseError` in `zk-token-elgamal`

* implement `FromStr` for `ElGamalPubkey` and `ElGamalCiphertext`

* implement `FromStr` for `AeCiphertext`

* fix target

* cargo fmt

* use constants for byte length check

* make `FromStr` functions available on chain

* use macros for the `FromStr` implementations

* restrict `from_str` macro to `pub(crate)`

* decode directly into array

* cargo fmt

* Apply suggestions from code review

Co-authored-by: Jon C <me@jonc.dev>

* remove unnecessary imports

* remove the need for `ParseError` dependency

---------

Co-authored-by: Jon C <me@jonc.dev>
2024-03-15 22:25:14 -05:00

42 lines
1.2 KiB
TOML

[package]
name = "solana-zk-token-sdk"
description = "Solana Zk Token SDK"
documentation = "https://docs.rs/solana-zk-token-sdk"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
[dependencies]
base64 = { workspace = true }
bytemuck = { workspace = true, features = ["derive"] }
num-derive = { workspace = true }
num-traits = { workspace = true }
solana-program = { workspace = true }
thiserror = { workspace = true }
[dev-dependencies]
tiny-bip39 = { workspace = true }
[target.'cfg(not(target_os = "solana"))'.dependencies]
aes-gcm-siv = { workspace = true }
bincode = { workspace = true }
byteorder = { workspace = true }
curve25519-dalek = { workspace = true, features = ["serde"] }
getrandom = { version = "0.1", features = ["dummy"] }
itertools = { workspace = true }
lazy_static = { workspace = true }
merlin = { workspace = true }
rand = { version = "0.7" }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha3 = "0.9"
solana-sdk = { workspace = true }
subtle = { workspace = true }
zeroize = { workspace = true, features = ["zeroize_derive"] }
[lib]
crate-type = ["cdylib", "rlib"]