throw new Error('Confirmed frontier block info subtype not found')
}
const confirmedFrontierSubtype = resConfirmedFrontierBlockInfo.subtype
- }
if (!('contents' in resConfirmedFrontierBlockInfo) || resConfirmedFrontierBlockInfo.contents == null || typeof resConfirmedFrontierBlockInfo.contents !== 'object') {
throw new Error('Confirmed frontier block info contents not found')
}
throw new Error('Frontier block info subtype not found')
}
const frontierSubtype = resFrontierBlockInfo.subtype
- if (!['change', 'epoch', 'open', 'receive', 'send'].includes(frontierSubtype)) {
- throw new RangeError('Invalid subtype for frontier block', { cause: frontierSubtype })
- }
if (!('contents' in resFrontierBlockInfo) || resFrontierBlockInfo.contents == null || typeof resFrontierBlockInfo.contents !== 'object') {
throw new Error('Frontier block info contents not found')
}