Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add caip122 spec for eip155 namespace #30

Merged
merged 1 commit into from
Aug 25, 2022
Merged

Conversation

haardikk21
Copy link
Contributor


namespace-identifier: eip155-caip122
title: EVM Namespace - SIWx
author: Haardik (@haardikk21)
discussions-to: TBA
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants