Эх сурвалжийг харах

[zk-token-sdk] deprecate the crate (#6969)

* deprecate `zk-token-sdk`

* allow deprecated in the `zk-token-proof` program since it will be removed

* allow deprecated in the `zk-keygen` program until this crate is migrated

* add README to warn that the crate is deprecated

* add a note to use the zk-sdk in the deprecation warning

* fully specify zk-sdk name and add deprecated version

* bump deprecation version to v3
samkim-crypto 3 сар өмнө
parent
commit
ad7fbe953d

+ 3 - 0
programs/zk-token-proof/benches/verify_proofs.rs

@@ -1,4 +1,7 @@
 #![allow(clippy::arithmetic_side_effects)]
 #![allow(clippy::arithmetic_side_effects)]
+// Allow deprecated warnings since this crate will be removed along with
+// `solana-zk-token-sdk` will be removed
+#![allow(deprecated)]
 use {
 use {
     criterion::{criterion_group, criterion_main, Criterion},
     criterion::{criterion_group, criterion_main, Criterion},
     curve25519_dalek::scalar::Scalar,
     curve25519_dalek::scalar::Scalar,

+ 3 - 0
programs/zk-token-proof/src/lib.rs

@@ -1,4 +1,7 @@
 #![forbid(unsafe_code)]
 #![forbid(unsafe_code)]
+// Allow deprecated warnings since this crate will be removed along with
+// `solana-zk-token-sdk` will be removed
+#![allow(deprecated)]
 
 
 use {
 use {
     bytemuck::Pod,
     bytemuck::Pod,

+ 1 - 0
zk-keygen/src/main.rs

@@ -1,3 +1,4 @@
+#![allow(deprecated)]
 use {
 use {
     bip39::{Mnemonic, MnemonicType, Seed},
     bip39::{Mnemonic, MnemonicType, Seed},
     clap::{crate_description, crate_name, Arg, ArgMatches, Command, PossibleValue},
     clap::{crate_description, crate_name, Arg, ArgMatches, Command, PossibleValue},

+ 7 - 0
zk-token-sdk/README.md

@@ -0,0 +1,7 @@
+# zk-token-sdk (DEPRECATED)
+
+**This crate is deprecated and no longer maintained.**
+
+This crate has been replaced by the [zk-sdk](https://github.com/solana-program/zk-elgamal-proof) crate.
+
+For the latest updates and features, please use the new crate.

+ 7 - 0
zk-token-sdk/src/lib.rs

@@ -1,3 +1,10 @@
+// Deprecate the crate
+#![deprecated(
+    since = "3.0.0",
+    note = "use the `solana-zk-sdk` instead: https://github.com/solana-program/zk-elgamal-proof/tree/main/zk-sdk"
+)]
+// Allow deprecated warnings to be suppressed in the crate
+#![allow(deprecated)]
 #![allow(clippy::arithmetic_side_effects, clippy::op_ref)]
 #![allow(clippy::arithmetic_side_effects, clippy::op_ref)]
 
 
 // The warning `clippy::op_ref` is disabled to allow efficient operator arithmetic of structs that
 // The warning `clippy::op_ref` is disabled to allow efficient operator arithmetic of structs that