Knowledge belongs to everyone, forever.
Alexandria Library runs on the Flow blockchain. All catalog and book content is stored on-chain. Read access is permissionless: anyone can query the contract with Cadence scripts — no wallet or account required. Projects like Flunks.net already compose on top of the library so users can read books from their apps.
0xfed1adffd14ea9d0https://rest-mainnet.onflow.orgUse Cadence scripts to read data; no authentication is needed for reads.
View functions you can call from scripts:
Copy-paste these scripts to read from the library from your app (e.g. with FCL fcl.query).
Returns all genres in the library catalog.
Args: none → Returns: [String]?
import Alexandria from 0xfed1adffd14ea9d0
access(all)
fun main(): [String]? {
return Alexandria.getAllGenres()
}Returns book titles for a given genre.
Args: genre: String → Returns: [String]?
import Alexandria from 0xfed1adffd14ea9d0
access(all)
fun main(genre: String): [String]? {
return Alexandria.getGenre(genre: genre)
}Returns all authors in the library.
Args: none → Returns: [String]?
import Alexandria from 0xfed1adffd14ea9d0
access(all)
fun main(): [String]? {
return Alexandria.getAuthors()
}Returns book titles for a given author.
Args: author: String → Returns: [String]?
import Alexandria from 0xfed1adffd14ea9d0
access(all)
fun main(author: String): [String]? {
return Alexandria.getAuthor(author: author)
}Returns chapter titles for a book.
Args: bookTitle: String → Returns: [String]
import Alexandria from 0xfed1adffd14ea9d0
access(all)
fun main(bookTitle: String): [String] {
return Alexandria.getBookChapterTitles(bookTitle: bookTitle)
}Returns a single paragraph by book, chapter, and index.
Args: bookTitle: String, chapterTitle: String, paragraphIndex: Int → Returns: String
import Alexandria from 0xfed1adffd14ea9d0
access(all)
fun main(bookTitle: String, chapterTitle: String, paragraphIndex: Int): String {
return Alexandria.getBookParagraph(bookTitle: bookTitle, chapterTitle: chapterTitle, paragraphIndex: paragraphIndex)
}Returns a reference to the full book resource (chapters, paragraphs).
Args: bookTitle: String → Returns: &Alexandria.Book?
import Alexandria from 0xfed1adffd14ea9d0
access(all)
fun main(bookTitle: String): &Alexandria.Book? {
return Alexandria.getBook(bookTitle: bookTitle)
}