JS API Reference

Class: Agreement

market/agreement/agreement.Agreement

Agreement module - an object representing the contract between the requestor and the provider.

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Agreement(id, model, demand): Agreement

Parameters

NameType
idstring
modelAgreement
demandDemand

Returns

Agreement

Defined in

src/market/agreement/agreement.ts:40

Properties

id

Readonly id: string

Defined in

src/market/agreement/agreement.ts:41


demand

Readonly demand: Demand

Defined in

src/market/agreement/agreement.ts:43

Accessors

provider

get provider(): ProviderInfo

Returns

ProviderInfo

Defined in

src/market/agreement/agreement.ts:54

Methods

getState

getState(): "Proposal" | "Pending" | "Cancelled" | "Rejected" | "Approved" | "Expired" | "Terminated"

Return agreement state

Returns

"Proposal" | "Pending" | "Cancelled" | "Rejected" | "Approved" | "Expired" | "Terminated"

state

Defined in

src/market/agreement/agreement.ts:50


isFinalState

isFinalState(): boolean

Returns flag if the agreement is in the final state

Returns

boolean

boolean

Description

if the final state is true, agreement will not change state further anymore

Defined in

src/market/agreement/agreement.ts:67