#[non_exhaustive]pub enum ControlMethod {
Show 34 variants
Status,
ConfigGet,
ConfigSetUpstream,
LogSetLevel,
CacheGet,
CacheSetCap,
CacheClear,
HostedStoresList,
HostedStoresPin,
HostedStoresUnpin,
HostedStoresStatus,
SyncStatus,
SyncTrigger,
UpdaterStatus,
UpdaterSetChannel,
UpdaterPause,
UpdaterResume,
UpdaterCheckNow,
PairingList,
PairingApprove,
PairingRevoke,
PeerStatus,
PeersConnect,
PeersDisconnect,
Subscribe,
Unsubscribe,
ListSubscriptions,
WalletBalance,
WalletCoins,
WalletCoinById,
WalletPeak,
WalletBroadcast,
PairingRequest,
PairingPoll,
}Expand description
A dig-node CONTROL method.
#[non_exhaustive] so adding a method in a minor release is additive; downstream matches must
carry a _ => … arm. Convert to/from the wire name with ControlMethod::name /
ControlMethod::from_name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Status
control.status — a rich node status snapshot.
ConfigGet
control.config.get — the node’s effective configuration.
ConfigSetUpstream
control.config.setUpstream — persist an upstream-RPC override (effective on restart).
LogSetLevel
control.log.setLevel — live-swap the running node’s tracing level filter.
CacheGet
control.cache.get — the on-disk cache view (cap/used/dir/shared).
CacheSetCap
control.cache.setCap — set the cache size cap (floored at 64 MiB).
CacheClear
control.cache.clear — delete all locally cached content.
HostedStoresList
control.hostedStores.list — every held/pinned store with its cached capsules.
HostedStoresPin
control.hostedStores.pin — pin a store (and pre-fetch when a root is given).
HostedStoresUnpin
control.hostedStores.unpin — unpin a store and evict its cached capsules.
HostedStoresStatus
control.hostedStores.status — per-store pinned flag + cached capsules.
SyncStatus
control.sync.status — whether authenticated whole-store sync is available + pin coverage.
SyncTrigger
control.sync.trigger — trigger a §21 sync for one capsule (storeId + root).
UpdaterStatus
control.updater.status — the DIG auto-update beacon’s current status.
UpdaterSetChannel
control.updater.setChannel — set the beacon’s update channel.
UpdaterPause
control.updater.pause — suspend auto-updates (optionally until a unix time).
UpdaterResume
control.updater.resume — resume auto-updates.
UpdaterCheckNow
control.updater.checkNow — force an immediate update check.
PairingList
control.pairing.list — list pending pairing requests + issued paired tokens.
PairingApprove
control.pairing.approve — approve a pending pairing, minting a scoped token.
PairingRevoke
control.pairing.revoke — revoke an issued paired token.
PeerStatus
control.peerStatus — live peer-pool + relay-reservation snapshot.
PeersConnect
control.peers.connect — dial a peer by address / resolve a connected peer_id.
PeersDisconnect
control.peers.disconnect — drop a pooled peer by peer_id.
Subscribe
control.subscribe — subscribe the node to a store (watch + gap-fill).
Unsubscribe
control.unsubscribe — stop watching a store.
ListSubscriptions
control.listSubscriptions — the node’s persisted subscription set.
WalletBalance
control.wallet.balance — read an address’s confirmed spendable balance for an asset.
WalletCoins
control.wallet.coins — read an address’s spendable coin records for an asset.
WalletCoinById
control.wallet.coinById — read ONE coin record by coin id, spent or unspent.
WalletPeak
control.wallet.peak — read the node’s current chain peak height.
WalletBroadcast
control.wallet.broadcast — push an ALREADY-SIGNED spend bundle to the network.
PairingRequest
pairing.request — request a control-token pairing (returns a code to compare).
PairingPoll
pairing.poll — poll a pairing; once the operator approves, returns the scoped token once.
Implementations§
Source§impl ControlMethod
impl ControlMethod
Sourcepub const ALL: &'static [ControlMethod]
pub const ALL: &'static [ControlMethod]
Every catalogued method, in a stable order — the enumeration a machine reads to discover the full control surface, and the anchor the conformance KATs pin against.
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The stable JSON-RPC wire name. Never derived from anything else — the published contract.
Sourcepub fn from_name(name: &str) -> Option<ControlMethod>
pub fn from_name(name: &str) -> Option<ControlMethod>
Resolve a wire name back to its ControlMethod, or None for an unknown name.
Sourcepub const fn requires_auth(self) -> bool
pub const fn requires_auth(self) -> bool
Does calling this method require the local control token?
Three groups are reachable WITHOUT one, and they are open for two different reasons:
- the pairing bootstrap (
pairing.request/pairing.poll), so a token-less client can obtain a token at all; - the wallet CHAIN READS (
Category::Walletminus the push), because each needs only PUBLIC chain data — an address, or a coin id oncontrol.wallet.coinById; never a seed, a key, or a signature — and dig-node has servedcontrol.wallet.balanceopen since #1851. A person whose node runs as a service with an unreadable token file can still see their own money.
control.wallet.broadcast is deliberately NOT in that second group. It puts bytes on the
network, so the token is what stands between a local process and a broadcast, and its
refusal genuinely means unauthorized — see ControlMethod::is_open_read.
Sourcepub const fn is_open_read(self) -> bool
pub const fn is_open_read(self) -> bool
Is this an OPEN chain read — served without a control token?
Stated on the contract rather than discovered by calling, because the two refusals a client
can get here demand OPPOSITE remedies. On an open read, UNAUTHORIZED can only come from a
node build that predates the method and gates it generically, so the remedy is an upgrade.
On a gated method — the push — UNAUTHORIZED means exactly what it says, and the remedy is
the token. A client that maps the two the same way sends somebody to fix the wrong thing.
Sourcepub const fn is_pairing_admin(self) -> bool
pub const fn is_pairing_admin(self) -> bool
Is this a PAIRING-ADMINISTRATION method that requires the MASTER control token specifically?
A paired (scoped) token can drive ordinary control.* mutations but MUST NOT mint more
tokens or revoke itself — so listing/approving/revoking pairings requires the master token
(a local file read), never a paired token.
Trait Implementations§
Source§impl Clone for ControlMethod
impl Clone for ControlMethod
Source§fn clone(&self) -> ControlMethod
fn clone(&self) -> ControlMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more