pub type Did = Singleton<DidInfo>;Expand description
Contains all information needed to spend the outer puzzles of DID coins.
The DidInfo is used to construct the puzzle, but the Proof is needed for the solution.
The only thing missing to create a valid coin spend is the inner puzzle and solution. However, this is handled separately to provide as much flexibility as possible.
This type should contain all of the information you need to store in a database for later. As long as you can figure out what puzzle the p2 puzzle hash corresponds to and spend it, you have enough information to spend the DID coin.
Aliased Type§
pub struct Did {
pub coin: Coin,
pub proof: Proof,
pub info: DidInfo,
}Fields§
§coin: CoinThe coin that this [Singleton] represents. Its puzzle hash should match the singleton outer puzzle hash.
proof: ProofThe proof is needed by the singleton puzzle to prove that this coin is a legitimate singleton. It’s typically obtained by looking up and parsing the parent coin.
Note that while the proof will be a [LineageProof] for most coins,
for the first singleton in the lineage it will be an EveProof instead.
However, the eve coin is typically unhinted and spent in the same transaction as it was created,
so this is not relevant for database storage or syncing unspent coins.
info: DidInfoThe information needed to construct the outer puzzle.