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
2 changes: 1 addition & 1 deletion docs/content/docs/modules/core/Function.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export declare const makeCBOREncodeEither: <A, T extends CBOR.CBOR, E extends Er
schemaTransformer: Schema.Schema<A, T>,
ErrorClass: ErrorCtor<E>,
defaultOptions?: CBOR.CodecOptions
) => (input: A, options?: CBOR.CodecOptions) => Either.Either<Uint8Array, E>
) => (value: A, options?: CBOR.CodecOptions) => Either.Either<Uint8Array, E>
```

## makeCBOREncodeHexEither
Expand Down
17 changes: 17 additions & 0 deletions docs/content/docs/modules/core/Value.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ parent: Modules
- [arbitrary](#arbitrary)
- [model](#model)
- [ValueCDDL (type alias)](#valuecddl-type-alias)
- [ordering](#ordering)
- [geq](#geq)
- [parsing](#parsing)
- [fromCBORBytes](#fromcborbytes)
- [fromCBORHex](#fromcborhex)
Expand Down Expand Up @@ -168,6 +170,21 @@ export type ValueCDDL = typeof FromCDDL.Type

Added in v2.0.0

# ordering

## geq

Check if Value a is greater than or equal to Value b.
This means after subtracting b from a, the result would not be negative.

**Signature**

```ts
export declare const geq: (a: Value, b: Value) => boolean
```

Added in v2.0.0

# parsing

## fromCBORBytes
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Credential.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Credential.ts
nav_order: 135
nav_order: 139
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Datum.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Datum.ts
nav_order: 136
nav_order: 140
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Delegation.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Delegation.ts
nav_order: 137
nav_order: 141
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Devnet/Devnet.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Devnet/Devnet.ts
nav_order: 138
nav_order: 142
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Devnet/DevnetDefault.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Devnet/DevnetDefault.ts
nav_order: 139
nav_order: 143
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/EvalRedeemer.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/EvalRedeemer.ts
nav_order: 140
nav_order: 144
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Label.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Label.ts
nav_order: 141
nav_order: 145
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/OutRef.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/OutRef.ts
nav_order: 142
nav_order: 146
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/PolicyId.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/PolicyId.ts
nav_order: 143
nav_order: 147
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/ProtocolParameters.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/ProtocolParameters.ts
nav_order: 144
nav_order: 148
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/RewardAddress.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/RewardAddress.ts
nav_order: 150
nav_order: 154
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Script.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Script.ts
nav_order: 151
nav_order: 155
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Type.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Type.ts
nav_order: 152
nav_order: 156
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/UTxO.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/UTxO.ts
nav_order: 154
nav_order: 158
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/modules/sdk/Unit.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Unit.ts
nav_order: 153
nav_order: 157
parent: Modules
---

Expand Down
61 changes: 21 additions & 40 deletions docs/content/docs/modules/sdk/builders/SignBuilder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,76 +10,57 @@ parent: Modules

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

- [utils](#utils)
- [interfaces](#interfaces)
- [SignBuilder (interface)](#signbuilder-interface)
- [SignBuilderEffect (interface)](#signbuildereffect-interface)
- [SubmitBuilder (interface)](#submitbuilder-interface)
- [SubmitBuilderEffect (interface)](#submitbuildereffect-interface)

---

# utils
# interfaces

## SignBuilder (interface)

SignBuilder extends TransactionResultBase with signing capabilities.

Only available when the client has a signing wallet (seed, private key, or API wallet).
Provides access to unsigned transaction (via base interface) and signing operations.

**Signature**

```ts
export interface SignBuilder extends EffectToPromiseAPI<SignBuilderEffect> {
export interface SignBuilder extends TransactionResultBase, EffectToPromiseAPI<SignBuilderEffect> {
readonly Effect: SignBuilderEffect
}
```

Added in v2.0.0

## SignBuilderEffect (interface)

Effect-based API for SignBuilder operations.

Includes all TransactionResultBase.Effect methods plus signing-specific operations.

**Signature**

```ts
export interface SignBuilderEffect {
// Main signing method - produces a fully signed transaction ready for submission
readonly sign: () => Effect.Effect<SubmitBuilder, TransactionBuilderError>
// Base transaction methods (from TransactionResultBase)
readonly toTransaction: () => Effect.Effect<Transaction.Transaction, TransactionBuilderError>
readonly toTransactionWithFakeWitnesses: () => Effect.Effect<Transaction.Transaction, TransactionBuilderError>
readonly estimateFee: () => Effect.Effect<bigint, TransactionBuilderError>

// Add external witness and proceed to submission
// Signing methods
readonly sign: () => Effect.Effect<SubmitBuilder, TransactionBuilderError>
readonly signWithWitness: (
witnessSet: TransactionWitnessSet.TransactionWitnessSet
) => Effect.Effect<SubmitBuilder, TransactionBuilderError>

// Assemble multiple witnesses into a complete transaction ready for submission
readonly assemble: (
witnesses: ReadonlyArray<TransactionWitnessSet.TransactionWitnessSet>
) => Effect.Effect<SubmitBuilder, TransactionBuilderError>

// Partial signing - creates witness without advancing to submission (useful for multi-sig)
readonly partialSign: () => Effect.Effect<TransactionWitnessSet.TransactionWitnessSet, TransactionBuilderError>

// Get witness set without signing (for inspection)
readonly getWitnessSet: () => Effect.Effect<TransactionWitnessSet.TransactionWitnessSet, TransactionBuilderError>

// Get the unsigned transaction (for inspection)
readonly toTransaction: () => Effect.Effect<Transaction.Transaction, TransactionBuilderError>

// Get the transaction with fake witnesses (for fee validation)
readonly toTransactionWithFakeWitnesses: () => Effect.Effect<Transaction.Transaction, TransactionBuilderError>
}
```

## SubmitBuilder (interface)

**Signature**

```ts
export interface SubmitBuilder extends EffectToPromiseAPI<SubmitBuilderEffect> {
readonly Effect: SubmitBuilderEffect
readonly witnessSet: TransactionWitnessSet.TransactionWitnessSet
}
```

## SubmitBuilderEffect (interface)

**Signature**

```ts
export interface SubmitBuilderEffect {
readonly submit: () => Effect.Effect<string, TransactionBuilderError>
}
```
Added in v2.0.0
51 changes: 51 additions & 0 deletions docs/content/docs/modules/sdk/builders/SignBuilderImpl.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: sdk/builders/SignBuilderImpl.ts
nav_order: 130
parent: Modules
---

## SignBuilderImpl overview

SignBuilder Implementation

Handles transaction signing by delegating to the wallet's signTx Effect method.
The SignBuilder is responsible for:

1. Providing the transaction and UTxO context to the wallet
2. Managing the transition from unsigned to signed transaction
3. Creating the SubmitBuilder for transaction submission

The actual signing logic (determining required signers, creating witnesses)
is the wallet's responsibility.

Added in v2.0.0

---

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

- [constructors](#constructors)
- [makeSignBuilder](#makesignbuilder)

---

# constructors

## makeSignBuilder

Create a SignBuilder instance for a built transaction.

**Signature**

```ts
export declare const makeSignBuilder: (params: {
transaction: Transaction.Transaction
transactionWithFakeWitnesses: Transaction.Transaction
fee: bigint
utxos: ReadonlyArray<UTxO.UTxO>
provider: Provider.Provider
wallet: Wallet
}) => SignBuilder
```

Added in v2.0.0
79 changes: 79 additions & 0 deletions docs/content/docs/modules/sdk/builders/SubmitBuilder.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: sdk/builders/SubmitBuilder.ts
nav_order: 131
parent: Modules
---

## SubmitBuilder overview

SubmitBuilder - Final stage of transaction lifecycle

Represents a signed transaction ready for submission to the blockchain.
Provides the submit() method to broadcast the transaction and retrieve the transaction hash.

Added in v2.0.0

---

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

- [interfaces](#interfaces)
- [SubmitBuilder (interface)](#submitbuilder-interface)
- [SubmitBuilderEffect (interface)](#submitbuildereffect-interface)

---

# interfaces

## SubmitBuilder (interface)

SubmitBuilder - represents a signed transaction ready for submission.

The final stage in the transaction lifecycle after building and signing.
Provides the submit() method to broadcast the transaction to the blockchain
and retrieve the transaction hash.

**Signature**

```ts
export interface SubmitBuilder extends EffectToPromiseAPI<SubmitBuilderEffect> {
/**
* Effect-based API for compositional workflows.
*
* @since 2.0.0
*/
readonly Effect: SubmitBuilderEffect

/**
* The witness set containing all signatures for this transaction.
*
* Can be used to inspect the signatures or combine with other witness sets
* for multi-party signing scenarios.
*
* @since 2.0.0
*/
readonly witnessSet: TransactionWitnessSet.TransactionWitnessSet
}
```

Added in v2.0.0

## SubmitBuilderEffect (interface)

Effect-based API for SubmitBuilder operations.

**Signature**

```ts
export interface SubmitBuilderEffect {
/**
* Submit the signed transaction to the blockchain via the provider.
*
* @returns Effect resolving to the transaction hash
* @since 2.0.0
*/
readonly submit: () => Effect.Effect<string, TransactionBuilderError>
}
```

Added in v2.0.0
Loading