Giter VIP home page Giter VIP logo

cleargraph's Introduction

logo

TravisCI build status GraphQL enabled

Cleargraph is a multi-purpose GraphQL runtime for decentralized applications (dApps) and wallets. Its API is infrastructure that makes it easy for application developers to create products and services that take advantage of the Ethereum blockchain without sacrificing usability, flexibility, or security. Cleargraph is the essential missing link between conventional application development and on-chain smart contracts. Read the announcement.

Usage

git clone [email protected]:dsys/cleargraph.git
cd cleargraph
yarn install
yarn start # listening on localhost:4000

Development

Contributions to Cleargraph are welcome. Our issues are maintained on GitHub and pull requests are appreciated. We'd love help with feature additions, documentation improvements, and more thorough tests.

yarn dev

License

Apache 2.0

cleargraph's People

Contributors

kern 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

cleargraph's Issues

Implement registerKeyPair() flow in API

type Query {
  keyPairChallenge(publicKey: String!): String!
  keyPair(publicKey: String!, network: ETHEREUM_NETWORK): KeyPair
}

type Mutation {
  registerKeyPair(
    publicKey: String!
    name: String
    deviceType: DEVICE_TYPE
    challenge: String!
    signature: String!
  ): KeyPair!
}


type KeyPair {
  publicKey: String!
  name: String
  deviceType: DEVICE_TYPE
}

enum DEVICE_TYPE {
  DESKTOP
  IOS
  ANDROID
  OTHER
}

Getting "TSError: ⨯ Unable to compile TypeScript" on startup

fresh pull from git
note - I do not see a directory dotenv/config

then:
yarn install --ignore-engines
yarn start

console shows:
yarn run v1.7.0
$ nodemon -e ts,graphql -x ts-node -r dotenv/config src/index.ts
[nodemon] 1.17.5
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting ts-node -r dotenv/config src/index.ts

then I get the following error:

/git/cleargraph/node_modules/ts-node/src/index.ts:253
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
src/index.ts(7,41): error TS2345: Argument of type '{ context: (req: any) => Context; resolvers: typeof import("/git/cleargraph/src/re...' is not assignable to parameter of type 'Props'.
Types of property 'resolvers' are incompatible.
Type 'typeof import("/git/cleargraph/src/resolvers/index")' is not assignable to type 'IResolvers'.
Property 'BigNumber' is incompatible with index signature.
Type 'GraphQLScalarType' is not assignable to type '(() => any) | IResolverObject | GraphQLScalarType'.
Type 'import("/git/cleargraph/node_modules/@types/graphql/type/definition").GraphQLScala...' is not assignable to type 'import("/git/cleargraph/node_modules/graphql-yoga/node_modules/@types/graphql/type...'.
Property 'extensionASTNodes' is missing in type 'GraphQLScalarType'.

Salt and truncate phone number hashes

As a Multi API client
I want to have greater resistance to preimage attacks
So that I can be more confident that our contacts database is not leaked

Support reverse ENS address lookup

As a Cleargraph client
I want to show ENS addresses everywhere that a reverse address exists
So that I can avoid showing hexadecimal addresses when possible

Support IPFS

As a Cleargraph user
I want to support IPFS as a data store
So that I can have a fully decentralized application and CDN

ethereumBlock(hash: ?) expects a hex value

This query returns the following error:

query {
  ethereumBlock(number: 5878023) {
    number
  }
}
{
  "data": {
    "ethereumBlock": null
  },
  "errors": [
    {
      "locations": [
        {
          "column": 2,
          "line": 1
        }
      ],
      "message": "Returned error: invalid argument 0: hex string without 0x prefix",
      "path": [
        "ethereumBlock"
      ]
    }
  ]
}

But the schema says that the number input should be an int (surely this is intended to be the block height...), for one, and if you instead pass the argument hash to the query, with the hex-value hash of block, and query the number property, you get back an int as expected:

query {
  ethereumBlock(hash:"0x2677dedc524bc4de6447e8996ba724ef3fe14712de2e12a81b3fa8f66b17a980") {
    network,
    number
  }
}
{
  "data": {
    "ethereumBlock": {
      "network": "MAINNET",
      "number": 5878023
    }
  }
}

Am I missing something here?

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.