Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1124 from Artemkaaas/feature/1.6.5
Browse files Browse the repository at this point in the history
RC 1.6.5
  • Loading branch information
jovfer authored Sep 6, 2018
2 parents 689aa2a + fecf7d3 commit c794469
Show file tree
Hide file tree
Showing 125 changed files with 9,584 additions and 8,987 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.6.5
* Fixed `ARGON2I` constants usage to be compatible with the latest sodium.
* Parameter `submitter_did` set as the optional field for:
* Ledger API `indy_build_get_*` functions (except `indy_build_get_validator_info_request`).
* all functions in Payment API.
* Fixed Android build rustflags for all architectures for libc linking.

## 1.6.4
* Early API types checks
* Workaround for OS permissions on Android
Expand Down
23 changes: 23 additions & 0 deletions Specs/libindy-objc/1.6.5/libindy-objc.podspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "libindy-objc",
"version": "1.6.5",
"summary": "Summary TODO.",
"homepage": "TODO",
"license": {
"type": "Apache License 2.0",
"file": "LICENSE"
},
"authors": {
"Daniel Hardman": "[email protected]"
},
"source": {
"http": "https://repo.sovrin.org/ios/libindy/stable/indy-objc/1.6.5/libindy-objc.zip"
},
"platforms": {
"ios": "10.0"
},
"ios": {
"vendored_frameworks": "libindy-objc/Indy.framework"
},
"module_name": "Indy"
}
23 changes: 23 additions & 0 deletions Specs/libindy/1.6.5/libindy.podspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "libindy",
"version": "1.6.5",
"summary": "Summary TODO.",
"description": "Description TODO.",
"homepage": "TODO",
"license": {
"type": "Apache License 2.0",
"file": "LICENSE"
},
"authors": {
"Daniel Hardman": "[email protected]"
},
"platforms": {
"ios": "10.0"
},
"source": {
"http": "https://repo.sovrin.org/ios/libindy/stable/libindy-core/1.6.5/libindy.tar.gz"
},
"source_files": "*.h",
"vendored_libraries": "*.a",
"requires_arc": false
}
2 changes: 1 addition & 1 deletion cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "indy-cli"
version = "1.6.4"
version = "1.6.5"
authors = ["Vyacheslav Gudkov <[email protected]>"]

[features]
Expand Down
8 changes: 5 additions & 3 deletions cli/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
indy-cli (1.6.4) unstable; urgency=medium
indy-cli (1.6.5) unstable; urgency=medium

[ Hyperledger ]
* Created Indy-Cli
[ Hyperledger ]

* 1.6.5
* `ledger get-*` commands can be called without having an active `did`.
183 changes: 131 additions & 52 deletions cli/src/commands/ledger.rs

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions cli/src/commands/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,18 @@ pub mod tests {
ensure_opened_wallet_handle(&ctx).unwrap()
}

pub fn open_wallet(ctx: &CommandContext) -> i32 {
{
let cmd = open_command::new();
let mut params = CommandParams::new();
params.insert("name", WALLET.to_string());
params.insert("key", WALLET_KEY.to_string());
cmd.execute(&ctx, &params).unwrap();
}

ensure_opened_wallet_handle(&ctx).unwrap()
}

