Truvera Documentation portal
WebsiteTruvera Workspace
  • Truvera overview
    • Decentralized identity explained
    • Roadmap
    • Subscription plans & billing
  • Solutions
    • Biometric-Bound Credentials
  • Truvera Workspace
    • Create an organization profile (DID)
    • Issue verifiable credentials
      • Filtering, downloading and deleting credentials
    • Verify credentials
    • Create a schema
    • Create a design
    • Team management
      • Inviting a team member
      • Removing a team member
      • Changing team member roles
      • Data retention policies
      • Sub-accounts
    • Revoking credentials
    • Ecosystem Tools
      • Ecosystem set up
      • Ecosystem example
    • Monetizing credentials
      • Setting up monetizable credentials
    • Creating API keys and webhook endpoints
    • Transaction history
    • Custom branded distribution emails
    • Truvera Workspace release notes
      • 2025 Release notes
        • Release notes Q1 2025
      • 2024 Release notes
        • Release Notes February 2024
        • Release Notes March 2024
        • Release Notes April 2024
        • Release Notes May 2024
        • Release Notes June 2024
        • Release Notes July 2024
        • Release Notes August 2024
        • Release Notes September 2024
        • Release Notes October 2024
        • Release notes November 2024
        • Release notes December 2024
  • Truvera API
    • Getting started
    • Webhooks
      • Webhooks API endpoints
    • Sample Postman collections
      • Issue-Store-Verify sample flow
      • Create ecosystems
      • Issue monetizable credentials
      • Create sub-accounts
      • Issue OpenID credentials
    • Truvera Swagger UI
    • DIDs
    • Profiles
    • Credentials
    • Presentations
      • Proof templates
      • Proof requests
      • Other proof endpoints
    • Registries
    • Revocation Status
    • Credential Schemas
    • Jobs
    • Templates
    • Sub-accounts
    • Teams
    • Messaging
    • OpenID
      • OpenID Issuance and Verification Integration Guide
    • iden3comm
    • Ecosystem Tools
      • Trust Registry Integration Guide
      • Creating a Trust Registry
      • Inviting participants
      • Verifiers and Public info
      • Trust Registry Schemas
      • Trust Registry Proof Templates
      • Reports
      • Updating and Deleting Trust Registry
    • Issuing paid credentials (KVAC algorithm integration)
    • Data
    • Verify
    • Keys
    • Schemas
  • System architecture
    • Proposed architecture with Truvera
    • Revocation
    • System scalability
    • Security policies
    • How data is processed and stored
  • Supported standards
    • Interoperability with OpenID
  • Credential wallet
    • Create and manage DIDs in the Truvera Wallet
    • White label wallet
      • Configuration
        • Enabling and Disabling Features
        • Customizing the Styling
        • Configuring for Android Builds
        • Configuring iOS Builds
      • Publishing in App Stores
        • Android Build Testing and Publishing
        • iOS Build Testing and Publishing
    • Wallet SDK
      • Getting started
        • Example Credential
        • Presentation definition
        • Verify credentials
      • Cloud wallet
      • Biometric plugin
      • Ecosystem Tools
    • Download Truvera Wallet
    • Truvera Wallet release notes
      • Release Notes 2025Q1
      • Release Notes 2024Q4
      • Release Notes 2024Q3
        • Release Notes September 2024
        • Release Notes August 2024
        • Release Notes July 2024
      • Release Notes June 2024
      • Release Notes May 2024
      • Release Notes April 2024
  • Open source community
    • Code of Conduct
    • Truvera Credential SDK
    • Blockchain archives
      • DOCK token
        • Migration terms and conditions
  • Support
    • System Status
    • Discord
    • Support services
    • Security policy
Powered by GitBook
On this page
  • Actions
  • Requests
  • Trust Registry identifiers
  • Schema metadata identifiers
  • Trust Registry information
  • Schemas metadata

Was this helpful?

Edit on GitHub
  1. Open source community
  2. Truvera Credential SDK
  3. Trust Registry

Trust Registry SDK interaction

Last updated 1 year ago

Was this helpful?

