Skip to main content

EdgeSeller

@totemsdk/edge


@totemsdk/edge / EdgeSeller

Interface: EdgeSeller

Properties

engine

engine: NegotiationEngine

The underlying engine (advanced use / recovery).

Methods

getState()

getState(negotiationId): Promise<NegotiationState | undefined>

Get current negotiation state.

Parameters

negotiationId

string

Returns

Promise<NegotiationState | undefined>


handleInbound()

handleInbound(message, context): Promise<ReplayOutcome>

Handle a single authenticated inbound message (advanced use).

Parameters

message

NegotiationMessage

context

TransportMessageContext

Returns

Promise<ReplayOutcome>


issueChallenge()

issueChallenge(negotiationId): Promise<WorkRequired>

Issue a WorkRequired challenge for the next round (advanced use).

Parameters

negotiationId

string

Returns

Promise<WorkRequired>


openNegotiation()

openNegotiation(opts): Promise<NegotiationRecord>

Open a negotiation locally in response to a buyer request (advanced use).

Parameters

opts
counterparty

string

expiresAt?

number

manifestId

string

negotiationId

string

Returns

Promise<NegotiationRecord>


subscribe()

subscribe(transport): Promise<() => void>

Subscribe to a negotiation transport.

Parameters

transport

NegotiationTransport

Returns

Promise<() => void>