Deserializes proofs from JSON back into typed Proof objects, restoring amount as bigint without silent precision loss.
amount
bigint
string[]
string
// NutZap proof tags const proofs = deserializeProofs( event.tags.filter((t) => t[0] === 'proof').map((t) => t[1]), ); // localStorage const proofs = deserializeProofs(JSON.parse(localStorage.getItem('proofs') ?? '[]')); Copy
// NutZap proof tags const proofs = deserializeProofs( event.tags.filter((t) => t[0] === 'proof').map((t) => t[1]), ); // localStorage const proofs = deserializeProofs(JSON.parse(localStorage.getItem('proofs') ?? '[]'));
Deserializes proofs from JSON back into typed Proof objects, restoring
amountasbigintwithout silent precision loss.string[](individual proof JSON strings) when reading from NutZap proof tags or a database.string(a JSON array) when reading from a single stored blob e.g. localStorage.