crustio / crust-api Goto Github PK
View Code? Open in Web Editor NEWThis project is used to provide Restful API for Crust chain
License: GNU General Public License v3.0
This project is used to provide Restful API for Crust chain
License: GNU General Public License v3.0
Currently, we put backup and password into eVERY api call, this is not friendly, we should extract them into 1 place
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 will be low priority because of the nonce
problem, we should solve it by set it to -1
when encounter this problem
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.