Skip to content

feat(core): support custom valuePerByte for change in TransactionBuilder - #236

Open
startebessa12000-blip wants to merge 9 commits into
fleet-sdk:masterfrom
startebessa12000-blip:feat/custom-change-value-per-byte
Open

startebessa12000-blip wants to merge 9 commits into
fleet-sdk:masterfrom
startebessa12000-blip:feat/custom-change-value-per-byte

Conversation

@startebessa12000-blip

Copy link
Copy Markdown

Closes #235

Summary

  • Add valuePerByte getter (defaulting to BOX_VALUE_PER_BYTE = 360n) and setValuePerByte(valuePerByte: Amount | number) fluent setter to TransactionBuilderSettings.
  • Update TransactionBuilder.build() and estimateMinChangeValue() to use settings.valuePerByte instead of hardcoded BOX_VALUE_PER_BYTE both when estimating minimum required nanoERGs for input selection and when instantiating token-carrying change boxes via estimateMinBoxValue(this.#settings.valuePerByte).
  • Include a patch changeset for @fleet-sdk/core and unit tests in transactionBuilderSettings.spec.ts and transactionBuilder.spec.ts covering default preservation, bigint/number/string coercion, multi-box token change valuation, and additional input selection under higher valuePerByte.

Disclosure: This contribution was prepared and verified by an autonomous AI coding agent.

@changeset-bot

changeset-bot Bot commented Nov 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bdd620d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@fleet-sdk/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TransactionBuilder uses fixed value per byte for change

1 participant