Skip to content

Commit

Permalink
Merge pull request #21 from DSRCorporation/feature/universal_did_reso…
Browse files Browse the repository at this point in the history
…lver

Make CL AnonCreds to work with did:indy and did:ethr
  • Loading branch information
Artemkaaas authored Dec 11, 2023
2 parents dca3cdc + d0fd1f4 commit 3ca0416
Show file tree
Hide file tree
Showing 58 changed files with 1,174 additions and 953 deletions.
12 changes: 6 additions & 6 deletions indy-besu/docs/design/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ Contract name: **transactionAllowed**

### DID Document management

| Contract | Method | Required Role | Action Description |
|---------------|--------------------------------|-----------------------------|---------------------------------|
| DidRegistry | createDid | Trustee, Endorser, Steward | Create a new DID Document |
| DidRegistry | updateDid | DID owner | Update DID an existing Document |
| DidRegistry | deactivateDid | DID owner | Deactivate an existing DID |
| DidRegistry | resolveDid | any | Resolve DID Document for a DID |
| Contract | Method | Required Role | Action Description |
|-------------------|--------------------------------|-----------------------------|---------------------------------|
| IndyDidRegistry | createDid | Trustee, Endorser, Steward | Create a new DID Document |
| IndyDidRegistry | updateDid | DID owner | Update DID an existing Document |
| IndyDidRegistry | deactivateDid | DID owner | Deactivate an existing DID |
| IndyDidRegistry | resolveDid | any | Resolve DID Document for a DID |

### CL Registry management

Expand Down
4 changes: 2 additions & 2 deletions indy-besu/docs/design/cl-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| parameter | value |
|--------------------|-----------------------------------------------------------------|
| id | “did:” method-name “:” namespace “:” method-specific-id |
| method-name | “indy2” |
| method-name | “indy2”, “indy”, “sov”, “ethr” |
| namespace | “testnet”/"mainnet" |
| indy-id | <issuer_did>/anoncreds/v0/SCHEMA/<schema_name>/<schema_version> |

Expand Down Expand Up @@ -136,7 +136,7 @@ Contract name: **SchemaRegistry**
| parameter | value |
|--------------------|---------------------------------------------------------|
| id | “did:” method-name “:” namespace “:” method-specific-id |
| method-name | “indy2” |
| method-name | “indy2”, “indy”, “sov”, “ethr” |
| namespace | “testnet”/"mainnet" |
| indy-id | <issuer_did>/anoncreds/v0/CLAIM_DEF/<schema_id>/<name> |

Expand Down
2 changes: 1 addition & 1 deletion indy-besu/docs/design/did-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Example:
| parameter | value |
|--------------------|---------------------------------------------------------|
| did | “did:” method-name “:” namespace “:” method-specific-id |
| method-name | "indy2" |
| method-name | indy2”, “indy”, “sov” |
| namespace | “testnet”/"mainnet" |
| method-specific-id | indy-id |
| indy-id | Base58(Truncate_msb(16(SHA256(publicKey)))) |
Expand Down
18 changes: 9 additions & 9 deletions indy-besu/docs/design/did-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Each DID Document MUST have a metadata section when a representation is produced

## Transactions (Smart Contract's methods)

Contract name: **DidRegistry**
Contract name: **IndyDidRegistry**

### Create DID

