Skip to content

Commit

Permalink
Updated names of functions
Browse files Browse the repository at this point in the history
Signed-off-by: artem.ivanov <[email protected]>
  • Loading branch information
Artemkaaas committed Nov 13, 2023
1 parent 11795bd commit a1c54f5
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions docs/design/w3c/w3c-representation.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,38 @@ pub extern "C" fn anoncreds_w3c_credential_add_type(
type_: FfiStr,
cred_p: *mut ObjectHandle,
) -> ErrorCode {}

/// Set subject id to W3C AnonCreds credential
///
/// # Params
/// cred - object handle pointing to W3C AnonCreds credential
/// id - subject id to add into credential
/// cred_p: reference that will contain update credential
///
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_credential_set_subject_id(
cred: ObjectHandle,
id: FfiStr,
cred_p: *mut ObjectHandle,
) -> ErrorCode {}

/// Set id to W3C AnonCreds credential
///
/// # Params
/// cred - object handle pointing to W3C AnonCreds credential
/// id - id to add into credential
/// cred_p: reference that will contain update credential
///
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_credential_id(
cred: ObjectHandle,
id: FfiStr,
cred_p: *mut ObjectHandle,
) -> ErrorCode {}
```

#### Optional: Presentation Conversion methods
Expand Down Expand Up @@ -322,7 +354,7 @@ The reasons for adding duplication methods:
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_create_credential_offer(
pub extern "C" fn anoncreds_create_w3c_credential_offer(
schema_id: FfiStr,
cred_def_id: FfiStr,
key_proof: ObjectHandle,
Expand All @@ -345,7 +377,7 @@ pub extern "C" fn anoncreds_w3c_create_credential_offer(
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_create_credential_request(
pub extern "C" fn anoncreds_create_w3c_credential_request(
entropy: FfiStr,
prover_did: FfiStr,
cred_def: ObjectHandle,
Expand All @@ -372,7 +404,7 @@ pub extern "C" fn anoncreds_w3c_create_credential_request(
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_create_credential(
pub extern "C" fn anoncreds_create_w3c_credential(
cred_def: ObjectHandle,
cred_def_private: ObjectHandle,
cred_offer: ObjectHandle,
Expand All @@ -397,7 +429,7 @@ pub extern "C" fn anoncreds_w3c_create_credential(
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_process_credential(
pub extern "C" fn anoncreds_process_w3c_credential(
cred: ObjectHandle,
cred_req_metadata: ObjectHandle,
link_secret: FfiStr,
Expand Down Expand Up @@ -438,7 +470,7 @@ pub extern "C" fn anoncreds_w3c_credential_get_attribute(
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_create_presentation(
pub extern "C" fn anoncreds_create_w3c_presentation(
pres_req: ObjectHandle,
credentials: FfiList<FfiCredentialEntry>,
credentials_prove: FfiList<FfiCredentialProve>,
Expand Down Expand Up @@ -468,7 +500,7 @@ pub extern "C" fn anoncreds_w3c_create_presentation(
/// # Returns
/// Error code
#[no_mangle]
pub extern "C" fn anoncreds_w3c_verify_presentation(
pub extern "C" fn anoncreds_verify_w3c_presentation(
presentation: ObjectHandle,
pres_req: ObjectHandle,
schemas: FfiList<ObjectHandle>,
Expand Down

0 comments on commit a1c54f5

Please sign in to comment.