Skip to main content

NegotiationStrategy

@totemsdk/edge


@totemsdk/edge / NegotiationStrategy

Interface: NegotiationStrategy

Applications supply bargaining intelligence. The core SDK supplies protocol mechanics only — no LLM, no private reservation price.

Methods​

evaluate()​

evaluate(context): Promise<{ action: "accept"; } | { action: "reject"; reason?: string; } | { action: "counter"; terms: TradeTerms; }>

Parameters​

context​
history​

TradeProposal[]

negotiationId​

string

proposal​

TradeProposal

termsHashes​

string[]

Canonical terms hashes of all prior proposals (for cycle detection).

Returns​

Promise<{ action: "accept"; } | { action: "reject"; reason?: string; } | { action: "counter"; terms: TradeTerms; }>