πŸ†”
ID++ SDK Docs
  • πŸ†”Introduction
  • ❓Why use the ID++ SDK?
  • πŸ’‘Key concepts
    • ℹ️Decentralized Web Node (DWN)
    • ℹ️Decentralized identities (DID)
    • ℹ️Schemas
    • ℹ️Records
  • πŸ€“Reference
    • βš™οΈInstallation
    • βš™οΈConfiguration
    • βš™οΈInitialization
    • πŸ“ƒRecords
      • πŸ“–Queries
        • πŸ“‘How to query records
      • βš’οΈCRUD Operations
        • πŸ†•Create a record
        • πŸ“šRead a record
        • πŸ“‘Update a record
        • ❌Delete a record
    • πŸ›‘οΈVerifiable Credentials
      • πŸ’³Credentials
      • πŸ“œPresentations
  • πŸ—ΊοΈGuides
    • πŸ“Handling files
    • πŸš€Sharing records
Powered by GitBook
On this page
  • Record example
  • Accessing data
  • Size limits
  1. Reference

Records

PreviousInitializationNextQueries

A record is a single set of data that follows a that is stored on the . They're similar to rows in a traditional relational database.

When interfacing the SDK, will return records and will alter them.

Record example

{
  "author": "did:ion:alice",
  "contextId": "bafyreigwuhvcybyu4menjqw5k7zygxihbga6w53kpanboxgszok2dyyqui",
  "dataCid": "bafkreifyhrkwiepwhltyjjhwl2lagdist2h6xt67dkdf24epu3rutzo7r4",
  "dataFormat": "text/plain",
  "dataSize": 11,
  "dateCreated": "2023-10-19T03:32:10.488330Z",
  "messageTimestamp": "2023-10-19T03:32:10.488330Z",
  "interface": "Records",
  "method": "Write",
  "protocol": "http://message-protocol.xyz",
  "protocolPath": "message",
  "published": false,
  "recordId": "bafyreigwuhvcybyu4menjqw5k7zygxihbga6w53kpanboxgszok2dyyqui",
  "schema": "http://message-protocol.xyz/schema/message",
  "recipient": "did:ion:bob"
}

Accessing data

Records have several methods available for accessing their data in commonly utilized formats.

  • record.data.text() returns the data as a plain text string.

  • record.data.json() returns the data as a JSON object.

  • record.data.stream() returns the data as a stream. This is useful for handling large files.

Size limits

A record can have a maximum of 1 GB of data stored on it.

πŸ€“
πŸ“ƒ
schema
DWN
queries
mutations