Skip to main content

List Permissions

List on-chain permissions (Issuer, Verifier, Grantors, Ecosystem, Holder) for all credential schemas. Use the CLI today; the Indexer will provide richer server-side filters.

Query Parameters

At the moment, the CLI query does not accept filter flags. Use client-side filters (examples below). The Indexer will expose parameters such as schema_id, type, status, and grantee.

Useful fields in the response

FieldDescription
idPermission ID
schema_idCredential Schema ID this permission belongs to
typeRole type (see mapping below)
granteeDID or account that holds the permission
didDID registered in the permission (verifiable service)
statusPENDING, VALIDATED, TERMINATED, or REVOKED

Type mapping

The CLI/REST output returns enum strings (e.g., PERMISSION_TYPE_ISSUER), not numbers. Legacy docs sometimes refer to numeric IDs; both are listed here for reference.

Enum stringMeaningLegacy ID
PERMISSION_TYPE_ISSUERISSUER1
PERMISSION_TYPE_VERIFIERVERIFIER2
PERMISSION_TYPE_ISSUER_GRANTORISSUER-GRANTOR3
PERMISSION_TYPE_VERIFIER_GRANTORVERIFIER-GRANTOR4
PERMISSION_TYPE_ECOSYSTEMECOSYSTEM5
PERMISSION_TYPE_HOLDERHOLDER6

Execute the Query

Set up your environment (if not already):

NODE_RPC=http://node1.testnet.verana.network:26657

List all permissions

veranad q perm list-permissions --node $NODE_RPC --output json

Filter examples (client-side with jq)

  • By schema:
veranad q perm list-permissions --node $NODE_RPC --output json \
| jq '.permissions[] | select(.schema_id == "5")'
  • By type = ISSUER:
veranad q perm list-permissions --node $NODE_RPC --output json \
| jq '.permissions[] | select(.type == "PERMISSION_TYPE_ISSUER")'
# Alternatively, match by suffix (works across enum names)
veranad q perm list-permissions --node $NODE_RPC --output json \
| jq 'select(.permissions != null) | .permissions[] | select(.type | endswith("_ISSUER"))'

Why type == "1" didn’t work? The .type field is an enum string (e.g., PERMISSION_TYPE_ISSUER), not a numeric ID. Use the string value (or the endswith("_ISSUER") helper) when filtering with jq.

  • By status = VALIDATED:
veranad q perm list-permissions --node $NODE_RPC --output json \
| jq '.permissions[] | select(.status == "VALIDATED")'
  • By grantee DID:
DID=did:example:abc123
veranad q perm list-permissions --node $NODE_RPC --output json \
| jq --arg did "$DID" '.permissions[] | select(.grantee == $did)'
  • Count per type:
veranad q perm list-permissions --node $NODE_RPC --output json \
| jq -r '.permissions[].type' | sort | uniq -c