• Verifies a KILT attestation proof by querying data from the KILT blockchain. This includes querying the KILT blockchain with the credential id, which returns an attestation record if attested. This record is then compared against attester address and delegation id (the latter of which is taken directly from the credential).

    Parameters

    • credentialInput: Omit<KiltCredentialV1, "proof">

      Verifiable Credential to verify proof against.

    • proof: KiltAttestationProofV1

      KiltAttestationProofV1 proof object to be verified. Any proofs embedded in the credentialInput are stripped and ignored.

    • opts: {
          api?: ApiPromise;
          cTypes?: ICType[];
          loadCTypes?: false | CTypeLoader;
      } = {}

      Additional parameters.

      • Optional api?: ApiPromise

        A polkadot-js/api instance connected to the blockchain network on which the credential is anchored.

      • Optional cTypes?: ICType[]

        One or more CType definitions to be used for validation. If loadCTypes is set to false, validation will fail if the definition of the credential's CType is not given.

      • Optional loadCTypes?: false | CTypeLoader

        A function to load CType definitions that are not in cTypes. Defaults to using the CachingCTypeLoader. If set to false or undefined, no additional CTypes will be loaded.

    Returns Promise<void>