Skip to content

Commit df73c9f

Browse files
committed
Merge remote-tracking branch 'origin/feature/anoncreds-filtering' into feature/anoncreds-filtering
2 parents aa3195c + dc2cb4b commit df73c9f

File tree

26 files changed

+484
-313
lines changed

26 files changed

+484
-313
lines changed

ci/indy-pool.dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ RUN pip3 install -U \
1919
setuptools
2020

2121
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88
22-
ARG indy_stream=master
22+
ARG indy_stream=stable
2323
RUN echo "deb https://repo.sovrin.org/deb xenial $indy_stream" >> /etc/apt/sources.list
2424

2525
RUN useradd -ms /bin/bash -u $uid indy
2626

27-
ARG indy_plenum_ver=1.4.419
28-
ARG indy_anoncreds_ver=1.0.32
29-
ARG indy_node_ver=1.4.480
27+
ARG indy_plenum_ver=1.4.45
28+
ARG indy_anoncreds_ver=1.0.11
29+
ARG indy_node_ver=1.4.66
3030
ARG python3_indy_crypto_ver=0.4.1
3131
ARG indy_crypto_ver=0.4.0
3232

cli/src/libindy/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ pub enum ErrorCode
171171

172172
// Insufficient funds on inputs
173173
PaymentInsufficientFundsError = 702,
174+
175+
// No such source on a ledger
176+
PaymentSourceDoesNotExistError = 703
174177
}
175178

176179
impl ErrorCode {
@@ -229,6 +232,7 @@ impl ErrorCode {
229232
PaymentUnknownMethodError => "Unknown payment method was given",
230233
PaymentIncompatibleMethodsError => "Multiple different payment methods were specified",
231234
PaymentInsufficientFundsError => "Insufficient funds on inputs",
235+
PaymentSourceDoesNotExistError => "No such source found",
232236
}
233237
}
234238
}

doc/getting-started/getting-started.dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ RUN pip3 install -U \
2020
pip \
2121
setuptools \
2222
jupyter \
23-
python3-indy==1.4.0-dev-586
23+
python3-indy==1.5.0
2424

2525
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 \
26-
&& add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial master" \
26+
&& add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial stable" \
2727
&& apt-get update \
2828
&& apt-get install -y \
29-
libindy
29+
libindy=1.5.0
3030

3131
USER indy
3232

doc/how-tos/save-schema-and-cred-def/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
This shows how to save a schema and credential definition on the ledger, which is
44
a prerequisite for ["Issue Credential"](../issue-credential/README.md).
55

6-
[ [Python](../not-yet-written.md) | [Java](java/README.md) | [.NET](../not-yet-written.md) | [Node.js](../not-yet-written.md) | [Objective C](../not-yet-written.md) ]
6+
[ [Python](python/README.md) | [Java](java/README.md) | [.NET](../not-yet-written.md) | [Node.js](../not-yet-written.md) | [Objective C](../not-yet-written.md) ]
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Save a Schema and Credential Definition
2+
3+
Indy-SDK Developer Walkthrough #4, Python Edition
4+
5+
[ [Java](../java/README.md) | [.NET](../../not-yet-written.md) | [Node.js](../../not-yet-written.md) | [Objective C](../../not-yet-written.md) ]
6+
7+
8+
## Prerequisites
9+
10+
Setup your workstation with an indy development virtual machine (VM). See [prerequisites](../../prerequisites.md).
11+
12+
Ensure you have the 64-bit version of Python 3 installed, as the 32-bit version may have problems loading the Indy .dll files.
13+
14+
## Steps
15+
16+
### Step 1
17+
18+
In your normal workstation operating system (not the VM), open a Python editor of your
19+
choice and paste the code from [template.py](template.py)
20+
into a new doc. We will be modifying this code in later steps.
21+
22+
Save the doc as `save_schema_and_cred_def.py`
23+
24+
This is a very simple app framework into which you'll plug the code you'll be writing.
25+
26+
Install the required python packages by executing: `$ pip install python3-indy asyncio`
27+
28+
### Step 2
29+
30+
We need to give the SDK some context that it will need
31+
to deal with an indy ledger. This requires us to point the SDK at some
32+
*genesis transactions* that tell the SDK how to contact the ledger on
33+
the network and how to trust that the nodes it contacts possess
34+
appropriate keys. We also need to create a wallet so the SDK can store
35+
DIDs and the key material we're going to use. Also, we need
36+
to create a trust anchor identity that has privileges to create schemas
37+
and credential definitions.
38+
39+
All of these steps are similar to those in simpler how-tos, such as
40+
["Write a DID and Query Its Verkey"](../../write-did-and-query-verkey/python/readme.md).
41+
We'll get this housekeeping out of
42+
the way in a single step here, rather than dwelling on its details.
43+
44+
Copy the contents of [step2.py](step2.py) into
45+
`save_schema_and_cred_def.py` on top of the `Step 2 code goes here` placeholder comment.
46+
47+
Save the updated version of `save_schema_and_cred_def.py`.
48+
49+
Study the changes. Scaffolding code like this is likely to appear in anything
50+
that uses indy.
51+
52+
### Step 3
53+
54+
Now we need to create and define a schema. Schemas in indy are very simple
55+
JSON documents that specify their name and version, and that list attributes
56+
that will appear in a credential. Today, they do not describe data type,
57+
recurrence rules, nesting, and other elaborate constructs. There is work
58+
underway to make them fancier; visit
59+
[#indy-sdk on Rocket.Chat](https://chat.hyperledger.org/channel/indy-sdk) to learn
60+
more.
61+
62+
A sample schema might look like this:
63+
64+
```json
65+
{
66+
"id": "1",
67+
"name": "gvt",
68+
"version": "1.0",
69+
"ver': "1.0",
70+
"attrNames": ["age", "sex", "height", "name"]
71+
}
72+
```
73+
74+
Copy the contents of [step3.py](step3.py) into
75+
`save_schema_and_cred_def.py` on top of the `Step 3 code goes here` placeholder comment.
76+
77+
Save the updated version of `save_schema_and_cred_def.py`.
78+
79+
Notice how this schema is submitted to the ledger by the steward
80+
identity we created previously.
81+
82+
### Step 4
83+
84+
Next, we create a *credential definition*. This references the schema
85+
that we just added, and announces who is going to be issuing credentials
86+
with that schema (our trust anchor identity, in this case), what type of
87+
signature method they plan to use ("CL" = "Camenisch Lysyanskya", the
88+
default method used for zero-knowledge proofs by indy), how they
89+
plan to handle revocation, and so forth.
90+
91+
Copy the contents of [step4.py](step4.py) into
92+
`save_schema_and_cred_def.py` on top of the `Step 4 code goes here` placeholder comment.
93+
94+
Save the updated version of `save_schema_and_cred_def.py``.
95+
96+
### Step 5
97+
98+
Run the [finished code](save_schema_and_cred_def.py) and observe the whole sequence.
99+
100+
## More experiments
101+
102+
You might try the ["Issue a Credential"](../../issue-credential/../not-yet-written.md)
103+
how-to, which can be done in only one step once you complete this one.

doc/how-tos/save-schema-and-cred-def/python/add_claim_def.py

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)