API Kit Reference
addMessage

addMessage

Creates a new message with an initial signature.

Usage


_12
import { AddMessageProps } from '@safe-global/api-kit'
_12
import { apiKit } from './setup.ts'
_12
_12
const safeAddress = '0x...'
_12
_12
const config: AddMessageProps = {
_12
message: '0x...',
_12
signature: '0x...',
_12
safeAppId: 1 // Optional
_12
}
_12
_12
await apiKit.addMessage(safeAddress, config)

Parameters

safeAddress

  • Type: string

The Safe address.


_10
await apiKit.addMessage(
_10
'0x...',
_10
{
_10
message: '0x...',
_10
signature: '0x...'
_10
}
_10
)

config.message

  • Type: string | EIP712TypedData

The raw message.


_10
await apiKit.addMessage(
_10
'0x...',
_10
{
_10
message: '0x...',
_10
signature: '0x...'
_10
}
_10
)

config.signature

  • Type: string

The message signature.


_10
await apiKit.addMessage(
_10
'0x...',
_10
{
_10
message: '0x...',
_10
signature: '0x...'
_10
}
_10
)

config.safeAppId (Optional)

  • Type: number

The Safe App ID.


_10
await apiKit.addMessage(
_10
'0x...',
_10
{
_10
message: '0x...',
_10
signature: '0x...',
_10
safeAppId: 1
_10
}
_10
)

Was this page helpful?