Giter Site home page Giter Site logo

crustio / crust-api Goto Github PK

View Code? Open in Web Editor NEW
18.0 9.0 10.0 285 KB

This project is used to provide Restful API for Crust chain

License: GNU General Public License v3.0

TypeScript 96.67% Dockerfile 1.28% Shell 1.71% JavaScript 0.35%
gpos substrate polkadot-js

crust-api's People

Contributors

badkk avatar lowentropybody avatar mmyyrroonn avatar pangwa avatar wuhaixian1984 avatar yashirooooo avatar

Stargazers

 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

crust-api's Issues

Not able to use Cross Chain Pinning

First of great work on Crust!
I was trying to pin some files using Cross Chain dStorage Solution, I have already added files to crust ipfs and have the cid.

I am doing something like this on my front end

const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
const publicAddress = await signer.getAddress();
const privateKey = await signer.signMessage(publicAddress);
const authHeaderRaw = `eth-${publicAddress}:${privateKey}`;
const authHeader = Buffer.from(authHeaderRaw).toString("base64");

and trying to pin file using

const res = await axios.post(`${ipfsPinningService}/pins`, {
      headers: {
        'Authorization': `Basic ${authHeader}`,
      },
      json: {
        cid: cid.toV0().toString(),
        name: "test",
      }
    })
    console.log(res);

However I keep on getting error 401, am I missing something??

[Tx] Low priority problem

Tx will be low priority because of the nonce problem, we should solve it by set it to -1 when encounter this problem

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.