Skip to content

Latest commit

 

History

History
89 lines (72 loc) · 1.36 KB

File metadata and controls

89 lines (72 loc) · 1.36 KB

Types Reference

This document contains type definitions used throughout the Pluto React Native SDK.

ManifestFile

The main manifest type used for proof generation and request building.

interface ManifestFile {
  manifestVersion: string;
  id: string;
  title: string;
  description: string;
  mode: Mode;
  request: ManifestFileRequest;
  response: ManifestFileResponse;
}

ManifestFileRequest

interface ManifestFileRequest {
  method: Methods;
  url: string;
  headers: Record<string, string>;
  body: string | null;
  vars?: ManifestVars;
  extra?: Partial<ManifestFileRequest>;
}

ManifestFileResponse

interface ManifestFileResponse {
  status: string;
  headers: Record<string, string>;
  cookies?: string[];
  body: {
    json: string[];
  };
}

ManifestVars

interface ManifestVars {
  [key: string]: {
    type?: string;
    regex?: string;
    length?: number;
  };
}

Enums

Mode

There are 4 modes supported by the SDK. In the alpha versions of the SDK, there may be issues with modes other than TEE.

  • TLSN
  • Origo
  • TEE [default]
  • Proxy
enum Mode {
  TLSN = "TLSN",
  Origo = "Origo",
  TEE = "TEE",
  Proxy = "Proxy",
}

Methods

enum Methods {
  POST = "POST",
  GET = "GET",
  PUT = "PUT",
  DELETE = "DELETE",
  PATCH = "PATCH",
}