Giter Site home page Giter Site logo

ceramicnetwork / js-ceramic Goto Github PK

View Code? Open in Web Editor NEW
417.0 18.0 127.0 67.17 MB

Typescript implementation of the Ceramic protocol

Home Page: http://ceramic.network

License: Other

JavaScript 0.38% TypeScript 99.53% Shell 0.09%
ceramic javascript typescript

js-ceramic's People

Contributors

3benbox avatar bshambaugh avatar christianlavoie avatar dav1do avatar dbcfd avatar dependabot-preview[bot] avatar dependabot[bot] avatar geo25rey avatar gvelez17 avatar gzalz avatar haardikk21 avatar jovonni avatar julissadantes avatar kammerdiener avatar michaelsena avatar msterle avatar nathanielc avatar oed avatar paullecam avatar pawartur avatar samika98 avatar simonovic86 avatar smrz2001 avatar stanly-johnson avatar stbrody avatar stephhuynh18 avatar ukstv avatar v-stickykeys avatar willex avatar zachferland 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  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  avatar  avatar  avatar  avatar

Watchers

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

js-ceramic's Issues

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating identity-wallet in /packages/ceramic-cli/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/@ceramicnetwork/ceramic-common - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Modularize doctypes

The core api should not need to include any specific doctype, instead any doctype should be possible to register in the node using an method. (the three current doctypes should probably be included for convenience).

Doctypes should include a handler which has all the needed state transition logic. It should also include a class which can be used to manipulate the doctype (more info on how this will look like in the js-ceramic api CIP).

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating typestub-multihashes in /packages/ceramic-core/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/@ceramicnetwork/ceramic-common - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Spec 3ID account package api

The 3ID Account Module should be a package in the js-ceramic repo. The result of this story should be a spec for the api of this package. The module should be able to use both a ceramic-core instance and a ceramic-http-client instance to interact with ceramic.

Rough API:

  • new ThreeIDAccount (did: string, ceramic: Ceramic)
    • setDIDProvider(provider: any)
    • DID: string
    • didDocument: DIDDocument (class for interacting with 3ID doctype)
      • Should be backwards compatible. Can we use js-ipfs-did-document? (might need some changes to ceramic 3id doctype)
    • accountLinks: AccountLinks (class for interacting with account links tile)
    • sources: Sources (class for interacting with sources tile)
    • services: Services (class for interacting with services tile)
    • keychain: Keychain (class for interacting with keychain tile)
    • profile: Profile (class for interacting with profile tile)

Maybe needs an async method for constructing?

The api above describes the high level interface. For this sprint we should focus on building out the way to interact with the DID Document and AccountLinks primarily (and account tile in the background). All of the classes for the different tiles needs their own api.

Make sure to coordinate with @zachferland on the functionality that the IdentityWallet provides though the 3idProvider interface.

implement anchor service module

There is currently a mock anchor service module. We should probably keep that around for now, but the goal of this ticket is to implement a version of the module that talks to a real anchor service.
The anchor service used should be configurable.

The DocState interface needs to be updated to something like this:

enum AnchorStatus {
  NOT_REQUESTED,
  PENDING,
  ANCHORED
}
interface DocState {
  doctype: string;
  owners: Array<string>;
  content: any;
  nextContent?: any;
  signature: SignatureStatus;
  anchorStatus: AnchorStatus;
  scheduledFor?: number; // only present when anchor status is pending
  anchorProof?: AnchorProof; // the anchor proof of the latest anchor, only present when anchor status is anchored
  log: Array<CID>;
}

The AnchorProof interface likely also needs an update.

Also make sure there are tests for the module and update existing tests to work accoring to needed changes.

Set up proper packages

We should create a few more packages:

  • ceramic-core -> ceramic
  • break out 3id-did-resolver from ceramic-core
  • break out ceramic-http-client from ceramic-cli

Show anchor status in cli

