hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
667 stars 737 forks source link

Clarify the use of primary in indy-cli ledger cred-def #2474

Closed tdiesler closed 2 years ago

tdiesler commented 2 years ago

In indi-cli ledger cred-def I see ...

Examples:
ledger cred-def schema_id=1 signature_type=CL tag=1 primary={"n":"1","s":"2","rms":"3","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"}

Where can I learn more about the primary key? All these {"n":"1","s":"2","r":{"age":"4","name":"5"},"rctxt":"6","z":"7"} seem to be required and "rms":"3" seems to be optional.

What do these keys mean and how do they relate to the schema?

WadeBarnes commented 2 years ago

Here is some sample code for creating a cred-def for use with the indy-cli that might help you follow the generation of the primary key for a cred-def; https://github.com/bcgov/von-network/blob/main/cli-scripts/cred_def.py. It all happens in anoncreds.issuer_create_and_store_credential_def.

It's used at this stage, Create the Credential Definition, of writing a schema and cred-def to a ledger using the indy-cli.

tdiesler commented 2 years ago

Closing for now