This document is written for developers using LibVCX to provide necessary information and to simplify their transition to LibVCX 0.1.x from LibVCX 0.2.
In the following tables, there are mappings for each LibVCX API part of how 0.1.x functionality maps to 0.2.0.
Functions from version 0.1.x are listed in the left column, and the equivalent 0.2.0 function is placed in the right column.
- If some function had been added, the word 'NEW' would be placed in the left column.
- If some function had been deleted, the word 'DELETED' would be placed in the right column.
- If some function had been changed, the current format would be placed in the right column.
- If some function had not been changed, the symbol '=' would be placed in the right column.
- To get more details about current format of a function click on the description above it.
- Bellow are signatures of functions in LibVCX C API. The params of cb (except command_handle and err) will be result values of the similar function in any LibVCX wrapper.
v0.1.x - Credential Definition API | v0.2.0 - Credential Definition API |
---|---|
Get Payment Txn for Credential definition | |
get_payment_txn(handle: u32) -> Result<PaymentTxn, CredDefError> |
get_cred_def_payment_txn(handle: u32) -> Result<PaymentTxn, CredDefError> |
Get Revocation Registry ID | |
NEW |
get_rev_reg_id(handle: u32) -> Result<Option<String>, CredDefError> |
Get Tails File | |
NEW |
get_tails_file(handle: u32) -> Result<Option<String>, CredDefError> |
Get Revocation Registry Definition | |
NEW |
get_rev_reg_def(handle: u32) -> Result<Option<String>, CredDefError> |
Get Revocation Registry Definition Payment Txn | |
NEW |
get_rev_reg_def_payment_txn(handle: u32) -> Result<Option<String>, CredDefError> |
Get Revocation Registry Delta Payment Txn | |
NEW |
get_rev_reg_delta_payment_txn(handle: u32) -> Result<Option<String>, CredDefError> |
Find Handle By Revocation Registry Id | |
NEW |
find_handle(cred_def_id: &str) -> Result<u32, CredDefError> |
There are no actual API changes, but there is one new parameter available for vcx_provision_agent
and vcx_agent_provision_async
config
variable. It is wallet_type
- it can be used to enable different wallet types.
v0.1.x - Issuer Credential API | v0.2.0 - Issuer Credential API |
---|---|
Revoke Credential | |
vcx_issuer_create_credential( command_handle: u32, source_id: *const c_char, cred_def_handle: u32, issuer_did: *const c_char, credential_data: *const c_char, credential_name: *const c_char, price: *const c_char, cb: Option<fn(xcommand_handle: u32, err: u32, credential_handle: u32)>) -> u32 |
Changed the format of param credential_data. was "{"state":["UT"]}", now "{"state":"UT"}" |
Revoke Credential | |
NEW |
vcx_issuer_revoke_credential( command_handle: u32, credential_handle: u32, cb: Option<fn(xcommand_handle: u32, err: u32)>) -> u32 |
Revoke Credential (Rust API) | |
NEW |
revoke_credential(handle: u32) -> Result<(), u32> |
v0.1.x - Proof API | v0.2.0 - Proof API |
---|---|
Create Proof | |
vcx_proof_create( command_handle: u32, source_id: *const c_char, requested_attrs: *const c_char, requested_predicates: *const c_char, name: *const c_char, cb: Option<extern fn(xcommand_handle: u32, err: u32, proof_handle: u32)>) -> u32 |
vcx_proof_create( command_handle: u32, source_id: *const c_char, requested_attrs: *const c_char, requested_predicates: *const c_char, revocation_interval: *const c_char, name: *const c_char, cb: Option<extern fn(xcommand_handle: u32, err: u32, proof_handle: u32)>) -> u32 |
vcx_disclosed_proof_generate_proof( proof_handle: u32, selected_credentials: *const c_char, self_attested_attrs: *const c_char, cb: Option) -> u32 |
Changed the format of param selected_credentials. was "{ "attrs":{ "attr_key": "cred_info":{} } }", now "{ "attrs":{ "attr_key":{ "credential":{"cred_info":{},"tails_file": Optional(string)} } } }" |
The main purpose of this API is to forward logs of libvcx and wrappers to its consumers.
It is needed if you consume libvcx as a .so
or .dll
- so you can forward logs from libvcx to your logging framework.
You don't need this endpoints if you use libvcx through the wrapper -- in Java and Python wrappers they are already forwarded to slf4j
for Java, log
crate for Rust and default logging facade for python.
libvcx sets the same log function for libindy as well.
v0.1.x - Logger API | v0.2.0 - Logger API |
---|---|
Set custom logger implementation | |
NEW |
vcx_set_logger(context: *const c_void, enabled: Option bool>, log: Option, flush: Option) -> ErrorCode |
Set default logger implementation. | |
NEW |
vcx_set_default_logger(pattern: *const c_char) -> ErrorCode |
Get the currently used logger. | |
NEW |
vcx_get_logger(context_p: *mut *const c_void, enabled_cb_p: *mut Option bool>, log_cb_p: *mut Option, flush_cb_p: *mut Option) |
The Libvcx 0.2.1 release contains fixes that don't affect API functions.
The Libvcx 0.2.2 release contains fixes that don't affect API functions.
-
Migrated Libvcx to failure crate for better handling and error chaining.
-
Added synchronous
vcx_get_current_error
API function that returns details for last occurred error. -
Updated Libvcx wrappers for automatic getting error details:
- Python - added
sdk_error_full_message
,sdk_error_cause
andsdk_error_backtrace
fields toVcxError
object. - Java - added
sdkMessage
,sdkFullMessage
,sdkCause
andsdkBacktrace
fields toVcxException
. - Objective-C - added
error
,message
,cause
,backtrace
fields touserInfo
dictionary inNSError
object.
- Python - added
-
Updated Libvcx to support community A2A protocol. Added
protocol_type
field to VCX provisioning config with indicates A2A message format will be used.1.0
means the current protocol.2.0
means community (IN PROGRESS) protocol which in the current state includes draft implementation of the following HIPEs:
-
Bugfixes
v0.2.2 - Libvcx API | v0.2.3 - Libvcx API |
---|---|
Get details for last occurred error. | |
NEW |
vcx_get_current_error(error_json_p: *mut *const c_char) |
The Libvcx 0.2.3 release contains fixes that don't affect API functions.