Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/components/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export default function DefaultSearchDialog(props: SharedProps) {
// the site lives under a subpath (e.g. /evolution-sdk). Set
// NEXT_PUBLIC_BASE_PATH=/evolution-sdk in CI so the client requests the
// correct static search JSON. Falls back to empty string for local dev.
const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? ''
const normalizedBase = basePath.endsWith('/') && basePath.length > 1 ? basePath.slice(0, -1) : basePath
const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? ""
const normalizedBase = basePath.endsWith("/") && basePath.length > 1 ? basePath.slice(0, -1) : basePath
const apiFrom = `${normalizedBase}/api/search`

const { search, setSearch, query } = useDocsSearch({
type: "static",
initOrama,
locale,
from: apiFrom,
from: apiFrom
})

return (
Expand Down
12 changes: 12 additions & 0 deletions docs/content/docs/modules/Data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ parent: Modules
- [ByteArray (type alias)](#bytearray-type-alias)
- [CDDLSchema](#cddlschema)
- [Int (type alias)](#int-type-alias)
- [equals](#equals)

---

Expand Down Expand Up @@ -742,3 +743,14 @@ export declare const CDDLSchema: Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>
```ts
export type Int = typeof IntSchema.Type
```

## equals

Deep structural equality for Plutus Data values.
Handles maps, lists, ints, bytes, and constrs.

**Signature**

```ts
export declare const equals: (a: Data, b: Data) => boolean
```
54 changes: 23 additions & 31 deletions docs/content/docs/modules/DatumOption.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ parent: Modules
- [DatumHash (class)](#datumhash-class)
- [toString (method)](#tostring-method)
- [[Symbol.for("nodejs.util.inspect.custom")] (method)](#symbolfornodejsutilinspectcustom-method)
- [DatumOptionCDDLSchema](#datumoptioncddlschema)
- [DatumOptionSchema](#datumoptionschema)
- [FromCBORBytes](#fromcborbytes-1)
- [FromCBORHex](#fromcborhex-1)
Expand All @@ -45,6 +44,7 @@ parent: Modules
- [testing](#testing)
- [arbitrary](#arbitrary)
- [utils](#utils)
- [CDDLSchema](#cddlschema)
- [DatumHashFromBytes](#datumhashfrombytes)
- [datumHashArbitrary](#datumhasharbitrary)
- [inlineDatumArbitrary](#inlinedatumarbitrary)
Expand Down Expand Up @@ -243,36 +243,6 @@ toString(): string
[Symbol.for("nodejs.util.inspect.custom")](): string
```

## DatumOptionCDDLSchema

CDDL schema for DatumOption.
datum_option = [0, Bytes32] / [1, #6.24(bytes)]

Where:

- [0, Bytes32] represents a datum hash (tag 0 with 32-byte hash)
- [1, #6.24(bytes)] represents inline data (tag 1 with CBOR tag 24 containing plutus data as bytes)

**Signature**

```ts
export declare const DatumOptionCDDLSchema: Schema.transformOrFail<
Schema.Union<
[
Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
Schema.Tuple2<
Schema.Literal<[1n]>,
Schema.TaggedStruct<"Tag", { tag: Schema.Literal<[24]>; value: typeof Schema.Uint8ArrayFromSelf }>
>
]
>,
Schema.SchemaClass<DatumHash | InlineDatum, DatumHash | InlineDatum, never>,
never
>
```

Added in v2.0.0

## DatumOptionSchema

Schema for DatumOption representing optional datum information in transaction outputs.
Expand Down Expand Up @@ -366,6 +336,12 @@ Added in v2.0.0
## FromCDDL

CDDL schema for DatumOption.
datum_option = [0, Bytes32] / [1, #6.24(bytes)]

Where:

- [0, Bytes32] represents a datum hash (tag 0 with 32-byte hash)
- [1, #6.24(bytes)] represents inline data (tag 1 with CBOR tag 24 containing plutus data as bytes)

**Signature**

Expand Down Expand Up @@ -432,6 +408,22 @@ Added in v2.0.0

# utils

## CDDLSchema

**Signature**

```ts
export declare const CDDLSchema: Schema.Union<
[
Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
Schema.Tuple2<
Schema.Literal<[1n]>,
Schema.TaggedStruct<"Tag", { tag: Schema.Literal<[24]>; value: typeof Schema.Uint8ArrayFromSelf }>
>
]
>
```

## DatumHashFromBytes

**Signature**
Expand Down
167 changes: 79 additions & 88 deletions docs/content/docs/modules/KeyHash.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ parent: Modules

<h2 className="text-delta">Table of contents</h2>

- [arbitrary](#arbitrary)
- [arbitrary](#arbitrary-1)
- [constructors](#constructors)
- [fromPrivateKey](#fromprivatekey)
- [fromVKey](#fromvkey)
- [make](#make)
- [effect](#effect)
- [either](#either)
- [Either (namespace)](#either-namespace)
- [encoding](#encoding)
- [encoding/decoding](#encodingdecoding)
- [fromBytes](#frombytes)
- [fromHex](#fromhex)
- [toBytes](#tobytes)
- [toHex](#tohex)
- [equality](#equality)
Expand All @@ -25,25 +31,55 @@ parent: Modules
- [KeyHash (class)](#keyhash-class)
- [toJSON (method)](#tojson-method)
- [toString (method)](#tostring-method)
- [parsing](#parsing)
- [fromBytes](#frombytes)
- [fromHex](#fromhex)
- [schemas](#schemas)
- [transformer](#transformer)
- [FromBytes](#frombytes-1)
- [FromHex](#fromhex-1)
- [testing](#testing)
- [arbitrary](#arbitrary)
- [utils](#utils)
- [fromPrivateKey](#fromprivatekey)
- [fromVKey](#fromvkey)

---

# arbitrary

## arbitrary

FastCheck arbitrary for generating random KeyHash instances.

**Signature**

```ts
export declare const arbitrary: FastCheck.Arbitrary<KeyHash>
```

Added in v2.0.0

# constructors

## fromPrivateKey

Create a KeyHash from a PrivateKey

**Signature**

```ts
export declare const fromPrivateKey: (privateKey: PrivateKey) => KeyHash
```

Added in v2.0.0

## fromVKey

Create a KeyHash from a VKey

**Signature**

```ts
export declare const fromVKey: (vkey: VKey.VKey) => KeyHash
```

Added in v2.0.0

## make

Smart constructor for KeyHash that validates and applies branding.
Smart constructor for KeyHash

**Signature**

Expand All @@ -53,15 +89,39 @@ export declare const make: (props: { readonly hash: any }, options?: Schema.Make

Added in v2.0.0

# effect
# either

## Either (namespace)

Effect-based error handling variants for functions that can fail.
Either-based error handling variants for functions that can fail.

Added in v2.0.0

# encoding
# encoding/decoding

## fromBytes

Decode a KeyHash from raw bytes.

**Signature**

```ts
export declare const fromBytes: (input: any) => KeyHash
```

Added in v2.0.0

## fromHex

Decode a KeyHash from a hex string.

**Signature**

```ts
export declare const fromHex: (input: string) => KeyHash
```

Added in v2.0.0

## toBytes

Expand Down Expand Up @@ -119,16 +179,14 @@ Added in v2.0.0

## KeyHash (class)

KeyHash as a TaggedClass (breaking change from branded hex string).
KeyHash

CDDL:

```
addr_keyhash = hash28
```

Follows CIP-0019 binary representation.

Stores raw 28-byte value for performance.

**Signature**

```ts
Expand All @@ -153,35 +211,7 @@ toJSON(): string
toString(): string
```

# parsing

## fromBytes

Parse a KeyHash from raw bytes.
Expects exactly 28 bytes.

**Signature**

```ts
export declare const fromBytes: (input: any) => KeyHash
```

Added in v2.0.0

## fromHex

Parse a KeyHash from a hex string.
Expects exactly 56 hex characters (28 bytes).

**Signature**

```ts
export declare const fromHex: (input: string) => KeyHash
```

Added in v2.0.0

# schemas
# transformer

## FromBytes

Expand Down Expand Up @@ -209,42 +239,3 @@ export declare const FromHex: Schema.transform<
```

Added in v2.0.0

# testing

## arbitrary

FastCheck arbitrary for generating random KeyHash instances.
Used for property-based testing to generate valid test data.

**Signature**

```ts
export declare const arbitrary: FastCheck.Arbitrary<KeyHash>
```

Added in v2.0.0

# utils

## fromPrivateKey

Create a KeyHash from a PrivateKey (sync version that throws KeyHashError).
All errors are normalized to KeyHashError with contextual information.

**Signature**

```ts
export declare const fromPrivateKey: (privateKey: PrivateKey) => KeyHash
```

## fromVKey

Create a KeyHash from a VKey (sync version that throws KeyHashError).
All errors are normalized to KeyHashError with contextual information.

**Signature**

```ts
export declare const fromVKey: (vkey: VKey.VKey) => KeyHash
```
15 changes: 15 additions & 0 deletions docs/content/docs/modules/ScriptRef.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ parent: Modules
- [ScriptRef (class)](#scriptref-class)
- [toJSON (method)](#tojson-method)
- [toString (method)](#tostring-method)
- [utils](#utils)
- [CDDLSchema](#cddlschema)

---

Expand Down Expand Up @@ -344,3 +346,16 @@ toJSON(): string
```ts
toString(): string
```

# utils

## CDDLSchema

**Signature**

```ts
export declare const CDDLSchema: Schema.TaggedStruct<
"Tag",
{ tag: Schema.Literal<[24]>; value: typeof Schema.Uint8ArrayFromSelf }
>
```
Loading