Repository navigation
feat(client): add a Falcon signer's extra fees with signerType - #43
Merged
Merged
Conversation
A Falcon-1024 (post-quantum) signature costs 3 fee units instead of 1,
so swaps from passkey accounts and Pera and Lute quantum accounts were
rejected for their fee. newQuote() and fetchQuote() take signerType
('ed25519', the default, or 'falcon'), sent as the router's signerType
parameter; with use-wallet, an account is Falcon when
getSignatureType(account.emptySignature) === 'pqsig'.
For a Falcon signer the SwapComposer adds 0.002 ALGO to the swap's input
transfer's fee for each transaction sent from the swap's address whose
fee the router's don't include: its app opt-ins, middleware's
transactions, addTransaction() and addMethodCall() (and the method's
transaction arguments). It decides from fetchExecuteSwapTxns's
signerType, not the quote's echo, so against a router that doesn't
include them (an older one, or one mid-update) it adds them for every
transaction the account sends. The user pays every fee. With
fetchQuote(), pass signerType to newSwap() too. SwapQuote.signerType
says which signer the quote is for.
txnlab-release-bot Bot
added a commit
that referenced
this pull request
Nov 8, 2026
# [3.5.0](v3.4.0...v3.5.0) (2026-11-08) ### Features * **client:** add a Falcon signer's extra fees with signerType ([#43](#43)) ([df476a9](df476a9))
Contributor
|
🎉 This PR is included in version 3.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
A Falcon-1024 (post-quantum) signature costs 3 fee units instead of 1, so swaps from passkey accounts and Pera and Lute quantum accounts were rejected for their fee.
newQuote()andfetchQuote()takesignerType('ed25519', the default, or'falcon'), sent as the router'ssignerTypeparameter. With use-wallet, an account is Falcon whengetSignatureType(account.emptySignature) === 'pqsig'.For a Falcon signer, the
SwapComposeradds 0.002 ALGO to the swap's input transfer's fee for each transaction sent from the swap's address whose fee the router's don't include: its app opt-ins, middleware's transactions,addTransaction()andaddMethodCall()(and the method's transaction arguments). The fee goes on before the group ID is assigned, and no transaction is added.It decides from
fetchExecuteSwapTxns'ssignerType, not the quote's echo, so against a router that doesn't include them (an older one, or one mid-update) it adds them for every transaction the account sends. WithfetchQuote(), passsignerTypetonewSwap()too.SwapQuote.signerTypesays which signer the quote is for. The user pays every fee.The router side is TxnLab/haystack-router 44b1f4e: a mainnet simulate of swaps for a Falcon account passes with these fees, and the same swaps without them fail. The README, MIDDLEWARE.md and the API docs cover it.