Securely request secrets from a Switchboard SecretsServer that are owned by a specific authority. Any secrets that are returned for the current feed will then be unwrapped into variables to be accessed later.

Input: None

Returns: The input

Example: SecretsTask

{ "secretsTask": { "authority": "Accb21tUCWocJea6Uk3DgrNZawgmKegDVeHw8cGMDPi5" } }

Implements

Constructors

  • Constructs a new SecretsTask.

    Parameters

    Returns SecretsTask

Properties

authority: string

The authority of the secrets that are to be requested.

url: string

The url of the server to request secrets from. The default is https://api.secrets.switchboard.xyz.

Methods

  • Converts this SecretsTask to JSON.

    Returns {
        [k: string]: any;
    }

    JSON object

    • [k: string]: any
  • Creates a new SecretsTask instance using the specified properties.

    Parameters

    Returns SecretsTask

    SecretsTask instance

  • Decodes a SecretsTask message from the specified reader or buffer.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • Optional length: number

      Message length if known beforehand

    Returns SecretsTask

    SecretsTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Decodes a SecretsTask message from the specified reader or buffer, length delimited.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns SecretsTask

    SecretsTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Encodes the specified SecretsTask message. Does not implicitly verify messages.

    Parameters

    • message: ISecretsTask

      SecretsTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Encodes the specified SecretsTask message, length delimited. Does not implicitly verify messages.

    Parameters

    • message: ISecretsTask

      SecretsTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Creates a SecretsTask message from a plain object. Also converts values to their respective internal types.

    Parameters

    • object: {
          [k: string]: any;
      }

      Plain object

      • [k: string]: any

    Returns SecretsTask

    SecretsTask

  • Gets the default type url for SecretsTask

    Parameters

    • Optional typeUrlPrefix: string

      your custom typeUrlPrefix(default "type.googleapis.com")

    Returns string

    The default type url

  • Creates a plain object from a SecretsTask message. Also converts values to other types if specified.

    Parameters

    • message: SecretsTask

      SecretsTask

    • Optional options: IConversionOptions

      Conversion options

    Returns {
        [k: string]: any;
    }

    Plain object

    • [k: string]: any
  • Verifies a SecretsTask message.

    Parameters

    • message: {
          [k: string]: any;
      }

      Plain object to verify

      • [k: string]: any

    Returns string

    null if valid, otherwise the reason why it is not