diff --git a/docs/3_guides/1.2_SDK_api_reference.md b/docs/3_guides/1.2_SDK_api_reference.md index 8bc3ca4dfa..08a2e02c03 100644 --- a/docs/3_guides/1.2_SDK_api_reference.md +++ b/docs/3_guides/1.2_SDK_api_reference.md @@ -307,6 +307,30 @@ pub async fn get_nonce_from_batcher( - `EthRpcError` if the batcher has an error in the Ethereum call when retrieving the nonce if not already cached. +### `get_first_nonce_in_queue_from_batcher` + +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. + +```rust +pub async fn get_first_nonce_in_queue_from_batcher( + batcher_ws_url: &str, + address: Address, +) -> Result +``` +#### Arguments + + +- `batcher_url` - The batcher websocket url. +- `address` - The user address for which the nonce will be retrieved. + +#### Returns + +- `Result` - The nonce of the first proof for the given address. + +#### Errors + +- `NoProofsInQueue` if the batcher does not have proofs in the queue for the given address. + ### `get_chain_id` Returns the chain id for a given rpc url.