import { Effect, FastCheck, Inspectable, ParseResult, Schema } from "effect"; import * as Natural from "./Natural.js"; import * as KeyHash from "./KeyHash.js"; import * as Pointer from "./Pointer.js"; import * as ScriptHash from "./ScriptHash.js"; declare const PointerAddressError_base: new = {}>(args: import("effect/Types").Equals extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "PointerAddressError"; } & Readonly; /** * Error thrown when address operations fail * * @since 2.0.0 * @category model */ export declare class PointerAddressError extends PointerAddressError_base<{ message: string; cause?: unknown; }> { } declare const NominalType: unique symbol; export interface PointerAddress { readonly [NominalType]: unique symbol; } declare const PointerAddress_base: Schema.TaggedClass; } & { networkId: Schema.brand, "NetworkId">; paymentCredential: Schema.Union<[typeof KeyHash.KeyHash, typeof ScriptHash.ScriptHash]>; pointer: typeof Pointer.Pointer; }>; /** * Pointer address with payment credential and pointer to stake registration * * @since 2.0.0 * @category schemas */ export declare class PointerAddress extends PointerAddress_base { [Inspectable.NodeInspectSymbol](): { _tag: string; networkId: number & import("effect/Brand").Brand<"NetworkId">; paymentCredential: KeyHash.KeyHash | ScriptHash.ScriptHash; pointer: Pointer.Pointer; }; } export declare const Bytes: Schema.transformOrFail; export declare const HexString: Schema.transformOrFail, string & import("effect/Brand").Brand<"HexString">, never>, typeof PointerAddress, never>; /** * Encode a number as a variable length integer following the Cardano ledger specification * * @since 2.0.0 * @category encoding/decoding */ export declare const encodeVariableLength: (natural: Natural.Natural) => Effect.Effect, ParseResult.ParseIssue, never>; /** * Decode a variable length integer from a Uint8Array * Following the Cardano ledger implementation for variable-length integers * * @example * import { PointerAddress } from "@lucid-evolution/experimental"; * import { Effect } from "effect"; * import assert from "assert"; * * // Create a buffer that encodes the value 128 * const buffer = new Uint8Array([0x80, 0x01]); * * const effect = PointerAddress.decodeVariableLength(buffer, 0); * const [natural, bytesRead] = Effect.runSync(effect); * assert(natural === 128); * assert(bytesRead === 2); * * @since 2.0.0 * @category encoding/decoding */ export declare const decodeVariableLength: (bytes: Uint8Array, offset?: number | undefined) => Effect.Effect<[ Natural.Natural, number ], PointerAddressError | ParseResult.ParseIssue>; /** * Check if two PointerAddress instances are equal. * * * @since 2.0.0 * @category equality */ export declare const equals: (a: PointerAddress, b: PointerAddress) => boolean; /** * Generate a random PointerAddress. * * @example * import { PointerAddress } from "@lucid-evolution/experimental"; * import { FastCheck } from "effect"; * import assert from "assert"; * * const randomSamples = FastCheck.sample(PointerAddress.generator, 20); * randomSamples.forEach((address) => { * assert(address._tag === "PointerAddress"); * assert(typeof address.networkId === "number"); * assert(address.pointer.slot > 0); * assert(address.pointer.txIndex > 0); * assert(address.pointer.certIndex > 0); * }); * * @since 2.0.0 * @category generators */ export declare const generator: FastCheck.Arbitrary; export {}; //# sourceMappingURL=PointerAddress.d.ts.map