Coder Social home page Coder Social logo

ceramicintegration's People

Contributors

glitch003 avatar hiaux0 avatar itali43 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ceramicintegration's Issues

yarn failing when no ssh present

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.

"encryptAndWrite" and other functions do not throw error even error occurs during the process

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.)

Webpack build issues

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

Steps to reproduce

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

Quickest way it to use

  1. https://github.com/LIT-Protocol/CeramicIntegrationExample
  2. yarn
  3. yarn watch
  4. Error log

image

Error log (expand)
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

Other

  1. Have webpack based project
  2. install lit-ceramic-sdk
  3. build
  4. Error log
    image
Error log (expand)
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.