Skip to main content

Module types

Module types 

Source
Expand description

Request/response wire types for every DIG-node RPC method.

Each type is serde-derived and models a method’s params or result field-for-field with the canonical implementation (the digstore dig-node crate). Fields that appear only in one profile or only on the first window of a paged stream are Option and doc-flagged.

Hex-encoded identifiers (store_id, root, retrieval_key, peer_id) are carried as String on the wire — lower-case 64-hex — because the interface crate does no crypto and imposes no byte-array dependency. Callers validate length/charset at their boundary.

§Two content profiles, one chunk type

ContentChunk models both the node profile (dig.getContent on the local dig-node) and the network profile (rpc.dig.net). The network-profile-only fields — total_length, length, program_hash, offset — are Option so one type serves both surfaces with no silent split.

Structs§

AnchoredRoot
Result for dig.getAnchoredRoot — the store’s current chain-anchored tip root.
AnnounceAck
Result for dig.announce.
AnnounceParams
Params for dig.announce.
AvailabilityAnswer
One availability answer. Only the fields relevant to the query’s granularity are populated.
AvailabilityBatch
Result for dig.getAvailability — one answer per query item, in order.
AvailabilityQuery
One availability query item. Granularity is inferred from which fields are present: store_id only ⇒ which roots are held; +root ⇒ a capsule; +root +retrieval_key ⇒ a resource.
CacheConfig
Result for cache.getConfig.
CacheStats
Result for cache.stats — cache telemetry beside cache.getConfig: the reserved cap + live usage, the cached-capsule count + total on-disk bytes, and the session eviction + content-cache counters.
CachedCapsule
One durable cached-module entry.
CachedList
Result for cache.listCached.
CapsuleKey
Params for a capsule-keyed cache op (cache.removeCached, cache.fetchAndCache).
Collection
Result for dig.getCollection — collection-level facts computed from DIG’s own coinset data.
CollectionItem
One resolved collection item — its current on-chain owner, royalty, and CHIP-0007 metadata.
CollectionItemsPage
Result for dig.listCollectionItems — a page of resolved items.
ContentCacheCounters
The decoded-content cache hit/miss counters carried in CacheStats.
ContentChunk
One window of a resource’s ciphertext — the chunk wire object.
ContentRef
The content item a redirect points at: store_id [+ root [+ retrieval_key]], each lower-case 64-hex — the exact item to re-request.
FetchAndCacheResult
Result for cache.fetchAndCache.
FetchRangeParams
Params for dig.fetchRange — a single range frame of a resource this node holds.
GetAnchoredRootParams
Params for dig.getAnchoredRoot.
GetAvailabilityParams
Params for dig.getAvailability.
GetCollectionParams
Params for dig.getCollection.
GetContentParams
Params for dig.getContent — a verified resource-window read.
Health
Result for dig.health — liveness + a capability summary.
ListCollectionItemsParams
Params for dig.listCollectionItems.
ListInventoryParams
Params for dig.listInventory.
Methods
Result for dig.methods — the method names this node implements (agent self-describe).
NetworkInfo
Result for dig.getNetworkInfo — this node’s own peer-network posture.
NftMetadata
CHIP-0007 NFT metadata for one collection item.
PeerAddress
A peer’s dialable network endpoint.
PeerConnectParams
Params for control.peers.connect and control.peers.disconnect.
PeerConnectResult
Result for control.peers.connect.
PeerDisconnectResult
Result for control.peers.disconnect.
PeerStatusSnapshot
Result for control.peerStatus — a snapshot of the node’s L7 peer network. Always safe to call; reports running: false on the FFI path.
PeersList
Result for dig.getPeers — the peers this node currently knows (peer exchange over RPC).
Provider
A content provider: a holder’s stable peer_id plus its candidate addresses.
RangeFrame
One range frame of a resource. The first frame (offset == 0) carries the per-resource verification metadata; later frames carry only the window.
RedirectInfo
The error.data.redirect payload of a ContentRedirect (-32008).
RelayStatus
The node’s relay reservation posture.
RemoveCachedResult
Result for cache.removeCached.
SetCapBytesParams
Params for cache.setCapBytes.
SetCapBytesResult
Result for cache.setCapBytes.
StageParams
Params for dig.stage — compile a local folder into a capsule .dig module in-process.
StageResult
Result for dig.stage — the compiled capsule.
SubscribeParams
Params for control.subscribe and control.unsubscribe.
SubscribeResult
Result for control.subscribe.
SubscriptionsList
Result for control.listSubscriptions.
UnsubscribeResult
Result for control.unsubscribe.

Enums§

Inventory
Result for dig.listInventory.

Type Aliases§

HexId
A lower-case 64-hex identifier on the wire (e.g. a store_id, root, retrieval_key, or peer_id). A type alias for documentation; validation is the boundary’s job.