@orangecheck/pledge-core / wrapOutcomeEnvelope
Function: wrapOutcomeEnvelope()
function wrapOutcomeEnvelope(input: OutcomeCanonicalInput, sigValue?: string): OutcomeEnvelope;
Defined in: pledge-core/src/outcome.ts:127
Build an outcome envelope from a canonical input + an optional externally-
obtained BIP-322 signature. Companion to createOutcome for external-sig
flows.
Discriminator (SPEC §4.3):
- resolved_by === "deterministic": pass
sigValue=undefined. Envelope.sig will be null. - resolved_by === <address>: pass
sigValue(the BIP-322 over the lowercase-hex outcome id). Envelope.sig.pubkey defaults toresolved_by.
Throws PledgeError on invalid input or sig/no-sig mismatch with the deterministic discriminator.
Parameters
| Parameter | Type |
|---|---|
input | OutcomeCanonicalInput |
sigValue? | string |