@@ -114,16 +114,16 @@ fn get_net(net: &str) -> Result<Net> {
114114#[ derive( SerdeSerialize , SerdeDeserialize ) ]
115115#[ serde( rename_all = "camelCase" ) ]
116116pub struct CredentialInput {
117- ip_info : IpInfo < constants:: IpPairing > ,
118- global_context : GlobalContext < constants:: ArCurve > ,
119- ars_infos : BTreeMap < ArIdentity , ArInfo < constants:: ArCurve > > ,
120- id_object : IdentityObjectV1 < constants:: IpPairing , constants:: ArCurve , AttributeKind > ,
117+ ip_info : IpInfo < constants:: IpPairing > ,
118+ global_context : GlobalContext < constants:: ArCurve > ,
119+ ars_infos : BTreeMap < ArIdentity , ArInfo < constants:: ArCurve > > ,
120+ id_object : IdentityObjectV1 < constants:: IpPairing , constants:: ArCurve , AttributeKind > ,
121121 revealed_attributes : Vec < AttributeTag > ,
122- seed_as_hex : HexString ,
123- net : String ,
124- identity_index : u32 ,
125- cred_number : u8 ,
126- expiry : TransactionTime ,
122+ seed_as_hex : HexString ,
123+ net : String ,
124+ identity_index : u32 ,
125+ cred_number : u8 ,
126+ expiry : TransactionTime ,
127127}
128128
129129pub fn create_credential_v1_aux ( input : CredentialInput ) -> Result < JsonString > {
@@ -227,7 +227,7 @@ pub fn generate_unsigned_credential_aux(input: &str) -> Result<JsonString> {
227227
228228 let public_keys: Vec < VerifyKey > = try_get ( & v, "publicKeys" ) ?;
229229 let cred_key_info = CredentialPublicKeys {
230- keys : build_key_map ( & public_keys) ,
230+ keys : build_key_map ( & public_keys) ,
231231 threshold : try_get ( & v, "threshold" ) ?,
232232 } ;
233233
@@ -323,7 +323,7 @@ pub fn get_credential_deployment_details_aux(
323323 let acc_cred = AccountCredential :: Normal { cdi } ;
324324
325325 let credential_message = AccountCredentialMessage {
326- credential : acc_cred,
326+ credential : acc_cred,
327327 message_expiry : TransactionTime { seconds : expiry } ,
328328 } ;
329329
@@ -371,20 +371,20 @@ pub fn get_credential_deployment_info_aux(
371371#[ serde( rename_all = "camelCase" ) ]
372372pub struct IdProofInput {
373373 id_object : IdentityObjectV1 < constants:: IpPairing , constants:: ArCurve , AttributeKind > ,
374- global_context : GlobalContext < constants:: ArCurve > ,
375- seed_as_hex : String ,
376- net : String ,
374+ global_context : GlobalContext < constants:: ArCurve > ,
375+ seed_as_hex : String ,
376+ net : String ,
377377 identity_provider_index : u32 ,
378- identity_index : u32 ,
379- cred_number : u8 ,
380- statement : Statement < constants:: ArCurve , AttributeKind > ,
381- challenge : String ,
378+ identity_index : u32 ,
379+ cred_number : u8 ,
380+ statement : Statement < constants:: ArCurve , AttributeKind > ,
381+ challenge : String ,
382382}
383383
384384#[ derive( SerdeSerialize , SerdeDeserialize ) ]
385385struct IdProofOutput {
386386 credential : String ,
387- proof : Versioned < Proof < constants:: ArCurve , AttributeKind > > ,
387+ proof : Versioned < Proof < constants:: ArCurve , AttributeKind > > ,
388388}
389389
390390pub fn create_id_proof_aux ( input : IdProofInput ) -> Result < JsonString > {
@@ -438,7 +438,7 @@ pub fn create_id_proof_aux(input: IdProofInput) -> Result<JsonString> {
438438
439439 let out = IdProofOutput {
440440 credential : base16_encode_string ( & credential) ,
441- proof : Versioned :: new ( VERSION_0 , proof) ,
441+ proof : Versioned :: new ( VERSION_0 , proof) ,
442442 } ;
443443
444444 Ok ( json ! ( out) . to_string ( ) )
@@ -450,7 +450,9 @@ struct Web3SecretKey(
450450) ;
451451
452452impl Web3IdSigner for Web3SecretKey {
453- fn id ( & self ) -> concordium_base:: ed25519:: PublicKey { self . 0 . id ( ) }
453+ fn id ( & self ) -> concordium_base:: ed25519:: PublicKey {
454+ self . 0 . id ( )
455+ }
454456
455457 fn sign ( & self , msg : & impl AsRef < [ u8 ] > ) -> concordium_base:: ed25519:: Signature {
456458 self . 0 . sign ( msg)
@@ -460,8 +462,8 @@ impl Web3IdSigner for Web3SecretKey {
460462#[ derive( SerdeDeserialize ) ]
461463#[ serde( rename_all = "camelCase" ) ]
462464pub struct Web3IdProofInput {
463- request : Request < constants:: ArCurve , Web3IdAttribute > ,
464- global_context : GlobalContext < constants:: ArCurve > ,
465+ request : Request < constants:: ArCurve , Web3IdAttribute > ,
466+ global_context : GlobalContext < constants:: ArCurve > ,
465467 commitment_inputs :
466468 Vec < OwnedCommitmentInputs < constants:: ArCurve , Web3IdAttribute , Web3SecretKey > > ,
467469}
@@ -491,28 +493,28 @@ pub fn serialize_credential_deployment_payload_aux(
491493#[ derive( SerdeSerialize , SerdeDeserialize ) ]
492494#[ serde( rename_all = "camelCase" ) ]
493495pub struct UnsignedCredentialInput {
494- ip_info : IpInfo < constants:: IpPairing > ,
495- global_context : GlobalContext < constants:: ArCurve > ,
496- ars_infos : BTreeMap < ArIdentity , ArInfo < constants:: ArCurve > > ,
496+ ip_info : IpInfo < constants:: IpPairing > ,
497+ global_context : GlobalContext < constants:: ArCurve > ,
498+ ars_infos : BTreeMap < ArIdentity , ArInfo < constants:: ArCurve > > ,
497499 id_object : IdentityObjectV1 < constants:: IpPairing , constants:: ArCurve , AttributeKind > ,
498- id_cred_sec : PedersenValue < ArCurve > ,
499- prf_key : prf:: SecretKey < ArCurve > ,
500+ id_cred_sec : PedersenValue < ArCurve > ,
501+ prf_key : prf:: SecretKey < ArCurve > ,
500502 sig_retrievel_randomness : String ,
501- credential_public_keys : CredentialPublicKeys ,
502- attribute_randomness : BTreeMap < AttributeTag , PedersenRandomness < ArCurve > > ,
503- revealed_attributes : Vec < AttributeTag > ,
504- cred_number : u8 ,
503+ credential_public_keys : CredentialPublicKeys ,
504+ attribute_randomness : BTreeMap < AttributeTag , PedersenRandomness < ArCurve > > ,
505+ revealed_attributes : Vec < AttributeTag > ,
506+ cred_number : u8 ,
505507}
506508
507509#[ derive( SerdeSerialize ) ]
508510#[ serde( rename_all = "camelCase" ) ]
509511pub struct BakerKeys {
510512 #[ serde( flatten) ]
511- keys_payload : ConfigureBakerKeysPayload ,
513+ keys_payload : ConfigureBakerKeysPayload ,
512514 #[ serde( serialize_with = "base16_encode" , rename = "electionPrivateKey" ) ]
513515 election_private_key : BakerElectionSignKey ,
514516 #[ serde( serialize_with = "base16_encode" , rename = "signatureSignKey" ) ]
515- signature_sign_key : BakerSignatureSignKey ,
517+ signature_sign_key : BakerSignatureSignKey ,
516518 #[ serde( serialize_with = "base16_encode" , rename = "aggregationSignKey" ) ]
517519 aggregation_sign_key : BakerAggregationSignKey ,
518520}
@@ -533,14 +535,14 @@ pub fn generate_baker_keys(sender: AccountAddress) -> Result<JsonString> {
533535#[ derive( SerdeDeserialize ) ]
534536#[ serde( rename_all = "camelCase" ) ]
535537pub struct VerifyWeb3IdCredentialSignatureInput {
536- global_context : GlobalContext < constants:: ArCurve > ,
537- values : BTreeMap < String , Web3IdAttribute > ,
538- randomness : BTreeMap < String , PedersenRandomness < constants:: ArCurve > > ,
538+ global_context : GlobalContext < constants:: ArCurve > ,
539+ values : BTreeMap < String , Web3IdAttribute > ,
540+ randomness : BTreeMap < String , PedersenRandomness < constants:: ArCurve > > ,
539541 #[ serde( serialize_with = "base16_encode" , deserialize_with = "base16_decode" ) ]
540- signature : concordium_base:: ed25519:: Signature ,
541- holder : CredentialHolderId ,
542+ signature : concordium_base:: ed25519:: Signature ,
543+ holder : CredentialHolderId ,
542544 issuer_public_key : IssuerKey ,
543- issuer_contract : ContractAddress ,
545+ issuer_contract : ContractAddress ,
544546}
545547
546548pub fn verify_web3_id_credential_signature_aux (
0 commit comments