• Initialize a new, prelimiary KiltAttestationProofV1, which is the first step in issuing a new credential.

    Parameters

    Returns [KiltAttestationProofV1, Parameters<ApiPromise["tx"]["attestation"]["add"]>]

    A tuple where the first entry is the (partial) proof object and the second entry are the arguments required to create an extrinsic that anchors the proof on the KILT blockchain.

    Example

    // start with initializing proof
    const [proof, args] = initializeProof(credential)
    const tx = api.tx.attestation.add(...args)
    // after DID-authorizing and submitting transaction (taking note of the block hash and timestamp where the transaction was included)
    const verifiableCredential = finalizeProof(credential, proof, {blockHash, timestamp})