EdgeRuntime
@totemsdk/edge / EdgeRuntime
Interface: EdgeRuntime
Properties
capabilities
capabilities:
EdgeCapabilitySet
deviceId
deviceId:
string
ports
ports:
EdgeRuntimePorts
version
version:
number
Methods
assertCapability()
assertCapability(
cap):void
Parameters
cap
Returns
void
executeAction()
executeAction(
params):Promise<EdgeActionResult>
Execute an action through the runtime.
If a policy port is configured, the action is first checked against it. If the policy rejects the action, execution is blocked and the rejection reason is returned.
The action string determines which port handles execution:
- 'payment:*' → EdgePaymentPort.pay()
- 'lookup:*' → EdgeLookupPort.query() / announce()
- 'proof:*' → EdgeProofPort.createProof() / verifyProof()
- 'intelligence:*' → EdgeIntelligencePort.invoke() / cancel()
Unknown action strings return an error without attempting execution.
Parameters
params
EdgeActionParams
Returns
Promise<EdgeActionResult>
hasCapability()
hasCapability(
cap):boolean
Parameters
cap
Returns
boolean