Lynx Blockchain
  • Welcome
  • Technical Evolution and Architecture Overview
  • History of Lynx
    • Evolution of a Blockchain
    • Hybrid Proof of Work (HPoW) Protocol
    • Pioneering Blockchain Data Storage
    • Evolution to Proof of Stake
    • Next Generation Data Storage Architecture
    • Preserving Knowledge
  • Lynx Core
    • Hardware and System Requirements
    • Lynx Dynamics
    • Open Source
    • Core Parameters and Strategy
    • Sustainability
    • Circulating Supply Analysis
    • Locked Addresses
    • Data Storage
      • auth
      • fetch
      • fetchall
      • store
      • status
      • list
    • Understanding the Encryption Option
    • Understanding Lynx Staking Wait Times
    • Understanding Asset Retrieval Times
    • Understanding Block Time Targeting in the Lynx Blockchain
    • Understanding the Lynx Blockchain Statistics Report
  • Lynx Administration
    • Public Peer Nodes
    • Understanding Blockchain Bootstrap Files
      • Bootstrap Extraction Script
      • Bootstrap Creation Script
    • How to Sweep a Lynx Wallet
    • Enable/Disable Staking
  • Clevver
    • Revolutionizing Digital Preservation
    • Permanent Storage for Digital Assets
    • Permanent Digital Archives for Journalism
    • How did Clevver originate?
    • Shortened URL Support
    • Assigning Tags to Assets
    • How to delete content
    • Clevver Terms of Service Agreement
  • Clevver API
    • Public Methods
      • Batches
      • Files
      • User
  • ElectrumX
    • Lynx ElectrumX nodes
    • Build Script Details
  • External Links
    • Lynx Explorer
    • Lynx Github
    • Lynx Uptime Report
    • Clevver Website
  • Lynx Bootstraps
  • Wallet Links
    • Komodo Wallet
    • Wally.id Wallet
    • Lynx Paper Wallet
  • Social Links
    • Lynx Discord
    • Lynx on Bluesky
    • Clevver on Bluesky
  • Exchange Links
    • FreiXLite (LYNX/LTC)
  • FreiExchange (LYNX/BTC)
  • Komodo Wallet (SWAP)
  • XredX (LYNX/LTC)
  • XredX (LYNX/DOGE)
  • XredX (LYNX/IL8P)
Powered by GitBook
On this page
  • Overview
  • Syntax
  • Description
  • Parameters
  • Returns
  • Authentication Requirements
  • Performance Considerations
  • Examples
  • Implementation Notes
  1. Lynx Core
  2. Data Storage

list

Published: March 2025 | Last updated: March 2025

Overview

The list RPC method retrieves metadata for files stored on the Lynx blockchain by the authenticated tenant. This command provides a comprehensive view of all your stored files, arranged chronologically with the most recently stored files appearing first in the results.

Syntax

list [count]

Description

When you invoke the list method, the Lynx daemon scans the blockchain for files associated with your tenant account and retrieves metadata about each file. This includes the unique identifier, file size, storage location, and timestamp information. This command is essential for managing your blockchain-stored files and serves as a directory service for your decentralized storage.

Parameters

Parameter
Type
Required
Description

count

string/integer

No

The maximum number of file records to retrieve. If omitted, the default is 10 records. To retrieve more files, you can specify a high number or 0 for all files.

Returns

The method returns a nested array structure containing file metadata:

[
  [
    {
      "uuid": "00112233445566778899aabbccddeeff",
      "length": 12345,
      "height": 987654,
      "timestamp": "2023-05-15 14:30:22"
    },
    {
      "uuid": "aabbccddeeff00112233445566778899",
      "length": 54321,
      "height": 987650,
      "timestamp": "2023-05-14 09:15:37"
    },
    ...
  ]
]

Each file entry contains the following fields:

Field
Type
Description

uuid

string

The unique identifier of the file. This is a 32-character hexadecimal string that serves as the primary reference for the file in the Lynx storage system.

length

number

The total size of the file in bytes. This represents the complete file size, even if the file data is distributed across multiple blockchain blocks.

height

number

The starting block number where the file storage began. Files may span multiple blocks depending on their size.

timestamp

string

The date and time when the file storage operation was initiated, in YYYY-MM-DD HH:MM:SS format.

Authentication Requirements

The list method requires user authentication:

  • You must authenticate using the appropriate credentials before using this command

  • If not authenticated, the method will return a simple "Not authenticated" message

  • The method only retrieves files associated with the authenticated tenant

Performance Considerations

  • The list command scans the blockchain to find files, which can be resource-intensive

  • For large storage histories, limiting the results with the count parameter can improve performance

  • The command logs the execution time to the debug log, which can be useful for monitoring performance

  • The default limit of 10 recent files helps optimize performance for routine usage

Examples

List the 10 most recently stored files (default)

lynx-cli list

Or using JSON-RPC:

curl --user username --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "list", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:9332/

List the 5 most recently stored files

lynx-cli list 5

List all stored files

lynx-cli list 0

Implementation Notes

  • Only files with complete metadata (file length > 0) are included in the results

  • The command measures and logs its execution time for performance monitoring

  • The results are presented with the most recent files first (chronological order, newest to oldest)

PreviousstatusNextUnderstanding the Encryption Option

Last updated 2 months ago

Page cover image