"use strict";
/* istanbul ignore file */
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPolymeshTransactionBatch = exports.isPolymeshTransaction = exports.isIdentityRole = exports.isTickerOwnerRole = exports.isCddProviderRole = exports.isVenueOwnerRole = exports.isPortfolioCustodianRole = exports.isMultiClaimCondition = exports.isSingleClaimCondition = exports.isInvestorUniquenessV2Claim = exports.isNoDataClaim = exports.isInvestorUniquenessClaim = exports.isBlockedClaim = exports.isExemptedClaim = exports.isJurisdictionClaim = exports.isKycClaim = exports.isCddClaim = exports.isSellLockupClaim = exports.isBuyLockupClaim = exports.isAffiliateClaim = exports.isAccreditedClaim = exports.isUnscopedClaim = exports.isScopedClaim = exports.isPolymeshError = exports.isVenue = exports.isTickerReservation = exports.isOffering = exports.isAsset = exports.isNumberedPortfolio = exports.isKnownPermissionGroup = exports.isInstruction = exports.isIdentity = exports.isDividendDistribution = exports.isDefaultTrustedClaimIssuer = exports.isDefaultPortfolio = exports.isCustomPermissionGroup = exports.isCorporateAction = exports.isCheckpointSchedule = exports.isCheckpoint = exports.isAuthorizationRequest = exports.isAccount = exports.isEntity = void 0;
const internal_1 = require("../internal");
const types_1 = require("../types");
/**
 * Return whether value is an Entity
 */
function isEntity(value) {
    return value instanceof internal_1.Entity;
}
exports.isEntity = isEntity;
/**
 * Return whether value is an Account
 */
function isAccount(value) {
    return value instanceof internal_1.Account;
}
exports.isAccount = isAccount;
/**
 * Return whether value is an AuthorizationRequest
 */
function isAuthorizationRequest(value) {
    return value instanceof internal_1.AuthorizationRequest;
}
exports.isAuthorizationRequest = isAuthorizationRequest;
/**
 * Return whether value is a Checkpoint
 */
function isCheckpoint(value) {
    return value instanceof internal_1.Checkpoint;
}
exports.isCheckpoint = isCheckpoint;
/**
 * Return whether value is a CheckpointSchedule
 */
function isCheckpointSchedule(value) {
    return value instanceof internal_1.CheckpointSchedule;
}
exports.isCheckpointSchedule = isCheckpointSchedule;
/**
 * Return whether value is a CorporateAction
 */
function isCorporateAction(value) {
    return value instanceof internal_1.CorporateAction;
}
exports.isCorporateAction = isCorporateAction;
/**
 * Return whether value is a CustomPermissionGroup
 */
function isCustomPermissionGroup(value) {
    return value instanceof internal_1.CustomPermissionGroup;
}
exports.isCustomPermissionGroup = isCustomPermissionGroup;
/**
 * Return whether value is a DefaultPortfolio
 */
function isDefaultPortfolio(value) {
    return value instanceof internal_1.DefaultPortfolio;
}
exports.isDefaultPortfolio = isDefaultPortfolio;
/**
 * Return whether value is a DefaultTrustedClaimIssuer
 */
function isDefaultTrustedClaimIssuer(value) {
    return value instanceof internal_1.DefaultTrustedClaimIssuer;
}
exports.isDefaultTrustedClaimIssuer = isDefaultTrustedClaimIssuer;
/**
 * Return whether value is a DividendDistribution
 */
function isDividendDistribution(value) {
    return value instanceof internal_1.DividendDistribution;
}
exports.isDividendDistribution = isDividendDistribution;
/**
 * Return whether value is an Identity
 */
function isIdentity(value) {
    return value instanceof internal_1.Identity;
}
exports.isIdentity = isIdentity;
/**
 * Return whether value is an Instruction
 */
function isInstruction(value) {
    return value instanceof internal_1.Instruction;
}
exports.isInstruction = isInstruction;
/**
 * Return whether value is a KnownPermissionGroup
 */
function isKnownPermissionGroup(value) {
    return value instanceof internal_1.KnownPermissionGroup;
}
exports.isKnownPermissionGroup = isKnownPermissionGroup;
/**
 * Return whether value is a NumberedPortfolio
 */
function isNumberedPortfolio(value) {
    return value instanceof internal_1.NumberedPortfolio;
}
exports.isNumberedPortfolio = isNumberedPortfolio;
/**
 * Return whether value is an Asset
 */
function isAsset(value) {
    return value instanceof internal_1.Asset;
}
exports.isAsset = isAsset;
/**
 * Return whether value is an Offering
 */
function isOffering(value) {
    return value instanceof internal_1.Offering;
}
exports.isOffering = isOffering;
/**
 * Return whether value is a TickerReservation
 */
function isTickerReservation(value) {
    return value instanceof internal_1.TickerReservation;
}
exports.isTickerReservation = isTickerReservation;
/**
 * Return whether value is a Venue
 */
function isVenue(value) {
    return value instanceof internal_1.Venue;
}
exports.isVenue = isVenue;
/**
 * Return whether value is a PolymeshError
 */
function isPolymeshError(value) {
    return value instanceof internal_1.PolymeshError;
}
exports.isPolymeshError = isPolymeshError;
/**
 * Return whether a Claim is a ScopedClaim
 */
