pub fn create_did(
ctx: &mut SpendContext,
funding_coin: Coin,
owner: Owner,
recovery_list_hash: Option<Bytes32>,
num_verifications_required: u64,
metadata: HashedPtr,
) -> DidResult<DidSpend>Expand description
Mints a brand-new DID, fully settled and wallet-parseable, from a funding coin.
Spends funding_coin (owned by owner) to create the launcher, launches the eve DID with the
given recovery configuration and metadata, then performs the owner-update (“settle”) spend that
confirms the DID for wallets. Returns a DidSpend whose child is the fully-created,
spendable Did.
§Signature
Two AGG_SIG_ME signatures are required, both under whichever key/spend owner names
(SPEC §3): one over the funding-coin spend (which creates the launcher) and one over the settle
spend (which confirms the DID for wallets). Both are coin-bound AGG_SIG_ME, never AGG_SIG_UNSAFE.
§Errors
Propagates any chia-wallet-sdk driver failure (currying, spend construction) as
crate::DidError::Driver.
§Owner::Custom
When using Owner::Custom(spend), the ONE caller-supplied inner spend is used for BOTH the
funding-coin spend and the settle spend. The caller is responsible for ensuring the custom spend
emits all conditions needed to satisfy both steps; conditions are not added by dig-did for a
custom spend. A custom create-spend that omits required conditions will fail closed with a parse
error, never a custody leak.