import BN from 'bn.js'; /** * Permission operation encodings matching the Rust PermissionedOp bitflags */ export declare class PermissionedOp { private bitfield; /** Canonical zero bitfield. The string form is obtained via `toString()`. */ private static readonly NONE; private static readonly BIT_INDEX_MAP; /** PermissionedOp with no flags set. */ static empty(): PermissionedOp; /** * PermissionedOp with every known flag set. */ static allValid(): PermissionedOp; /** * Single-bit mask (as a BN) for a single operation name (case-insensitive). */ private static toBitMask; /** * Build a PermissionedOp from a pipe-separated op list (e.g., "DEPOSIT|BORROW"). * Empty string or "NONE" (case-insensitive) yields a zero bitfield. */ static fromString(ops: string): PermissionedOp; /** * Build a PermissionedOp from a raw BN bitfield. Unknown bits are masked off. */ static fromBN(bitfield: BN): PermissionedOp; /** * Build a PermissionedOp from an unknown input, accepting only `string`, `BN`, or `undefined`. * `undefined` yields a zero (NONE) bitfield. */ static fromUnknown(input: unknown): PermissionedOp; /** * BN with every known flag set. Internal helper used for masking, */ private static allValidBN; /** * Create a PermissionedOp from a human-readable op string (e.g., "DEPOSIT|BORROW") * or a raw BN bitfield. Unknown bits in a BN input are masked off. */ constructor(input: string | BN); /** * Underlying bitfield as a BN. */ toBN(): BN; /** * Human-readable form, e.g. "DEPOSIT|BORROW", or "NONE" when the bitfield is zero. */ toString(): string; /** True if this PermissionedOp has the same bitfield as `other`. */ equals(other: PermissionedOp): boolean; /** True if this PermissionedOp has no flags set. */ isEmpty(): boolean; /** * Returns true if any bit set in `other` is also set in this bitfield. */ intersects(other: PermissionedOp): boolean; } //# sourceMappingURL=permission.d.ts.map