when running the command $ ceramic state <docId> we should include the anchor status in the output. I think this will happen automatically, but we should make sure that dates are converted correctly and that the output looks ok.

Clean up repo

  • Clean up readmes and add more useful information
  • Make sure lerna build process and workflows are set up correctly
  • Enable CI testing

Add methods for pinning

To ceramic-core and ceramic-http-client. Could looks something like:

  • ceramic.pin.add(docId)
  • ceramic.pin.rm(docId)
  • ceramic.pin.ls(docId)

Also need to implement additional apis in the ceramic-daemon so that the http-client can talk to it to pin docs.

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating identity-wallet in /packages/ceramic-cli/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/@ceramicnetwork/ceramic-doctype-tile - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating identity-wallet in /packages/ceramic-cli/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/@ceramicnetwork/ceramic-doctype-tile - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Add data backup service configuration to Ceramic nodes

This would allow a Ceramic node operator to specify which persistence system they want to use for the Ceramic documents their node is pinning/persisting. This would be, for example, Filecoin, Arweave, S3, etc, etc.

Implement core of 3ID account module

Should include creation of 3ID document, account tile, and account links tile (+ account links).

We should take care to make sure that the 3ID document is backwards compatible with the current system.

It should use the didProvider to sign document updates and use #44 to apply these signed records to the correct ceramic document.

Create types and/or utils package

Create a package which holds types shared by other packages in the js-ceramic repo.
Create a package which holds utils shared by other packages in the js-ceramic repo.

Does it make sense to have this in one or two separate packages? Maybe we can just have one @ceramicnetwork/utils which includes the types?

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating p-queue in /packages/ceramic-core/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/@ceramicnetwork/ceramic-common - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Use a proper logging tool

simonovic86
We can introduce a specific logger (e.g. winston) instead of directly using console.log

Also investigate which tool is best to use.

Deploy Ceramic Anchor Service on 3Box architecture

Task list:

  • Talk to @zachferland and @msterle about the infrastructure details and guides of common practices for deploying on 3Box architecture
  • Implement Terraform scripts for deployment
  • Implement HealthChecker route for CAS
  • Implement Dockerfile for CAS
  • Test with docker-compose
  • Split CAS into two components: CAS API and CAS anchor
  • Implement configuration management and ENV variables for CAS
  • Fix CRON incompatibility (AWS, CAS)
  • Fix times returned from CAS
  • Create failover mechanism for not processed request (based on time)
  • Estimate gas dynamically
  • Create db snapshot on db destroy
  • Implement retry mechanism for blockchain related ops (sending tx, etc.)
  • Update README.md with different CAS modes: anchor, service and bundled
  • Set-up HTTPS
  • Use cas terraform module in stack
  • Fix IPFS swarm connection issues
  • Refactor terraform scripts to allow swarm connect and use ECS instead of EC2
  • Deploy IPFS using docker-compose and troubleshoot
  • Make ethereumRpcUrl optional

Record prev verification for anchor record

  • add prev verification for anchor record

Pseudo code:

    // const prevRecordA = await this.dispatcher.retrieveRecord(record.prev)
    // const prevRecordB = await this.dispatcher.retrieveRecord(record.proof + '/root' + record.path)
    // assert A == B

Implement logic for pinning

  • Needs to be able to detect changes to documents and update the head that is stored for that document.

  • When loading a document that is pinned we should load it with the persisted head.

  • When a document is pinned, we should also pin the individual records in ipfs.

  • When a document is unpinned we should remove the pins of the records from ipfs.

  • Other considerations?

Add method to apply signed records directly

This will allow the 3ID Account module to use the didProvider directly to sign updates to documents. It can then pass signed updates to a ceramic document directly. This could look something like this: doc.applyRecord(record).
This will effectively remove any need for the ceramic-core/http-client to have access to a didProvider as external libraries (such as 3ID Account) can pass already signed records.

Also add to http client and CLI.

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.