Skip to main content

PlanTransactionRequest

HardKAS SDK


HardKAS SDK / tx-builder/src / PlanTransactionRequest

Interface: PlanTransactionRequest

Defined in: packages/tx-builder/src/service.ts:20

Properties​

amountSompi​

amountSompi: bigint

Defined in: packages/tx-builder/src/service.ts:23


changeAddress?​

optional changeAddress?: string

Defined in: packages/tx-builder/src/service.ts:58

Wave 13 · CHANGEADDR-1 · Explicit change-output destination.

Optional. When present, the selected planner routes the change output (if any) to this address instead of fromAddress. Semantics are effectiveChangeAddress = request.changeAddress ?? request.fromAddress — the ONLY fallback. No inference from account aliases, execution mode, network profile, or any orchestration state.

Forwarded by:

  • planTransactionUpstream → kaspa-wasm buildTransactions.changeAddress
  • planTransaction / planTransactionSynthetic → buildPaymentPlan.changeAddress

Preserves pre-Wave-13 behaviour when omitted: every existing caller whose object literal does NOT set this field continues to route change to fromAddress. Adding the field is backward-compatible; no existing call sites require migration.


excludeOutpoints?​

optional excludeOutpoints?: Set<string>

Defined in: packages/tx-builder/src/service.ts:39

Outpoint keys ("txId:index") to exclude from coin selection (e.g. pending-spent UTXOs).


feeEstimator?​

optional feeEstimator?: (inputs, outputs) => Promise<bigint>

Defined in: packages/tx-builder/src/service.ts:36

Parameters​

inputs​

number

outputs​

number

Returns​

Promise<bigint>


feePolicy?​

optional feePolicy?: "legacy" | "toccata" | "auto"

Defined in: packages/tx-builder/src/service.ts:35


feeRate?​

optional feeRate?: bigint

Defined in: packages/tx-builder/src/service.ts:31


fromAddress​

fromAddress: string

Defined in: packages/tx-builder/src/service.ts:21


genesisCovenantGroups?​

optional genesisCovenantGroups?: object[]

Defined in: packages/tx-builder/src/service.ts:37

authorizingInput​

authorizingInput: number

outputIndices​

outputIndices: number[]


networkId?​

optional networkId?: string

Defined in: packages/tx-builder/src/service.ts:33

Network whose mass parameters the SDK applies (defaults to simnet).


outputs?​

optional outputs?: object[]

Defined in: packages/tx-builder/src/service.ts:30

Optional multi-output override for the upstream planner (planTransactionUpstream). When present, the planner ignores toAddress/amountSompi and pays these outputs instead. Ignored by the legacy planTransaction path.

address​

address: string

amountSompi​

amountSompi: bigint


toAddress​

toAddress: string

Defined in: packages/tx-builder/src/service.ts:22


version?​

optional version?: 0 | 1

Defined in: packages/tx-builder/src/service.ts:34