diff --git a/src/api/vade_evan_api.rs b/src/api/vade_evan_api.rs index 9c6c655..f36f6f9 100644 --- a/src/api/vade_evan_api.rs +++ b/src/api/vade_evan_api.rs @@ -1106,8 +1106,8 @@ impl VadeEvan { /// /// * `schema_did` - schema to create the credential /// * `credential_subject_str` - JSON string of CredentialSubject structure - /// * `exp_date` - expiration date, string, e.g. "1722-12-03T14:23:42.120Z" (or `None` if no expiration date is used) /// * `issuer_did` - issuer did for self issued credential + /// * `exp_date` - expiration date, string, e.g. "1722-12-03T14:23:42.120Z" (or `None` if no expiration date is used) /// /// # Returns /// * credential as JSON serialized [`BbsCredential`](https://docs.rs/vade_evan_bbs/*/vade_evan_bbs/struct.BbsCredential.html) @@ -1135,8 +1135,8 @@ impl VadeEvan { /// .helper_create_self_issued_credential( /// SCHEMA_DID, /// CREDENTIAL_SUBJECT_STR, - /// None, /// ISSUER_DID, + /// None, /// ) /// .await?; /// @@ -1152,12 +1152,12 @@ impl VadeEvan { &mut self, schema_did: &str, credential_subject_str: &str, - exp_date: Option<&str>, issuer_did: &str, + exp_date: Option<&str>, ) -> Result { let mut credential = Credential::new(self)?; credential - .create_self_issued_credential(schema_did, credential_subject_str, exp_date, issuer_did) + .create_self_issued_credential(schema_did, credential_subject_str, issuer_did, exp_date) .await .map_err(|err| err.into()) } diff --git a/src/c_lib.rs b/src/c_lib.rs index 19128df..2c28fed 100644 --- a/src/c_lib.rs +++ b/src/c_lib.rs @@ -650,8 +650,8 @@ pub extern "C" fn execute_vade( .helper_create_self_issued_credential( arguments_vec.get(0).unwrap_or_else(|| &no_args), arguments_vec.get(1).unwrap_or_else(|| &no_args), - arguments_vec.get(2).map(|v| v.as_str()), - arguments_vec.get(3).unwrap_or_else(|| &no_args), + arguments_vec.get(2).unwrap_or_else(|| &no_args), + arguments_vec.get(3).map(|v| v.as_str()), ) .await .map_err(stringify_vade_evan_error) diff --git a/src/helpers/credential.rs b/src/helpers/credential.rs index e7b0203..e12d781 100644 --- a/src/helpers/credential.rs +++ b/src/helpers/credential.rs @@ -382,8 +382,8 @@ impl<'a> Credential<'a> { /// /// * `schema_did` - schema to create the credential /// * `credential_subject_str` - JSON string of CredentialSubject structure - /// * `exp_date` - expiration date, string, e.g. "1722-12-03T14:23:42.120Z" (or `None` if no expiration date is used) /// * `issuer_did` - issuer did for self issued credential + /// * `exp_date` - expiration date, string, e.g. "1722-12-03T14:23:42.120Z" (or `None` if no expiration date is used) /// /// # Returns /// * credential as JSON serialized [`UnsignedBbsCredential`](https://docs.rs/vade_evan_bbs/*/vade_evan_bbs/struct.UnsignedBbsCredential.html) @@ -391,8 +391,8 @@ impl<'a> Credential<'a> { &mut self, schema_did: &str, credential_subject_str: &str, - exp_date: Option<&str>, issuer_did: &str, + exp_date: Option<&str>, ) -> Result { fail_if_not_a_did(schema_did, "schema_did")?; fail_if_not_a_did(issuer_did, "issuer_did")?; @@ -1089,7 +1089,7 @@ mod tests { let mut credential = Credential::new(&mut vade_evan)?; match credential - .create_self_issued_credential(schema_did, credential_subject_str, None, subject_id) + .create_self_issued_credential(schema_did, credential_subject_str, subject_id, None) .await { Ok(issued_credential) => { diff --git a/src/main.rs b/src/main.rs index 788c49d..5823d75 100644 --- a/src/main.rs +++ b/src/main.rs @@ -269,8 +269,8 @@ async fn main() -> Result<()> { .helper_create_self_issued_credential( get_argument_value(sub_m, "schema_did", None), get_argument_value(sub_m, "credential_subject", None), - get_optional_argument_value(sub_m, "exp_date"), get_argument_value(sub_m, "issuer_did", None), + get_optional_argument_value(sub_m, "exp_date"), ) .await? } @@ -449,7 +449,8 @@ fn add_subcommand_helper<'a>(app: App<'a, 'a>) -> Result> { .about("Revokes a given credential with vade and updates the revocation list credential.") .arg(get_clap_argument("credential")?) .arg(get_clap_argument("update_key")?) - .arg(get_clap_argument("private_key")?) + .arg(get_clap_argument("issuer_public_key_did")?) + .arg(get_clap_argument("issuer_proving_key")?) ); } else {} } diff --git a/src/wasm_lib.rs b/src/wasm_lib.rs index 1f7110b..eaabb76 100644 --- a/src/wasm_lib.rs +++ b/src/wasm_lib.rs @@ -440,8 +440,8 @@ cfg_if::cfg_if! { .helper_create_self_issued_credential( &schema_did, &credential_subject_str, - exp_date.as_deref(), &issuer_did, + exp_date.as_deref(), ).await .map_err(jsify_vade_evan_error)?) } @@ -800,8 +800,8 @@ pub async fn execute_vade( helper_create_self_issued_credential( payload.schema_did, payload.credential_subject_str, - payload.exp_date, payload.issuer_did, + payload.exp_date, ) .await }