Comment on page
Authentication
To authenticate your requests to the Claims and Credentials API, follow these steps:
- 1.Create a new
.env
file in the directory where you plan to run the Docker instance. - 2.Open the
.env
file in a text editor and add the following content:PORT=3000AUTHORIZATION="Bearer <your-auth-token>"# ============Claims============# whether to include the claims module, credentials module is required for thisENABLE_CLAIMS=true# To get claim queries fromBLOCKSYNC=""# To upload claims to and use cid as id and proofCELLNODE=""RPC_URL=""# to generate secp wallet that will be used for claim to chain interactionsSECP_MNEMONIC=""# ==========Credentials==========# whether to include the credentials moduleENABLE_CREDENTIALS=true# issuer did for issuing verifyable credentials, ensure the below mnemonics edkeys is added# to the dids verification methods for method 'assertionMethod' on chainISSUER_DID="did:x:zQ3shne9kEBA4Q8mQr5em3NF9mgE8zLXiHGMydLeDqPvbMo7c"# to generate ed key that will be used for credential signingCREDENTIALS_MNEMONIC="draw enable truly decorate blur negative easily manage hand dog absurd convince"# "devnet" or "testnet" or "mainnet"NETWORK=""# remote contexts to be fetched on startup to be added to the ld credential context resolverREMOTE_CONTEXTS=["https://w3id.org/ixo/context/v1"]# ==========Tokens==========# whether to include the tokens moduleENABLE_TOKENS=trueReplace<your-auth-token>
with your own bearer authentication token. - 3.Save the
.env
file. - 4.Start the Docker container with the following command:docker run --env-file .env -p 3000:3000 ghcr.io/emerging-eco/emerging-claims-credentials:v0.0.2This command starts the Docker container, passing the environment variables from the
.env
file and mapping the container's port 3000 to your local machine's port 3000. - 5.You can now make authenticated API requests to the Claims and Credentials API running on
http://localhost:3000
.
Last modified 5mo ago