Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: configure the agent modules and wallet storage #85

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

KulkarniShashank
Copy link
Contributor

What

Refactor the configuration setup for agent modules, wallet storage, and network management within the credo-controller.

Why

The current configuration setup lacks clarity and modularity, making it difficult to maintain and extend the system. By restructuring the configuration for agent modules, wallet storage, and network management, aim to improve readability, maintainability, and scalability of the codebase.

How

Agent Modules Configuration
Separate configuration files for each agent module to isolate configurations and enhance modularity.
Implement a centralized configuration handler to manage agent module configurations efficiently.

Wallet Storage Configuration
Introduce a dedicated configuration file for wallet storage settings.
Configuration file for specifying wallet storage paths, credentials, and other relevant parameters.

Network Management Configuration
Abstract network management settings into a separate configuration module.
Integrate support for dynamic network configuration changes through configuration files or API endpoints.

tipusinghaw and others added 5 commits March 14, 2024 13:05
* refactor: replace rpc url

Signed-off-by: tipusinghaw <[email protected]>

* fix: format issue

Signed-off-by: tipusinghaw <[email protected]>

* fix: contract address issue

Signed-off-by: tipusinghaw <[email protected]>

* fix: undefine polygon module changes

Signed-off-by: tipusinghaw <[email protected]>

* fix: format issue

Signed-off-by: tipusinghaw <[email protected]>

---------

Signed-off-by: tipusinghaw <[email protected]>
* fix:add OutOfBandRecordId

Signed-off-by: pallavicoder <[email protected]>

* fix:add OutOfBandRecordId

Signed-off-by: pallavicoder <[email protected]>

* fix:added recipient key

Signed-off-by: pallavicoder <[email protected]>

* feat:added recipientKey

Signed-off-by: pallavicoder <[email protected]>

---------

Signed-off-by: pallavicoder <[email protected]>
* Create DMP_2024.yml

Signed-off-by: Ajay Jadhav <[email protected]>

* Update and rename DMP_2024.yml to DMP_2024.yml

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

---------

Signed-off-by: Ajay Jadhav <[email protected]>
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
Co-authored-by: Sai Ranjit Tummalapalli <[email protected]>
* feat: upgrade credo to 0.5.0

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* refactor: remove unused modules

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* fix: dependencies

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* fix: auto update flags

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* fix: docker file

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* fix:W3C schema

Signed-off-by: tipusinghaw <[email protected]>

---------

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
Signed-off-by: tipusinghaw <[email protected]>
Co-authored-by: tipusinghaw <[email protected]>
export const RPC_URL = 'https://rpc-mumbai.maticvigil.com'
export const FILE_SERVER_TOKEN =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6ImNhZDI3ZjhjLTMyNWYtNDRmZC04ZmZkLWExNGNhZTY3NTMyMSJ9.I3IR7abjWbfStnxzn1BhxhV0OEzt1x3mULjDdUcgWHk'
export const RPC_URL = 'https://polygon-mumbai.infura.io/v3/0579d305568d404e996e49695e9272a3'

Check failure

Code scanning / SonarCloud

Infura API keys should not be disclosed

<!--SONAR_ISSUE_KEY:AY6ivYiRObagGHYT__1U-->Make sure this Infura API key gets revoked, changed, and removed from the code. <p>See more on <a href="https://sonarcloud.io/project/issues?id=credebl_afj-controller&issues=AY6ivYiRObagGHYT__1U&open=AY6ivYiRObagGHYT__1U&pullRequest=85">SonarCloud</a></p>
src/enums/enum.ts Outdated Show resolved Hide resolved
src/utils/util.ts Outdated Show resolved Hide resolved
src/cliAgent.ts Outdated Show resolved Hide resolved
src/cliAgent.ts Outdated Show resolved Hide resolved
src/cliAgent.ts Outdated Show resolved Hide resolved
src/cliAgent.ts Outdated Show resolved Hide resolved
src/cliAgent.ts Outdated
Comment on lines 378 to 380
autoAcceptCredentials || '',
autoAcceptProofs || '',
walletScheme || ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these values be empty if not passed ?

src/cliAgent.ts Outdated
Comment on lines 366 to 368
autoAcceptCredentials || '',
autoAcceptProofs || '',
walletScheme || ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these values be empty if not passed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After adding an enum as a type, we should ensure that the default values passed align with the values defined in the enum.

@KulkarniShashank KulkarniShashank changed the base branch from main to develop April 4, 2024 11:01
KulkarniShashank added 2 commits April 5, 2024 13:05
package.json Outdated
@@ -58,6 +58,7 @@
"cors": "^2.8.5",
"express": "^4.18.1",
"express-rate-limit": "^7.1.5",
"joi": "^17.12.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using this package ?

Copy link

Quality Gate Passed Quality Gate passed

Issues
26 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants