Arcium LogoArcium TS SDK Docs

getComputationFeeFromQueueTx

getComputationFeeFromQueueTx(arciumProgram, queueTxSignature, mxeProgramId, computationOffset, opts?): Promise<ComputationAccount>

Decode a closed computation's raw fee inputs from its queue_computation transaction.

Fetches the exact queueTxSignature (no signature scanning), rejects a failed or unavailable tx, and decodes the queue_computation ix matching mxeProgramId + computationOffset. Reads no current MXE/cluster state, so it stays correct across cluster migration.

Pass opts.cluster to additionally bind the match to the comp PDA derived from that historical cluster (rejects a same-tx queue for a different cluster's PDA). Omit it for the common case of a single queue per tx.

Returns raw queue-time ix inputs, not lamport fees. Exact reconstruction also needs queue-time state absent from the ix: cluster cu_price, comp-def cuAmount, and the callback context: when callbackCuLimit is 0 the callback priority term defaults from customCallbackInstructionCount.

Parameters

ParameterTypeDescription
arciumProgramProgram<Arcium>Anchor program instance (Arcium IDL).
queueTxSignaturestringSignature of the tx that queued the computation.
mxeProgramIdPublicKeyMXE program the computation belongs to.
computationOffsetBNComputation offset.
opts{ cluster?: number; commitment?: Commitment; }cluster binds the match to a historical cluster's comp PDA; commitment maps to confirmed/finalized for the tx fetch.
opts.cluster?number-
opts.commitment?Commitment-

Returns

Promise<ComputationAccount>

The queueTx fee variant.

Throws

Error if the tx is unavailable, failed, or carries no matching queue_computation instruction.

On this page