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
19 changes: 19 additions & 0 deletions .changeset/nine-frogs-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
"@evolution-sdk/evolution": minor
---

Add `sendAll()` API to TxBuilder for draining wallet assets to a single address.

This new method simplifies the common use case of transferring all wallet assets:
- Automatically selects all wallet UTxOs as inputs
- Creates a single output with all assets minus the transaction fee
- Properly calculates minUTxO for the destination output
- Validates incompatibility with other operations (payToAddress, collectFrom, mint, staking, governance)

Usage:
```typescript
const tx = await client
.newTx()
.sendAll({ to: recipientAddress })
.build()
```
61 changes: 61 additions & 0 deletions docs/content/docs/modules/sdk/builders/operations/SendAll.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: sdk/builders/operations/SendAll.ts
nav_order: 131
parent: Modules
---

## SendAll overview

SendAll operation - sends all wallet assets to a recipient address.

This operation marks the transaction as a "send all" transaction,
which triggers special handling in the build phases:

1. All wallet UTxOs are collected as inputs
2. A single output is created with all assets minus fee
3. No change output is created (everything goes to recipient)

Added in v2.0.0

---

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

- [programs](#programs)
- [createSendAllProgram](#createsendallprogram)
- [types](#types)
- [SendAllTarget (type alias)](#sendalltarget-type-alias)

---

# programs

## createSendAllProgram

Creates a ProgramStep for sendAll operation.

This sets up the sendAll mode in the builder state, which is processed
during the build phases. The actual UTxO collection and output creation
happens during the build process when wallet UTxOs are available.

**Signature**

```ts
export declare const createSendAllProgram: (params: SendAllParams) => Effect.Effect<void, never, TxContext>
```

Added in v2.0.0

# types

## SendAllTarget (type alias)

Type representing the sendAll target address in builder state.

**Signature**

```ts
export type SendAllTarget = CoreAddress.Address
```

Added in v2.0.0
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/SingleHostAddr.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: SingleHostAddr.ts
nav_order: 163
nav_order: 164
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/SingleHostName.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: SingleHostName.ts
nav_order: 164
nav_order: 165
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/StakeReference.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: StakeReference.ts
nav_order: 165
nav_order: 166
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TSchema.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TSchema.ts
nav_order: 180
nav_order: 181
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Text.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Text.ts
nav_order: 166
nav_order: 167
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Text128.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Text128.ts
nav_order: 167
nav_order: 168
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Time/Slot.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Time/Slot.ts
nav_order: 168
nav_order: 169
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Time/SlotConfig.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Time/SlotConfig.ts
nav_order: 169
nav_order: 170
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Time/UnixTime.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Time/UnixTime.ts
nav_order: 170
nav_order: 171
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Transaction.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Transaction.ts
nav_order: 171
nav_order: 172
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TransactionBody.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionBody.ts
nav_order: 172
nav_order: 173
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TransactionHash.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionHash.ts
nav_order: 173
nav_order: 174
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TransactionIndex.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionIndex.ts
nav_order: 174
nav_order: 175
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TransactionInput.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionInput.ts
nav_order: 175
nav_order: 176
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TransactionMetadatum.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionMetadatum.ts
nav_order: 176
nav_order: 177
parent: Modules
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionMetadatumLabels.ts
nav_order: 177
nav_order: 178
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TransactionOutput.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionOutput.ts
nav_order: 178
nav_order: 179
parent: Modules
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TransactionWitnessSet.ts
nav_order: 179
nav_order: 180
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/TxOut.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TxOut.ts
nav_order: 181
nav_order: 182
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/UTxO.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: UTxO.ts
nav_order: 188
nav_order: 189
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/UnitInterval.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: UnitInterval.ts
nav_order: 182
nav_order: 183
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Url.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Url.ts
nav_order: 184
nav_order: 185
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/VKey.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: VKey.ts
nav_order: 190
nav_order: 191
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Value.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Value.ts
nav_order: 189
nav_order: 190
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/VotingProcedures.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: VotingProcedures.ts
nav_order: 191
nav_order: 192
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/VrfCert.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: VrfCert.ts
nav_order: 192
nav_order: 193
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/VrfKeyHash.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: VrfKeyHash.ts
nav_order: 193
nav_order: 194
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/VrfVkey.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: VrfVkey.ts
nav_order: 194
nav_order: 195
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/Withdrawals.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Withdrawals.ts
nav_order: 195
nav_order: 196
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/sdk/EvalRedeemer.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/EvalRedeemer.ts
nav_order: 154
nav_order: 155
parent: Modules
---

Expand Down
2 changes: 1 addition & 1 deletion packages/evolution/docs/modules/sdk/Type.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/Type.ts
nav_order: 160
nav_order: 161
parent: Modules
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/builders/RedeemerBuilder.ts
nav_order: 143
nav_order: 144
parent: Modules
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/builders/SignBuilder.ts
nav_order: 144
nav_order: 145
parent: Modules
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/builders/SignBuilderImpl.ts
nav_order: 145
nav_order: 146
parent: Modules
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/builders/SubmitBuilder.ts
nav_order: 146
nav_order: 147
parent: Modules
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: sdk/builders/SubmitBuilderImpl.ts
nav_order: 147
nav_order: 148
parent: Modules
---

Expand Down
Loading