import { Data } from 'effect'; import { type ProtocolVersion } from '@midnightntwrk/wallet-sdk-abstractions'; /** * A tagged enum data type that represents a change in Midnight protocol versions. * * @remarks * A specific protocol version can be specified using the {@link VersionChangeType.Version} enum variant. It has a * `version` property that accepts a {@link ProtocolVersion} value for a known protocol version. For use cases where a * specific protocol version cannot be given, the {@link VersionChangeType.Next} enum variant can be used. Its use is * context specific. */ export type VersionChangeType = Data.TaggedEnum<{ /** A change to a particular protocol version. */ Version: { readonly version: ProtocolVersion.ProtocolVersion; }; /** A change to the 'next' protocol version. Particularly useful in testing */ Next: {}; }>; /** A type predicate that determines if a given value is a {@link VersionChangeType.Version} enum variant. */ export declare const isVersion: (u: unknown) => u is { readonly _tag: "Version"; readonly version: ProtocolVersion.ProtocolVersion; }; /** A type predicate that determines if a given value is a {@link VersionChangeType.Next} enum variant. */ export declare const isNext: (u: unknown) => u is { readonly _tag: "Next"; }; export declare const match: { any; readonly Next: (args: { readonly _tag: "Next"; }) => any; }>(cases: Cases & { [K in Exclude]: never; }): (value: { readonly _tag: "Version"; readonly version: ProtocolVersion.ProtocolVersion; } | { readonly _tag: "Next"; }) => import("effect/Unify").Unify>; any; readonly Next: (args: { readonly _tag: "Next"; }) => any; }>(value: { readonly _tag: "Version"; readonly version: ProtocolVersion.ProtocolVersion; } | { readonly _tag: "Next"; }, cases: Cases & { [K in Exclude]: never; }): import("effect/Unify").Unify>; }, Version: Data.Case.Constructor<{ readonly _tag: "Version"; readonly version: ProtocolVersion.ProtocolVersion; }, "_tag">, Next: Data.Case.Constructor<{ readonly _tag: "Next"; }, "_tag">;