lit-protocol / ceramicintegration Goto Github PK
View Code? Open in Web Editor NEWThis module allows you to integrate Ceramic with Lit.
License: MIT License
This module allows you to integrate Ceramic with Lit.
License: MIT License
In yarn.lock:
web-streams-polyfill@https://github.com/gwicke/web-streams-polyfill#spec_performance_improvements
is being fetched with git://
(ssh) instead of https://
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/gwicke/web-streams-polyfill
Directory: C:\Users\rsasdasd\Projects\CeramicIntegration
Output:
fatal: unable to connect to github.com:
github.com[0: 140.82.113.4]: errno=Unknown error
There's much less a guarantee of ssh than https:// suggest you change or state a dependency in the readme of ssh on command line.
In encryptAndWrite
function, errors during the encrypting & writing process are all caught, and returned as string.
https://github.com/LIT-Protocol/CeramicIntegration/blob/main/src/integration.ts#L71
However, this behavior is confusing because the document says that the return value of this function is the created stream ID.
How about just throwing error when error occurs? It would reduce confusion, and also would help developers easily debug their apps.
(fyi: we use this function in our app, we had to write a bit ugly error handling due to this behavior.)
Reading a stream in Ceramic does not need authentication.
However, in the "readAndDecrypt" function, authentication to Ceramic is always performed.
So, even if users just want to read data, they have to create (or choose) their DIDs for authentication, which is not good for UX.
How about removing the authentication?
The description comment for function _readCeramic
in ceramic.ts
file is wrong.
Currently, the integration works if you're trying to encrypt a strong and store it on ceramic and gate it using Lit.
Could we add the relevant functions that also encrypt a file and then store the encrypted file contents on ceramic?
I'm trying to use this package, but encountered issues with webpack while building.
Also, I'm no bundling expert, so I'd like to get help in troubleshooting
Note, both ways yield different errors, but underlying problem should be the same, and relates to
You should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option.
See: microsoft/TypeScript#12358
Edit: hmm, not sure anymore about this one
ERROR in ./node_modules/lit-ceramic-sdk/integration.ts 3:12
Module parse failed: Unexpected token (3:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| // Don't forget to rebuild
| import { createIDX } from "./idx";
> import type { CeramicApi } from "@ceramicnetwork/common";
| import { _encryptWithLit, _decryptWithLit } from "./lit";
| import { _startLitClient } from "./client";
@ ./node_modules/lit-ceramic-sdk/index.ts 3:0-44 5:0-23
@ ./src/app.ts
ERROR in ./node_modules/did-jwt/lib/index.module.js 1665:17
Module parse failed: Unexpected token (1665:17)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| // TODO: should be able to use non base58 keys too
| return key.type === 'X25519KeyAgreementKey2019' && Boolean(key.publicKeyBase58);
> })) ?? [];
| if (!pks.length && !controllerEncrypters.length) throw new Error(`no_suitable_keys: Could not find x25519 key for ${did}`);
| return pks.map(pk => x25519Encrypter(base58ToBytes(pk.publicKeyBase58), pk.id)).concat(...controllerEncrypters);
@ ./node_modules/dids/lib/did.js 14:18-36
@ ./node_modules/dids/lib/index.js
@ ./node_modules/lit-ceramic-sdk/ceramic.ts
@ ./node_modules/lit-ceramic-sdk/integration.ts
@ ./node_modules/lit-ceramic-sdk/index.ts
No idea why these aren't disabled by default in a dist, but please add the option to silence them.
lit-ceramic-sdk version: 1.1.13
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.