Constructors

Properties

Methods

  • Creates new Activity based on given Agreement. Note: This call shall get routed as a provider event (see ProviderEvent structure).

    Parameters

    • requestBody: string | {
          agreementId: string;
          requestorPubKey?: string;
      }
    • timeout: number = 5

      Timeout used in blocking calls waiting for eg. acknowledgement. How many seconds server should wait for response/acknowledgement of an action (0.0 means it should wait for other party's response indefinitely)

    Returns ActivityApi.CancelablePromise<string | {
        activityId: string;
        credentials?: {
            sgx: {
                enclavePubKey: string;
                iasReport: string;
                iasSig: string;
                payloadHash: string;
                requestorPubKey: string;
            };
        };
    }>

    any Success

    Throws

    ApiError

  • Destroys given Activity. Note: This call shall get routed as a provider event (see ProviderEvent structure).

    Parameters

    • activityId: string
    • timeout: number = 5

      Timeout used in blocking calls waiting for eg. acknowledgement. How many seconds server should wait for response/acknowledgement of an action (0.0 means it should wait for other party's response indefinitely)

    Returns ActivityApi.CancelablePromise<any>

    any Success

    Throws

    ApiError

  • Executes an ExeScript batch within a given Activity. Note: This call shall get routed directly to ExeUnit.

    Parameters

    • activityId: string
    • requestBody: {
          text: string;
      }
      • text: string

    Returns ActivityApi.CancelablePromise<string>

    string Success

    Throws

    ApiError

  • Queries for ExeScript batch results. 'This call shall collect ExeScriptCommand result objects received directly from ExeUnit (via the long polling pattern). Note: two formats of response are specified (as indicated by the Accept header):

    • application/json - standard JSON response, specified below, as code generators handle it properly.
    • text/event-stream - an EventSource implementation (as per https://www.w3.org/TR/eventsource/). This isn't explicitly specified as code generators generally are unable to handle this. The streaming events adhere to following format:

    event: runtime data:

    This streaming endpoint requires dedicated implementation. '

    Parameters

    • activityId: string
    • batchId: string
    • Optional commandIndex: number

      Wait until command with the specified index finishes. Must be accompanied by a valid "pollTimeout" query parameter.

    • timeout: number = 5

      Timeout used in long-polling calls (in seconds). How many seconds server should wait for response containing new events (0.0 means it should return immediately if there are no events)

    Returns ActivityApi.CancelablePromise<{
        eventDate: string;
        index: number;
        isBatchFinished?: boolean;
        message?: string;
        result: "Ok" | "Error";
        stderr?: string;
        stdout?: string;
    }[]>

    any Success

    Throws

    ApiError