import { respecfully, iReckon, ifWe } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
const maam = `[${import.meta.url}]`, sir = maam;
import { GLOBAL_LOG_A_LOT } from '../core-constants.mjs';
import { createRevocationPoolConfig, createStandardPoolConfig } from './keystone-config-builder.mjs';
import { KEYSTONE_VERB_REVOKE, } from './keystone-constants.mjs';
const logalot = GLOBAL_LOG_A_LOT;
await respecfully(sir, 'Config Builders', async () => {
    await ifWe(sir, 'createStandardPoolConfig defaults are correct', async () => {
        const config = createStandardPoolConfig("test_salt");
        iReckon(sir, config.salt).willEqual("test_salt");
        iReckon(sir, config.id).willEqual("test_salt");
        iReckon(sir, config.type).willEqual("hash-reveal-v1");
        // Behavior check
        const b = config.behavior;
        iReckon(sir, b.size).willEqual(100);
        iReckon(sir, b.selectSequentially).willEqual(2);
        iReckon(sir, b.selectRandomly).willEqual(2);
        iReckon(sir, b.replenish).willEqual("top-up");
        // Verbs should be empty/undefined (permissive)
        iReckon(sir, config.allowedVerbs.length).willEqual(0);
    });
    await ifWe(sir, 'createRevocationPoolConfig defaults are correct', async () => {
        const config = createRevocationPoolConfig("revoke_salt");
        iReckon(sir, config.salt).willEqual("revoke_salt");
        // Behavior check
        const b = config.behavior;
        iReckon(sir, b.size).willEqual(500); // Higher security
        iReckon(sir, b.replenish).willEqual("scorched-earth");
        // Verbs should be restricted
        iReckon(sir, config.allowedVerbs).includes(KEYSTONE_VERB_REVOKE);
        iReckon(sir, config.allowedVerbs.length).willEqual(1);
    });
});
//# sourceMappingURL=keystone-config-builder.respec.mjs.map