Skip to content
LogoLogo

getServiceByType

Find the first service of a given type — the same selection access and compute do when you omit serviceId.

Usage

const  = await .('did:ope:1234abcd...')
 
const  = (, 'compute') 
const  = (, 'access') 

Returns

  • Type: ServiceV5 | undefined

Parameters

ddo

  • Type: unknown

type

  • Type: string

'access' or 'compute'.