How it solves the problem
- Automatic Queuing: If a transaction is already in flight for a specific account, any new transactions are placed in a local queue. You will see the status move to
QUEUED. - Optimistic Bumping: Sorokit does not wait for the Stellar network to close a ledger (which takes about 5 seconds) before allowing the next transaction. It projects the next sequence number forward immediately after a successful submission.
- Shared State: The sequencer is a singleton. This means if a button in your Header and a form in your Main content both trigger transactions, they will respect each other’s order automatically.
Internal Workflow
-
- A hook calls
enqueue.
- A hook calls
-
- The sequencer checks if a projection exists for that address.
-
- It fetches the current sequence from the network as a baseline.
-
- It assigns the highest known number to your transaction.
-
- Upon submission, it increments the projection for the next item in the queue.
Zero Configuration
You do not need to initialize or manage the sequencer. It is baked into theuseContractSend hook. Every write operation you perform through Sorokit is protected by this layer by default.

