const result = await client.store(
{
collection: 'posts',
data: [{
title: 'My First Post',
content: 'Stored on blockchain!',
author: 'alice'
}]
},
// Payment callback - SDK invokes this when server requires payment
async (quote) => {
const txHash = await processPayment(quote);
return {
txHash,
network: quote.network,
sender: walletAddress,
chainType: quote.chainType,
paymentMethod: 'native'
};
},
true // waitForConfirmation
);
console.log(`Confirmed at block ${result.block_height}`);