Skip to content

Commit

Permalink
fix: Replace with w3c call, change order of enum variants
Browse files Browse the repository at this point in the history
Signed-off-by: Abdulbois <[email protected]>
Signed-off-by: artem.ivanov <[email protected]>
  • Loading branch information
Abdulbois authored and Artemkaaas committed Dec 2, 2023
1 parent 4e8113e commit 6d64da4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ffi/w3c/presentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl_anoncreds_object_from_json!(W3CPresentation, anoncreds_w3c_presentation_fro
/// # 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 @@ -83,7 +83,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
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,8 @@ export class NodeJSAnoncreds implements Anoncreds {
credentialRequest,
attributeNames as unknown as Buffer,
attributeRawValues as unknown as Buffer,
revocationConfiguration?.ref().address() ?? 0,
encoding,
revocationConfiguration?.ref().address() ?? 0,
credentialPtr
)
this.handleError()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ export const nativeBindings = {
FFI_OBJECT_HANDLE,
StringListStruct,
StringListStruct,
FFI_OBJECT_HANDLE,
FFI_STRING,
FFI_OBJECT_HANDLE,
FFI_OBJECT_HANDLE_PTR
]
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class W3CCredential extends AnoncredsObject {
}

public static fromJson(json: JsonObject) {
return new W3CCredential(anoncreds.credentialFromJson({ json: JSON.stringify(json) }).handle)
return new W3CCredential(anoncreds.w3cCredentialFromJson({ json: JSON.stringify(json) }).handle)
}

public process(options: ProcessW3CCredentialOptions) {
Expand Down
2 changes: 1 addition & 1 deletion wrappers/python/anoncreds/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,10 +1024,10 @@ def create_w3c_credential(
cred_request,
names_list,
raw_values_list,
encode_str(encoding),
pointer(revocation_config)
if revocation_config
else POINTER(RevocationConfig)(),
encode_str(encoding),
byref(cred),
)
return cred
Expand Down

0 comments on commit 6d64da4

Please sign in to comment.