Skip to main content

Client

Clients can interact with this module via:

A verifiable presentation that satisfies the AnteHandler requirement for a gated message is attached to the transaction as an ExtensionOptions entry of type /d.vcv.v1.VerifiablePresentation carrying the compact SD-JWT in its presentation field.

CLI

Transactions

The module exposes dchain tx vcv ... subcommands. update-params is authority-only; the issuer/route-management commands must be signed by the route's admin.

add-route and add-issuer-verification-material read their payload from a JSON file (passed via --route-json / --vm-json); the others take positional arguments plus protojson flags.

# Add a route, reading the Route from a JSON file
dchain tx vcv add-route /d.notary.v1.MsgNotarise:1 --route-json ./route.json --from mykey

# Append content/extension requirements for an issuer on a route
dchain tx vcv add-issuer-requirements /d.notary.v1.MsgNotarise:1 issuer-a \
--content-requirements '[...]' --from mykey

# Replace content/extension requirements for an issuer on a route
dchain tx vcv replace-issuer-requirements /d.notary.v1.MsgNotarise:1 issuer-a \
--content-requirements '[...]' --from mykey

# Add a single verification material (issuer pubkey) from a JSON file
dchain tx vcv add-issuer-verification-material /d.notary.v1.MsgNotarise:1 issuer-a \
--vm-json ./vm.json --from mykey

# Rotate (replace all) verification materials for an issuer on a route
dchain tx vcv rotate-verification-material /d.notary.v1.MsgNotarise:1 issuer-a \
--verification-materials '[...]' --from mykey

# Update module params (authority only)
dchain tx vcv update-params '{"suspicious_threshold":"5","max_presentation_len":"4096"}' --from mykey

Query

# Get a single route by its routeId
dchain query vcv get-route /d.notary.v1.MsgNotarise:1

# Get all registered routes
dchain query vcv get-routes

# Get an issuer's requirements and verification materials on a route
dchain query vcv get-issuer /d.notary.v1.MsgNotarise:1 issuer-a

# Get the verification materials for an issuer on a route
dchain query vcv verification-materials /d.notary.v1.MsgNotarise:1 issuer-a

# Get the module authority address
dchain query vcv authority

gRPC

The vcv module provides a gRPC query service defined in d/vcv/v2/query.proto (d.vcv.v1.Query).

GetAuthority

grpcurl -plaintext localhost:9090 d.vcv.v1.Query/GetAuthority
message QueryGetAuthorityRequest {}
message QueryGetAuthorityResponse { string authority = 1; }

GetRoute

grpcurl -plaintext -d '{"route_id": "/d.notary.v1.MsgNotarise:1"}' \
localhost:9090 d.vcv.v1.Query/GetRoute
message GetRouteRequest { string route_id = 1; }
message GetRouteResponse { Route route = 1; }

GetRoutes

grpcurl -plaintext localhost:9090 d.vcv.v1.Query/GetRoutes
message GetRoutesRequest {}
message GetRoutesResponse { map<string, Route> routes = 1; }

GetIssuer

grpcurl -plaintext -d '{"route_id": "/d.notary.v1.MsgNotarise:1", "issuer": "issuer-a"}' \
localhost:9090 d.vcv.v1.Query/GetIssuer
message GetIssuerRequest {
string route_id = 1;
string issuer = 2;
}
message GetIssuerResponse { Issuer issuer = 1; }

GetVerificationMaterials

grpcurl -plaintext -d '{"route_id": "/d.notary.v1.MsgNotarise:1", "issuer": "issuer-a"}' \
localhost:9090 d.vcv.v1.Query/GetVerificationMaterials
message GetVerificationMaterialsRequest {
string route_id = 1;
string issuer = 2;
}
message GetVerificationMaterialsResponse {
repeated VerificationMaterial verification_material = 1;
}

REST

Query endpoints are available via the gRPC-gateway.

GET /d/vcv/v1/authority

curl http://localhost:1317/d/vcv/v1/authority

GET /d/vcv/v2/routes

curl http://localhost:1317/d/vcv/v2/routes

GET /d/vcv/v2/routes/{route_id}

curl http://localhost:1317/d/vcv/v2/routes/d.notary.v1.MsgNotarise:1

GET /d/vcv/v2/issuer/{route_id}/{issuer}

curl http://localhost:1317/d/vcv/v2/issuer/d.notary.v1.MsgNotarise:1/issuer-a

GET /d/vcv/v2/verification_material/{route_id}/{issuer}

curl http://localhost:1317/d/vcv/v2/verification_material/d.notary.v1.MsgNotarise:1/issuer-a