EVM Namespace - SIWx

Author Haardik
Discussions-To https://github.com/ChainAgnostic/namespaces/pull/30
Status Draft
Type Standard
Created 2022-08-19
Updated 2022-08-19
Requires CAIP-122, CAIP-2, CAIP-10

CAIP-122

For context, see the CAIP-122 specification.

Rationale

On Ethereum, EIP-4361 Sign-in with Ethereum already exists, which was the inspiration for CAIP-122. This specification highlights how EIP-4361 conforms with CAIP-122.

Specification

Signing Algorithm

Ethereum uses the ECDSA signing algorithm for signing and verifying messages. Ethereum addresses are derived from the public ECDSA key.

Signature Type

We use the signature type eip191 and eip1271 when referring to Ethereum Personal Signatures and Contract Signatures respectively, as specified in the EIP-4361 specification.

Signature Creation

The abstract data model must be converted into a string representation in an unambigious format. We use the format as defined in EIP-4361.

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

${statement}

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:
- ${resources[0]}
- ${resources[1]}
...
- ${resources[n]}

Signature Verification

We use signature verification techniques from EIP-191 and EIP-1271 as specified as well as any additional steps specified in EIP-4361.

References

  • EIP-4361: Sign-In with Ethereum
  • CAIP-10: Account ID Specification
  • CAIP-2: Blockchain ID Specification
  • CAIP-122: Sign in With X Specification
  • EIP-191: Signed Data Standard
  • EIP-1271: Standard Signature Validation Method for Contracts

Citation

Please cite this document as:

Haardik, "namespaces/eip155-caip122: EVM Namespace - SIWx [DRAFT]," Chain Agnostic Namespaces, eip155-caip122, August 2022 / August 2022. [Online serial]. Available: https://github.com/ChainAgnostic/namespaces/eip155-caip122.md