import { HashAlgorithm } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs"; export declare const KEYSTONE_ATOM = "keystone"; export declare const KEYSTONE_POOL_ID_REGEXP: RegExp; export declare const KEYSTONE_SALT_REGEXP: RegExp; export declare const KEYSTONE_USERNAME_REGEXP: RegExp; export declare const KEYSTONE_DESCRIPTION_REGEXP: RegExp; /** * Broad, robust email validation regex (non-whitespace@non-whitespace.non-whitespace, 3-254 chars). * Intentionally robust and non-restrictive to avoid rejecting valid email formats. */ export declare const KEYSTONE_EMAIL_REGEXP: RegExp; /** * arbitrary right now. don't want an easy DoS. this may still be too high. */ export declare const KEYSTONE_HASH_MAX_ROUNDS = 1000; /** * @see {@link KeystoneVerb.REVOKE} */ export declare const KEYSTONE_VERB_REVOKE = "revoke"; /** * @see {@link KeystoneVerb.MANAGE} */ export declare const KEYSTONE_VERB_MANAGE = "manage"; /** * @see {@link KeystoneVerb.SIGN} */ export declare const KEYSTONE_VERB_SIGN = "sign"; /** * Used when a senderIdentity keystone authorizes a session keystone for a sync * operation. The senderIdentity is evolved with a claim whose verb is `sync`, * pointing to the session keystone genesis address. * * @see {@link KeystoneVerb.SYNC} */ export declare const KEYSTONE_VERB_SYNC = "sync"; /** * Used by the session keystone's `connect` pool to authorize the transport * connect (e.g. WebSocket challenge/response). Consumed exactly once per * sync session during `peer.connect()`. * * @see {@link KeystoneVerb.CONNECT} */ export declare const KEYSTONE_VERB_CONNECT = "connect"; /** * Used by one-off administrative challenge keystones to authorize or approve * an administrative action (e.g. exception handle request, claim, delegation). * * @see {@link KeystoneVerb.ACCEPT} */ export declare const KEYSTONE_VERB_ACCEPT = "accept"; /** * Used by one-off administrative challenge keystones to reject or decline * an administrative action. * * @see {@link KeystoneVerb.REJECT} */ export declare const KEYSTONE_VERB_REJECT = "reject"; /** * Used by an author delegate keystone to authorize and sign an authored * discourse comment, markdown note, PR, or code artifact. * * @see {@link KeystoneVerb.AUTHOR} */ export declare const KEYSTONE_VERB_AUTHOR = "author"; export type KeystoneVerb = typeof KEYSTONE_VERB_REVOKE | typeof KEYSTONE_VERB_MANAGE | typeof KEYSTONE_VERB_SIGN | typeof KEYSTONE_VERB_SYNC | typeof KEYSTONE_VERB_CONNECT | typeof KEYSTONE_VERB_ACCEPT | typeof KEYSTONE_VERB_REJECT | typeof KEYSTONE_VERB_AUTHOR; /** * Verbs that describe actions that can be authorized by a Keystone. */ export declare const KeystoneVerb: { /** * The specific ibGib address for the 'revoke' verb. * Used in Claims to indicate the Keystone should be considered dead. */ REVOKE: "revoke"; /** * The meta-verb used to authorize structural changes to the Keystone, * specifically adding or removing challenge pools. * * "Root access" to the identity. * * Basically, this is the verb for the "admin" pool. * * todo: add a separate "add pool" verb * todo: add a one-time mechanism that limits pool use per verb. */ MANAGE: "manage"; /** * This is the least of all privileges that can actually evolve a keystone. */ SIGN: "sign"; /** * Used when a senderIdentity keystone authorizes a session keystone. * The senderIdentity is evolved with a `sync` claim targeting S^Stjp. */ SYNC: "sync"; /** * Used by the session keystone's `connect` pool for the transport * connect (proof-of-possession). Consumed once per session. */ CONNECT: "connect"; /** * Used by one-off administrative challenge keystones to authorize or approve * an administrative action. */ ACCEPT: "accept"; /** * Used by one-off administrative challenge keystones to reject or decline * an administrative action. */ REJECT: "reject"; /** * Used by an author delegate keystone to authorize and sign authored discourse, * markdown notes, comments, PRs, or code artifacts. */ AUTHOR: "author"; }; export declare const KEYSTONE_VERB_VALID_VALUES: ("accept" | "author" | "connect" | "manage" | "reject" | "revoke" | "sign" | "sync")[]; export declare function isKeystoneVerb(value: string): value is KeystoneVerb; /** * Some standard pool IDs can be conventionally named after their primary verb, * but this is not a requirement. */ export declare const POOL_ID_REVOKE = "revoke"; export declare const POOL_ID_MANAGE = "manage"; export declare const POOL_ID_CUSTODIAN_MANAGE = "custodian-manage"; export declare const POOL_ID_DEFAULT = "default"; /** * Pool ID for the session keystone's transport connect pool. * Paired with {@link KEYSTONE_VERB_CONNECT}. Consumed once per sync session * during `peer.connect()`. */ export declare const POOL_ID_CONNECT = "connect"; /** * Pool ID for the session keystone's per-turn signing pool. * Paired with {@link KEYSTONE_VERB_SYNC}. Consumed once per outgoing sync * context frame (Init, Delta, Commit, etc.). */ export declare const POOL_ID_SYNC = "sync"; /** * Pool ID for administrative approval action in challenge keystones. * Paired with {@link KEYSTONE_VERB_ACCEPT}. */ export declare const POOL_ID_ACCEPT = "accept"; /** * Pool ID for administrative rejection action in challenge keystones. * Paired with {@link KEYSTONE_VERB_REJECT}. */ export declare const POOL_ID_REJECT = "reject"; /** * **THESE SHOULD ONLY BE USED IN TEMPORARY/SESSION KEYSTONES.** * _this is because a receiver could intercept the stone, DoS participants and * then take over a stone._ * * transition pools are used as a temporary mechanism to create one-time management pools for delegates to create their own pools. */ export declare const POOL_ID_TRANSITION = "transition"; export declare const KEYSTONE_CONFIG_DEFAULT_SIZE = 200; export declare const KEYSTONE_CONFIG_DEFAULT_SEQUENTIAL = 2; export declare const KEYSTONE_CONFIG_DEFAULT_RANDOM = 2; export declare const KEYSTONE_CONFIG_DEFAULT_BINDING = 5; export declare const KEYSTONE_CONFIG_DEFAULT_REPLENISH_STRATEGY: "top-up"; export declare const KEYSTONE_CONFIG_DEFAULT_HASH_ALGORITHM: HashAlgorithm; export declare const KEYSTONE_CONFIG_DEFAULT_HASH_ROUNDS = 1; export declare const KEYSTONE_CONFIG_DEFAULT_SIZE_HIGHSECURITY = 2000; export declare const KEYSTONE_CONFIG_DEFAULT_SEQUENTIAL_HIGHSECURITY = 5; export declare const KEYSTONE_CONFIG_DEFAULT_RANDOM_HIGHSECURITY = 5; export declare const KEYSTONE_CONFIG_DEFAULT_BINDING_HIGHSECURITY = 16; export declare const KEYSTONE_CONFIG_DEFAULT_REPLENISH_STRATEGY_HIGHSECURITY: "replace-all"; export declare const KEYSTONE_CONFIG_DEFAULT_HASH_ALGORITHM_HIGHSECURITY: HashAlgorithm; export declare const KEYSTONE_CONFIG_DEFAULT_HASH_ROUNDS_HIGHSECURITY = 10; /** * the checkpointing mechanism will do a checkpoint every [this number] of * keystone frame evolutions. */ export declare const KEYSTONE_CHECKPOINT_FREQUENCY = 50; //# sourceMappingURL=keystone-constants.d.mts.map