Interface CreateAttestationPayload

interface CreateAttestationPayload {
    attestationMessages: string[];
    dataIntegrityProof: {
        publicKey?: string;
        signature: string;
        signer: string;
    };
    description: string;
    image: string;
    messageFormat: "plaintext" | "json";
    name: string;
    proofOfIssuance: {
        message: string;
        publicKey?: string;
        signature: string;
        signer: string;
    };
    scheme: "bbs" | "standard";
    type: string;
}

Properties

attestationMessages: string[]

Thesse are the attestations that are signed. For BBS+ signatures, there can be >1 attestationMessages, and the signer can selectively disclose the attestations. For standard signatures, there is only 1 attestationMessage.

dataIntegrityProof: {
    publicKey?: string;
    signature: string;
    signer: string;
}

This is the signature and accompanying details of the attestationMessages. The siganture maintains the integrity of the attestationMessages.

This should match the expected scheme. For example, if the scheme is BBS+, the signature should be a BBS+ signature and signer should be a BBS+ public key.

description: string

Metadata for the attestation for display purposes. Note this should not contain anything sensitive. It may be displayed to verifiers.

image: string

Metadata for the attestation for display purposes. Note this should not contain anything sensitive. It may be displayed to verifiers.

messageFormat: "plaintext" | "json"

The message format of the attestationMessages.

name: string

Metadata for the attestation for display purposes. Note this should not contain anything sensitive. It may be displayed to verifiers.

proofOfIssuance: {
    message: string;
    publicKey?: string;
    signature: string;
    signer: string;
}

Proof of issuance is used for BBS+ signatures (scheme = bbs) only. BBS+ signatures are signed with a BBS+ key pair, but you would often want the issuer to be a native address. The prooofOfIssuance establishes a link saying that "I am the issuer of this attestation signed with BBS+ key pair ___".

Fields can be left blank for standard signatures.

scheme: "bbs" | "standard"

The scheme of the attestation. BBS+ signatures are supported and can be used where selective disclosure is a requirement. Otherwise, you can simply use your native blockchain's signature scheme.

type: string

The type of the attestation (e.g. credential).