getPendingSafeOperations
Returns the list of Safe operations which are pending to be executed through a bundler.
ℹ️
The SafeOperations methods are currently compatible with Entrypoint v0.6, which corresponds to safeModuleVersion
v0.2.0. If you need to use v0.7, you should use the relay-kit
Safe4337Pack
class with safeModuleVersion
v0.3.0, and collect the signatures yourself.
Examples of how to use the Safe4337Pack
are provided in the following links:
Usage
_11import { GetSafeOperationListProps } from '@safe-global/api-kit'_11import { apiKit } from './setup.ts'_11_11const safeAddress = '0x...'_11const options: GetPendingSafeOperationListOptions = {_11 ordering: 'created', // Optional_11 limit: '10', // Optional_11 offset: '50' // Optional_11}_11_11const safeOperationsResponse = await apiKit.getPendingSafeOperations(safeAddress, options)
Returns
Promise<GetSafeOperationListResponse>
The paginated list of Safe operations.
Parameters
safeAddress
- Type:
string
The Safe address.
_10const safeOperationsResponse = await apiKit.getPendingSafeOperations({_10 safeAddress: '0x...'_10})
options.ordering
(Optional)
- Type:
string
- Default:
-user_operation__nonce
The field used when ordering the results.
Can be one of: -user_operation__nonce
, -created
, created
.
_10const safeOperationsResponse = await apiKit.getPendingSafeOperations(_10 {_10 safeAddress: '0x...',_10 ordering: 'created'_10 }_10)
options.limit
(Optional)
- Type:
number
The number of results to return per page.
_10const safeOperationsResponse = await apiKit.getPendingSafeOperations(_10 {_10 safeAddress: '0x...',_10 limit: 10_10 }_10)
options.offset
(Optional)
- Type:
number
The initial index from which to return the results.
_10const safeOperationsResponse = await apiKit.getPendingSafeOperations(_10 {_10 safeAddress: '0x...',_10 offset: 50_10 }_10)