Actions

  1. InitOrUpdateTrustRegistry

    • Description: Initializes or updates a trust registry with the provided parameters.

      Parameter
      Type
      Description

      registryId

      TrustRegistryId

      Identifier for the trust registry.

      name

      String

      Name of the trust registry.

      govFramework

      Bytes

      Government framework associated with the trust registry.

      nonce

      u32

      Nonce of the caller DID.

    • Example:

      const trustRegistryId = randomAsHex(32);
      await dock.trustRegistry.initOrUpdate(
        convenerDID,
        trustRegistryId,
        "My Trust Registry",
        '{"name":"Sample Government Framework","description":"This is a sample government framework for use in a trust registry.","authority":"Sample Government Authority","contact":{"name":"John Doe","email":"johndoe@example.com","phone":"+1234567890"},"policies":[{"name":"Identity Verification Policy","description":"Policy for verifying the identity of participants in the trust registry.","requirements":["Government-issued identification","Biometric verification"]},{"name":"Data Protection Policy","description":"Policy for protecting the data stored in the trust registry.","requirements":["Encryption of sensitive data","Regular security audits"]},{"name":"Compliance Policy","description":"Policy for ensuring compliance with relevant regulations and standards.","requirements":["Adherence to GDPR regulations","ISO 27001 certification"]}]}',
        convenerPair,
        dock
      );
  2. SetSchemasMetadata

    • Description: Sets the schemas metadata for a trust registry.

      Parameter
      Type
      Description

      registryId

      TrustRegistryId

      Identifier for the trust registry.

      schemas

      UnboundedSchemasUpdate

      Schemas to be updated.

      nonce

      u32

      Nonce of the caller DID.

    • Example:

      const issuers = new BTreeMap(dock.api.registry, 'Issuer', 'VerificationPrices');
      const issuerPrices = new BTreeMap(dock.api.registry, 'String', 'VerificationPrice');
      issuerPrices.set("DOCK", 10e6); // 10 DOCK tokens with 6 decimals of precision
      issuers.set(issuerDID, issuerPrices);
      
      const verifiers = new BTreeSet(dock.api.registry, 'Verifier');
      verifiers.add(verifierDID);
      
      const schemas = new BTreeMap(dock.api.registry, 'Verifier');
      schemas.set(schemaId, {
        Set: {
          issuers,
          verifiers,
        },
      });
      
      await dock.trustRegistry.setSchemasMetadata(
        convenerDID,
        trustRegistryId,
        { Modify: schemas },
        convenerPair,
        dock
      );
  3. SuspendIssuers

    • Description: Suspends issuers within a trust registry.

      Parameter
      Type
      Description

      registryId

      TrustRegistryId

      Identifier for the trust registry.

      issuers

      BTreeSet

      Set of issuers to be suspended.

      nonce

      u32

      Nonce of the caller DID.

    • Example:

      await dock.trustRegistry.suspendIssuers(
        convenerDID,
        trustRegistryId,
        [issuerDID, issuerDID2],
        convenerPair,
        dock
      );
  4. UnsuspendIssuers

    • Description: Unsuspends previously suspended issuers within a trust registry.

      Parameter
      Type
      Description

      registryId

      TrustRegistryId

      Identifier for the trust registry.

      issuers

      BTreeSet

      Set of issuers to be unsuspended.

      nonce

      u32

      Nonce of the caller DID.

    • Example:

      await dock.trustRegistry.unsuspendIssuers(
        convenerDID,
        trustRegistryId,
        [issuerDID],
        convenerPair,
        dock
      );
  5. UpdateDelegatedIssuers

    • Description: Updates delegated issuers within a trust registry.

      Parameter
      Type
      Description

      registryId

      TrustRegistryId

      Identifier for the trust registry.

      delegated

      UnboundedDelegatedUpdate

      Delegated issuers to be updated.

      nonce

      u32

      Nonce of the caller DID.

    • Example:

      const issuers = new BTreeSet(dock.api.registry);
      issuers.add(delegatedIssuer);
      
      await dock.trustRegistry.updateDelegatedIssuers(
        issuerDID,
        trustRegistryId,
        { Set: issuers },
        issuerPair,
        dock
      );

Requests

