SDK Explorer

Signs an EIP-191 message.

Parameters
input
object
Required

Represents the input to sign the EIP-191 message from a specified user-controlled wallet.

option 1:
userId
string
Required

Unique system-generated identifier for the user.

encodedByHex
boolean

Indicator of whether the input message is encoded by hex. If TRUE, then the message should be a hex string. By default, it is False.

memo
string

The human readable explanation for this sign action. Useful for presenting with extra information.

message
string
Required

The user friendly message that needs to be signed. If it is a hex string, encodedByHex needs to be TRUE. The hex string should start with “0x” and have even length.

walletId
string
Required

Unique system generated identifier of the wallet.

option 2:
userToken
string
Required

The JSON Web Token (JWT) representing the user.

encodedByHex
boolean

Indicator of whether the input message is encoded by hex. If TRUE, then the message should be a hex string. By default, it is False.

memo
string

The human readable explanation for this sign action. Useful for presenting with extra information.

message
string
Required

The user friendly message that needs to be signed. If it is a hex string, encodedByHex needs to be TRUE. The hex string should start with “0x” and have even length.

walletId
string
Required

Unique system generated identifier of the wallet.

Example
1const response = await client.signMessage({
2  userToken: 'dummy-user-token',
3  walletId: 'wallet-id',
4  encodedByHex: false,
5  message: 'I agree with this transfer',
6  memo: 'Transfer',
7})
8console.log(response.data?.challengeId)
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.