getMessages
Returns the list of messages associated to a Safe account.
Usage
_12import { GetSafeMessageListProps } from '@safe-global/api-kit'_12import { apiKit } from './setup.ts'_12_12const safeAddress = '0x...'_12_12const config: GetSafeMessageListProps = {_12 ordering: 'created', // Optional_12 limit: '10', // Optional_12 offset: '50' // Optional_12}_12_12const messagesResponse = await apiKit.getMessages(safeAddress, config)
Returns
Promise<SafeMessageListResponse>
The paginated list of messages.
Parameters
safeAddress
- Type:
string
The Safe address.
_10const messagesResponse = await apiKit.getMessages(_10 '0x...'_10)
config.ordering
(Optional)
- Type:
string
The field used when ordering the results.
_10const messagesResponse = await apiKit.getMessages(_10 '0x...',_10 {_10 ordering: 'created'_10 }_10)
config.limit
(Optional)
- Type:
number
The number of results to return per page.
_10const messagesResponse = await apiKit.getMessages(_10 '0x...',_10 {_10 limit: 10_10 }_10)
config.offset
(Optional)
- Type:
number
The initial index from which to return the results.
_10const messagesResponse = await apiKit.getMessages(_10 '0x...',_10 {_10 offset: 50_10 }_10)