From befc3e46ccf68c663cd41e94514a8cfcaddd8302 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sat, 14 Sep 2024 15:30:02 -0500 Subject: [PATCH] feat: add `PrivacyPolicy` type --- src/Zenith/Types.hs | 8 ++++++++ zenith-openrpc.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Zenith/Types.hs b/src/Zenith/Types.hs index 7d83a93..f9c09b4 100644 --- a/src/Zenith/Types.hs +++ b/src/Zenith/Types.hs @@ -198,6 +198,14 @@ $(deriveJSON defaultOptions ''ZenithStatus) derivePersistField "ZenithStatus" +data PrivacyPolicy + = Full + | Medium + | Low + | None + +$(deriveJSON defaultOptions ''PrivacyPolicy) + -- ** `zebrad` -- | Type for modeling the tree state response data ZebraTreeInfo = ZebraTreeInfo diff --git a/zenith-openrpc.json b/zenith-openrpc.json index a58fb0b..8fb37da 100644 --- a/zenith-openrpc.json +++ b/zenith-openrpc.json @@ -815,7 +815,7 @@ "address": { "type": "string", "description": "Recipient's address (unified, Sapling or transparent)" }, "amount": { "type": "number", "description": "The amount to send in ZEC"}, "memo": { "type": "string", "description": "The shielded memo to include, if applicable"}, - "privacy": { "type": "string", "enum": ["None", "Medium", "Full"], "description": "The privacy policy to use for the transaction. `Full` policy allows shielded funds to be transferred within their shielded pools. `Medium` policy allows shielded funds to cross shielded pools and deshielding transactions. `None` allows for transparent funds to be spent."} + "privacy": { "type": "string", "enum": ["None", "Low", "Medium", "Full"], "description": "The privacy policy to use for the transaction. `Full` policy allows shielded funds to be transferred within their shielded pools. `Medium` policy allows shielded funds to cross shielded pools and deshielding transactions. `Low` allows to spend transparent funds into shielded pools. `None` allows for transparent funds to be spent to transparent addresses."} } } },