API Kit Reference
addMessage

addMessage

Creates a new message with an initial signature.

Usage

import { AddMessageOptions } from '@safe-global/api-kit'
import { apiKit } from './setup.ts'

const safeAddress = '0x...'

const config: AddMessageOptions = {
message: '0x...',
signature: '0x...',
safeAppId: 1 // Optional
}

await apiKit.addMessage(safeAddress, config)

Parameters

safeAddress

  • Type: string

The Safe address.

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

config.message

  • Type: string | EIP712TypedData

The raw message.

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

config.signature

  • Type: string

The message signature.

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

config.safeAppId (Optional)

  • Type: number

The Safe App ID.

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

Was this page helpful?

We use cookies to provide you with the best experience and to help improve our website and application. Please read our Cookie Policy for more information. By clicking "Accept all", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and provide customer support.