Cashu-TS - v4.13.1
    Preparing search index...

    Function serializeProofs

    • Serializes one or more Proof objects to an array of individual JSON strings, one per proof. Amounts are written as JSON numbers without precision loss (plain JSON.stringify quotes them).

      Parameters

      Returns string[]

      // NutZap proof tags
      const proofTags = serializeProofs(proofs).map((s) => ['proof', s]);

      // localStorage
      localStorage.setItem('proofs', JSON.stringify(serializeProofs(proofs)));