API Reference
API Reference
Endpoint
Method
Parameters
Returns
Description
Example Usage: Create, Spend, and Verify
// 1. Create a private note
const note = await logia.createNote('USDC', 10.0);
// 2. Generate a proof for payment
const proof = await logia.generateProof(note, recipientAddress);
// 3. Send a private transaction
const tx = await logia.sendPrivate({
note,
to: recipientAddress,
amount: 5.25
});
console.log('Transaction submitted:', tx.hash);
// 4. Verify the proof (merchant or agent)
const isValid = await logia.verifyProof(proof);
console.log('Payment valid?', isValid);Last updated