SDK
list
What geode.list returns, where the entries come from, and the errors it raises.
list(): Promise<FileEntry[]>list returns the files in the vault: the entries of its encrypted manifest, in the order they were stored. Each entry is a copy; changing it changes nothing in the client.
What it does
Unlock the vault
On the client's first vault call, the wallet signs the key message, and the client reads the manifest at the vault's locator, decrypts it with the view key and checks every entry, as in
recover.Return the entries
The client returns its entries from memory. A file stored by this client joins the list once its upload succeeds, when
storereads the manifest again, before the manifest itself is paid for. Files stored from another client of the same wallet appear afterrecoveror astoreon this client reads the newer manifest.
Return value
idstringkeystringreceiptstring0x and 64 hex digits.bucketBuckettermTermlinkstring/s/<id>#<key>, rebuilt from id and key when the manifest is read.namestringtypestringsizenumberstoredAtstringPOST /upload.The name, type and size exist only inside the manifest, which is sealed under the view key. The chain and Irys hold the bucket.
What it costs
Nothing. No transaction is sent.
Errors
| Code | Raised when |
|---|---|
WALLET_REJECTED | The client has no wallet, or the wallet declines the key message |
VALIDATION_ERROR | The manifest has an unsupported format or an invalid entry, or a note memo is malformed |
WRONG_KEY | The manifest does not decrypt under the view key |
NOT_FOUND, IRYS_UNAVAILABLE, PAYLOAD_TOO_LARGE, CONFIGURATION_REQUIRED | The manifest ciphertext cannot be fetched |
UNKNOWN_ROOT | The tree leaves the relayer returned do not hash to its root |
RELAYER_FAILED | A relayer reply does not match the contract |
UPSTREAM_UNAVAILABLE | A network failure or any other unrecognised error |
Codes from /manifest and /tree pass through as listed at /docs/api#errors.
Sample
const entries = await geode.list()
for (const entry of entries) console.log(entry.name, entry.size, entry.term, entry.storedAt)