Skip to content

Commit f86cd63

Browse files
committed
docs(sdk): get_first_nonce_in_queue_from_batcher
1 parent eb456f7 commit f86cd63

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/3_guides/1.2_SDK_api_reference.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,30 @@ pub async fn get_nonce_from_batcher(
307307

308308
- `EthRpcError` if the batcher has an error in the Ethereum call when retrieving the nonce if not already cached.
309309

310+
### `get_first_nonce_in_queue_from_batcher`
311+
312+
Returns the nonce of the proof with the lowest nonce inside the batcher queue for a given address. This might be useful when you proofs are stuck in the batcher due to a low fee and you need to bump them.
313+
314+
```rust
315+
pub async fn get_first_nonce_in_queue_from_batcher(
316+
batcher_ws_url: &str,
317+
address: Address,
318+
) -> Result<U256, GetNonceError>
319+
```
320+
#### Arguments
321+
322+
323+
- `batcher_url` - The batcher websocket url.
324+
- `address` - The user address for which the nonce will be retrieved.
325+
326+
#### Returns
327+
328+
- `Result<U256, NonceError>` - The nonce of the first proof for the given address.
329+
330+
#### Errors
331+
332+
- `NoProofsInQueue` if the batcher does not have proofs in the queue for the given address.
333+
310334
### `get_chain_id`
311335

312336
Returns the chain id for a given rpc url.

0 commit comments

Comments
 (0)