Arcium LogoArcium TS SDK Docs
@arcium-hq/readerType aliases

ComputationFee

ComputationFee = { baseFee: anchor.BN; callbackCuLimit: number; priorityFee: anchor.BN; source: "account"; } | { callbackCuLimit: number; callbackTransactionsRequired: number; computationDefinitionOffset: number; cuPriceMicro: anchor.BN; customCallbackInstructionCount: number; queueTxSignature: string; source: "queueTx"; }

Fee information for a computation, tagged by the source it was read from.

  • account: read from the live on-chain ComputationAccount.executionFee.
  • queueTx: the raw queue-time ix inputs decoded from the original queueComputation instruction, for callers reconstructing a closed computation's fee from its queue transaction.

The queueTx variant surfaces raw inputs, not lamport fees. Exact reconstruction needs queue-time state absent from the ix: baseFee from cluster.cu_price x comp-def cuAmount, and priorityFee from cuPriceMicro x cuAmount plus a callback term. When callbackCuLimit is 0 (no explicit budget) that callback term defaults from customCallbackInstructionCount, so the count is surfaced for that case.