DEVELOPER DOCS
Transaction mode

Transaction mode

Transaction mode gives you more fine-grained control over the upload workflow. You can create and sign your transaction first, store it, and then upload when it makes the most sense for your application.

uploadTransaction()

uploader = irys.uploader.chunkedUploader; // Recreate for each transaction
const transaction = irys.createTransaction("Hello, world!");
await transaction.sign();
response = await uploader.uploadTransaction(transaction);
console.log(`Transaction mode uploaded ==> https://gateway.irys.xyz/${response.data.id}`);