import { Brand } from 'effect'; /** * A user public key capable of receiving Zswap coins. * * @remarks * `CoinPublicKey` is a 'branded' string type that represents a public key encoded either as a sequence of * hexadecimal characters, or as a string formatted according to the Bech32m encoding scheme. * * @see {@link CoinPublicKey.Hex} * @see {@link CoinPublicKey.Bech32m} * @category keys */ export type CoinPublicKey = CoinPublicKey.Bech32m | CoinPublicKey.Hex; export declare namespace CoinPublicKey { /** * A user public key capable of receiving Zswap coins, formatted as a hex-encoded string. * * @category keys */ type Hex = Brand.Branded; /** * A user public key capable of receiving Zswap coins, formatted as a string according to the Bech32m encoding * scheme. * * @category keys */ type Bech32m = Brand.Branded; } /** * Creates a coin public key from a plain hex-encoded source string ({@link Hex_.PlainHex | PlainHex}). * * @category constructors */ export declare const Hex: Brand.Brand.Constructor & Brand.Brand<"CoinPublicKeyHex">>; /** * Create a coin public key from a source string formatted according to the Bech32m encoding scheme. * * @category constructors */ export declare const Bech32m: Brand.Brand.Constructor; /** * Creates a hex-encoded coin public key from a given source. * * @param self A source string that should become a {@link CoinPublicKey.Hex}, or a {@link CoinPublicKey} that * should become a {@link CoinPublicKey.Hex}. * @returns A {@link CoinPublicKey.Hex}. * * @category constructors */ export declare const asHex: (self: CoinPublicKey | string) => CoinPublicKey.Hex; /** * Creates a Bech32m formatted coin public key from a given source. * * @param self A source string that should become a {@link CoinPublicKey.Bech32m}, or a {@link CoinPublicKey} that * should become a {@link CoinPublicKey.Bech32m}. * @returns A {@link CoinPublicKey.Bech32m}. * * @category constructors */ export declare const asBech32m: (self: CoinPublicKey | string) => CoinPublicKey.Bech32m; /** * Creates a buffer representing the raw bytes of a coin public key. * * @param self The {@link CoinPublicKey} for which raw bytes are required. * @returns A `Uint8Array` representing the raw bytes of `self`. * * @category constructors */ export declare const asBytes: (self: CoinPublicKey) => Uint8Array; /** * Create a coin public key from a source string. * * @param value The string value that is become a {@link CoinPublicKey}. * @returns A {@link CoinPublicKey} that is an instance of {@link CoinPublicKey.Hex} if `value` could be * parsed as a hex-encoded string; otherwise as an instance of {@link CoinPublicKey.Bech32m}. * * @category constructors */ export declare const make: (value: string) => CoinPublicKey; //# sourceMappingURL=CoinPublicKey.d.ts.map