Skip to content

Commit

Permalink
docs(sdk): get_first_nonce_in_queue_from_batcher
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosNicolau committed Dec 4, 2024
1 parent 0d6e3ea commit c8fe0c4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/3_guides/1.2_SDK_api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<U256, GetNonceError>
```
#### Arguments


- `batcher_url` - The batcher websocket url.
- `address` - The user address for which the nonce will be retrieved.

#### Returns

- `Result<U256, NonceError>` - 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.
Expand Down

0 comments on commit c8fe0c4

Please sign in to comment.