Feature: Expose the build_fee_block#37
Merged
Merged
Conversation
rkeene
approved these changes
Jul 23, 2026
| #[derive(Clone, Copy)] | ||
| struct FeePayer<'a> { | ||
| account: &'a AccountRef, | ||
| signer: &'a AccountRef, |
Member
There was a problem hiding this comment.
In the future we might want to see if it's possible to use the type system to enforce that only keyed accounts can be the signer as is done in the TypeScript SDK
Srayman
reviewed
Jul 23, 2026
Srayman
approved these changes
Jul 23, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a29fdf8. Configure here.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
Aligns fee payment DX across Rust, WASM, WASI, and Java with TS's
generateFeeBlockmodel.Examples
Rust
Java
Breaking
TransmitOptions.fee_signerfield removedNote
Medium Risk
Breaking transmit-options API and changes how staples are assembled and published when fees are required; mistakes affect all client bindings but behavior is heavily covered by new fee E2E tests.
Overview
Breaking:
TransmitOptions.fee_signeris removed. Fee payment during transmit/recover now goes through an optionalgenerate_fee_blockcallback invoked with the temporary-round staple; common cases usewith_fee_signerorwith_fee_block_from(delegated signing, e.g. storage account pays while the owner signs).The Rust client adds a public
build_fee_blockthat builds/signs the fee block from staple votes, honors fee-token priority, and chains the payer after their tip in the staple or their ledger head so the payer need not be in the round. Factory failures surfaceFeeBlockFactory; missing factory when fees are required still yieldsFEE_REQUIRED.WASI gains staple handles and fee helpers (
keeta_fees_required,keeta_staple_fee_sends,keeta_staple_tip_for,keeta_base_token,keeta_vote_staple_new), replacing the single-votekeeta_fee_sendpath. Java mirrors TS-styleTransmitOptions/GenerateFeeBlock; WASM addssetGenerateFeeBlock,buildFeeBlock, and preserves coded errors from JS factories instead of always mapping toFEE_BLOCK_FACTORY.CI/Makefile pin
cargo install cargo-audit --locked. Block testing addsrandom_ed25519_ref. Fee coverage expands across Rust E2E, Playwright (fee.spec.ts+ dual fee-enforcing server), and the Java fee harness (self-pay, storage/delegated pay, typedFEE_REQUIRED).Reviewed by Cursor Bugbot for commit 6e64761. Bugbot is set up for automated code reviews on this repo. Configure here.