Readonly
httpOptional
constraints?: stringoptional filter.
Optional
timeout?: numberspecifies how long an unused iterator will live in the server's memory. The value may be unspecified, defaulting to 30 seconds. This is intended to protect the server from memory leaks in applications that do not clean up their resources.
scan type. offer for offers. demand for demands.
any Unexpected error.
ApiError
CancelAgreement - Cancels Agreement. It is only possible before Provider approved or rejected the Agreement, and before its Expiration.
Causes:
approveAgreement
on Provider side to return with Cancelled
response.waitForApproval
local call to return with Cancelled
response.Optional
requestBody: Record<string, any>any Unexpected error.
ApiError
CollectAgreementEvents - Collects events related to an Agreement. This is a blocking operation. It will not return until there is at least one new event. All events are appearing on both sides equally.
Returns Agreement related events:
AgreementApprovedEvent
- Indicates that the Agreement has been approved
by the Provider.approveAgreement
call returns Approved
after this event is emitted.AgreementRejectedEvent
- Indicates that the Provider has called
rejectAgreement
, which effectively stops the Agreement handshake.
The Requestor may attempt to return to the Negotiation phase by sending
a new Proposal.
AgreementCancelledEvent
- Indicates that the Requestor has called
cancelAgreement
, which effectively stops the Agreement handshake.
AgreementTerminatedEvent
- Indicates that the Agreement has been
terminated by specified party (contains signature).
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)
Optional
afterTimestamp: stringApply only to records created later than the specified timestamp
Maximum number of events that server should return at once.
Optional
appSessionId: stringA correlation/session identifier used for querying events related to an action where this appSessionId has been specified
any Agreement-related event list.
ApiError
CollectOffers - Reads Market responses to published Demand. This is a blocking operation. It will not return until there is at least one new event. Returns Proposal related events:
ProposalEvent
- Indicates that there is new Offer Proposal for this Demand.
ProposalRejectedEvent
- Indicates that the Provider has rejected
our previous Proposal related to this Demand. This effectively ends a
Negotiation chain - it explicitly indicates that the sender will not
create another counter-Proposal.
PropertyQueryEvent
- not supported yet.
Note: When collectOffers
is waiting, simultaneous call to unsubscribeDemand
on the same subscriptionId
should result in "Subscription does not exist" error returned from collectOffers
.
Note: Specification requires this endpoint to support list of specific Proposal Ids to listen for messages related only to specific Proposals. This is not covered yet.
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)
Maximum number of events that server should return at once.
any Proposal or Agreement event list.
ApiError
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)
Maximum number of events that server should return at once.
Optional
peerId: stringallows to query offers from specified node.
any Scan Events
ApiError
ConfirmAgreement - Sends Agreement proposal to the Provider. Signs self-created Agreement and sends it to the Provider.
This call should immediately follow createAgreement
.
Optional
appSessionId: stringA correlation/session identifier used for querying events related to an action where this appSessionId has been specified
any Unexpected error.
ApiError
CounterProposalDemand - Responds with a bespoke Demand to received Offer.
Creates and sends a modified version of original Demand (a counter-proposal) adjusted to previously received Proposal (ie. Offer). Changes Proposal state to Draft
. Returns created Proposal id.
The object which includes all the Demand/Offer/Proposal properties. This is a JSON object in "flat convention" - where keys are full property names and their values indicate properties.
The value's Javascript type shall conform with the type of the property (as indicated in Golem Standards).
{
* "golem.com.pricing.model":"linear",
* "golem.com.pricing.model.linear.coeffs":[0.001, 0.002, 0.0],
* "golem.com.scheme":"payu",
* "golem.com.scheme.payu.interval_sec":6.0,
* "golem.com.usage.vector":["golem.usage.duration_sec","golem.usage.cpu_sec"],
* "golem.inf.cpu.architecture":"x86_64",
* "golem.inf.cpu.cores":4,
* "golem.inf.cpu.threads":7,
* "golem.inf.mem.gib":10.612468048930168,
* "golem.inf.storage.gib":81.7227783203125,
* "golem.node.debug.subnet":"market-devnet",
* "golem.node.id.name":"tworec@mf-market-devnet",
* "golem.runtime.name":"vm",
* "golem.runtime.version@v":"0.1.0"
* }
* ```
*
any Unexpected error.
ApiError
CreateAgreement - Creates Agreement from selected Proposal. Initiates the Agreement handshake phase.
Formulates an Agreement artifact from the Proposal indicated by the received Proposal Id. Created Agreement is in Proposal
state.
The Approval Expiry Date is added to Agreement artifact and implies the effective timeout on the whole Agreement Confirmation sequence.
A successful call to createAgreement
shall immediately be followed by a confirmAgreement
and waitForApproval
call in order to listen for responses from the Provider.
Note: Moves given Proposal to Approved
state.
id of the proposal to be promoted to the Agreement
End of validity period.
Agreement needs to be approved, rejected or cancelled before this date; otherwise will expire.
any Unexpected error.
ApiError
any Unexpected error.
ApiError
GetAgreement - Fetches agreement with given agreement id.
any Agreement.
ApiError
GetDemands - Fetches all active Demands which have been published by the Requestor.
any Demand list.
ApiError
GetProposalOffer - Fetches Proposal (Offer) with given id.
any Proposal.
ApiError
Gets termination reason reported when terminateAgreement operation was called. Method to get the reason for terminating the Agreement.
any Agreement termination reason.
ApiError
ListAgreements - Lists agreements with optional filters List agreements. Supported filters: * state * creation datetime * app session id A well-formed call will result in a collection of objects with the following fields: * id * creationTs * approveTs * role
Optional
appSessionId: stringA correlation/session identifier used for querying events related to an action where this appSessionId has been specified
Optional
state: "Rejected" | "Expired" | "Proposal" | "Pending" | "Cancelled" | "Approved" | "Terminated"State of an agreement
Optional
afterDate: stringApply only to records created later than the specified timestamp
Optional
beforeDate: stringApply only to records created before the specified timestamp
any Result of listing agreements.
ApiError
QueryReplyDemands - Handles dynamic property query. Sends a response to a received property value query.
The Market Matching Mechanism, when resolving the match relation for the specific Demand-Offer pair, is to detect the “dynamic” properties required (via constraints) by the other side. At this point, it is able to query the issuing node for those properties and submit the other side’s requested properties as the context of the query.
Note: The property query responses may be submitted in “chunks”, ie. the responder may choose to resolve ‘quick’/lightweight’ properties faster and provide response sooner, while still working on more time-consuming properties in the background. Therefore the response contains both the resolved properties, as well as list of properties which responder knows still require resolution.
Note: This method must be implemented for Market API Capability Level 2.
any Unexpected error.
ApiError
RejectProposalOffer - Rejects Proposal (Offer). Effectively ends a Negotiation chain - it explicitly indicates that the sender will not create another counter-Proposal.
Optional
requestBody: Record<string, any>any Unexpected error.
ApiError
SubscribeDemand - Publishes Requestor capabilities via Demand. Demand object can be considered an "open" or public Demand, as it is not directed at a specific Provider, but rather is sent to the market so that the matching mechanism implementation can associate relevant Offers.
Note: it is an "atomic" operation, ie. as soon as Subscription is placed, the Demand is published on the market.
The object which includes all the Demand/Offer/Proposal properties. This is a JSON object in "flat convention" - where keys are full property names and their values indicate properties.
The value's Javascript type shall conform with the type of the property (as indicated in Golem Standards).
{
* "golem.com.pricing.model":"linear",
* "golem.com.pricing.model.linear.coeffs":[0.001, 0.002, 0.0],
* "golem.com.scheme":"payu",
* "golem.com.scheme.payu.interval_sec":6.0,
* "golem.com.usage.vector":["golem.usage.duration_sec","golem.usage.cpu_sec"],
* "golem.inf.cpu.architecture":"x86_64",
* "golem.inf.cpu.cores":4,
* "golem.inf.cpu.threads":7,
* "golem.inf.mem.gib":10.612468048930168,
* "golem.inf.storage.gib":81.7227783203125,
* "golem.node.debug.subnet":"market-devnet",
* "golem.node.id.name":"tworec@mf-market-devnet",
* "golem.runtime.name":"vm",
* "golem.runtime.version@v":"0.1.0"
* }
* ```
*
any Unexpected error.
ApiError
TerminateAgreement - Terminates approved Agreement.
Method to finish/close the Agreement while in Approved
state.
The other party gets notified about calling party decision to terminate a "running" agreement.
Note: Can be invoked at any time after Agreement was approved by both sides.
Note: Financial and reputational consequences are not defined by this specification.
Optional
requestBody: Record<string, any>any Unexpected error.
ApiError
UnsubscribeDemand - Stop subscription for previously published Demand. Stop receiving Proposals.
Note: this will terminate all pending collectOffers
calls on this subscription. This implies, that client code should not unsubscribeDemand
before it has received all expected/useful inputs from collectOffers
.
any Unexpected error.
ApiError
WaitForApproval - Waits for Agreement approval by the Provider.
This is a blocking operation. The call may be aborted by Requestor caller code. After the call is aborted or timed out, another waitForApproval
call can be raised on the same Agreement Id.
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)
any Unexpected error.
ApiError
Creates new offer/demand Iterator.