Trust Registry Service¶
The Trust Registry Service exposes functionality for managing Trust Registries -- lists of authorized issuers for the various credential types within an ecosystem.
Under Construction
This section -- and the underlying API -- is under active development.
We are working to define exactly how Trust Registries will be implemented within our platform; this page and API may change as we do so.
Create Governance Framework¶
Creates a Governance Framework and attaches it to the current ecosystem.
trinsic trust-registry register-efg
var schemaUri = "https://schema.org/Card";
var frameworkUri = "https://example.com";
var registerFrameworkResponse = await trinsic.TrustRegistry.AddFrameworkAsync(new() {
Name = "Demo framework",
Description = "My governance framework",
GovernanceFrameworkUri = frameworkUri
});
register_framework_response = await trinsic_service.trust_registry.add_framework(
request=AddFrameworkRequest(
governance_framework_uri=https_example_com,
description="Demo framework",
name=framework_name,
)
)
newFramework, err := trinsic.TrustRegistry().AddFramework(context.Background(), &trustregistry.AddFrameworkRequest{
GovernanceFrameworkUri: frameworkURI,
Name: fmt.Sprintf("Example Framework - %s", uuid.New()),
})
var frameworkResponse =
trinsic
.trustRegistry()
.addFramework(
AddFrameworkRequest.newBuilder()
.setGovernanceFrameworkUri(frameworkUri)
.setName("Example Framework" + UUID.randomUUID())
.build())
.get();
AddFrameworkRequest
Register Issuer¶
Registers an authorized issuer for a specific credential type (identified by its schema_uri
).
trinsic trust-registry register-issuer \
--egf http://hl7.org/fhir \
--credential-type https://w3id.org/vaccination#VaccinationCertificate \
--did did:example:fabre
var didUri = "did:example:test";
var registerMemberResponse = await trinsic.TrustRegistry.RegisterMemberAsync(new() {
DidUri = didUri,
FrameworkId = registerFrameworkResponse.Id,
SchemaUri = schemaUri
});
await trinsic_service.trust_registry.register_member(
request=RegisterMemberRequest(
did_uri=did_example_test,
framework_id=register_framework_response.id,
schema_uri=https_schema_org,
)
)
registerMemberResponse, err := trinsic.TrustRegistry().RegisterMember(context.Background(), &trustregistry.RegisterMemberRequest{
FrameworkId: newFramework.Id,
SchemaUri: schemaURI,
Member: &trustregistry.RegisterMemberRequest_DidUri{DidUri: didURI},
})
var memberResponse =
trinsic
.trustRegistry()
.registerMember(
RegisterMemberRequest.newBuilder()
.setDidUri(didUri)
.setFrameworkId(frameworkResponse.getId())
.setSchemaUri(typeUri)
.build())
.get();
did_uri
, wallet_id
, or email
may be specified.RegisterMemberRequest
Unregister Issuer¶
Unregisters an issuer for a specific credential type (identified by its schema_uri
).
trinsic trust-registry unregister-issuer \
--egf http://hl7.org/fhir \
--credential-type https://w3id.org/vaccination#VaccinationCertificate \
--did did:example:fabre
var unregisterResponse = await trinsic.TrustRegistry.UnregisterMemberAsync(new() {
DidUri = didUri,
FrameworkId = registerFrameworkResponse.Id,
SchemaUri = schemaUri
});
unregister_issuer_response = await trinsic_service.trust_registry.unregister_member(
request=UnregisterMemberRequest(
framework_id=register_framework_response.id,
schema_uri=https_schema_org,
did_uri=did_example_test,
)
)
unregisterMemberResponse, err := trinsic.TrustRegistry().UnregisterMember(context.Background(), &trustregistry.UnregisterMemberRequest{
SchemaUri: schemaURI,
FrameworkId: newFramework.Id,
})
⋯
// Do absolutely nothing
trinsic
.trustRegistry()
.unregisterMember(
UnregisterMemberRequest.newBuilder()
.setFrameworkId(frameworkResponse.getId())
.setDidUri(didUri)
.setSchemaUri(typeUri)
.build());
did_uri
, wallet_id
, or email
may be specified.UnregisterMemberRequest
Check Issuer Status¶
Check the status of an issuer for a specific credential type.
trinsic trust-registry check-issuer \
--egf http://hl7.org/fhir \
--credential-type https://w3id.org/vaccination#VaccinationCertificate \
--did did:example:fabre
var issuerStatus = await trinsic.TrustRegistry.GetMembershipStatusAsync(new() {
DidUri = didUri,
GovernanceFrameworkUri = frameworkUri,
SchemaUri = schemaUri
});
check_response = await trinsic_service.trust_registry.get_membership_status(
request=GetMembershipStatusRequest(
did_uri=did_example_test,
governance_framework_uri=https_example_com,
schema_uri=https_schema_org,
)
)
getMembershipStatusResponse, err := trinsic.TrustRegistry().GetMembershipStatus(context.Background(), &trustregistry.GetMembershipStatusRequest{
GovernanceFrameworkUri: frameworkURI,
Member: &trustregistry.GetMembershipStatusRequest_DidUri{DidUri: didURI},
SchemaUri: schemaURI,
})
⋯
// Do absolutely nothing
var issuerStatus =
trinsic
.trustRegistry()
.getMembershipStatus(
GetMembershipStatusRequest.newBuilder()
.setDidUri(didUri)
.setGovernanceFrameworkUri(frameworkUri)
.setSchemaUri(typeUri)
.build())
.get();
did_uri
, x509_cert
may be specified.GetMembershipStatusRequest
Search¶
Search the registry for registered issuers using a SQL query.
trinsic trust-registry search --query <SQL query>
var searchResult = await trinsic.TrustRegistry.SearchAsync(new());
search_result = await trinsic_service.trust_registry.search()
ecosystemList, err := trinsic.TrustRegistry().Search(context.Background(), nil)
var searchResult = trinsic.trustRegistry().search().get();
SELECT c from c where c.type == 'GovernanceFramework'
SearchRegistryResponse
SearchRegistryRequest
SearchRegistryRequest
Cache Offline Registry File¶
trinsic trust-registry download