import { DwnInterfaceName } from '@enbox/dwn-sdk-js';
import { DwnInterface } from './types/dwn.js';
export function isDwnRequest(dwnRequest, messageType) {
    return dwnRequest.messageType === messageType;
}
export function isDwnMessage(messageType, message) {
    const incomingMessageInterfaceName = message.descriptor.interface + message.descriptor.method;
    return incomingMessageInterfaceName === messageType;
}
export function isRecordsType(messageType) {
    return messageType === DwnInterface.RecordsCount ||
        messageType === DwnInterface.RecordsDelete ||
        messageType === DwnInterface.RecordsQuery ||
        messageType === DwnInterface.RecordsRead ||
        messageType === DwnInterface.RecordsSubscribe ||
        messageType === DwnInterface.RecordsWrite;
}
export function isRecordPermissionScope(scope) {
    return scope.interface === DwnInterfaceName.Records;
}
export function isMessagesPermissionScope(scope) {
    return scope.interface === DwnInterfaceName.Messages;
}
//# sourceMappingURL=dwn-type-guards.js.map