Cashu-TS - v4.0.0-rc3
    Preparing search index...

    Function serializeProofs

    • Serializes one or more Proof objects to an array of individual JSON strings, one per proof. BigInt amount fields are emitted as plain JSON numbers without precision loss.

      Parameters

      Returns string[]

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

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