# @canvas-js/ethereum-contracts

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

Latest version **0.16.1** (published 2025-07-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install @canvas-js/ethereum-contracts
pnpm add @canvas-js/ethereum-contracts
yarn add @canvas-js/ethereum-contracts
bun add @canvas-js/ethereum-contracts
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.16.1 |
| Published | 2025-07-30 |
| First published | 2024-02-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 38.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | joelg, raykyri, rjwebb |

## Links

- npm: https://www.npmjs.com/package/@canvas-js/ethereum-contracts
- npm.io page: https://npm.io/package/@canvas-js/ethereum-contracts

## Dependencies (4)

- [base58-solidity](https://npm.io/package/base58-solidity.md) ^1.0.2
- [@openzeppelin/contracts](https://npm.io/package/@openzeppelin/contracts.md) ^4.9.6
- [@canvas-js/signer-ethereum](https://npm.io/package/@canvas-js/signer-ethereum.md) 0.16.1
- [@lazyledger/protobuf3-solidity-lib](https://npm.io/package/@lazyledger/protobuf3-solidity-lib.md) ^0.6.0

## Recent versions

- 0.16.1 (latest) — 2025-07-30
- 0.16.0-next.9 (next) — 2025-07-13
- 0.10.0-beta.3 (beta) — 2024-06-27
- 0.10.0-alpha.1 (alpha) — 2024-05-21
- 0.8.26-main-488c798d (main) — 2024-02-15
- 0.16.0 — 2025-07-08
- 0.16.0-next.8 — 2025-06-26
- 0.16.0-next.7 — 2025-06-25
- 0.16.0-next.6 — 2025-06-25
- 0.16.0-next.5 — 2025-06-18
- 0.16.0-next.4 — 2025-06-18
- 0.16.0-next.3 — 2025-06-13
- 0.16.0-next.2 — 2025-06-13
- 0.16.0-next.1 — 2025-06-13
- 0.16.0-next.0 — 2025-06-13
- … 85 more at https://npm.io/package/@canvas-js/ethereum-contracts/versions

## README

# @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:pkh:eip155:1:0x123...)
  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>`.

---
_Source: https://npm.io/package/@canvas-js/ethereum-contracts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
