@corpus-core/colibri-stateless 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +64 -0
  2. package/c4_logo.png +0 -0
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+
2
+
3
+ <img src="c4_logo.png" alt="C4 Logo" width="300"/>
4
+
5
+ # C4 (corpus core colibri client)
6
+
7
+ ![ETH2.0_Spec_Version 1.4.0](https://img.shields.io/badge/ETH2.0_Spec_Version-1.4.0-2e86c1.svg)
8
+ [![CI on multiple platforms](https://github.com/corpus-core/c4/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/corpus-core/c4/actions/workflows/cmake-multi-platform.yml)
9
+
10
+ The colibri client is a stateless and trustless ethereum client, which is optimized for the mobile apps or embedded devices, because it does not hols the state, but verifies on demand.
11
+
12
+ ## Installation
13
+
14
+ ```sh
15
+ npm install @corpus-core/colibri-stateless
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```js
21
+ import Colibri from "@corpus-core/colibri-stateless";
22
+
23
+ const client = new Colibri();
24
+
25
+ async function main() {
26
+ const method = "eth_getTransactionByHash";
27
+ const args = ['0x2af8e0202a3d4887781b4da03e6238f49f3a176835bc8c98525768d43af4aa24'];
28
+
29
+
30
+ const proof = await c4w.createProof(method, args);
31
+ const result = await c4w.verifyProof(method, args, proof);
32
+ console.log(result);
33
+ }
34
+
35
+ main().then(console.log).catch(console.error);
36
+
37
+ ```
38
+
39
+ ## Building
40
+
41
+ In order to build the Javascript bindings, you need to have [emscripten installed](https://emscripten.org/docs/getting_started/downloads.html).
42
+
43
+ ```sh
44
+ git clone https://github.com/corpus-core/c4.git
45
+ cd c4
46
+ mkdir build
47
+ cd build
48
+ emcmake cmake -DWASM=true -DCURL=false ..
49
+ make
50
+ ```
51
+ The js-module will be in the `build/emscripten` folder.
52
+
53
+ ## Concept
54
+
55
+ The idea behind C4 is to create a ultra light client or better verifier which can be used in Websites, Mobile applications, but especially in embedded systems. The Proofer is a library which can used within you mobile app or in the backend to create Proof that the given data is valid. The Verifier is a library which can be used within the embedded system to verify this Proof.
56
+
57
+ The verifier itself is almost stateless and only needs to store the state of the sync committee, which changes every 27h. But with the latest sync committee the verifier is able to verify any proof with the signatures matching the previously verified public keys of the sync committee.
58
+ This allows independent Verification and security on any devices without the need to process every blockheader (as light clients usually would do).
59
+
60
+ More Details can be found on [github](https://github.com/corpus-core/c4)
61
+
62
+ ## License
63
+
64
+ MIT
package/c4_logo.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpus-core/colibri-stateless",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Colibri is a stateless and trustless ethereum client, which is optimized for the mobile apps or embedded devices, because it does not hols the state, but verifies on demand.",
5
5
  "main": "index.js",
6
6
  "scripts": {},