forked from dluxio/dlux_open_token
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrtrades.js
22 lines (22 loc) · 848 Bytes
/
rtrades.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const config = require('./config');
const fetch = require('node-fetch');
//const { store } = require("./index");
//const { getPathObj } = require("./getPathObj");
module.exports = {
ipfsVerify: function (str, pinobj) {
return new Promise ((resolve, reject) => {
const pins = Object.keys(pinobj)
fetch(config.pinurl, {
body: `{"jsonrpc":"2.0", "method":"ipfs.stats", "params":[${pins}], "id":1}`,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
method: "POST"
})
.then(got=>{
// put in plasma memory and report? this verification may not scale very well
// maybe load by ${str} key and return [bytes]
})
})
}
}