Skip to content
    hazBasehazBaseDocs
    SMART CONTRACTS
    Contract catalog

    MultiTrustCredential

    Manage participant metrics, credentials and proofs.

    Agreements, credentials & debtMultiTrustCredential.sol@hazbase/kit@0.9.0

    Role and use

    Use for metrics such as operational assessments or eligibility, separating metric updates from proofs about those metrics.

    Integration considerationsDefine authorized metric issuers and proof types. Match proof-generation circuits and public inputs to the verifier.

    Key SDK operations

    These operations are exposed by MultiTrustCredentialHelper in @hazbase/kit@0.9.0. The signatures below are type definitions; see the SDK reference for parameter structures and the complete interface.

    typescript
    import { MultiTrustCredentialHelper } from '@hazbase/kit';

    registerMetric

    typescript
    async registerMetric(
        id         : Bytes32 | string,
        label      : string,
        roleName   : Bytes32 | string,
        commitment : boolean,
        mask       : CompareMaskKey | number,
      ): Promise<TransactionReceipt>

    mint

    typescript
    async mint(to: Address, input: MetricInputStruct): Promise<TransactionReceipt>

    updateMetric

    typescript
    async updateMetric(tokenId: bigint, upd: MetricUpdateStruct): Promise<TransactionReceipt>

    proveMetric

    typescript
    async proveMetric(
        tokenId: bigint,
        metricId: Bytes32 | string,
        a: readonly [string, string],
        b: readonly [[string, string], [string, string]],
        c: readonly [string, string],
        pubSignals: readonly [bigint, bigint, bigint, bigint, bigint, bigint]
      ): Promise<boolean>
    View parameters, return types and all methods

    Related contracts

    Put it into practice

    Evidence & disclosure

    See the data model, processing sequence and SDK code for an application-level implementation.

    Read the implementation pattern

    Specification and source

    The Solidity source is pinned to the revision below. Match it with the SDK version and your network’s implementation address and ABI.

    multi-trust-credential/contracts/MultiTrustCredential.sol

    Source revision: b53a5b5