@lelantos-org/sdk / protocol / verifyPaymentProof
Function: verifyPaymentProof()
ts
function verifyPaymentProof(args): Promise<PaymentProofResult>;Defined in: @lelantos-org/sdk/dist/bundle/payment-proof.d.ts:115
Verify a sender's PaymentProof for a payment to recipient, against the chain reader reads.
Resolves the asset and value paid, and the memo sent with them, when the proof holds, and the reason when it does not. Needs no key: only the payee's address, which the party asking for proof already has.
ts
const result = await verifyPaymentProof({ proof, recipient: payeeAddress, reader });
if (result.ok) console.log(result.asset, result.value);Parameters
| Parameter | Type | Description |
|---|---|---|
args | { proof: PaymentProof; reader: PaymentProofReader; recipient: string; } | - |
args.proof | PaymentProof | - |
args.reader | PaymentProofReader | - |
args.recipient | string | The payee's shielded address. |
Returns
Promise<PaymentProofResult>
Throws
for a malformed recipient, or a reader that cannot read NotePayload logs.