Skip to main content

CreateEdgeOptions

@totemsdk/edge


@totemsdk/edge / CreateEdgeOptions

Interface: CreateEdgeOptions

Properties

adapters

adapters: ResourceAdapter[]

Resource adapters.


authority

authority: EdgeAuthorityPort

Authority / policy approval.


commerceStore?

optional commerceStore?: object

Aggregated durable commerce store (negotiations + purchases + replay + principals + outbox in one physical backend). When supplied, it takes precedence over the individual store options. A SQLiteCommerceStore from @totemsdk/edge-adapters is the production reference.

negotiations

negotiations: NegotiationStore

outbox

outbox: OutboxStore

principals

principals: PrincipalNegotiationStore

purchases

purchases: PurchaseStore

replay

replay: ReplayLedger


hashRatePerSec?

optional hashRatePerSec?: number

Hash rate for work estimation.


lookup

lookup: EdgeLookupPort

Lookup port.


minimaRelay?

optional minimaRelay?: MinimaWorkRelay

Minima block relay (optional — commerce still works without it).


negotiationLimits?

optional negotiationLimits?: Partial<NegotiationLimits>

Negotiation limits.


negotiationStore?

optional negotiationStore?: NegotiationStore

Durable negotiation store (optional — in-memory dev mode).


negotiationTransport?

optional negotiationTransport?: NegotiationTransport

Authenticated negotiation transport (optional — local/programmatic only).


now?

optional now?: () => number

Current time (for deterministic tests).

Returns

number


onEvent?

optional onEvent?: (event) => void

Event sink.

Parameters

event

PurchaseEvent

Returns

void


outboxStore?

optional outboxStore?: OutboxStore

Durable outbox store (optional — in-memory dev mode).


payment

payment: EdgePaymentPort

Payment port (idempotent).


persistence?

optional persistence?: "ephemeral" | "durable"

Explicit persistence mode. When 'ephemeral' (or when durable stores are not supplied), the runtime emits runtime.persistence_ephemeral on startup so operators never mistake dev mode for crash guarantees.


principal

principal: string

Authenticated principal (root identity) that owns this runtime.


principalStore?

optional principalStore?: PrincipalNegotiationStore

Durable principal anti-abuse store (optional — in-memory dev mode).


purchaseStore?

optional purchaseStore?: PurchaseStore

Durable purchase store (optional — in-memory dev mode).


replayLedger?

optional replayLedger?: ReplayLedger

Replay ledger (optional — in-memory dev mode).


seller?

optional seller?: object

Seller-side negotiation service configuration. When supplied, the runtime also operates as a supply-side counterpart for inbound negotiation messages.

manifest?

optional manifest?: SignedManifest<Manifest>

Standing service manifest (used to compute manifestId for opened negotiations).

strategy

strategy: SellerStrategy

Seller bargaining strategy.


sign

sign: Signer

Signature creation (WOTS).


templateProvider?

optional templateProvider?: MinimaWorkTemplateProvider

Minima work template provider (optional — work-disabled if omitted).


verifySignature

verifySignature: SignatureVerifier

Signature verification (WOTS).


workBudget?

optional workBudget?: LocalWorkBudget

Local work budget.


workDifficulty?

optional workDifficulty?: WorkDifficultyPolicy

Work difficulty policy.


workMode?

optional workMode?: WorkMode

Work mode. Defaults to 'disabled' when no template provider is supplied.