Skip to content

Commit

Permalink
docs: add docs for asset lock proofs
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Oct 20, 2023
1 parent b7d8afc commit fbf540d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ pub use bincode::{Decode, Encode};
use dashcore::consensus::Encodable;
use dashcore::OutPoint;

/// Instant Asset Lock Proof is a part of Identity Create and Identity Topup
/// transitions. It is a proof that specific output of dash is locked in credits
/// pull and the transitions can mint credits and populate identity's balance.
/// To prove that the output is locked, a height where transaction was chain locked is provided.
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ChainAssetLockProof {
/// Core height on which the asset lock transaction was chain locked or higher
pub core_chain_locked_height: u32,
/// A reference to Asset Lock Special Transaction ID and output index in the payload
pub out_point: OutPoint,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@ use crate::util::vec::vec_to_array;
use crate::validation::SimpleConsensusValidationResult;
use crate::ProtocolError;

/// Instant Asset Lock Proof is a part of Identity Create and Identity Topup
/// transitions. It is a proof that specific output of dash is locked in credits
/// pull and the transitions can mint credits and populate identity's balance.
/// To prove that the output is locked, an Instant Lock is provided.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct InstantAssetLockProof {
/// The transaction's Instant Lock
instant_lock: InstantLock,
/// Asset Lock Special Transaction
transaction: Transaction,
/// Index of the output in the transaction payload
output_index: u32,
}

Expand Down

0 comments on commit fbf540d

Please sign in to comment.