Skip to content

Commit 6e9b14b

Browse files
authored
Merge branch 'master' into dotnet-payment-update
2 parents 58b8f2b + 2f2d6d4 commit 6e9b14b

File tree

64 files changed

+6415
-1382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+6415
-1382
lines changed

doc/contributor-resources.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributing to Indy SDK
2+
3+
4+
Before contributing to Indy SDK, there are a couple steps that will help your process go much more smoothly.
5+
6+
First, please take a look at our contributing guidelines: [how to contribute to Hyperledger Indy](http://bit.ly/2ugd0bq).
7+
8+
If you are looking for how to sign current or previous commits, go here: [signing your commits](signing-commits.md)
9+
10+
## Connect with the Community
11+
12+
Hyperledger Indy has a vibrant and active community of developers willing to help you answer questions, learn more about self-sovereign identity, and get involved.
13+
14+
You will find the best and most update resources on chat board here: [Hyperledger Rocket Chat](https://chat.hyperledger.org/home)
15+
16+
\#indy-sdk, \#indy-node, and \#indy are the some of the best channels to get started. Please introduce yourself and let us know what you want to accomplish!
17+
18+
## How to Start Working with the Code
19+
20+
1. Fork the indy-sdk repository on Github to your personal account.
21+
22+
1. Add the hyperledger/indy-sdk as the remote upstream:
23+
`git remote add upstream https://github.com/hyperledger/indy-sdk.git`
24+
25+
1. Set up Developer Certificate of Origin and learn how to [sign your commits](signing-commits.md)
26+
27+
1. Take a look at our [release workflow](release-workflow.md)
28+
29+
## How to send a PR
30+
31+
- Do not create big PRs; send a PR for one feature or bug fix only.
32+
If a feature is too big, consider splitting a big PR to a number of small ones.
33+
- Consider sending a design doc into `design` folder (as markdown or PlantUML diagram) for a new feature before implementing it
34+
- Make sure that a new feature or fix is covered by tests (try following TDD)
35+
- Make sure that documentation is updated according to your changes
36+
- Provide a full description of changes in the PR including Jira ticket number if any
37+
- Make sure that all your commits have a DCO sign-off from the author. (add the `-s` flag to all commits)
38+
- Put the link to the PR into `#indy-pr-review` channel in Rocket.Chat
39+
- A reviewer needs to start your tests first (add `test this please` comment to the PR)
40+
- You need to make sure that all the tests pass
41+
- A reviewer needs to review the code and approve the PR. If there are review comments, they will be put into the PR itself.
42+
- You must process them (feel free to reply in the PR threads, or have a discussion in Rocket.Chat if needed)
43+
- A reviewer or maintainer will merge the PR

doc/design/002-anoncreds/README.md

Lines changed: 255 additions & 19 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Wallet Query Language
2+
3+
This language will be used to define queries in Non-secrets, Anoncreds search APIs.
4+
5+
```Rust
6+
query = {subquery}
7+
subquery = {subquery, ..., subquery} - WHERE subquery AND ... AND subquery
8+
subquery = $or: [{subquery},..., {subquery}] - WHERE subquery OR ... OR subquery
9+
subquery = $not: {subquery} - Where NOT (subquery)
10+
subquery = "tagName": tagValue - WHERE tagName == tagValue
11+
subquery = "tagName": {$neq: tagValue} - WHERE tagName != tagValue
12+
subquery = "tagName": {$gt: tagValue} - WHERE tagName > tagValue
13+
subquery = "tagName": {$gte: tagValue} - WHERE tagName >= tagValue
14+
subquery = "tagName": {$lt: tagValue} - WHERE tagName < tagValue
15+
subquery = "tagName": {$lte: tagValue} - WHERE tagName <= tagValue
16+
subquery = "tagName": {$like: tagValue} - WHERE tagName LIKE tagValue
17+
subquery = "tagName": {$in: [tagValue, ..., tagValue]} - WHERE tagName IN (tagValue, ..., tagValue)
18+
```

doc/getting-started/getting-started.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 \
3030

3131
USER indy
3232

33-
EXPOSE 8888
33+
EXPOSE 8888

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)