live · mainnetoc · docs
specs · api · guides
docs / documentation

@orangecheck/pledge-core


@orangecheck/pledge-core / wrapAbandonmentEnvelope

Function: wrapAbandonmentEnvelope()

function wrapAbandonmentEnvelope(
   input: AbandonmentCanonicalInput, 
   sigValue: string, 
   swearerAddress: string): AbandonmentEnvelope;

Defined in: pledge-core/src/abandonment.ts:77

Build an abandonment envelope from a canonical input + an externally- obtained BIP-322 signature. Companion to createAbandonment for external-sig flows.

The caller must:

  • Compute the id via computeAbandonmentId(input) first.
  • Sign the lowercase-hex id with the original pledge's swearer key (SPEC §5.3 — abandonments are principal-only; agents MUST NOT sign).
  • Pass swearerAddress as the address that signed.

Parameters

ParameterType
inputAbandonmentCanonicalInput
sigValuestring
swearerAddressstring

Returns

AbandonmentEnvelope