Skip to content

Quickstart

Get up and running in under five minutes. Pick the workflow that suits you:

  1. REST API File Upload
    Send a file, fetch it instantly from our testnet, then finalize permanent storage with a single payment.
  2. JavaScript SDK Bundles
    Install @liteseed/sdk, sign your data-item, and post & pay in one atomic call.

Follow the detailed steps below to complete each method.

  1. Send your file

    Terminal window
    curl -X POST https://api.liteseed.xyz/upload \
    -H 'Content-Type: multipart/form-data' \
    -F 'file=@/path/to/your/file'
  2. Receive an upload ID

    { "id": "1234567890" }
  3. Fetch your file (available immediately, stored on Liteseed testnet for 10 blocks):

    Terminal window
    curl -X GET https://api.liteseed.xyz/data/1234567890 \
    -H 'Mime-Type: application/octet-stream'
  4. Finalize storage After reviewing, pay the bundle fee to commit your data permanently on Arweave:

    Terminal window
    curl -X POST https://api.liteseed.xyz/payment/1234567890 \
    -H 'Content-Type: application/json' \
    -d '{ "payment_id": "2322323232323232" }'

Pricing is competitive and transparent; you only pay for the data you commit to Arweave.


  • Node.js ≥ 14
  • An Arweave wallet keyfile (.json)
  • Your project initialized with npm init or yarn init

  1. Install the SDK

    Terminal window
    npm install @liteseed/sdk
  2. Load your Arweave key and instantiate Liteseed Client

    import { readFileSync } from 'fs';
    import { Liteseed } from '@liteseed/sdk';
    // Replace with your key path
    const jwk = JSON.parse(readFileSync('./arweave-key.json', 'utf-8'));
    const client = new Liteseed(jwk);
  3. Sign Your Data - Convert any binary payload (images, JSON, logs, etc.) into a data-item:

    const fileBuffer = readFileSync('path/to/image.jpg');
    const dataItem = await client.signData({ data: fileBuffer });
    console.log('✅ Data-item ID:', dataItem.id);
  4. Post & Pay in One Call - The SDK batches the posting of your signed data-item and the on-chain payment:

    const receipt = await client.postSignedData({ dataItem });
    console.log('📜 Receipt:', receipt);
    const paymentInfo = await client.sendPayment({ dataItem });
    console.log('💸 Payment:', paymentInfo);
    • receipt contains your upload ID, cache endpoints, and deadline height.
    • paymentInfo confirms the AR transaction ID finalizing permanent storage.
  5. Fetch Your Data - Once your bundle is finalized on Arweave, retrieve it via HTTP:

    Terminal window
    curl https://api.liteseed.xyz/data/{uploadId} \
    -H 'Accept: application/octet-stream' \
    -o downloaded.jpg

import { readFileSync } from 'fs';
import { Liteseed } from '@liteseed/sdk';
async function main() {
// 1. Init client
const jwk = JSON.parse(readFileSync('./arweave-key.json', 'utf-8'));
const client = new Liteseed(jwk);
// 2. Read file
const data = readFileSync('image.jpg');
// 3. Sign
const dataItem = await client.signData({ data });
console.log('Data-item ID:', dataItem.id);
// 4. Post & Pay
const receipt = await client.postSignedData({ dataItem });
console.log('Receipt:', receipt);
const paymentTx = await client.sendPayment({ dataItem });
console.log('Payment TX ID:', paymentTx.id);
console.log('🎉 Your data is now permanently stored on Arweave!');
}
main().catch(err => {
console.error('❌ Upload failed:', err);
process.exit(1);
});