Solana Namespace - SIWx

Author Haardik
Status Draft
Type Standard
Created 2022-07-06
Updated 2022-07-06
Requires CAIP-122, CAIP-2, CAIP-10


For context, see the CAIP-122 specification.


In Solana, signatures can only be made over raw bytes, Uint8Arrays in Javascript. This specification provides the signing algorithm to use, the type of the signing algorithm to identify it, and a method for signature creation and verification as required by CAIP-122.


Signing Algorithm

Solana uses the Ed25519 signing algorithm for signing and verifying messages. Solana keypairs are also just Ed25519 public/private keypairs.

Signature Type

We propose using the signature type solana:ed25519 to refer to the chain and algorithm used uniquely.

Signature Creation

The abstract data model must be converted into a string representation in an unambigious format, and then the string converted to a byte array to be signed over.

We propose the following string format, inspired by EIP-4361.

${domain} wants you to sign in with your Solana account:


URI: ${uri}
Version: ${version}
Chain ID: ${chain-id}
Nonce: ${nonce}
Issued At: ${issued-at}
Expiration Time: ${expiration-time}
Not Before: ${not-before}
Request ID: ${request-id}
- ${resources[0]}
- ${resources[1]}
- ${resources[n]}

For example, wants you to sign in with your Solana account:

I accept the ServiceOrg Terms of Service:

Version: 1
Chain ID: 1
Nonce: 32891757
Issued At: 2021-09-30T16:25:24.000Z
- ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu

which should then be converted into raw bytes (encoded as base64url for brevity).


Depending on the method used for signatures, this conversion may or may not happen automatically. For example, when using Phantom Wallet client-side, it performs the conversion automatically. However, if doing something server-side, you likely need to do this conversion yourself.

Signature Verification

Signature verification behaves similarly. We can use standard Ed25519 signature verification. We convert the input message to a bytes representation of the string format, then verify the signature over that. The verification public key should be the Solana wallet address, which is just a base58 encoded Ed25519 public key.


  • EIP-4361: Sign-In with Ethereum
  • CAIP-10: Account ID Specification
  • CAIP-2: Blockchain ID Specification
  • CAIP-122: Sign in With X Specification
  • Ed25519: Ed25519: high-speed high-security signatures


Please cite this document as:

Haardik, "namespaces/solana-caip122: Solana Namespace - SIWx [DRAFT]," Chain Agnostic Namespaces, solana-caip122, July 2022 / July 2022. [Online serial]. Available: