Interface UpdateSecretPayload

interface UpdateSecretPayload {
    anchorsToAdd?: {
        message?: string;
        txHash?: string;
    }[];
    dataIntegrityProof?: {
        publicKey?: string;
        signature: string;
        signer: string;
    };
    description?: string;
    holdersToSet?: {
        cosmosAddress: string;
        delete?: boolean;
    }[];
    image?: string;
    messageFormat?: "plaintext" | "json";
    name?: string;
    proofOfIssuance?: {
        message: string;
        publicKey?: string;
        signature: string;
        signer: string;
    };
    scheme?: "bbs" | "standard";
    secretId: string;
    secretMessages?: string[];
    type?: string;
}

Properties

anchorsToAdd?: {
    message?: string;
    txHash?: string;
}[]

Blockchain anchors to add to the secret. These are on-chain transactions that can be used to prove stuff about the secret, like existence at a certain point in time or to maintain data integrity.

Type declaration

  • Optional message?: string
  • Optional txHash?: string
dataIntegrityProof?: {
    publicKey?: string;
    signature: string;
    signer: string;
}

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

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.

Type declaration

  • Optional publicKey?: string
  • signature: string
  • signer: string
description?: string

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

holdersToSet?: {
    cosmosAddress: string;
    delete?: boolean;
}[]

Holders can use the secret to prove something about themselves. This is a list of holders that have added this secret to their profile.

Type declaration

  • cosmosAddress: string
  • Optional delete?: boolean
image?: string

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

messageFormat?: "plaintext" | "json"

The message format of the secretMessages.

name?: string

Metadata for the secret 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 secret signed with BBS+ key pair ___".

Fields can be left blank for standard signatures.

Type declaration

  • message: string
  • Optional publicKey?: string
  • signature: string
  • signer: string
scheme?: "bbs" | "standard"

The scheme of the secret. 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.

secretId: string

The secret ID. This is the ID that is given to the user to query the secret. Anyone with the ID can query it, so keep this safe and secure.

secretMessages?: string[]

Thesse are the secrets that are signed. For BBS+ signatures, there can be >1 secretMessages, and the signer can selectively disclose the secrets. For standard signatures, there is only 1 secretMessage.

type?: string

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