import type { TileMetadataArgs } from '@ceramicnetwork/stream-tile' ; const didRegex = /^did:([A-Za-z0-9]+):([A-Za-z0-9.\-:_]+)$/ ; export function isDIDstring ( did ) { return didRegex . test ( did ) ; } export function assertDIDstring ( did ) { if ( ! isDIDstring ( did ) ) { throw new Error ( `Invalid DID: ${ did }` ) ; } } export function getIDXMetadata ( did ) { assertDIDstring ( did ) ; return { controllers : [ did ] , family : 'IDX' } ; }