Skip to content

Latest commit

 

History

History
168 lines (150 loc) · 5.81 KB

migration-guide-0.2.x-0.3.0.md

File metadata and controls

168 lines (150 loc) · 5.81 KB

LibVCX migration guide from 0.2.x to 0.3.0

A Developer Guide for LibVCX migration

This document is written for developers using LibVCX to provide necessary information and to simplify their transition to LibVCX 0.3 from LibVCX 0.2.x.

Notes

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.

API

VCX API

v0.2.x - VCX API v0.3.0 - VCX API
Retrieve author agreement and acceptance mechanisms set on the Ledger
NEW
vcx_get_ledger_author_agreement(
    command_handle: u32,
    cb: Option<fn(xcommand_handle: u32, 
                  err: u32, 
                  author_agreement: *const c_char)>) -> u32
        
Set some accepted agreement as active
NEW
vcx_set_active_txn_author_agreement_meta(text: *const c_char,
                                         version: *const c_char,
                                         hash: *const c_char,
                                         acc_mech_type: *const c_char,
                                         time_of_acceptance: u64) -> u32
        

Sample

agrement = vcx_get_ledger_author_agreement(...)
agrement = json.parse(agrement)
vcx_set_active_txn_author_agreement_meta(text, version, null, acc_mech_type, tome)
vcx_schema_create(...)

Libvcx 0.3.0 to 0.3.1 migration Guide

Changes

The set of new similar functions was added to Libvcx library to provide a way of manually updating a state of Libvcx objects (connection, credential, proof). These functions check the message any state change and update the state attribute.

v0.3.0 - Libvcx API v0.3.1 - Libvcx API
Checks the message any connection state change and updates the state attribute.
NEW
vcx_connection_update_state_with_message(command_handle: u32,
                                              connection_handle: u32,
                                              message: *const c_char,
                                              cb: Option) -> u32
Checks and updates the state of issuer credential based on the given message
NEW
vcx_issuer_credential_update_state_with_message(command_handle: u32,
                                                     credential_handle: u32,
                                                     message: *const c_char,
                                                     cb: Option) -> u32
Checks for any state change from the given message and updates the proof state attribute
NEW
vcx_proof_update_state_with_message(command_handle: u32,
                                         proof_handle: u32,
                                         message: *const c_char,
                                         cb: Option) -> u32

Libvcx 0.3.1 to 0.3.2 migration Guide

The Libvcx 0.3.2 release contains fixes that don't affect API functions.