Expand All @@ -143,13 +143,13 @@ Contract name: **DidRegistry**
* Valid DID Document must be provided
* Format:
```
DidRegistry.createDid(
IndyDidRegistry.createDid(
didDoc DidDoc
)
```
* Example:
```
DidRegistry.createDid(
IndyDidRegistry.createDid(
didDoc: {
id:"did:indy2:testnet:SEp33q43PsdP7nDATyySSH",
verificationMethod: [
Expand Down Expand Up @@ -180,13 +180,13 @@ Contract name: **DidRegistry**
* Sender must be DID creator
* Format:
```
DidRegistry.updateDid(
IndyDidRegistry.updateDid(
didDoc DidDoc
)
```
* Example:
```
DidRegistry.updatedDid(
IndyDidRegistry.updatedDid(
didDoc: {
id:"did:indy2:testnet:SEp33q43PsdP7nDATyySSH",
verificationMethod: [
Expand Down Expand Up @@ -217,13 +217,13 @@ Contract name: **DidRegistry**
* Sender must be DID creator
* Format:
```
DidRegistry.deactivateDid(
IndyDidRegistry.deactivateDid(
string did
)
```
* Example:
```
DidRegistry.deactivateDid(
IndyDidRegistry.deactivateDid(
"did:indy2:testnet:SEp33q43PsdP7nDATyySSH"
)
```
Expand All @@ -238,13 +238,13 @@ Contract name: **DidRegistry**
* DID must exist
* Format:
```
DidRegistry.resolveDid(
IndyDidRegistry.resolveDid(
string id,
) returns (DidDocumentStorage)
```
* Example:
```
DidRegistry.resolveDid(
IndyDidRegistry.resolveDid(
"did:indy2:testnet:SEp33q43PsdP7nDATyySSH"
)
```
Expand Down
20 changes: 10 additions & 10 deletions indy-besu/docs/design/vdr.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct BuildTxnOptions {}
```

```rust
/// Prepare transaction executing `DidRegistry.createDid` smart contract method to create a new DID on the Ledger
/// Prepare transaction executing `IndyDidRegistry.createDid` smart contract method to create a new DID on the Ledger
///
/// #Params
/// param: client: LedgerClient - Ledger client
Expand All @@ -247,7 +247,7 @@ fn indy_vdr_build_create_did_transaction(
##### Single step contract execution

```rust
/// Single step function executing DidRegistry.createDid smart contract method to publish a new DID Document
/// Single step function executing `IndyDidRegistry.createDid` smart contract method to publish a new DID Document
///
/// #Params
/// param: client: LedgerClient - Ledger client
Expand All @@ -270,7 +270,7 @@ fn indy_vdr_create_did(
##### Request builder

```rust
/// Prepare transaction executing `DidRegistry.updateDid` smart contract method to update an existing DID Document
/// Prepare transaction executing `IndyDidRegistry.updateDid` smart contract method to update an existing DID Document
///
/// #Params
/// param: client: LedgerClient - Ledger client
Expand All @@ -291,7 +291,7 @@ fn indy_vdr_build_update_did_transaction(
##### Single step contract execution

```rust
/// Single step function executing DidRegistry.updateDid smart contract method to publish DID Document
/// Single step function executing `IndyDidRegistry.updateDid smart` contract method to publish DID Document
///
/// #Params
/// param: client: LedgerClient - Ledger client
Expand All @@ -314,7 +314,7 @@ fn indy_vdr_update_did(
##### Request builder

```rust
/// Prepare transaction executing `DidRegistry.deactivateDid` smart contract method to deactivate an existing DID
/// Prepare transaction executing `IndyDidRegistry.deactivateDid` smart contract method to deactivate an existing DID
///
/// #Params
/// param: client: LedgerClient - Ledger client
Expand All @@ -335,7 +335,7 @@ fn indy_vdr_build_deactivate_did_transaction(
##### Single step contract execution

```rust
/// Single step function executing DidRegistry.deactivateDid smart contract method to publish DID Document
/// Single step function executing `IndyDidRegistry.deactivateDid` smart contract method to publish DID Document
///
/// #Params
/// param: client: LedgerClient - Ledger client
Expand All @@ -358,7 +358,7 @@ fn indy_vdr_deactivate_did(
##### Request builder

```rust
/// Prepare transaction executing `DidRegistry.resolveDid` smart contract method to resolve a DID
/// Prepare transaction executing `IndyDidRegistry.resolveDid` smart contract method to resolve a DID
///
/// #Params
/// param: client: Ledger - client (Ethereum client - for example web3::Http)
Expand All @@ -375,7 +375,7 @@ fn indy_vdr_build_resolve_did_transaction(
```

```rust
/// Parse response for of `DidRegistry.resolveDid` smart contract
/// Parse response for of `IndyDidRegistry.resolveDid` smart contract
///
/// #Params
/// param: client: Ledger - client (Ethereum client - for example web3::Http)
Expand All @@ -392,7 +392,7 @@ fn indy_vdr_parse_resolve_did_response(
##### Single step contract execution

```rust
/// Single step function executing DidRegistry.resolveDid smart contract method to resolve DID Document with metadata
/// Single step function executing `IndyDidRegistry.resolveDid` smart contract method to resolve DID Document with metadata
///
/// #Params
/// param: client - Ledger client (Ethereum client - for example web3::Http)
Expand All @@ -409,7 +409,7 @@ fn indy_vdr_resolve_did(
```

```rust
/// Single step function executing dereferencing DID-URL and DidRegistry.resolveDid smart contract method to resolve DID Document with metadata
/// Single step function executing dereferencing DID-URL and `IndyDidRegistry.resolveDid` smart contract method to resolve DID Document with metadata
///
/// #Params
/// param: client - Ledger client (Ethereum client - for example web3::Http)
Expand Down
Loading

0 comments on commit 3ca0416

Please sign in to comment.