Agent
Local setup using NPM
This is an optional section, it's not required for CREDEBL setup. If you want to explore credo-controller rest APIs locally you can consume this section.
CREDO Controller
Clone the following repository:
Use the following commands to install and upgrade Yarn:
To install the dependencies use the following command:
Below is the cliConfig.json file, which needs to be used to set up the agent
For polygon mainnet use these configuration
Description of Fields in cliConfig.json
referringlabel: A descriptive name for the agent configuration.
walletId: The identifier for the wallet used by the agent.
walletKey: The key or token used to access the wallet.
walletType: The type of wallet (e.g., PostgreSQL).
walletUrl: The URL where the wallet service is hosted.
walletAccount: The username for the wallet account.
walletPassword: The password for the wallet account.
walletAdminAccount: The username for the wallet admin account.
walletAdminPassword: The password for the wallet admin account.
walletScheme: The
ProfilePerWallet
scheme implies that each wallet operates with its own distinct profile or configuration. This means that each wallet can have its own settings, schemas, and data management rules. It provides isolation between different wallets, which can be useful for managing multiple wallets with different requirements or configurationsindyLedger: Configuration for Indy ledger.
To know more about indyLedgers - IndyLedgers
endpoint: List of URLs for the agent’s API endpoints.
inboundTransport: Configuration for inbound transport methods.
transport: Type of transport protocol.
port: Port number used for inbound transport.
outboundTransport: Types of transport methods used for outgoing communications.
adminPort: Port number for administrative operations.
tenancy: Set to
true
for a Shared agent andfalse
for a Dedicated or on-premises agent.webhookUrl: Provide base wallet’s tenantId for Shared agent and for individual entity ID for Dedicated agent
schemaFileServerURL: URL for accessing schema files.
didRegistryContractAddress: To know more about the DID registry contract address
schemaManagerContractAddress: To know more about schema manager contract address
rpcUrl: URL for the Remote Procedure Call (RPC) service.
fileServerUrl: You can create your own file server by referring to the schema file server
fileServerToken: Authentication token for accessing the file server
Build Agent controller using the following command:
Use the following command to run the agent locally :
The command ./bin/afj-rest.js
--config
./samples/cliConfig.json is used to run a script (afj-rest.js) located in the ./bin/ directory, with the configuration file (cliConfig.json) specified via the--config
flag.
The agent env sample file is already provided in the repository, for a quick start rename the file to .env
Last updated