Skip to content

Commit

Permalink
Merge pull request #175 from alastria/feature/upgradeables
Browse files Browse the repository at this point in the history
Feature/upgradeables
  • Loading branch information
DaniRumpi authored Oct 28, 2022
2 parents 598db51 + a6a7bec commit 01f0d1e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ You can execute some of our examples by running:
```
node file_name.js
```
## Dependencies
This library is using functionality from others.

| Lib | URL |
|:------------- |:-------------|
| web3 | https://www.npmjs.com/package/web3 |
| web3-utils | https://www.npmjs.com/package/web3-utils |
| ethereumjs-tx | https://www.npmjs.com/package/ethereumjs-tx |
| jsontokens-npm | https://www.npmjs.com/package/jsontokens |

Or create yours.

Expand Down
22 changes: 11 additions & 11 deletions src/txFactory/credentialRegistryTransactionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ export function getSubjectCredentialStatus(
* @param web3 ethereum connection
* @param didSubject subject to recover credential list
*/
export function getSubjectCredentialList(web3, didSubject) {
const subjectAddr = AIdUtils.getProxyAddress(didSubject)
const transaction = Object.assign({}, config.basicTransaction)
transaction.data = web3.eth.abi.encodeFunctionCall(
config.contractsAbi.AlastriaCredentialRegistry.getSubjectCredentialList,
[subjectAddr]
)
transaction.to = config.alastriaCredentialRegistry
transaction.gasLimit = 600000
return transaction
}
//export function getSubjectCredentialList(web3, didSubject) {
//const subjectAddr = AIdUtils.getProxyAddress(didSubject)
//const transaction = Object.assign({}, config.basicTransaction)
//transaction.data = web3.eth.abi.encodeFunctionCall(
//config.contractsAbi.AlastriaCredentialRegistry.getSubjectCredentialList,
//[subjectAddr]
//)
//transaction.to = config.alastriaCredentialRegistry
//transaction.gasLimit = 600000
//return transaction
//}

/**
* function updateCredentialStatus(web3, issuerCredentialHash, status)
Expand Down
4 changes: 2 additions & 2 deletions src/txFactory/presentationRegistryTransactionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function getSubjectPresentationStatus(
* @param web3
* @param didSubject
*/
export function getSubjectPresentationList(web3, didSubject) {
/**export function getSubjectPresentationList(web3, didSubject) {
const subjectAddr = AIdUtils.getProxyAddress(didSubject)
const transaction = Object.assign({}, config.basicTransaction)
transaction.data = web3.eth.abi.encodeFunctionCall(
Expand All @@ -75,7 +75,7 @@ export function getSubjectPresentationList(web3, didSubject) {
transaction.to = config.alastriaPresentationRegistry
transaction.gasLimit = 600000
return transaction
}
}*/

/**
* Receiver functions
Expand Down
4 changes: 0 additions & 4 deletions src/txFactory/transactionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
addIssuerCredential,
deleteSubjectCredential,
getSubjectCredentialStatus,
getSubjectCredentialList,
updateCredentialStatus,
getIssuerCredentialStatus,
getCredentialStatus
Expand Down Expand Up @@ -38,7 +37,6 @@ import {
addSubjectPresentation,
updateSubjectPresentation,
getSubjectPresentationStatus,
getSubjectPresentationList,
updateReceiverPresentation,
getReceiverPresentationStatus,
getPresentationStatus
Expand All @@ -60,7 +58,6 @@ export const transactionFactory = {
addIssuerCredential: addIssuerCredential,
deleteSubjectCredential: deleteSubjectCredential,
getSubjectCredentialStatus: getSubjectCredentialStatus,
getSubjectCredentialList: getSubjectCredentialList,
updateCredentialStatus: updateCredentialStatus,
getIssuerCredentialStatus: getIssuerCredentialStatus,
getCredentialStatus: getCredentialStatus
Expand Down Expand Up @@ -92,7 +89,6 @@ export const transactionFactory = {
addSubjectPresentation: addSubjectPresentation,
updateSubjectPresentation: updateSubjectPresentation,
getSubjectPresentationStatus: getSubjectPresentationStatus,
getSubjectPresentationList: getSubjectPresentationList,
updateReceiverPresentation: updateReceiverPresentation,
getReceiverPresentationStatus: getReceiverPresentationStatus,
getPresentationStatus: getPresentationStatus
Expand Down

0 comments on commit 01f0d1e

Please sign in to comment.