|
| 1 | +/// Create a new oberon token |
| 2 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 3 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 4 | +pub struct CreateOberonTokenRequest { |
| 5 | + /// raw BLS key bytes |
| 6 | + #[prost(bytes="vec", tag="1")] |
| 7 | + pub sk: ::prost::alloc::vec::Vec<u8>, |
| 8 | + /// data is the public part of the oberon protocol and can be any data |
| 9 | + #[prost(bytes="vec", tag="2")] |
| 10 | + pub data: ::prost::alloc::vec::Vec<u8>, |
| 11 | + /// optional blinding for the token |
| 12 | + #[prost(bytes="vec", repeated, tag="3")] |
| 13 | + pub blinding: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>, |
| 14 | +} |
| 15 | +/// Contains the token with optional blinding |
| 16 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 17 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 18 | +pub struct CreateOberonTokenReply { |
| 19 | + /// raw token bytes |
| 20 | + #[prost(bytes="vec", tag="1")] |
| 21 | + pub token: ::prost::alloc::vec::Vec<u8>, |
| 22 | +} |
| 23 | +/// Create a proof that holder knows the token |
| 24 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 25 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 26 | +pub struct CreateOberonProofRequest { |
| 27 | + /// data used to create the token |
| 28 | + #[prost(bytes="vec", tag="1")] |
| 29 | + pub data: ::prost::alloc::vec::Vec<u8>, |
| 30 | + /// token data |
| 31 | + #[prost(bytes="vec", tag="2")] |
| 32 | + pub token: ::prost::alloc::vec::Vec<u8>, |
| 33 | + /// any blindings used to create the token |
| 34 | + #[prost(bytes="vec", repeated, tag="3")] |
| 35 | + pub blinding: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>, |
| 36 | + /// nonce for generating the proof |
| 37 | + #[prost(bytes="vec", tag="4")] |
| 38 | + pub nonce: ::prost::alloc::vec::Vec<u8>, |
| 39 | +} |
| 40 | +/// Contains the token proof |
| 41 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 42 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 43 | +pub struct CreateOberonProofReply { |
| 44 | + /// raw proof bytes |
| 45 | + #[prost(bytes="vec", tag="2")] |
| 46 | + pub proof: ::prost::alloc::vec::Vec<u8>, |
| 47 | +} |
| 48 | +/// Verify the presented proof is valid |
| 49 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 50 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 51 | +pub struct VerifyOberonProofRequest { |
| 52 | + /// raw proof bytes returned from CreateProof |
| 53 | + #[prost(bytes="vec", tag="1")] |
| 54 | + pub proof: ::prost::alloc::vec::Vec<u8>, |
| 55 | + /// data used to create the token |
| 56 | + #[prost(bytes="vec", tag="2")] |
| 57 | + pub data: ::prost::alloc::vec::Vec<u8>, |
| 58 | + /// nonce used to generate the proof |
| 59 | + #[prost(bytes="vec", tag="3")] |
| 60 | + pub nonce: ::prost::alloc::vec::Vec<u8>, |
| 61 | + /// public key that was used to generate the token |
| 62 | + #[prost(bytes="vec", tag="4")] |
| 63 | + pub pk: ::prost::alloc::vec::Vec<u8>, |
| 64 | +} |
| 65 | +/// Contains the status of the proof validation |
| 66 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 67 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 68 | +pub struct VerifyOberonProofReply { |
| 69 | + /// whether the given proof was valid |
| 70 | + #[prost(bool, tag="1")] |
| 71 | + pub valid: bool, |
| 72 | +} |
| 73 | +/// Blind an oberon token |
| 74 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 75 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 76 | +pub struct BlindOberonTokenRequest { |
| 77 | + /// raw token bytes |
| 78 | + #[prost(bytes="vec", tag="1")] |
| 79 | + pub token: ::prost::alloc::vec::Vec<u8>, |
| 80 | + /// blinding to apply to the token |
| 81 | + #[prost(bytes="vec", repeated, tag="2")] |
| 82 | + pub blinding: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>, |
| 83 | +} |
| 84 | +/// Contains the blinded token reply |
| 85 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 86 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 87 | +pub struct BlindOberonTokenReply { |
| 88 | + /// raw blinded token bytes |
| 89 | + #[prost(bytes="vec", tag="1")] |
| 90 | + pub token: ::prost::alloc::vec::Vec<u8>, |
| 91 | +} |
| 92 | +/// UnBlind an oberon token |
| 93 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 94 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 95 | +pub struct UnBlindOberonTokenRequest { |
| 96 | + /// raw token bytes |
| 97 | + #[prost(bytes="vec", tag="1")] |
| 98 | + pub token: ::prost::alloc::vec::Vec<u8>, |
| 99 | + /// blinding to remove from the token |
| 100 | + #[prost(bytes="vec", repeated, tag="2")] |
| 101 | + pub blinding: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>, |
| 102 | +} |
| 103 | +/// Contains the unblinded token reply |
| 104 | +#[derive(::serde::Serialize, ::serde::Deserialize)] |
| 105 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 106 | +pub struct UnBlindOberonTokenReply { |
| 107 | + /// raw unblinded token bytes |
| 108 | + #[prost(bytes="vec", tag="1")] |
| 109 | + pub token: ::prost::alloc::vec::Vec<u8>, |
| 110 | +} |
0 commit comments