Skip to content

Commit d3602c8

Browse files
author
Matthias Zimmermann
committed
docs: add docs folder
1 parent a96b68d commit d3602c8

File tree

6 files changed

+706
-74
lines changed

6 files changed

+706
-74
lines changed

README.md

Lines changed: 2 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -200,24 +200,6 @@ results = client.arkiv.query_entities(
200200
)
201201
```
202202

203-
### Paging
204-
205-
Paging of query results is currently in development.
206-
207-
**Requirements:**
208-
- Support cursor-based pagination for consistent results
209-
- Configurable maximum page size (a page might contain fewer entities depending on actual data used for the representation per entity)
210-
- Return page metadata (total count, has_next_page, cursor)
211-
212-
**Example:**
213-
```python
214-
# Fetch first page
215-
page = client.arkiv.query("SELECT * FROM entities", max_page_size=100)
216-
217-
# Fetch next page using cursor
218-
next_page = client.arkiv.query("SELECT * FROM entities", cursor=page.next, max_page_size=100)
219-
```
220-
221203
### Sorting
222204

223205
Querying entities should support sorting results by one or more fields.
@@ -236,61 +218,8 @@ results = client.arkiv.query(
236218
)
237219
```
238220

239-
### Projections
240-
241-
The transfer of large entities or many entities consumes considerable bandwidth. Which information per entity is most valuable is use-case specific and should be specified by the application.
242-
243-
**Let users decide which parts of an entity to return:**
244-
- **Payload** - Binary data (can be large)
245-
- **Attributes** - Key-value metadata
246-
- **Metadata** - Owner, expiration, timestamps
247-
248-
**Current implementation:**
249-
The SDK already supports projections via the `fields` parameter using bitmask flags:
250-
```python
251-
from arkiv.types import PAYLOAD, ATTRIBUTES, METADATA
252-
253-
# Fetch only attributes (minimal bandwidth)
254-
entity = client.arkiv.get_entity(entity_key, fields=ATTRIBUTES)
255-
256-
# Fetch payload and metadata (skip attributes)
257-
entity = client.arkiv.get_entity(entity_key, fields=PAYLOAD | METADATA)
258-
259-
# Fetch everything (fields = ALL is default)
260-
entity = client.arkiv.get_entity(entity_key)
261-
```
262-
263-
### Entity Existence Check
264-
265-
Make testing whether an entity exists for a specific entity key as efficient as possible.
266-
267-
**Current implementation:**
268-
```python
269-
exists = client.arkiv.entity_exists(entity_key) # Returns bool
270-
```
271-
272-
**Options for optimization:**
273-
- Dedicated lightweight RPC endpoint (current approach)
274-
- Fold into unified query RPC with minimal projection
275-
- Support batch existence checks for multiple keys
276-
277-
**Example batch API:**
278-
```python
279-
# Check multiple entities at once
280-
existence_map = client.arkiv.entities_exist([key1, key2, key3])
281-
# Returns: {key1: True, key2: False, key3: True}
282-
```
283-
284221
### Other Features
285222

286-
- **Ownership Transfer**: The creating account is the owner of the entity.
287-
Only the owner can update the entity (payload, attributes, expires_at_block).
288-
A mechanism to transfer entity ownership should be provided.
289-
```python
290-
# Proposed API
291-
client.arkiv.transfer_entity(entity_key, new_owner_address)
292-
```
293-
294223
- **Creation Flags**: Entities should support creation-time flags with meaningful defaults.
295224
Flags can only be set at creation and define entity behavior:
296225
- **Read-only**: Once created, entity data cannot be changed by anyone (immutable)
@@ -316,8 +245,8 @@ Flags can only be set at creation and define entity behavior:
316245
```
317246

318247
- **Offline Entity Verification**: Provide cryptographic verification of entity data without querying the chain.
319-
- Signature verification for entity authenticity
320-
- Minimal trust assumptions for light clients
248+
- Currently not supported
249+
- Proposal: Store entity keys (and block number) in smart contracts and work with an optimistic oracle approach (challenger may take entity key and checks claimed data against the data of an Arkiv archival node)
321250

322251
## Development Guide
323252

0 commit comments

Comments
 (0)