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 #12 from hyperledger/master
Browse files Browse the repository at this point in the history
Merging master from hyperledger
  • Loading branch information
anastasia-tarasova authored Jul 7, 2017
2 parents 4d969b6 + ec0ea1a commit 7b0fea9
Show file tree
Hide file tree
Showing 24 changed files with 664 additions and 416 deletions.
73 changes: 73 additions & 0 deletions ci/indy-sdk.spec.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
%global commit @commit@

Summary: Official SDK for Hyperledger Indy
Name: indy-sdk
Version: @version@.%{commit}
Release: 1%{?dist}
License: Apache License 2.0
Group: System Environment/Libraries
Source: https://github.com/hyperledger/indy-sdk/archive/%{commit}.tar.gz
URL: https://github.com/hyperledger/indy-sdk/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: sqlite openssl libsodium
BuildRequires: sqlite-devel openssl-devel libsodium-devel

%description
This is the official SDK for Hyperledger Indy, which provides a
distributed-ledger-based foundation for self-sovereign identity.
The major artifact of the SDK is a c-callable library; there are
also convenience wrappers for various programming languages.

All bugs, stories, and backlog for this project are managed through
Hyperledger's Jira in project IS (note that regular Indy tickets are
in the INDY project instead...). Also, join us on Jira's Rocket.Chat
at #indy-sdk to discuss.

%package devel
Summary: Development files for Hyperledger Indy
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
This is the official SDK for Hyperledger Indy, which provides a
distributed-ledger-based foundation for self-sovereign identity.
The major artifact of the SDK is a c-callable library; there are
also convenience wrappers for various programming languages.

All bugs, stories, and backlog for this project are managed through
Hyperledger's Jira in project IS (note that regular Indy tickets are
in the INDY project instead...). Also, join us on Jira's Rocket.Chat
at #indy-sdk to discuss.

%prep
%autosetup -n %{name}-%{commit}

%build
cargo build --release

%install
rm -rf ${RPM_BUILD_ROOT}

install -dm0755 $RPM_BUILD_ROOT/%{_includedir}/sovrin
install -dm0755 $RPM_BUILD_ROOT/%{_libdir}
cp -a include/*.h $RPM_BUILD_ROOT/%{_includedir}/sovrin/
install -Dm0644 target/release/libsovrin.a $RPM_BUILD_ROOT/%{_libdir}/libsovrin.a
install -Dm0644 target/release/libsovrin.so $RPM_BUILD_ROOT/%{_libdir}/libsovrin.so

%clean
rm -rf ${RPM_BUILD_ROOT}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/libsovrin.so*

%files devel
%defattr(-,root,root)
%{_libdir}/libsovrin.a
%{_includedir}/sovrin/*.h

%changelog
15 changes: 15 additions & 0 deletions ci/rpm-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

commit=$1
version=$(wget -q https://raw.githubusercontent.com/hyperledger/indy-sdk/$commit/Cargo.toml -O - | grep -E '^version =' | head -n1 | cut -f2 -d= | tr -d '" ')

[ -z $version ] && exit 1
[ -z $commit ] && exit 2

sed \
-e "s|@commit@|$commit|g" \
-e "s|@version@|$version.$commit|g" \
indy-sdk.spec.in >indy-sdk.spec

spectool -g -R indy-sdk.spec || exit 3
rpmbuild -ba indy-sdk.spec || exit 4
8 changes: 4 additions & 4 deletions include/sovrin_anoncreds.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ extern "C" {

extern sovrin_error_t sovrin_issuer_create_and_store_claim_def(sovrin_handle_t command_handle,
sovrin_handle_t wallet_handle,
const char * issuer_did,
const char * schema_json,
const char * signature_type,
sovrin_bool_t create_non_revoc,

void (*cb)(sovrin_handle_t xcommand_handle,
sovrin_error_t err,
const char* clain_def_json,
const char* claim_def_uuid)
const char* clain_def_json)
);

extern sovrin_error_t sovrin_issuer_create_and_store_revoc_reg(sovrin_handle_t command_handle,
sovrin_handle_t wallet_handle,
sovrin_i32_t claim_def_seq_no,
const char * issuer_did,
sovrin_i32_t schema_seq_no,
sovrin_i32_t max_claim_num,

void (*cb)(sovrin_handle_t xcommand_handle,
Expand All @@ -44,7 +45,6 @@ extern "C" {

extern sovrin_error_t sovrin_issuer_revoke_claim(sovrin_handle_t command_handle,
sovrin_handle_t wallet_handle,
sovrin_i32_t claim_def_seq_no,
sovrin_i32_t revoc_reg_seq_no,
sovrin_i32_t user_revoc_index,

Expand Down
25 changes: 25 additions & 0 deletions include/sovrin_ledger.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,31 @@ extern "C" {
sovrin_error_t err,
const char* request_json)
);

/// Builds a NODE request.
///
/// #Params
/// command_handle: command handle to map callback to caller context.
/// submitter_did: Id of Identity stored in secured Wallet.
/// target_did: Id of Identity stored in secured Wallet.
/// data: id of a target NYM record
/// cb: Callback that takes command result as parameter.
///
/// #Returns
/// Request result as json.
///
/// #Errors
/// Common*


extern sovrin_error_t sovrin_build_get_txn_request(sovrin_handle_t command_handle,
const char * submitter_did,
sovrin_i32_t data,

void (*cb)(sovrin_handle_t xcommand_handle,
sovrin_error_t err,
const char* request_json)
);

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit 7b0fea9

Please sign in to comment.