@spknetwork/idx-data-utils
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@spknetwork/idx-data-utils

A convenience library for common interactions with user data on ceramic using the IDX protocol over glaze.

Usage

import { IdxDataService } from '@spknetwork/idx-data-utils'

const service = new IdxDataService(ceramic) // Pass your ceramic client instance

await service.init() // Required to initialize datamodels

// Get profile for the current logged in user
const profile = await service.getOwnProfile()

// Set profile for the current logged in user
await service.writeOwnProfile(profile)

// Get profile for any user by their DID
const profile = await service.getUserProfile(did)

Helper functions

IdxDataService.isInitialized: () => boolean // will return true if the service instance has been initialized

Note on changes to the IDX protocol and tools

See this recent blog post from ceramic on datamodels and glaze.

https://blog.ceramic.network/the-next-architecture-for-building-web3-data-applications/

Readme

Keywords

Package Sidebar

Install

npm i @spknetwork/idx-data-utils

Weekly Downloads

1

Version

0.1.0

License

ISC

Unpacked Size

98.1 kB

Total Files

32

Last publish

Collaborators

  • igormuba
  • lioha
  • vaultec81
  • cyphercider