function isScopedClaim(claim) {
    return 'scope' in claim;
}
exports.isScopedClaim = isScopedClaim;
/**
 * Return whether a Claim is an UnscopedClaim
 */
function isUnscopedClaim(claim) {
    return !('scope' in claim);
}
exports.isUnscopedClaim = isUnscopedClaim;
/**
 * Return whether Claim is an AccreditedClaim
 */
function isAccreditedClaim(claim) {
    return claim.type === types_1.ClaimType.Accredited;
}
exports.isAccreditedClaim = isAccreditedClaim;
/**
 * Return whether Claim is an AffiliateClaim
 */
function isAffiliateClaim(claim) {
    return claim.type === types_1.ClaimType.Affiliate;
}
exports.isAffiliateClaim = isAffiliateClaim;
/**
 * Return whether Claim is a BuyLockupClaim
 */
function isBuyLockupClaim(claim) {
    return claim.type === types_1.ClaimType.BuyLockup;
}
exports.isBuyLockupClaim = isBuyLockupClaim;
/**
 * Return whether Claim is a SellLockupClaim
 */
function isSellLockupClaim(claim) {
    return claim.type === types_1.ClaimType.SellLockup;
}
exports.isSellLockupClaim = isSellLockupClaim;
/**
 * Return whether Claim is a CddClaim
 */
function isCddClaim(claim) {
    return claim.type === types_1.ClaimType.CustomerDueDiligence;
}
exports.isCddClaim = isCddClaim;
/**
 * Return whether Claim is a KycClaim
 */
function isKycClaim(claim) {
    return claim.type === types_1.ClaimType.KnowYourCustomer;
}
exports.isKycClaim = isKycClaim;
/**
 * Return whether Claim is a JurisdictionClaim
 */
function isJurisdictionClaim(claim) {
    return claim.type === types_1.ClaimType.Jurisdiction;
}
exports.isJurisdictionClaim = isJurisdictionClaim;
/**
 * Return whether Claim is an ExemptedClaim
 */
function isExemptedClaim(claim) {
    return claim.type === types_1.ClaimType.Exempted;
}
exports.isExemptedClaim = isExemptedClaim;
/**
 * Return whether Claim is a BlockedClaim
 */
function isBlockedClaim(claim) {
    return claim.type === types_1.ClaimType.Blocked;
}
exports.isBlockedClaim = isBlockedClaim;
/**
 * Return whether a Claim is an InvestorUniquenessClaim
 */
function isInvestorUniquenessClaim(claim) {
    return claim.type === types_1.ClaimType.InvestorUniqueness;
}
exports.isInvestorUniquenessClaim = isInvestorUniquenessClaim;
/**
 * Return whether Claim is a NoDataClaim
 */
function isNoDataClaim(claim) {
    return claim.type === types_1.ClaimType.NoData;
}
exports.isNoDataClaim = isNoDataClaim;
/**
 * Return whether a Claim is an InvestorUniquenessV2Claim
 */
function isInvestorUniquenessV2Claim(claim) {
    return claim.type === types_1.ClaimType.InvestorUniquenessV2;
}
exports.isInvestorUniquenessV2Claim = isInvestorUniquenessV2Claim;
/**
 * Return whether Condition has a single Claim
 */
function isSingleClaimCondition(condition) {
    return 'claim' in condition;
}
exports.isSingleClaimCondition = isSingleClaimCondition;
/**
 * Return whether Condition has multiple Claims
 */
function isMultiClaimCondition(condition) {
    return 'claims' in condition;
}
exports.isMultiClaimCondition = isMultiClaimCondition;
/**
 * Return whether Role is PortfolioCustodianRole
 */
function isPortfolioCustodianRole(role) {
    return role.type === types_1.RoleType.PortfolioCustodian;
}
exports.isPortfolioCustodianRole = isPortfolioCustodianRole;
/**
 * Return whether Role is VenueOwnerRole
 */
function isVenueOwnerRole(role) {
    return role.type === types_1.RoleType.VenueOwner;
}
exports.isVenueOwnerRole = isVenueOwnerRole;
/**
 * Return whether Role is CddProviderRole
 */
function isCddProviderRole(role) {
    return role.type === types_1.RoleType.CddProvider;
}
exports.isCddProviderRole = isCddProviderRole;
/**
 * Return whether Role is TickerOwnerRole
 */
function isTickerOwnerRole(role) {
    return role.type === types_1.RoleType.TickerOwner;
}
exports.isTickerOwnerRole = isTickerOwnerRole;
/**
 * Return whether Role is IdentityRole
 */
function isIdentityRole(role) {
    return role.type === types_1.RoleType.Identity;
}
exports.isIdentityRole = isIdentityRole;
/**
 * Return whether value is a PolymeshTransaction
 */
function isPolymeshTransaction(value) {
    return value instanceof internal_1.PolymeshTransaction;
}
exports.isPolymeshTransaction = isPolymeshTransaction;
/**
 * Return whether value is a PolymeshTransactionBatch
 */
function isPolymeshTransactionBatch(value) {
    return value instanceof internal_1.PolymeshTransactionBatch;
}
exports.isPolymeshTransactionBatch = isPolymeshTransactionBatch;
//# sourceMappingURL=typeguards.js.map