@canvas-js/ethereum-contracts

0.10.0-beta.1 • Public • Published

@canvas-js/ethereum-contracts

Contracts for onchain verification of Canvas messages created by the EIP712Signer verifiable signer.

Usage

TODO

How it works

Canvas is a CRDT/causal-graph environment where all operations are represented on a log.

Every log entry is a signed [Message<Action | Session>, Signature] tuple.

For example, a Session authorizes a new session key (did:key) and is serialized as a Message<Session>, which is then signed by the did:key that was authorized to create a Signature.

To exhaustively verify that a message was correctly signed to be appended to the log, you should verify that:

  • A session key (e.g. did:key) was authorized by a user (e.g. did:eth, eip155:1:0x) in a Session. Sessions are verified using logic in the EIP712 signer.
  • That authorization message was signed by the did:key it authoriaed, i.e. there exists a Signature corresponding to the session wrapped as a message Message<Session>.
  • An action message was also signed by that did:key, i.e. there exists a valid Signature corresponding to the user's action wrapped as a message Message<Action>.

Readme

Keywords

none

Package Sidebar

Install

npm i @canvas-js/ethereum-contracts

Weekly Downloads

17

Version

0.10.0-beta.1

License

ISC

Unpacked Size

38.2 kB

Total Files

9

Last publish

Collaborators

  • rjwebb
  • joelg
  • raykyri