#validate #create #chains #authentication #decentraland #endpoint #ethereum

dcl-crypto

Tools to create and validate Decentraland's Authentication Chains

4 releases

0.2.2 Feb 14, 2024
0.2.1 May 22, 2023
0.2.0 May 22, 2023
0.1.0 Apr 18, 2023

#5 in #decentraland

22 downloads per month
Used in dcl-crypto-middleware-rs

Apache-2.0

88KB
1.5K SLoC

Decentraland crypto (Rust)

This crate is a port of @dcl/crypto originally implemented on javascript and provides the necessary tools to create and validate Decentraland's Authentication Chains.

Test

To run all tests you need to provide a ethereum rpc endpoint.

First, create a .cargo/config.toml file using the template provided in the repository and set your rpc provider.

cp .cargo/config.toml.example .cargo/config.toml

Once configured you can run all tests

cargo test --doc

Release

⚠️ Do not modify package.version on Cargo.toml

Use Github Releases to create a new version.

TODO

  • serialize and deserialize auth chains
  • verify auth chains
    • simple
    • ephemeral
  • verify auth chain expiration
  • verify personal signatures
  • verify EIP-1271 signatures
  • create identity
  • create auth chain from identity
  • load identity from file
  • release process
    • build cache
    • coverage
    • publish cargo

Dependencies

~14–22MB
~292K SLoC