Expert path

surface

Expert surface

Expert gives the same cryptographic act an execution lens. It's the level for staging new flows, debugging policies, inspecting publication gates, and exporting evidence.

Expert surfaces domain namespaces: expert.signatures, expert.wallets, expert.transactions, expert.transfers, expert.devices, expert.backups, expert.sync, expert.diagnostics, expert.policies, and expert.runtime. Each namespace gives operations tooling explicit control over one operation class — the same runtime as Hero, but with full parameter visibility and no intent-level abstraction.

The prepare-inspect-run-export lifecycle is the designed Expert flow for deeper inspection; the domain namespaces are the current wiring. All Expert results return DvmOp<Receipt>, and the progress stream works the same way as it does on Hero — making it equally usable in support tools that need to observe execution phase by phase.

API reference

Call contracts

Each call should name when to use it, what it accepts, what it returns, how it fails, and which evidence it leaves behind.

expert.signatures.signDigest(request)

Use whenOps tooling needs explicit control over the signing operation.
InputkeyId, digest, lane, policy, participants, idempotencyKey
ReturnsSignatureOperation -> SignatureReceipt
Fails withPOLICY_DENIED, PEER_UNAVAILABLE, BOUNDARY_UNAVAILABLE
EvidencepolicyReceiptId, signature, keyId; progress stream emits phase states

expert.devices.list() / approveJoin / revoke

Use whenDevice management — list enrolled devices, approve join requests, revoke access.
InputlogicalDeviceId, reason, idempotencyKey (revoke); JoinDeviceRequest (approveJoin)
ReturnsDvmDeviceIdentity / DvmDeviceRecord[] / RevokeDeviceResult
Fails withPOLICY_DENIED, BOUNDARY_UNAVAILABLE
EvidencedeviceIdentity, peerId, rosterHash, activationEpoch

expert.diagnostics.auditTrail() / snapshot()

Use whenSupport and audit workflows need a durable record of policy decisions and sync state.
Inputlimit (optional)
ReturnsAuditEvent[] / DvmDiagnosticsSnapshot
Fails withstorage not configured
Evidencepolicy_evaluated events with operationClass, custody, intent, approved, publicFields

expert.policies.evaluate(request)

Use whenTest a policy rule against a real request without executing the operation.
InputDvmPolicyEvaluationRequest with operationClass, custody, intent, requireUserPresence
ReturnsDvmPolicyReceipt
Fails withpolicyProvider throws
Evidenceapproved, reason, operationClass, custody, policyReceiptId; appended to audit trail

When to use Expert

Use Expert in staging, support tooling, internal workbenches, and release reviews. Route through expert.signatures.signDigest(request) for controlled sign operations, expert.devices.list() to inspect enrolled devices, expert.diagnostics.auditTrail() to pull the policy audit log, and expert.policies.evaluate(request) to test a policy rule against a real request without executing the operation. The sync and runtime namespaces belong in node management flows and FFI-level debugging.

Expert namespace shape
swift
// Signing through Expert namespace
let signOp = try await sdk.expert.signatures.signDigest(request)

for await progress in signOp.progress {
    switch progress {
    case .waitingForPeers(let peers):
        print("Waiting on \(peers.count) peers")
    case .pendingPhase(let phase, let admitted, let expected):
        print("Phase \(phase): \(admitted)/\(expected)")
    default: break
    }
}

let receipt = try await signOp.awaitReceipt()

// Diagnostics and audit
let auditTrail = try await sdk.expert.diagnostics.auditTrail()
let snapshot = try await sdk.expert.diagnostics.snapshot()

// Policy evaluation without executing
let policyReceipt = try await sdk.expert.policies.evaluate(policyRequest)

What Expert makes visible

Expert preserves the same secret boundary: it exposes operation class parameters explicitly, routes to the same bridge, and emits the same receipt shape Hero uses — but with the domain structure that makes each operation class individually addressable. Three calls are outside the supported surface: expert.backups.recover(), expert.operations.cancel(), and expert.operations.resume() throw DvmBridgeError.unsupported. The supported recovery path is the runtime reshare mechanism.