Skip to content

Commit a759988

Browse files
authored
Merge pull request #161 from alastria/fix/exampleCredentials
Fix/example credentials
2 parents 9ef8bcc + 1f5d6b7 commit a759988

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

README.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ tsc
1919

2020
### Folders of example
2121

22-
|**Folder**|**What it does**|**Wiki page**|
23-
|:--|:--|:--|
24-
|exampleCreateAlastriaID| Contains an example of how to create an Alastria ID| [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Create-Alastria-ID-examples) |
25-
|exampleTokens| Contains an example of how to interact with [tokenFactory.ts](https://github.com/alastria/alastria-identity-lib/blob/develop/src/tokenFactory/tokensFactory.ts) functions | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Tokens-example)|
26-
|exampleCredentials| Contains examples of how to add and get Credentials in AlastriaID | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Credentials-examples)
27-
|examplePresentations| Contains examples of how to create, add and get Presentations in AlastriaID |[Wiki](https://github.com/alastria/alastria-identity-example/wiki/Presentations-examples)
28-
|exampleIdentityServiceProvider| Contains an example of how to add and remove a Identity Service Provider|[Wiki](https://github.com/alastria/alastria-identity-example/wiki/Service-Provider-examples)
29-
|exampleIdentityIssuer| Contains an example of how to add and remove a Identity Issuer|[Wiki](https://github.com/alastria/alastria-identity-example/wiki/Issuer-examples)
30-
|exampleFirstEntity| Contains an example of how to create the first entity with the firstIdentity account|[Wiki](https://github.com/alastria/alastria-identity-example/wiki/First-Entity-examples)
31-
|exampleEntities| Contains an example of get list of entities and get entity information |[Wiki](https://github.com/alastria/alastria-identity-example/wiki/Entities-examples)
32-
|exampleAuthentication| It contains an example of how authentication is done |[Wiki](https://github.com/alastria/alastria-identity-example/wiki/Authentication-example)
33-
|keystores| Contains the mocked keystores that we used to create the identities with different roles. These roles are explained [here](/keystores/README.md) |
22+
| **Folder** | **What it does** | **Wiki page** |
23+
| :----------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------- |
24+
| exampleCreateAlastriaID | Contains an example of how to create an Alastria ID | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Create-Alastria-ID-examples) |
25+
| exampleTokens | Contains an example of how to interact with [tokenFactory.ts](https://github.com/alastria/alastria-identity-lib/blob/develop/src/tokenFactory/tokensFactory.ts) functions | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Tokens-example) |
26+
| exampleCredentials | Contains examples of how to add and get Credentials in AlastriaID | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Credentials-examples) |
27+
| examplePresentations | Contains examples of how to create, add and get Presentations in AlastriaID | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Presentations-examples) |
28+
| exampleIdentityServiceProvider | Contains an example of how to add and remove a Identity Service Provider | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Service-Provider-examples) |
29+
| exampleIdentityIssuer | Contains an example of how to add and remove a Identity Issuer | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Issuer-examples) |
30+
| exampleFirstEntity | Contains an example of how to create the first entity with the firstIdentity account | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/First-Entity-examples) |
31+
| exampleEntities | Contains an example of get list of entities and get entity information | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Entities-examples) |
32+
| exampleAuthentication | It contains an example of how authentication is done | [Wiki](https://github.com/alastria/alastria-identity-example/wiki/Authentication-example) |
33+
| keystores | Contains the mocked keystores that we used to create the identities with different roles. These roles are explained [here](/keystores/README.md) |
3434

3535
## Environment requirements
3636

@@ -39,11 +39,13 @@ tsc
3939
First of all, to avoid possible errors with node and npm, it is recommended that the installation is done through **Nvm**.
4040

4141
Once you have **Nvm installed**, all you need to do is install the required version of node with .
42+
4243
```sh
4344
nvm install <version>
4445
```
4546

46-
On the other hand, if any problem persists, it is recommended to **clean the npm cache** with the following command
47+
On the other hand, if any problem persists, it is recommended to **clean the npm cache** with the following command
48+
4749
```sh
4850
npm cache clean -f
4951
```
@@ -60,14 +62,16 @@ The list of Npm and Node versions that have worked for the different members of
6062
|Node 18.19.0 && Npm 10.2.3|**OK**|
6163

6264
### Problems with the version of the library and the json-objects installed when running npm install
65+
6366
If you encounter problems with the version of the library and the json-objects that are installed after npm install, you need to perform the following steps to solve these problems:
67+
6468
- Delete node_modules folder -> `rm -rf node_modules`
6569
- Delete the package-lock.json -> `rm package-lock.json`
6670
- Clean the cache -> `npm cache clean -f`
6771
- Install all dependencies -> `npm install` (from the root directory)
6872

6973
Following these steps then check that the version of the library and the json objects that have been installed are correct. To do this go to the `node_modules -> alastria-identity-lib` folder and look at the code inside, to check if it is the one you want.
70-
Perform the same checking operation for the json-object code `node_modules -> alastria-identity-json-objects`
74+
Perform the same checking operation for the json-object code `node_modules -> alastria-identity-json-objects`
7175

7276
## How to use it
7377

@@ -131,3 +135,7 @@ The repository already has configuration files for both, so you won't have to co
131135
To automatically format Javascript and Typescript code
132136

133137
If you have installed some plugin that add keyboard shortcuts, like IntelliJ IDEA Keybindings (https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings) you will be able to format documents with Prettier with shortcuts like `cmd+alt+l`
138+
139+
### Contribution
140+
141+
**Contribution made by Inetum during 2024 in this document has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No. 101084071. (Dome project https://dome-marketplace.eu/)**

exampleCredentials/7.getCredentialStatus.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const getPresentationStatusExample = async () => {
1717
const entity1CredentialStatus = await getEntity1CredentialStatus()
1818

1919
const globalStatus =
20-
transactionFactory.presentationRegistry.getPresentationStatus(
20+
transactionFactory.credentialRegistry.getCredentialStatus(
2121
web3,
2222
subjectCredentialStatus.status,
2323
entity1CredentialStatus.status
@@ -93,4 +93,4 @@ const getEntity1CredentialStatus = async () => {
9393
})
9494
}
9595

96-
getPresentationStatusExample()
96+
getPresentationStatusExample()

0 commit comments

Comments
 (0)