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 <tipu.singh@ayanworks.com>

* fix: format issue

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

* fix: contract address issue

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

* fix: undefine polygon module changes

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

* fix: format issue

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

---------

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>
* fix:add OutOfBandRecordId

Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>

* fix:add OutOfBandRecordId

Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>

* fix:added recipient key

Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>

* feat:added recipientKey

Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>

---------

Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>
* Create DMP_2024.yml

Signed-off-by: Ajay Jadhav <ajay@ayanworks.com>

* Update and rename DMP_2024.yml to DMP_2024.yml

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

---------

Signed-off-by: Ajay Jadhav <ajay@ayanworks.com>
Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
Co-authored-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
* feat: upgrade credo to 0.5.0

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* refactor: remove unused modules

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* fix: dependencies

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* fix: auto update flags

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* fix: docker file

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* fix:W3C schema

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

---------

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>
Co-authored-by: tipusinghaw <tipu.singh@ayanworks.com>
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
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.

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
@KulkarniShashank KulkarniShashank changed the base branch from main to develop April 4, 2024 11:01
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
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 ?

GHkrishna and others added 11 commits April 10, 2024 16:41
Signed-off-by: Krishna <krishna.waske@ayanworks.com>
Signed-off-by: Krishna <krishna.waske@ayanworks.com>
feat: added messageType on the credo core
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
fix: specify Node.js version 18.19.0 in engines
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
fix: specify Node.js version 18.19.0 in yml file
…nto refactor/credo-controller

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
Copy link

sonarcloud bot commented Apr 22, 2024

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.

None yet

6 participants