Skip to main content
All CollectionsDevelop with Core
Core API Calls: avalanche_signMessage
Core API Calls: avalanche_signMessage

Developer documentation for JSON-RPC API calls to use with Core

Amanda avatar
Written by Amanda
Updated this week

Calculates an Avalanche specific signature by signing a message with a given private key. Before using this method, ensure that the user has granted permission to access their account by invoking eth_requestAccounts.

Params (2)

  1. Message (required)

    1. string

    2. Data to sign. This can be an arbitrary length string, or hexadecimal beginning with 0x.
      ​

  2. Account Index

    1. number

    2. Account index to sign with.

Result (SignMessageResult)

String

The Signature of the message.

Errors:

Code

Message

-32602

Missing mandatory param(s)

-32602

Invalid account index provided

-32603

Failed to sign message

4001

User rejected the request.


For any additional questions, please view our other knowledge base articles or contact a Product Support team member via the chat button. Examples are for illustrative purposes only.

Did this answer your question?