Skip to main content
Version: v4

Quickstart: a trusted Verifiable Service in one sitting

At the end of this guide you have a VS Agent running under your own domain, with its own DID, holding an ECS Organization credential issued by an accredited issuer of the testnet ECS ecosystem and an ECS Service credential it issued to itself, and the indexer answers trusted: true for it. That is the starting point of everything else in this section.

Goal​

A DID of the form did:webvh:<scid>:agent.example.com that any wallet or service on testnet resolves as a trusted Verifiable Service operated by your organisation.

Prerequisites​

  • A host reachable on the public internet with a DNS name you control, for example agent.example.com, with Docker installed. A small virtual machine anywhere is enough. No server yet? Run VS Agent on your computer first, then come back for the trust steps.
  • A browser wallet that works with Cosmos chains (Keplr or Leap) with a testnet account. Get test coins from the Get VNA action on the frontend's Account page, or from the faucet listed in Environments and endpoints.
  • A corporation on testnet that your account can act for. If you have none, create one first: it takes five minutes in the frontend and you come back here with its id.
  • About an hour, most of it waiting for a validator.

Steps​

1. Deploy the agent​

Follow Deploy on one VM with Docker Compose with the .env values of this quickstart: your corporation id, a freshly generated mnemonic for the agent's account, the testnet endpoints, the DID of the testnet ECS ecosystem, and the claims of your service and organisation. Start the stack and wait for readiness:

curl -s http://127.0.0.1:3000/v2/agent/health/ready # 200 when the agent caught up with the indexer
curl -s http://127.0.0.1:3000/v2/agent/info | jq .did # your DID, created on first start

Keep the DID. Everything you do on the registry now names it.

2. Give the agent's account a little balance​

The agent pays its own transaction fees until the corporation grants it a fee grant. Its address was printed with the mnemonic when you generated it; a fresh agent also logs it at start, in a warning that the account is unfunded. Send it a few test coins from your wallet: the faucet only funds an account that signs its challenge, which is your wallet's, not the agent's.

3. Apply for the ECS Organization credential​

In the frontend, with your corporation acting, find the ECS ecosystem in Discover & Join, open it and open the participant tree of its Organization schema. Under Issuers are the accredited issuers that validate organisations on testnet; tick Business Rules to read their fees. Choose one and join the Holders folder under it: accept the governance framework, enter your agent's DID, and under Advanced: VS operator delegation name the agent's account as VS operator with the re-resolution message, then confirm. This creates the pending accreditation on the registry, with that issuer as validator, and escrows the fee. See Join an ecosystem for the screens.

Without a VS operator the agent gets no authorization to act for this accreditation, for example to ask the indexer to re-resolve it: see Let the agent pay with corporation funds.

Your agent sees the event through the indexer, connects to the validator's agent, and sends the onboarding request with the organisation claims from your .env. The validator reviews the evidence it asks for, on testnet usually a light check, and validates. The agent receives the credential and publishes it in its DID Document. Follow the flow:

curl -s http://127.0.0.1:3000/v2/vt/flows | jq '.items[] | {participantSessionId, role, variant, flowState, connectionState}'

The flow ends in COMPLETED.

4. Issue the ECS Service credential to yourself​

The ECS Service schema is open to issuers: your corporation self-creates the issuer accreditation for your agent's DID, with the agent's account as VS operator. In the frontend, join the Issuers folder of the schema's participant tree and set the VS operator under Advanced: VS operator delegation; the command line works too, see Let the agent pay with corporation funds. As soon as the accreditation is active, the agent issues the Service credential to itself from the service claims in your .env, anchors its digest on the registry, and publishes it. No validator is involved.

5. Check that you are trusted​

examples/vs-00-quickstart/check-trusted.sh
#!/usr/bin/env bash
# Resolves the agent's DID on the testnet indexer and prints the trust verdict.
# Usage: check-trusted.sh <did> [indexer base url]
set -euo pipefail
DID="${1:?did}"
IDX="${2:-https://idx.testnet.verana.network}"
curl -sS -X POST "$IDX/v4/verifiable-trust/resolve" \
-H 'content-type: application/json' \
-d "{\"did\":\"$DID\",\"ecsCredentials\":true,\"participations\":{\"states\":[\"ACTIVE\"]}}" \
| jq '{did, trusted, evaluatedAtTime, expiresAtTime,
ecs: [.ecsCredentials[]? | {schema: .ecsSchema, name: .credentialSubject.name}],
accreditations: [.participations[]? | {role, credentialSchemaId, ecosystemId, state}]}'

Run it with your DID. The first resolution can take a few seconds.

Verify​

The script prints trusted: true, two ECS credentials (Organization and Service) with your names, and two active accreditations (Holder on the Organization schema, Issuer on the Service schema). Open your DID in the frontend's Agents page, or paste it into the playground resolver, and read the Proof-of-Trust: your service, operated by your organisation.

Troubleshooting​

SymptomCauseFix
Readiness stays 503The agent has not caught up with the indexer, or cannot reach itCheck VERANA_INDEXER_BASE_URL and the container logs
info returns a DID with a different hostPUBLIC_API_BASE_URL changed after first startThe DID is bound to the first value; restore it, or start over with a fresh volume
The flow stays in AWAITING_OPThe accreditation was not started for this DID, or not with the agent as VS operatorCheck the participant entry in the frontend
The flow stays in OR_SENTThe validator's agent is not answeringPick another validator, or wait
trusted: false with a failed credentialA claim URI (logo, terms, privacy) could not be fetched or its digest changedServe stable resources, then ask the agent to republish

Next​