From 96cdebbbbc539cd2af56701ded5525622c6ba6a6 Mon Sep 17 00:00:00 2001 From: Mike Bailey <mike.bailey@evernym.com> Date: Tue, 16 Oct 2018 16:43:56 -0600 Subject: [PATCH] Added method and attribute before-and-after Migration guide updated Signed-off-by: Mike Bailey <mike.bailey@evernym.com> --- vcx/docs/migration.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/vcx/docs/migration.md b/vcx/docs/migration.md index 0fc7a178..3f70d1a1 100644 --- a/vcx/docs/migration.md +++ b/vcx/docs/migration.md @@ -9,7 +9,7 @@ This version of libVCX represents a major step forward. The last version of libv - vcx_credential_* - family of functions for receiving credential offers, sending credential requests and storing issued credentials in the wallet. - vcx_disclosed_proof_* - family of functions for receiving proof requests, retrieving credentials relevant to a particular proof request and generating and sending proofs in response to proof requests. - Many changes to vcxconfig.json parameter names - + ## Configuration Changes | Previously | Currently | @@ -33,3 +33,39 @@ The sweeping changes to libVCX/libIndy and the PoC nature of the previous versio ## Tokens/Payments One of the major features of the this new version is the addition of token or payment related functionality. There is a new wallet API that allows the creation of payment addresses, the querying of addresses and balances, and the sending of tokens to other addresses. Payment of ledger fees and premium credentials is handled automatically when creating schemas and credential definitions and sending credential requests. While there is a payment_handle type defined in the API it is a placeholder and does not currently have any functionality. Payments are handled automatically by libVCX and addresses with sufficient balances are automatically used when payment is needed. + +## Changes to Common API Calls +Most calls to methods in libvcx are unchanged or changes are small, and where they exist they usually are related to supporting the token payment system. The following table shows where changes have occurred (using the python wrapper as an example). Asterisks are used to denote changed parameters. + +| Previously | Currently | +|-------------------------|-------------------------| +| vcx_init(<br />config_path:str<br />) | vcx_init(<br />config_path:str<br />) | +| Connection.create(<br />source_id:str<br />) | Connection.create(<br />source_id:str<br />) | +| connection.connect(<br />phone_nbr<br />)| connection.connect(<br />phone_nbr<br />)| +| connection.update_state()| connection.update_state()| +| connection.get_state()| connection.get_state()| +| Schema.create(<br />source_id:str, <br />name:str, <br />attrs:list<br />)<br /> <br /> | Schema.create(<br />source_id:str, <br />name:str, <br />\*version:str, <br />attrs:list, <br />\*payment_handle:int<br />) | +| schema.get_sequence_number() | schema.\*get_schema_id() | +| CredentialDef.create(<br />source_id:str, <br />name:str, <br />schema_seq_nbr:str, <br />)<br /> | CredentialDef.create(<br />source_id:str, <br />name:str, <br />\*schema_id:str, <br />\*payment_handle:int<br />)| +| | cred_def.\*get_cred_def_id()| +| IssuerCredential.create(<br />source_id:str, <br />attrs:dict, <br />schema_seq_no:str, <br />name:str<br />)<br /> | IssuerCredential.create(<br />source_id:str, <br />\*attrs:dict, <br />\*cred_def_id:str, <br />name:str, <br />\*price:str<br />) | +| credential.send_offer(<br />connection<br />) | credential.send_offer(<br />connection<br />) | +| credential.send_credential(<br />connection<br />) | credential.send_credential(<br />connection<br />) | +| credential.update_state()| credential.update_state()| +| credential.get_state()| credential.get_state()| +| Proof.create(<br />source_id:str, <br />name:str, <br />requested_attrs:list<br />)| Proof.create(<br />source_id:str, <br />name:str, <br />\*requested_attrs:list<br />)| +| proof.request_proof(<br />connection<br />)| proof.request_proof(<br />connection<br />)| +| proof.update_state()| proof.update_state()| +| proof.get_state()| proof.get_state()| +| proof.get_proof(<br />connection<br />)| proof.get_proof(<br />connection<br />)| + +## Schema and Proof Attribute Changes +The attribute data structures used to define schemas and proofs have changed as follows: + +| Previously | Currently | +|-------------------------|-------------------------| +| Schema:<br /> <br />{<br />"attr_names":["attr1", "attr2", "attr3", ...],<br />"name":"schema_name",<br />"version": "version_string"<br />}| ["attr1", "attr2", "attr3", ...]| +| Proof:<br /> <br />[{<br /> "name": "attr1",<br /> "issuerDid": "DID1"<br />},<br />{<br /> "name": "attr2"<br /> "issuerDid": "DID2",<br />}, ...<br />]<br />| [{<br /> "name": "attr1",<br /> "restrictions": [{<br /> "criteria1_name": "criteria1_value",<br /> "criteria2_name": "criteria2_value", ...<br /> }, ...]<br />},<br />{<br /> "name": "attr2",<br /> "restrictions": []<br />}, ...<br />]| + +## Documentation +For more detail on the methods and parameters, refer to the in-line documentation for the nodejs or python3 wrapper that you are using.