import { Effect, Equal, FastCheck, Hash, Inspectable, Schema } from "effect";
import * as Bip32PublicKey from "./Bip32PublicKey.js";
import * as PrivateKey from "./PrivateKey.js";
declare const Bip32PrivateKeyError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "Bip32PrivateKeyError";
} & Readonly;
/**
* Error class for Bip32PrivateKey related operations.
*
* @since 2.0.0
* @category errors
*/
export declare class Bip32PrivateKeyError extends Bip32PrivateKeyError_base<{
message?: string;
cause?: unknown;
}> {
}
declare const Bip32PrivateKey_base: Schema.TaggedClass;
} & {
bytes: Schema.filter, string, never>>;
}>;
/**
* Schema for Bip32PrivateKey representing a BIP32-Ed25519 extended private key.
* Always 96 bytes: 32-byte scalar + 32-byte IV + 32-byte chain code.
* Derivation implements the V2 scheme for CML compatibility.
*
* @since 2.0.0
* @category schemas
*/
export declare class Bip32PrivateKey extends Bip32PrivateKey_base {
toJSON(): {
_tag: "Bip32PrivateKey";
bytes: string;
};
toString(): string;
[Inspectable.NodeInspectSymbol](): unknown;
[Equal.symbol](that: unknown): boolean;
[Hash.symbol](): number;
}
/**
* Schema for transforming between Uint8Array and Bip32PrivateKey.
*
* @since 2.0.0
* @category schemas
*/
export declare const FromBytes: Schema.transform, Uint8Array, never>, Schema.SchemaClass>;
/**
* Schema for transforming between hex string and Bip32PrivateKey.
*
* @since 2.0.0
* @category schemas
*/
export declare const FromHex: Schema.transform, string, never>>, Schema.transform, Uint8Array, never>, Schema.SchemaClass>>;
/**
* Parse a Bip32PrivateKey from raw bytes.
*
* @since 2.0.0
* @category parsing
*/
export declare const fromBytes: (i: Uint8Array, overrideOptions?: import("effect/SchemaAST").ParseOptions) => Bip32PrivateKey;
/**
* Parse a Bip32PrivateKey from hex string.
*
* @since 2.0.0
* @category parsing
*/
export declare const fromHex: (i: string, overrideOptions?: import("effect/SchemaAST").ParseOptions) => Bip32PrivateKey;
/**
* Convert a Bip32PrivateKey to raw bytes.
*
* @since 2.0.0
* @category encoding
*/
export declare const toBytes: (a: Bip32PrivateKey, overrideOptions?: import("effect/SchemaAST").ParseOptions) => Uint8Array;
/**
* Convert a Bip32PrivateKey to hex string.
*
* @since 2.0.0
* @category encoding
*/
export declare const toHex: (a: Bip32PrivateKey, overrideOptions?: import("effect/SchemaAST").ParseOptions) => string;
/**
* Create a Bip32PrivateKey from BIP39 entropy with PBKDF2 key stretching.
*
* @since 2.0.0
* @category bip39
*/
export declare const fromBip39Entropy: (entropy: Uint8Array, password?: string) => Bip32PrivateKey;
/**
* Derive a child private key using a single derivation index (V2 scheme).
* Supports hardened (index >= 0x80000000) and soft derivation.
*
* @since 2.0.0
* @category bip32
*/
export declare const deriveChild: (bip32PrivateKey: Bip32PrivateKey, index: number) => Bip32PrivateKey;
/**
* Derive a child private key using multiple indices.
*
* @since 2.0.0
* @category bip32
*/
export declare const derive: (bip32PrivateKey: Bip32PrivateKey, indices: Array) => Bip32PrivateKey;
/**
* Derive a child private key using a BIP32 path string.
* Supports paths like "m/1852'/1815'/0'/0/0" or "1852'/1815'/0'/0/0".
*
* @since 2.0.0
* @category bip32
*/
export declare const derivePath: (bip32PrivateKey: Bip32PrivateKey, path: string) => Bip32PrivateKey;
/**
* Convert to standard (non-extended) PrivateKey (first 64 bytes: scalar + IV).
*
* @since 2.0.0
* @category conversion
*/
export declare const toPrivateKey: (bip32PrivateKey: Bip32PrivateKey) => PrivateKey.PrivateKey;
/**
* Derive the corresponding Bip32PublicKey.
*
* @since 2.0.0
* @category cryptography
*/
export declare const toPublicKey: (bip32PrivateKey: Bip32PrivateKey) => Bip32PublicKey.Bip32PublicKey;
/**
* Serialize to CML-compatible 128-byte format: [scalar(32) | iv(32) | publicKey(32) | chainCode(32)].
*
* @since 2.0.0
* @category cml-compatibility
*/
export declare const to128XPRV: (bip32PrivateKey: Bip32PrivateKey) => Uint8Array;
/**
* Create from CML-compatible 128-byte format.
*
* @since 2.0.0
* @category cml-compatibility
*/
export declare const from128XPRV: (bytes: Uint8Array) => Bip32PrivateKey;
export declare const arbitrary: FastCheck.Arbitrary;
export declare namespace Either {
const fromBip39Entropy: (entropy: Uint8Array, password?: string) => Effect.Effect;
const deriveChild: (bip32PrivateKey: Bip32PrivateKey, index: number) => Effect.Effect;
const derive: (bip32PrivateKey: Bip32PrivateKey, indices: Array) => Effect.Effect;
const derivePath: (bip32PrivateKey: Bip32PrivateKey, path: string) => Effect.Effect;
const toPrivateKey: (bip32PrivateKey: Bip32PrivateKey) => Effect.Effect;
const toPublicKey: (bip32PrivateKey: Bip32PrivateKey) => Effect.Effect;
const to_128_xprv: (bip32PrivateKey: Bip32PrivateKey) => Effect.Effect, Bip32PrivateKeyError, never>;
const from_128_xprv: (bytes: Uint8Array) => Effect.Effect;
}
/**
* Utility functions to build Cardano BIP44 derivation indices.
* Standard path: m/1852'/1815'/account'/role/index
*/
export declare const CardanoPath: {
harden: (n: number) => number;
indices: (account?: number, role?: 0 | 2, index?: number) => Array;
paymentIndices: (account?: number, index?: number) => Array;
stakeIndices: (account?: number, index?: number) => Array;
};
export {};
//# sourceMappingURL=Bip32PrivateKey.d.ts.map