sigil-core · storage_market
Source declarations, signatures and documentation for storage_market.
Source: sigil/node/sigil-core/src/storage_market.rs. SHA-256: 423eedc2098d3b9bda69c29223e375497766d4b7a0645e7732989979cb49d601.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
storage_market::STORAGE_PROVIDER_ID_DOMAIN
pub const STORAGE_PROVIDER_ID_DOMAIN: &[u8];Source line: 10.
storage_market::STORAGE_PIN_REQUEST_ID_DOMAIN
pub const STORAGE_PIN_REQUEST_ID_DOMAIN: &[u8];Source line: 11.
storage_market::STORAGE_CONTRACT_ID_DOMAIN
pub const STORAGE_CONTRACT_ID_DOMAIN: &[u8];Source line: 12.
storage_market::STORAGE_RECEIPT_HASH_DOMAIN
pub const STORAGE_RECEIPT_HASH_DOMAIN: &[u8];Source line: 13.
storage_market::STORAGE_CHALLENGE_ID_DOMAIN
pub const STORAGE_CHALLENGE_ID_DOMAIN: &[u8];Source line: 14.
storage_market::STORAGE_EVENT_DOMAIN
pub const STORAGE_EVENT_DOMAIN: &[u8];Source line: 15.
storage_market::storage_pin_request_id
pub fn storage_pin_request_id(
chain_id: &str,
owner_did: &str,
artifact: &ArtifactCommitment,
duration_epochs: u64,
replication_factor: u16,
client_nonce: &str,
) -> Result<String, CoreError>;Source line: 34.
storage_market::storage_contract_id
pub fn storage_contract_id(
chain_id: &str,
request_id: &str,
provider_did: &str,
) -> Result<String, CoreError>;Source line: 79.
storage_market::storage_challenge_id
pub fn storage_challenge_id(
chain_id: &str,
contract_id: &str,
opened_at_height: u64,
client_nonce: &str,
) -> Result<String, CoreError>;Source line: 101.
storage_market::StorageProviderStatus
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum StorageProviderStatus {
Active,
Suspended,
Exiting,
}Source line: 127.
storage_market::StoragePinStatus
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum StoragePinStatus {
Open,
Accepted,
Pinned,
Settled,
Cancelled,
Expired,
Challenged,
Slashed,
}Source line: 135.
storage_market::StorageChallengeStatus
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum StorageChallengeStatus {
Open,
Proved,
Failed,
Dismissed,
}Source line: 148.
storage_market::StorageProviderRecord
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageProviderRecord {
pub provider_did: String,
pub capacity_gib: u64,
pub regions: Vec<String>,
pub price_per_gib_epoch: u64,
pub retrieval_price_per_gib: u64,
pub replication_guarantee: u16,
pub stake: u64,
pub provider_pubkey: Vec<u8>,
pub status: StorageProviderStatus,
pub registered_at_height: u64,
pub updated_at_height: u64
}Source line: 156.
storage_market::StorageProviderRecord::validate
pub fn validate(&self) -> Result<(), CoreError>;Source line: 171.
storage_market::StoragePinRequest
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StoragePinRequest {
pub request_id: String,
pub owner_did: String,
pub artifact: ArtifactCommitment,
pub duration_epochs: u64,
pub replication_factor: u16,
pub max_price_per_gib_epoch: u64,
pub escrowed_amount: u64,
pub accepted_contracts: Vec<String>,
pub status: StoragePinStatus,
pub created_at_height: u64,
pub expires_at_height: Option<u64>
}Source line: 198.
storage_market::StoragePinRequest::validate
pub fn validate(&self) -> Result<(), CoreError>;Source line: 213.
storage_market::StoragePinContract
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StoragePinContract {
pub contract_id: String,
pub request_id: String,
pub provider_did: String,
pub owner_did: String,
pub artifact: ArtifactCommitment,
pub duration_epochs: u64,
pub replication_factor: u16,
pub accepted_price_per_gib_epoch: u64,
pub escrowed_amount: u64,
pub paid_amount: u64,
pub status: StoragePinStatus,
pub accepted_at_height: u64,
pub settled_at_epoch: Option<u64>,
pub challenge_window_until_height: Option<u64>
}Source line: 236.
storage_market::StorageProofPosition
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum StorageProofPosition {
Left,
Right,
}Source line: 255.
storage_market::StorageProofSibling
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageProofSibling {
pub position: StorageProofPosition,
pub hash: SigilHash
}Source line: 261.
storage_market::StorageChunkProof
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageChunkProof {
pub sample_index: u64,
pub leaf_hash: SigilHash,
pub siblings: Vec<StorageProofSibling>
}Source line: 267.
storage_market::StorageChallengeProof
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageChallengeProof {
pub challenge_nonce: SigilHash,
pub chunk_proofs: Vec<StorageChunkProof>
}Source line: 274.
storage_market::StorageChallengeProof::verify_against_weft
pub fn verify_against_weft(&self, artifact: &ArtifactCommitment) -> Result<bool, CoreError>;Source line: 280.
storage_market::verify_weft_chunk_proof
pub fn verify_weft_chunk_proof(
root: SigilHash,
leaf: SigilHash,
leaf_index: u64,
leaf_count: u64,
siblings: &[StorageProofSibling],
) -> bool;Source line: 317.
storage_market::StoragePinReceipt
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StoragePinReceipt {
pub receipt_id: String,
pub contract_id: String,
pub provider_did: String,
pub artifact: ArtifactCommitment,
pub pinned_root_cid: String,
pub settled_epoch: u64,
pub price_paid: u64,
pub proof: StorageChallengeProof,
pub receipt_hash: SigilHash,
pub provider_signature: Vec<u8>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub signer_pubkey: Option<Vec<u8>>
}Source line: 360.
storage_market::StoragePinReceipt::compute_receipt_hash
pub fn compute_receipt_hash(&self) -> SigilHash;Source line: 376.
storage_market::StoragePinReceipt::verify_hash
pub fn verify_hash(&self) -> bool;Source line: 395.
storage_market::StorageChallengeRecord
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageChallengeRecord {
pub challenge_id: String,
pub contract_id: String,
pub challenger_did: String,
pub provider_did: String,
pub challenge_nonce: SigilHash,
pub sample_indices: Vec<u64>,
pub status: StorageChallengeStatus,
pub opened_at_height: u64,
pub response_due_height: u64,
pub resolved_at_height: Option<u64>
}Source line: 401.
storage_market::StorageProviderRegisterData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageProviderRegisterData {
pub provider_did: String,
pub capacity_gib: u64,
pub regions: Vec<String>,
pub price_per_gib_epoch: u64,
pub retrieval_price_per_gib: u64,
pub replication_guarantee: u16,
pub stake: u64,
pub provider_pubkey: Vec<u8>,
pub client_nonce: String
}Source line: 415.
storage_market::StorageProviderUpdateData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageProviderUpdateData {
pub provider_did: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub capacity_gib: Option<u64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub regions: Option<Vec<String>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub price_per_gib_epoch: Option<u64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub retrieval_price_per_gib: Option<u64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub replication_guarantee: Option<u16>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub provider_pubkey: Option<Vec<u8>>,
pub client_nonce: String
}Source line: 428.
storage_market::StorageProviderExitData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageProviderExitData {
pub provider_did: String,
pub client_nonce: String
}Source line: 446.
storage_market::StoragePinRequestData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StoragePinRequestData {
pub owner_did: String,
pub artifact: ArtifactCommitment,
pub duration_epochs: u64,
pub replication_factor: u16,
pub max_price_per_gib_epoch: u64,
pub escrowed_amount: u64,
pub expires_at_height: Option<u64>,
pub client_nonce: String
}Source line: 452.
storage_market::StoragePinAcceptData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StoragePinAcceptData {
pub request_id: String,
pub provider_did: String,
pub accepted_price_per_gib_epoch: u64,
pub client_nonce: String
}Source line: 464.
storage_market::StorageReceiptSettleData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageReceiptSettleData {
pub receipt: StoragePinReceipt
}Source line: 472.
storage_market::StorageChallengeData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageChallengeData {
pub contract_id: String,
pub challenger_did: String,
pub sample_indices: Vec<u64>,
pub response_window_blocks: u64,
pub client_nonce: String
}Source line: 477.
storage_market::StorageChallengeResolveData
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct StorageChallengeResolveData {
pub challenge_id: String,
pub proof: StorageChallengeProof
}Source line: 486.