Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt

Use this file to discover all available pages before exploring further.

Class Configuration for exponential-backoff polling loops used throughout the SDK.
class CrossmintPollingConfig
The delay between consecutive poll attempts grows exponentially from initialDelay up to maxDelay, with optional random jitter to prevent thundering-herd effects when many clients poll in parallel. The total number of attempts is capped at maxAttempts.

Constructors

CrossmintPollingConfig

const CrossmintPollingConfig({
  this.initialDelay = const Duration(seconds: 1),
  this.maxDelay = const Duration(seconds: 8),
  this.maxAttempts = 60,
  this.jitter = true,
  this.backoffFactor = 2.0,
})
Creates a polling configuration.

Properties

initialDelay

final Duration initialDelay
Delay before the first retry (doubles each attempt up to maxDelay).

maxDelay

final Duration maxDelay
Upper bound on the delay between attempts.

maxAttempts

final int maxAttempts
Maximum number of poll iterations before timing out.

jitter

final bool jitter
When true, each computed delay is multiplied by a random factor in the range [0.5, 1.0) to spread retries across time.

backoffFactor

final double backoffFactor
Multiplicative factor applied to the delay each iteration.

Methods

delayForAttempt

Duration delayForAttempt(int attempt, [Random? random])
Computes the delay for a given zero-based attempt index.