Skip to main content
Please note: The Casper RPC standard is still under review and specifications may change. Implementation details and method signatures are subject to updates.

Methods

casper_sign_deploy

Use the casper_sign_deploy method to request the user to approve or reject the signature of a transaction (aka deploy). The wallet should validate the received deploy object and present the details to the user for his review.

Parameters

  • address. Type: string. The chain namespace and the public key corresponding to the key pair that signs the transaction are separated with a colon character.
  • deploy. Type: object. A Deploy object as per the Casper protocol specification.

Returns

  • deploy. Type: object. The Deploy object including the newly generated approval item as per the Casper protocol specification.
If the user rejects the signature, the wallet returns the WalletConnect SDK error USER_REJECTED.

Example

Request:
Response:

casper_sign_message

Use casper_sign_message to request the user to sign a message. It’s recommended to use this method with human-readable text messages. Upon user approval, the wallet must generate a signature for the prefixed message "Casper Message:\n" + message. The prefix protects the user against misuse of this method, preventing a malicious actor from trying to trick the user into signing arbitrary data, like a network transaction.

Parameters

  • address. Type: string. The chain namespace and the public key corresponding to the key pair that signs the transaction separated with a colon character.
  • message. Type: string. The message to be signed.

Returns

  • signature. Type: string. The signature of the message.
If the user rejects the signature, the wallet returns the WalletConnect SDK error USER_REJECTED.

Example

Request:
Response:

Events

Currently, this specification doesn’t define any required events for wallets.