Hello everyone,
I would like to ask if you know about any (web-) application implementing Ceramic to create and retrieve DIDs. It might be one only in test phase, must not be productive phase. Any application, just as an illustrative example of how it would work.
Best,
Laura
1 Like
Here’s an example of how to do create DIDs via did-session
within React. Check in particular the connect
and loadSession
functions.
Check other completed grants (filter via category) to see other projects.
import { DIDSession } from 'did-session';
import { EthereumWebAuth, getAccountId } from '@didtools/pkh-ethereum';
import { createContext, useState, useMemo } from 'react';
import { useAccount } from 'wagmi';
import { useEffect, useContext } from 'react';
import { composeClient } from '../lib/composeDB';
interface CeramicContextType {
session: DIDSession | null;
connect: () => Promise<void>;
}
const CeramicContext = createContext<CeramicContextType>(
{} as CeramicContextType
);
const getStorageKey = (address: string) => `did-session:${address}`;
interface CeramicProviderProps {
children: React.ReactNode;
This file has been truncated. show original
1 Like