pub fn close_and_delete_wallet(ctx: &CommandContext) {
{
let cmd = close_command::new();
Expand All @@ -1196,6 +1208,14 @@ pub mod tests {
}
}

pub fn close_wallet(ctx: &CommandContext) {
{
let cmd = close_command::new();
let params = CommandParams::new();
cmd.execute(&ctx, &params).unwrap();
}
}

pub fn delete_wallet(ctx: &CommandContext) {
{
let cmd = delete_command::new();
Expand Down
24 changes: 12 additions & 12 deletions cli/src/libindy/ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ impl Ledger {
super::results::result_to_string(err, receiver)
}

pub fn build_get_nym_request(submitter_did: &str, target_did: &str) -> Result<String, ErrorCode> {
pub fn build_get_nym_request(submitter_did: Option<&str>, target_did: &str) -> Result<String, ErrorCode> {
let (receiver, command_handle, cb) = super::callbacks::_closure_to_cb_ec_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let target_did = CString::new(target_did).unwrap();

let err = unsafe {
indy_build_get_nym_request(command_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
target_did.as_ptr(),
cb)
};
Expand Down Expand Up @@ -155,10 +155,10 @@ impl Ledger {
super::results::result_to_string(err, receiver)
}

pub fn build_get_attrib_request(submitter_did: &str, target_did: &str, raw: Option<&str>, hash: Option<&str>, enc: Option<&str>) -> Result<String, ErrorCode> {
pub fn build_get_attrib_request(submitter_did: Option<&str>, target_did: &str, raw: Option<&str>, hash: Option<&str>, enc: Option<&str>) -> Result<String, ErrorCode> {
let (receiver, command_handle, cb) = super::callbacks::_closure_to_cb_ec_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let target_did = CString::new(target_did).unwrap();

let raw_str = raw.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
Expand All @@ -167,7 +167,7 @@ impl Ledger {

let err = unsafe {
indy_build_get_attrib_request(command_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
target_did.as_ptr(),
if raw.is_some() { raw_str.as_ptr() } else { null() },
if hash.is_some() { hash_str.as_ptr() } else { null() },
Expand All @@ -194,15 +194,15 @@ impl Ledger {
super::results::result_to_string(err, receiver)
}

pub fn build_get_schema_request(submitter_did: &str, id: &str) -> Result<String, ErrorCode> {
pub fn build_get_schema_request(submitter_did: Option<&str>, id: &str) -> Result<String, ErrorCode> {
let (receiver, command_handle, cb) = super::callbacks::_closure_to_cb_ec_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let id = CString::new(id).unwrap();

let err = unsafe {
indy_build_get_schema_request(command_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
id.as_ptr(),
cb)
};
Expand Down Expand Up @@ -240,15 +240,15 @@ impl Ledger {
super::results::result_to_string(err, receiver)
}

pub fn build_get_cred_def_request(submitter_did: &str, id: &str) -> Result<String, ErrorCode> {
pub fn build_get_cred_def_request(submitter_did: Option<&str>, id: &str) -> Result<String, ErrorCode> {
let (receiver, command_handle, cb) = super::callbacks::_closure_to_cb_ec_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let id = CString::new(id).unwrap();

let err = unsafe {
indy_build_get_cred_def_request(command_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
id.as_ptr(),
cb)
};
Expand Down
42 changes: 21 additions & 21 deletions cli/src/libindy/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ impl Payment {
super::results::result_to_string(err, receiver)
}

pub fn add_request_fees(wallet_handle: i32, submitter_did: &str, req_json: &str, inputs_json: &str, outputs_json: &str, extra: Option<&str>) -> Result<(String, String), ErrorCode> {
pub fn add_request_fees(wallet_handle: i32, submitter_did: Option<&str>, req_json: &str, inputs_json: &str, outputs_json: &str, extra: Option<&str>) -> Result<(String, String), ErrorCode> {
let (receiver, command_handle, cb) = super::callbacks::_closure_to_cb_ec_string_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let req_json = CString::new(req_json).unwrap();
let inputs_json = CString::new(inputs_json).unwrap();
let outputs_json = CString::new(outputs_json).unwrap();
Expand All @@ -48,7 +48,7 @@ impl Payment {
let err = unsafe {
indy_add_request_fees(command_handle,
wallet_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
req_json.as_ptr(),
inputs_json.as_ptr(),
outputs_json.as_ptr(),
Expand All @@ -59,17 +59,17 @@ impl Payment {
super::results::result_to_string_string(err, receiver)
}

pub fn build_get_payment_sources_request(wallet_handle: i32, submitter_did: &str, payment_address: &str) -> Result<(String, String), ErrorCode> {
pub fn build_get_payment_sources_request(wallet_handle: i32, submitter_did: Option<&str>, payment_address: &str) -> Result<(String, String), ErrorCode> {
let (receiver, command_handle, cb) =
super::callbacks::_closure_to_cb_ec_string_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let payment_address = CString::new(payment_address).unwrap();

let err = unsafe {
indy_build_get_payment_sources_request(command_handle,
wallet_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
payment_address.as_ptr(),
cb)
};
Expand All @@ -95,19 +95,19 @@ impl Payment {
super::results::result_to_string(err, receiver)
}

pub fn build_payment_req(wallet_handle: i32, submitter_did: &str, inputs: &str, outputs: &str, extra: Option<&str>) -> Result<(String, String), ErrorCode> {
pub fn build_payment_req(wallet_handle: i32, submitter_did: Option<&str>, inputs: &str, outputs: &str, extra: Option<&str>) -> Result<(String, String), ErrorCode> {
let (receiver, command_handle, cb) =
super::callbacks::_closure_to_cb_ec_string_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let inputs = CString::new(inputs).unwrap();
let outputs = CString::new(outputs).unwrap();
let extra_str = extra.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());

let err = unsafe {
indy_build_payment_req(command_handle,
wallet_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
inputs.as_ptr(),
outputs.as_ptr(),
if extra.is_some() { extra_str.as_ptr() } else { null() },
Expand All @@ -134,18 +134,18 @@ impl Payment {
super::results::result_to_string(err, receiver)
}

pub fn build_mint_req(wallet_handle: i32, submitter_did: &str, outputs_json: &str, extra: Option<&str>) -> Result<(String, String), ErrorCode> {
pub fn build_mint_req(wallet_handle: i32, submitter_did: Option<&str>, outputs_json: &str, extra: Option<&str>) -> Result<(String, String), ErrorCode> {
let (receiver, command_handle, cb) =
super::callbacks::_closure_to_cb_ec_string_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let outputs_json = CString::new(outputs_json).unwrap();
let extra_str = extra.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());

let err = unsafe {
indy_build_mint_req(command_handle,
wallet_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
outputs_json.as_ptr(),
if extra.is_some() { extra_str.as_ptr() } else { null() },
cb)
Expand All @@ -154,18 +154,18 @@ impl Payment {
super::results::result_to_string_string(err, receiver)
}

pub fn build_set_txn_fees_req(wallet_handle: i32, submitter_did: &str, payment_method: &str, fees_json: &str) -> Result<String, ErrorCode> {
pub fn build_set_txn_fees_req(wallet_handle: i32, submitter_did: Option<&str>, payment_method: &str, fees_json: &str) -> Result<String, ErrorCode> {
let (receiver, command_handle, cb) =
super::callbacks::_closure_to_cb_ec_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let payment_method = CString::new(payment_method).unwrap();
let fees_json = CString::new(fees_json).unwrap();

let err = unsafe {
indy_build_set_txn_fees_req(command_handle,
wallet_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
payment_method.as_ptr(),
fees_json.as_ptr(),
cb)
Expand All @@ -174,17 +174,17 @@ impl Payment {
super::results::result_to_string(err, receiver)
}

pub fn build_get_txn_fees_req(wallet_handle: i32, submitter_did: &str, payment_method: &str) -> Result<String, ErrorCode> {
pub fn build_get_txn_fees_req(wallet_handle: i32, submitter_did: Option<&str>, payment_method: &str) -> Result<String, ErrorCode> {
let (receiver, command_handle, cb) =
super::callbacks::_closure_to_cb_ec_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let payment_method = CString::new(payment_method).unwrap();

let err = unsafe {
indy_build_get_txn_fees_req(command_handle,
wallet_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
payment_method.as_ptr(),
cb)
};
Expand Down Expand Up @@ -226,17 +226,17 @@ impl Payment {
super::results::result_to_string(err, receiver)
}

pub fn build_verify_payment_req(wallet_handle: i32, submitter_did: &str, receipt: &str) -> Result<(String, String), ErrorCode> {
pub fn build_verify_payment_req(wallet_handle: i32, submitter_did: Option<&str>, receipt: &str) -> Result<(String, String), ErrorCode> {
let (receiver, command_handle, cb) =
super::callbacks::_closure_to_cb_ec_string_string();

let submitter_did = CString::new(submitter_did).unwrap();
let submitter_did_str = submitter_did.map(|s| CString::new(s).unwrap()).unwrap_or(CString::new("").unwrap());
let receipt = CString::new(receipt).unwrap();

let err = unsafe {
indy_build_verify_payment_req(command_handle,
wallet_handle,
submitter_did.as_ptr(),
if submitter_did.is_some() { submitter_did_str.as_ptr() } else { null() },
receipt.as_ptr(),
cb)
};
Expand Down
16 changes: 15 additions & 1 deletion doc/migration-guide-1.5.0-1.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ version you can check migration guides history:
* [Libindy 1.6.2 to 1.6.3 migration](#libindy-162-to-163-migration-guide)
* [Wallet API 1.6.3](#wallet-api-163)
* [Ledger API 1.6.3](#ledger-api-163)
* [Libindy 1.6.3 to 1.6.4 migration](#libindy-163-to-164-migration-guide)
* [Libindy 1.6.4 to 1.6.5 migration](#libindy-164-to-165-migration-guide)


## Notes

Expand Down Expand Up @@ -1266,4 +1269,15 @@ indy_build_node_request(
Left the same but the additional optional field <b>blskey_pop</b> has been added in data json.
</td>
</tr>
</table>
</table>

## Libindy 1.6.3 to 1.6.4 migration Guide

The Libindy 1.6.4 release contains fixes that don't affect API functions.

## Libindy 1.6.4 to 1.6.5 migration Guide

The Libindy 1.6.5 release contains changes that related with Ledger API and Payment API but doesn't break them.
Parameter `submitter_did` set as the optional field for:
* Ledger API `indy_build_get_*` functions (except `indy_build_get_validator_info_request`).
* all functions in Payment API.
2 changes: 1 addition & 1 deletion libindy/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libindy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "indy"
version = "1.6.4"
version = "1.6.5"
authors = [
"Sergej Pupykin <[email protected]>",
"Vyacheslav Gudkov <[email protected]>",
Expand Down
Loading

0 comments on commit c794469

Please sign in to comment.