Trust Registry identifiers

  1. Fetch all Trust Registry identifiers by Verifier:

  • Request: dock.api.query.trustRegistry.verifiersTrustRegistries(verifierDID)

  • Response: Returns trust registries where the specified verifier exists.

  1. Fetch all Trust Registry identifiers by Issuer:

  • Request: dock.api.query.trustRegistry.issuersTrustRegistries(issuerDID)

  • Response: Returns trust registries where the specified issuer exists.

  1. Request Trust Registry identifiers by Issuers:

  • Request: dock.trustRegistry.registriesIds({ issuers: { AnyOf: [issuerDID] } })

  • Response: Returns information about trust registries where the specified issuer exists.

  1. Request Trust Registry identifiers by Issuers or Verifiers:

  • Request: dock.trustRegistry.registriesIds({ issuersOrVerifiers: { AnyOf: [verifierDID, issuerDID] } })

  • Response: Returns information about trust registries where the specified issuer or verifier exists.

  1. Request Trust Registry identifiers by schema identifiers:

  • Request: dock.trustRegistry.registriesIds({ schemaIds: { AnyOf: [schemaId] } })

  • Response: Returns information about trust registries associated with the specified schema.

Schema metadata identifiers

  1. Fetch all schema metadata identifiers in the Trust Registry with the supplied id by Verifier:

  • Request: dock.api.query.trustRegistry.trustRegistryVerifierSchemas(registryID, verifierDID)

  • Response: Returns trust registries where the specified verifier exists.

  1. Fetch all schema metadata identifiers in the Trust Registry with the supplied id by Issuer:

  • Request: dock.api.query.trustRegistry.trustRegistryIssuerSchemas(registryID, issuerDID)

  • Response: Returns trust registries where the specified issuer exists.

  1. Request schema metadata identifiers by Issuers:

  • Request: dock.trustRegistry.registrySchemaIds({ issuers: { AnyOf: [issuerDID] } }, registryID)

  • Response: Returns information about trust registries where the specified issuer exists.

  1. Request schema metadata identifiers by Issuers or Verifiers:

  • Request: dock.trustRegistry.registrySchemaIds({ issuersOrVerifiers: { AnyOf: [verifierDID, issuerDID] } }, registryID)

  • Response: Returns information about trust registries where the specified issuer or verifier exists.

  1. Request schema metadata identifiers by schema identifiers:

  • Request: dock.trustRegistry.registrySchemaIds({ schemaIds: { AnyOf: [schemaId] } }, registryID)

  • Response: Returns information about trust registries associated with the specified schema.

Trust Registry information

  1. Request Trust Registry information by Verifiers:

  • Request: dock.trustRegistry.registriesInfo({ verifiers: { AnyOf: [verifierDID] } })

  • Response: Returns information about trust registries where the specified verifier exists.

  1. Request Trust Registry information by Issuers:

  • Request: dock.trustRegistry.registriesInfo({ issuers: { AnyOf: [issuerDID] } })

  • Response: Returns information about trust registries where the specified issuer exists.

  1. Request Trust Registry information by Issuers or Verifiers:

  • Request: dock.trustRegistry.registriesInfo({ issuersOrVerifiers: { AnyOf: [verifierDID, issuerDID] } })

  • Response: Returns information about trust registries where the specified issuer or verifier exists.

  1. Request Trust Registry information by schema identifiers:

  • Request: dock.trustRegistry.registriesInfo({ schemaIds: { AnyOf: [schemaId] } })

  • Response: Returns information about trust registries associated with the specified schema.

Schemas metadata

  1. Request Trust Registry schemas metadata by Verifiers:

  • Request: dock.trustRegistry.registrySchemasMetadata({ verifiers: { AnyOf: [verifierDID] } }, registryId)

  • Response: Returns metadata for all schemas in the given trust registry where the specified verifier exists.

  1. Request Trust Registry schemas metadata by Issuers:

  • Request: dock.trustRegistry.registrySchemasMetadata({ issuers: { AnyOf: [issuerDID] } }, registryId)

  • Response: Returns metadata for all schemas in the given trust registry where the specified issuer exists.

  1. Request Trust Registry schemas metadata by Issuers or Verifiers:

  • Request: dock.trustRegistry.registrySchemasMetadata({ issuersOrVerifiers: { AnyOf: [verifierDID, issuerDID] } }, registryId)

  • Response: Returns metadata for all schemas in the given trust registry where the specified issuer or verifier exists.

  1. Request Trust Registry schemas metadata by schema identifiers:

  • Request: dock.trustRegistry.registrySchemasMetadata({ schemaIds: { AnyOf: [schemaId] } }, registryId)

  • Response: Returns metadata for schemas with supplied identifiers.

Actions
1. Initialize or update Trust Registry
2. Set or update schemas metadata
3. Suspend issuers
4. Unsuspend issuers
5. Update delegated issuers
Requests
- Trust Registry identifiers
- Schema metadata identifiers
- Trust Registry information
- Schema metadata information