mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
commit
3357542d30
891
package-lock.json
generated
891
package-lock.json
generated
@ -1431,17 +1431,396 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@ethereum-navigator/atlas": {
|
"@ethereum-navigator/atlas": {
|
||||||
"version": "0.5.1",
|
"version": "0.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ethereum-navigator/atlas/-/atlas-0.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/@ethereum-navigator/atlas/-/atlas-0.7.1.tgz",
|
||||||
"integrity": "sha512-ZK8S30ITBolyJaJp0DQNcf8Ish+hPHdJ9otlaIyJUbRXSfzPyPNBeP3NbYG9pxDDrYvfxy/07HH1tUcsRecrIA=="
|
"integrity": "sha512-YV7tMVwpRcJbc+Kj/Rr0RzNV/2hHBEEM1/tMWDVLB15dGJfoQuRfPJpFt6uq+Ji6s3EkldIt9kZylEeG5ALKAA=="
|
||||||
},
|
},
|
||||||
"@ethereum-navigator/navigator": {
|
"@ethereum-navigator/navigator": {
|
||||||
"version": "0.4.1",
|
"version": "0.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/@ethereum-navigator/navigator/-/navigator-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@ethereum-navigator/navigator/-/navigator-0.5.2.tgz",
|
||||||
"integrity": "sha512-wOLlwiJprq6fAJETCM1dG1kft2UxXOSr2qU5ZxCkX0uRqL6mikUTZVAJif9e5HgL+EzVFI4/u03rpoGzljriWw==",
|
"integrity": "sha512-agSE2xzLxOKKid8QiS4v8jPhnFXW5uSXsICZ4JmS437aCZ8L3SUAy3cDQKikHb2PPZ3AazJO05k8m8i6u77peQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ethereum-navigator/atlas": "~0.5.1",
|
"@ethereum-navigator/atlas": "^0.7.1",
|
||||||
"web3": "^1.2.4"
|
"web3": "^1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "10.17.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.21.tgz",
|
||||||
|
"integrity": "sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ=="
|
||||||
|
},
|
||||||
|
"get-stream": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
|
||||||
|
},
|
||||||
|
"p-cancelable": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw=="
|
||||||
|
},
|
||||||
|
"prepend-http": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
|
||||||
|
},
|
||||||
|
"swarm-js": {
|
||||||
|
"version": "0.1.40",
|
||||||
|
"resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz",
|
||||||
|
"integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==",
|
||||||
|
"requires": {
|
||||||
|
"bluebird": "^3.5.0",
|
||||||
|
"buffer": "^5.0.5",
|
||||||
|
"eth-lib": "^0.1.26",
|
||||||
|
"fs-extra": "^4.0.2",
|
||||||
|
"got": "^7.1.0",
|
||||||
|
"mime-types": "^2.1.16",
|
||||||
|
"mkdirp-promise": "^5.0.1",
|
||||||
|
"mock-fs": "^4.1.0",
|
||||||
|
"setimmediate": "^1.0.5",
|
||||||
|
"tar": "^4.0.2",
|
||||||
|
"xhr-request": "^1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"got": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==",
|
||||||
|
"requires": {
|
||||||
|
"decompress-response": "^3.2.0",
|
||||||
|
"duplexer3": "^0.1.4",
|
||||||
|
"get-stream": "^3.0.0",
|
||||||
|
"is-plain-obj": "^1.1.0",
|
||||||
|
"is-retry-allowed": "^1.0.0",
|
||||||
|
"is-stream": "^1.0.0",
|
||||||
|
"isurl": "^1.0.0-alpha5",
|
||||||
|
"lowercase-keys": "^1.0.0",
|
||||||
|
"p-cancelable": "^0.3.0",
|
||||||
|
"p-timeout": "^1.1.1",
|
||||||
|
"safe-buffer": "^5.0.1",
|
||||||
|
"timed-out": "^4.0.0",
|
||||||
|
"url-parse-lax": "^1.0.0",
|
||||||
|
"url-to-options": "^1.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url-parse-lax": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=",
|
||||||
|
"requires": {
|
||||||
|
"prepend-http": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uuid": {
|
||||||
|
"version": "3.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||||
|
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||||
|
},
|
||||||
|
"web3": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3/-/web3-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-jAAJHMfUlTps+jH2li1ckDFEpPrEEriU/ubegSTGRl3KRdNhEqT93+3kd7FHJTn3NgjcyURo2+f7Da1YcZL8Mw==",
|
||||||
|
"requires": {
|
||||||
|
"web3-bzz": "1.2.7",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-eth": "1.2.7",
|
||||||
|
"web3-eth-personal": "1.2.7",
|
||||||
|
"web3-net": "1.2.7",
|
||||||
|
"web3-shh": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-bzz": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-iTIWBR+Z+Bn09WprtKm46LmyNOasg2lUn++AjXkBTB8UNxlUybxtza84yl2ETTZUs0zuFzdSSAEgbjhygG+9oA==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "^10.12.18",
|
||||||
|
"got": "9.6.0",
|
||||||
|
"swarm-js": "^0.1.40",
|
||||||
|
"underscore": "1.9.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-QA0MTae0gXcr3KHe3cQ4x56+Wh43ZKWfMwg1gfCc3NNxPRM1jJ8qudzyptCAUcxUGXWpDG8syLIn1APDz5J8BQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/bn.js": "^4.11.4",
|
||||||
|
"@types/node": "^12.6.1",
|
||||||
|
"bignumber.js": "^9.0.0",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-requestmanager": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "12.12.39",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.39.tgz",
|
||||||
|
"integrity": "sha512-pADGfwnDkr6zagDwEiCVE4yQrv7XDkoeVa4OfA9Ju/zRTk6YNDLGtQbkdL4/56mCQQCs4AhNrBIag6jrp7ZuOg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-helpers": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-bdU++9QATGeCetVrMp8pV97aQtVkN5oLBf/TWu/qumC6jK/YqrvLlBJLdwbz0QveU8zOSap6GCvJbqKvmmbV2A==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-eth-iban": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-method": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-e1TI0QUnByDMbQ8QHwnjxfjKw0LIgVRY4TYrlPijET9ebqUJU1HCayn/BHIMpV6LKyR1fQj9EldWyT64wZQXkg==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-promievent": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-promievent": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-jNmsM/czCeMGQqKKwM9/HZVTJVIF96hdMVNN/V9TGvp+EEE7vDhB4pUocDnc/QF9Z/5QFBCVmvNWttlRgZmU0A==",
|
||||||
|
"requires": {
|
||||||
|
"eventemitter3": "3.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-requestmanager": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-HJb/txjHixu1dxIebiZQKBoJCaNu4gsh7mq/uj6Z/w6tIHbybL90s/7ADyMED353yyJ2tDWtYJqeMVAR+KtdaA==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-providers-http": "1.2.7",
|
||||||
|
"web3-providers-ipc": "1.2.7",
|
||||||
|
"web3-providers-ws": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-subscriptions": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-W/CzQYOUawdMDvkgA/fmLsnG5aMpbjrs78LZMbc0MFXLpH3ofqAgO2by4QZrrTShUUTeWS0ZuEkFFL/iFrSObw==",
|
||||||
|
"requires": {
|
||||||
|
"eventemitter3": "3.1.2",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-ljLd0oB4IjWkzFGVan4HkYhJXhSXgn9iaSaxdJixKGntZPgWMJfxeA+uLwTrlxrWzhvy4f+39WnT7wCh5e9TGg==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-eth-abi": "1.2.7",
|
||||||
|
"web3-eth-accounts": "1.2.7",
|
||||||
|
"web3-eth-contract": "1.2.7",
|
||||||
|
"web3-eth-ens": "1.2.7",
|
||||||
|
"web3-eth-iban": "1.2.7",
|
||||||
|
"web3-eth-personal": "1.2.7",
|
||||||
|
"web3-net": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-abi": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-4FnlT1q+D0XBkxSMXlIb/eG337uQeMaUdtVQ4PZ3XzxqpcoDuMgXm4o+3NRxnWmr4AMm6QKjM+hcC7c0mBKcyg==",
|
||||||
|
"requires": {
|
||||||
|
"ethers": "4.0.0-beta.3",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-accounts": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-AE7QWi/iIQIjXwlAPtlMabm/OPFF0a1PhxT1EiTckpYNP8fYs6jW7lYxEtJPPJIKqfMjoi1xkEqTVR1YZQ88lg==",
|
||||||
|
"requires": {
|
||||||
|
"@web3-js/scrypt-shim": "^0.1.0",
|
||||||
|
"crypto-browserify": "3.12.0",
|
||||||
|
"eth-lib": "^0.2.8",
|
||||||
|
"ethereumjs-common": "^1.3.2",
|
||||||
|
"ethereumjs-tx": "^2.1.1",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"uuid": "3.3.2",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eth-lib": {
|
||||||
|
"version": "0.2.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz",
|
||||||
|
"integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "^4.11.6",
|
||||||
|
"elliptic": "^6.4.0",
|
||||||
|
"xhr-request-promise": "^0.1.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-contract": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-uW23Y0iL7XroRNbf9fWZ1N6OYhEYTJX8gTuYASuRnpYrISN5QGiQML6pq/NCzqypR1bl5E0fuINZQSK/xefIVw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/bn.js": "^4.11.4",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-promievent": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-eth-abi": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-ens": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-SPRnvUNWQ0CnnTDBteGIJkvFWEizJcAHlVsrFLICwcwFZu+appjX1UOaoGu2h3GXWtc/XZlu7B451Gi+Os2cTg==",
|
||||||
|
"requires": {
|
||||||
|
"eth-ens-namehash": "2.0.8",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-promievent": "1.2.7",
|
||||||
|
"web3-eth-abi": "1.2.7",
|
||||||
|
"web3-eth-contract": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-iban": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-2NrClz1PoQ3nSJBd+91ylCOVga9qbTxjRofq/oSCoHVAEvz3WZyttx9k5DC+0rWqwJF1h69ufFvdHAAlmN/4lg==",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "4.11.8",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-personal": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-2OAa1Spz0uB29dwCM8+1y0So7E47A4gKznjBEwXIYEcUIsvwT5X7ofFhC2XxyRpqlIWZSQAxRSSJFyupRRXzyw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "^12.6.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-net": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "12.12.39",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.39.tgz",
|
||||||
|
"integrity": "sha512-pADGfwnDkr6zagDwEiCVE4yQrv7XDkoeVa4OfA9Ju/zRTk6YNDLGtQbkdL4/56mCQQCs4AhNrBIag6jrp7ZuOg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-net": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-j9qeZrS1FNyCeA0BfdLojkxOZQz3FKa1DJI+Dw9fEVhZS68vLOFANu2RB96gR9BoPHo5+k5D3NsKOoxt1gw3Gg==",
|
||||||
|
"requires": {
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-providers-http": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-vazGx5onuH/zogrwkUaLFJwFcJ6CckP65VFSHoiV+GTQdkOqgoDIha7StKkslvDz4XJ2FuY/zOZHbtuOYeltXQ==",
|
||||||
|
"requires": {
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"xhr2-cookies": "1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-providers-ipc": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-/zc0y724H2zbkV4UbGGMhsEiLfafjagIzfrsWZnyTZUlSB0OGRmmFm2EkLJAgtXrLiodaHHyXKM0vB8S24bxdA==",
|
||||||
|
"requires": {
|
||||||
|
"oboe": "2.1.4",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-providers-ws": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-b5XzqDpRkNVe6MFs5K6iqOEyjQikHtg3KuU2/ClCDV37hm0WN4xCRVMC0LwegulbDXZej3zT9+1CYzGaGFREzA==",
|
||||||
|
"requires": {
|
||||||
|
"@web3-js/websocket": "^1.0.29",
|
||||||
|
"eventemitter3": "^4.0.0",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eventemitter3": {
|
||||||
|
"version": "4.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz",
|
||||||
|
"integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-shh": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-f6PAgcpG0ZAo98KqCmeHoDEx5qzm3d5plet18DkT4U6WIeYowKdec8vZaLPRR7c2XreXFJ2gQf45CB7oqR7U/w==",
|
||||||
|
"requires": {
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-net": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-utils": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-FBh/CPJND+eiPeUF9KVbTyTZtXNWxPWtByBaWS6e2x4ACazPX711EeNaZaChIOGSLGe6se2n7kg6wnawe/MjuQ==",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "4.11.8",
|
||||||
|
"eth-lib": "0.2.7",
|
||||||
|
"ethereum-bloom-filters": "^1.0.6",
|
||||||
|
"ethjs-unit": "0.1.6",
|
||||||
|
"number-to-bn": "1.7.0",
|
||||||
|
"randombytes": "^2.1.0",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"utf8": "3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eth-lib": {
|
||||||
|
"version": "0.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz",
|
||||||
|
"integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "^4.11.6",
|
||||||
|
"elliptic": "^6.4.0",
|
||||||
|
"xhr-request-promise": "^0.1.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@istanbuljs/load-nyc-config": {
|
"@istanbuljs/load-nyc-config": {
|
||||||
@ -3017,6 +3396,434 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.13.2.tgz",
|
||||||
"integrity": "sha512-915dcnzCHEuvsmRKqVj0RxHT3T386lSJh8WREe4dsnrXHsi1ULNYxX0Ts/cvalv6bRL+aqyaZ6gN3l3nkfwEDg=="
|
"integrity": "sha512-915dcnzCHEuvsmRKqVj0RxHT3T386lSJh8WREe4dsnrXHsi1ULNYxX0Ts/cvalv6bRL+aqyaZ6gN3l3nkfwEDg=="
|
||||||
},
|
},
|
||||||
|
"@oceanprotocol/react": {
|
||||||
|
"version": "0.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/react/-/react-0.0.3.tgz",
|
||||||
|
"integrity": "sha512-oC/IYQlQDlMDcmF85yvwxLaC3Am8bYoka1bivtfW/LM3bxtm0Z5y0VZtjuigBNmZf7mXXuATVNQjamN9W5VO3A==",
|
||||||
|
"requires": {
|
||||||
|
"@oceanprotocol/squid": "^2.1.1",
|
||||||
|
"axios": "^0.19.2",
|
||||||
|
"react": "^16.13.1",
|
||||||
|
"web3connect": "^1.0.0-beta.33"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@ethereum-navigator/atlas": {
|
||||||
|
"version": "0.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ethereum-navigator/atlas/-/atlas-0.7.1.tgz",
|
||||||
|
"integrity": "sha512-YV7tMVwpRcJbc+Kj/Rr0RzNV/2hHBEEM1/tMWDVLB15dGJfoQuRfPJpFt6uq+Ji6s3EkldIt9kZylEeG5ALKAA=="
|
||||||
|
},
|
||||||
|
"@ethereum-navigator/navigator": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ethereum-navigator/navigator/-/navigator-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-agSE2xzLxOKKid8QiS4v8jPhnFXW5uSXsICZ4JmS437aCZ8L3SUAy3cDQKikHb2PPZ3AazJO05k8m8i6u77peQ==",
|
||||||
|
"requires": {
|
||||||
|
"@ethereum-navigator/atlas": "^0.7.1",
|
||||||
|
"web3": "^1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"web3": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3/-/web3-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-jAAJHMfUlTps+jH2li1ckDFEpPrEEriU/ubegSTGRl3KRdNhEqT93+3kd7FHJTn3NgjcyURo2+f7Da1YcZL8Mw==",
|
||||||
|
"requires": {
|
||||||
|
"web3-bzz": "1.2.7",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-eth": "1.2.7",
|
||||||
|
"web3-eth-personal": "1.2.7",
|
||||||
|
"web3-net": "1.2.7",
|
||||||
|
"web3-shh": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@oceanprotocol/squid": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-aoZttkArQ3qKsAHcaQfv6kFLpaSeGFHUSDRdK/MllJ5UFzclkDkBJd4P7XIJ5lS8uXOOBrrvQPxDU8wvf2yyMQ==",
|
||||||
|
"requires": {
|
||||||
|
"@ethereum-navigator/navigator": "^0.5.0",
|
||||||
|
"@oceanprotocol/keeper-contracts": "^0.13.2",
|
||||||
|
"@oceanprotocol/secret-store-client": "^0.0.15",
|
||||||
|
"bignumber.js": "^9.0.0",
|
||||||
|
"deprecated-decorator": "^0.1.6",
|
||||||
|
"node-fetch": "^2.6.0",
|
||||||
|
"save-file": "^2.3.1",
|
||||||
|
"uuid": "^7.0.2",
|
||||||
|
"web3": "^1.2.6",
|
||||||
|
"whatwg-url": "^8.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/node": {
|
||||||
|
"version": "10.17.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.21.tgz",
|
||||||
|
"integrity": "sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ=="
|
||||||
|
},
|
||||||
|
"get-stream": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
|
||||||
|
},
|
||||||
|
"p-cancelable": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw=="
|
||||||
|
},
|
||||||
|
"prepend-http": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
|
||||||
|
},
|
||||||
|
"swarm-js": {
|
||||||
|
"version": "0.1.40",
|
||||||
|
"resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz",
|
||||||
|
"integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==",
|
||||||
|
"requires": {
|
||||||
|
"bluebird": "^3.5.0",
|
||||||
|
"buffer": "^5.0.5",
|
||||||
|
"eth-lib": "^0.1.26",
|
||||||
|
"fs-extra": "^4.0.2",
|
||||||
|
"got": "^7.1.0",
|
||||||
|
"mime-types": "^2.1.16",
|
||||||
|
"mkdirp-promise": "^5.0.1",
|
||||||
|
"mock-fs": "^4.1.0",
|
||||||
|
"setimmediate": "^1.0.5",
|
||||||
|
"tar": "^4.0.2",
|
||||||
|
"xhr-request": "^1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"got": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==",
|
||||||
|
"requires": {
|
||||||
|
"decompress-response": "^3.2.0",
|
||||||
|
"duplexer3": "^0.1.4",
|
||||||
|
"get-stream": "^3.0.0",
|
||||||
|
"is-plain-obj": "^1.1.0",
|
||||||
|
"is-retry-allowed": "^1.0.0",
|
||||||
|
"is-stream": "^1.0.0",
|
||||||
|
"isurl": "^1.0.0-alpha5",
|
||||||
|
"lowercase-keys": "^1.0.0",
|
||||||
|
"p-cancelable": "^0.3.0",
|
||||||
|
"p-timeout": "^1.1.1",
|
||||||
|
"safe-buffer": "^5.0.1",
|
||||||
|
"timed-out": "^4.0.0",
|
||||||
|
"url-parse-lax": "^1.0.0",
|
||||||
|
"url-to-options": "^1.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url-parse-lax": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=",
|
||||||
|
"requires": {
|
||||||
|
"prepend-http": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uuid": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
|
||||||
|
},
|
||||||
|
"web3-bzz": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-iTIWBR+Z+Bn09WprtKm46LmyNOasg2lUn++AjXkBTB8UNxlUybxtza84yl2ETTZUs0zuFzdSSAEgbjhygG+9oA==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "^10.12.18",
|
||||||
|
"got": "9.6.0",
|
||||||
|
"swarm-js": "^0.1.40",
|
||||||
|
"underscore": "1.9.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-QA0MTae0gXcr3KHe3cQ4x56+Wh43ZKWfMwg1gfCc3NNxPRM1jJ8qudzyptCAUcxUGXWpDG8syLIn1APDz5J8BQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/bn.js": "^4.11.4",
|
||||||
|
"@types/node": "^12.6.1",
|
||||||
|
"bignumber.js": "^9.0.0",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-requestmanager": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "12.12.38",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.38.tgz",
|
||||||
|
"integrity": "sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-helpers": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-bdU++9QATGeCetVrMp8pV97aQtVkN5oLBf/TWu/qumC6jK/YqrvLlBJLdwbz0QveU8zOSap6GCvJbqKvmmbV2A==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-eth-iban": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-method": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-e1TI0QUnByDMbQ8QHwnjxfjKw0LIgVRY4TYrlPijET9ebqUJU1HCayn/BHIMpV6LKyR1fQj9EldWyT64wZQXkg==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-promievent": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-promievent": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-jNmsM/czCeMGQqKKwM9/HZVTJVIF96hdMVNN/V9TGvp+EEE7vDhB4pUocDnc/QF9Z/5QFBCVmvNWttlRgZmU0A==",
|
||||||
|
"requires": {
|
||||||
|
"eventemitter3": "3.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-requestmanager": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-HJb/txjHixu1dxIebiZQKBoJCaNu4gsh7mq/uj6Z/w6tIHbybL90s/7ADyMED353yyJ2tDWtYJqeMVAR+KtdaA==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-providers-http": "1.2.7",
|
||||||
|
"web3-providers-ipc": "1.2.7",
|
||||||
|
"web3-providers-ws": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-core-subscriptions": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-W/CzQYOUawdMDvkgA/fmLsnG5aMpbjrs78LZMbc0MFXLpH3ofqAgO2by4QZrrTShUUTeWS0ZuEkFFL/iFrSObw==",
|
||||||
|
"requires": {
|
||||||
|
"eventemitter3": "3.1.2",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-ljLd0oB4IjWkzFGVan4HkYhJXhSXgn9iaSaxdJixKGntZPgWMJfxeA+uLwTrlxrWzhvy4f+39WnT7wCh5e9TGg==",
|
||||||
|
"requires": {
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-eth-abi": "1.2.7",
|
||||||
|
"web3-eth-accounts": "1.2.7",
|
||||||
|
"web3-eth-contract": "1.2.7",
|
||||||
|
"web3-eth-ens": "1.2.7",
|
||||||
|
"web3-eth-iban": "1.2.7",
|
||||||
|
"web3-eth-personal": "1.2.7",
|
||||||
|
"web3-net": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-abi": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-4FnlT1q+D0XBkxSMXlIb/eG337uQeMaUdtVQ4PZ3XzxqpcoDuMgXm4o+3NRxnWmr4AMm6QKjM+hcC7c0mBKcyg==",
|
||||||
|
"requires": {
|
||||||
|
"ethers": "4.0.0-beta.3",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-accounts": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-AE7QWi/iIQIjXwlAPtlMabm/OPFF0a1PhxT1EiTckpYNP8fYs6jW7lYxEtJPPJIKqfMjoi1xkEqTVR1YZQ88lg==",
|
||||||
|
"requires": {
|
||||||
|
"@web3-js/scrypt-shim": "^0.1.0",
|
||||||
|
"crypto-browserify": "3.12.0",
|
||||||
|
"eth-lib": "^0.2.8",
|
||||||
|
"ethereumjs-common": "^1.3.2",
|
||||||
|
"ethereumjs-tx": "^2.1.1",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"uuid": "3.3.2",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eth-lib": {
|
||||||
|
"version": "0.2.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz",
|
||||||
|
"integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "^4.11.6",
|
||||||
|
"elliptic": "^6.4.0",
|
||||||
|
"xhr-request-promise": "^0.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uuid": {
|
||||||
|
"version": "3.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||||
|
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-contract": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-uW23Y0iL7XroRNbf9fWZ1N6OYhEYTJX8gTuYASuRnpYrISN5QGiQML6pq/NCzqypR1bl5E0fuINZQSK/xefIVw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/bn.js": "^4.11.4",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-promievent": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-eth-abi": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-ens": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-SPRnvUNWQ0CnnTDBteGIJkvFWEizJcAHlVsrFLICwcwFZu+appjX1UOaoGu2h3GXWtc/XZlu7B451Gi+Os2cTg==",
|
||||||
|
"requires": {
|
||||||
|
"eth-ens-namehash": "2.0.8",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-promievent": "1.2.7",
|
||||||
|
"web3-eth-abi": "1.2.7",
|
||||||
|
"web3-eth-contract": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-iban": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-2NrClz1PoQ3nSJBd+91ylCOVga9qbTxjRofq/oSCoHVAEvz3WZyttx9k5DC+0rWqwJF1h69ufFvdHAAlmN/4lg==",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "4.11.8",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-eth-personal": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-2OAa1Spz0uB29dwCM8+1y0So7E47A4gKznjBEwXIYEcUIsvwT5X7ofFhC2XxyRpqlIWZSQAxRSSJFyupRRXzyw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "^12.6.1",
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-net": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "12.12.38",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.38.tgz",
|
||||||
|
"integrity": "sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-net": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-j9qeZrS1FNyCeA0BfdLojkxOZQz3FKa1DJI+Dw9fEVhZS68vLOFANu2RB96gR9BoPHo5+k5D3NsKOoxt1gw3Gg==",
|
||||||
|
"requires": {
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-utils": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-providers-http": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-vazGx5onuH/zogrwkUaLFJwFcJ6CckP65VFSHoiV+GTQdkOqgoDIha7StKkslvDz4XJ2FuY/zOZHbtuOYeltXQ==",
|
||||||
|
"requires": {
|
||||||
|
"web3-core-helpers": "1.2.7",
|
||||||
|
"xhr2-cookies": "1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-providers-ipc": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-/zc0y724H2zbkV4UbGGMhsEiLfafjagIzfrsWZnyTZUlSB0OGRmmFm2EkLJAgtXrLiodaHHyXKM0vB8S24bxdA==",
|
||||||
|
"requires": {
|
||||||
|
"oboe": "2.1.4",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-providers-ws": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-b5XzqDpRkNVe6MFs5K6iqOEyjQikHtg3KuU2/ClCDV37hm0WN4xCRVMC0LwegulbDXZej3zT9+1CYzGaGFREzA==",
|
||||||
|
"requires": {
|
||||||
|
"@web3-js/websocket": "^1.0.29",
|
||||||
|
"eventemitter3": "^4.0.0",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"web3-core-helpers": "1.2.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eventemitter3": {
|
||||||
|
"version": "4.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.3.tgz",
|
||||||
|
"integrity": "sha512-HyaFeyfTa18nYjft59vEPsvuq6ZVcrCC1rBw6Fx8ZV9NcuUITBNCnTOyr0tHHkkHn//d+lzhsL1YybgtLQ7lng=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-shh": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-f6PAgcpG0ZAo98KqCmeHoDEx5qzm3d5plet18DkT4U6WIeYowKdec8vZaLPRR7c2XreXFJ2gQf45CB7oqR7U/w==",
|
||||||
|
"requires": {
|
||||||
|
"web3-core": "1.2.7",
|
||||||
|
"web3-core-method": "1.2.7",
|
||||||
|
"web3-core-subscriptions": "1.2.7",
|
||||||
|
"web3-net": "1.2.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web3-utils": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-FBh/CPJND+eiPeUF9KVbTyTZtXNWxPWtByBaWS6e2x4ACazPX711EeNaZaChIOGSLGe6se2n7kg6wnawe/MjuQ==",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "4.11.8",
|
||||||
|
"eth-lib": "0.2.7",
|
||||||
|
"ethereum-bloom-filters": "^1.0.6",
|
||||||
|
"ethjs-unit": "0.1.6",
|
||||||
|
"number-to-bn": "1.7.0",
|
||||||
|
"randombytes": "^2.1.0",
|
||||||
|
"underscore": "1.9.1",
|
||||||
|
"utf8": "3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eth-lib": {
|
||||||
|
"version": "0.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz",
|
||||||
|
"integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "^4.11.6",
|
||||||
|
"elliptic": "^6.4.0",
|
||||||
|
"xhr-request-promise": "^0.1.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@oceanprotocol/secret-store-client": {
|
"@oceanprotocol/secret-store-client": {
|
||||||
"version": "0.0.15",
|
"version": "0.0.15",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/secret-store-client/-/secret-store-client-0.0.15.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/secret-store-client/-/secret-store-client-0.0.15.tgz",
|
||||||
@ -3026,20 +3833,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@oceanprotocol/squid": {
|
"@oceanprotocol/squid": {
|
||||||
"version": "2.0.0-beta.4",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-2.0.0-beta.4.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-2.1.1.tgz",
|
||||||
"integrity": "sha512-SZx940zRJxN6HPB2Zsk3OMjkBUBjUiVWRvYFjKNTQqwflOe80ceGxWzKRwxcBvzz/C4TN1zXQAXHIidOR8aPMQ==",
|
"integrity": "sha512-aoZttkArQ3qKsAHcaQfv6kFLpaSeGFHUSDRdK/MllJ5UFzclkDkBJd4P7XIJ5lS8uXOOBrrvQPxDU8wvf2yyMQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ethereum-navigator/navigator": "^0.4.1",
|
"@ethereum-navigator/navigator": "^0.5.0",
|
||||||
"@oceanprotocol/keeper-contracts": "^0.13.2",
|
"@oceanprotocol/keeper-contracts": "^0.13.2",
|
||||||
"@oceanprotocol/secret-store-client": "^0.0.15",
|
"@oceanprotocol/secret-store-client": "^0.0.15",
|
||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
"deprecated-decorator": "^0.1.6",
|
"deprecated-decorator": "^0.1.6",
|
||||||
"node-fetch": "^2.6.0",
|
"node-fetch": "^2.6.0",
|
||||||
"save-file": "^2.3.1",
|
"save-file": "^2.3.1",
|
||||||
"uuid": "^3.4.0",
|
"uuid": "^7.0.2",
|
||||||
"web3": "^1.2.5",
|
"web3": "^1.2.6",
|
||||||
"whatwg-url": "^8.0.0"
|
"whatwg-url": "^8.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"uuid": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@oceanprotocol/typographies": {
|
"@oceanprotocol/typographies": {
|
||||||
@ -5756,6 +6570,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
|
||||||
"integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY="
|
"integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY="
|
||||||
},
|
},
|
||||||
|
"attr-accept": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-sLzVM3zCCmmDtDNhI0i96k6PUztkotSOXqE4kDGQt/6iDi5M+H0srjeF+QC6jN581l4X/Zq3Zu/tgcErEssavg=="
|
||||||
|
},
|
||||||
"authereum": {
|
"authereum": {
|
||||||
"version": "0.0.4-beta.93",
|
"version": "0.0.4-beta.93",
|
||||||
"resolved": "https://registry.npmjs.org/authereum/-/authereum-0.0.4-beta.93.tgz",
|
"resolved": "https://registry.npmjs.org/authereum/-/authereum-0.0.4-beta.93.tgz",
|
||||||
@ -11762,6 +12581,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.2.tgz",
|
||||||
"integrity": "sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw=="
|
"integrity": "sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw=="
|
||||||
},
|
},
|
||||||
|
"file-selector": {
|
||||||
|
"version": "0.1.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.12.tgz",
|
||||||
|
"integrity": "sha512-Kx7RTzxyQipHuiqyZGf+Nz4vY9R1XGxuQl/hLoJwq+J4avk/9wxxgZyHKtbyIPJmbD4A66DWGYfyykWNpcYutQ==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"file-system-cache": {
|
"file-system-cache": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/file-system-cache/-/file-system-cache-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/file-system-cache/-/file-system-cache-1.0.5.tgz",
|
||||||
@ -21776,9 +22603,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react": {
|
"react": {
|
||||||
"version": "16.12.0",
|
"version": "16.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/react/-/react-16.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz",
|
||||||
"integrity": "sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA==",
|
"integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
"object-assign": "^4.1.1",
|
"object-assign": "^4.1.1",
|
||||||
@ -22050,14 +22877,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-dom": {
|
"react-dom": {
|
||||||
"version": "16.12.0",
|
"version": "16.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz",
|
||||||
"integrity": "sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw==",
|
"integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
"object-assign": "^4.1.1",
|
"object-assign": "^4.1.1",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"scheduler": "^0.18.0"
|
"scheduler": "^0.19.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"scheduler": {
|
||||||
|
"version": "0.19.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz",
|
||||||
|
"integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==",
|
||||||
|
"requires": {
|
||||||
|
"loose-envify": "^1.1.0",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-dotdotdot": {
|
"react-dotdotdot": {
|
||||||
@ -22078,6 +22916,16 @@
|
|||||||
"prop-types": "^15.6.0"
|
"prop-types": "^15.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"react-dropzone": {
|
||||||
|
"version": "11.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-11.0.1.tgz",
|
||||||
|
"integrity": "sha512-x/6wqRHaR8jsrNiu/boVMIPYuoxb83Vyfv77hO7/3ZRn8Pr+KH5onsCsB8MLBa3zdJl410C5FXPUINbu16XIzw==",
|
||||||
|
"requires": {
|
||||||
|
"attr-accept": "^2.0.0",
|
||||||
|
"file-selector": "^0.1.12",
|
||||||
|
"prop-types": "^15.7.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"react-error-overlay": {
|
"react-error-overlay": {
|
||||||
"version": "6.0.6",
|
"version": "6.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.6.tgz",
|
||||||
@ -23176,6 +24024,7 @@
|
|||||||
"version": "0.18.0",
|
"version": "0.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.18.0.tgz",
|
||||||
"integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==",
|
"integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"loose-envify": "^1.1.0",
|
"loose-envify": "^1.1.0",
|
||||||
"object-assign": "^4.1.1"
|
"object-assign": "^4.1.1"
|
||||||
|
@ -18,8 +18,9 @@
|
|||||||
"storybook:build": "build-storybook -c .storybook -o public/storybook"
|
"storybook:build": "build-storybook -c .storybook -o public/storybook"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@oceanprotocol/react": "0.0.3",
|
||||||
|
"@oceanprotocol/squid": "^2.1.1",
|
||||||
"@oceanprotocol/art": "^2.2.0",
|
"@oceanprotocol/art": "^2.2.0",
|
||||||
"@oceanprotocol/squid": "2.0.0-beta.4",
|
|
||||||
"@oceanprotocol/typographies": "^0.1.0",
|
"@oceanprotocol/typographies": "^0.1.0",
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"date-fns": "^2.11.0",
|
"date-fns": "^2.11.0",
|
||||||
@ -31,10 +32,11 @@
|
|||||||
"next-svgr": "^0.0.2",
|
"next-svgr": "^0.0.2",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"numeral": "^2.0.6",
|
"numeral": "^2.0.6",
|
||||||
"react": "^16.12.0",
|
"react": "^16.13.1",
|
||||||
"react-datepicker": "^2.14.0",
|
"react-datepicker": "^2.14.0",
|
||||||
"react-dom": "^16.12.0",
|
"react-dom": "^16.13.1",
|
||||||
"react-dotdotdot": "^1.3.1",
|
"react-dotdotdot": "^1.3.1",
|
||||||
|
"react-dropzone": "^11.0.1",
|
||||||
"react-jsonschema-form": "^1.8.1",
|
"react-jsonschema-form": "^1.8.1",
|
||||||
"react-markdown": "^4.3.1",
|
"react-markdown": "^4.3.1",
|
||||||
"react-paginate": "^6.3.2",
|
"react-paginate": "^6.3.2",
|
||||||
|
4
src/@types/MetaData.d.ts
vendored
4
src/@types/MetaData.d.ts
vendored
@ -16,6 +16,8 @@ export interface Sample {
|
|||||||
url: string
|
url: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export declare type AccessType = 'Download' | 'Compute'
|
||||||
|
|
||||||
export interface AdditionalInformationDexFreight extends AdditionalInformation {
|
export interface AdditionalInformationDexFreight extends AdditionalInformation {
|
||||||
description: string // required for dexFreight
|
description: string // required for dexFreight
|
||||||
categories: [string] // required for dexFreight, lock to one category only
|
categories: [string] // required for dexFreight, lock to one category only
|
||||||
@ -26,9 +28,9 @@ export interface AdditionalInformationDexFreight extends AdditionalInformation {
|
|||||||
granularity?: Granularity
|
granularity?: Granularity
|
||||||
supportName?: string
|
supportName?: string
|
||||||
supportEmail?: string
|
supportEmail?: string
|
||||||
|
access: AccessType
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MetaDataDexFreight extends MetaData {
|
export interface MetaDataDexFreight extends MetaData {
|
||||||
additionalInformation: AdditionalInformationDexFreight
|
additionalInformation: AdditionalInformationDexFreight
|
||||||
curation: Curation
|
|
||||||
}
|
}
|
||||||
|
14
src/components/atoms/Dropzone.module.css
Normal file
14
src/components/atoms/Dropzone.module.css
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.dropzone {
|
||||||
|
padding: 22px;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--color-secondary);
|
||||||
|
border: 2px dashed var(--color-primary);
|
||||||
|
}
|
||||||
|
.dragover {
|
||||||
|
border-color: var(--color-secondary);
|
||||||
|
}
|
||||||
|
.disabled {
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
}
|
8
src/components/atoms/Dropzone.stories.tsx
Normal file
8
src/components/atoms/Dropzone.stories.tsx
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import Dropzone from './Dropzone'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Atoms/Dropzone'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Default = () => <Dropzone handleOnDrop={() => null} />
|
68
src/components/atoms/Dropzone.tsx
Normal file
68
src/components/atoms/Dropzone.tsx
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
import React, { useCallback } from 'react'
|
||||||
|
import { useDropzone } from 'react-dropzone'
|
||||||
|
import styles from './Dropzone.module.css'
|
||||||
|
import { formatBytes } from '../../utils'
|
||||||
|
|
||||||
|
export default function Dropzone({
|
||||||
|
handleOnDrop,
|
||||||
|
disabled,
|
||||||
|
multiple,
|
||||||
|
error
|
||||||
|
}: {
|
||||||
|
handleOnDrop(files: File[]): void
|
||||||
|
disabled?: boolean
|
||||||
|
multiple?: boolean
|
||||||
|
error?: string
|
||||||
|
}) {
|
||||||
|
const onDrop = useCallback(acceptedFiles => handleOnDrop(acceptedFiles), [
|
||||||
|
handleOnDrop
|
||||||
|
])
|
||||||
|
|
||||||
|
const {
|
||||||
|
getRootProps,
|
||||||
|
getInputProps,
|
||||||
|
isDragActive,
|
||||||
|
isDragReject,
|
||||||
|
acceptedFiles
|
||||||
|
} = useDropzone({ onDrop })
|
||||||
|
|
||||||
|
const files = acceptedFiles.map((file: any) => (
|
||||||
|
<li key={file.path}>
|
||||||
|
{file.path} - {formatBytes(file.size, 0)}
|
||||||
|
</li>
|
||||||
|
))
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
{...getRootProps({
|
||||||
|
className: isDragActive
|
||||||
|
? `${styles.dropzone} ${styles.dragover}`
|
||||||
|
: disabled
|
||||||
|
? `${styles.dropzone} ${styles.disabled}`
|
||||||
|
: styles.dropzone
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
{acceptedFiles.length > 0 ? (
|
||||||
|
<aside>
|
||||||
|
<ul>{files}</ul>
|
||||||
|
</aside>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<input {...getInputProps({ multiple })} />
|
||||||
|
|
||||||
|
{isDragActive && !isDragReject ? (
|
||||||
|
`Drop it like it's hot!`
|
||||||
|
) : multiple ? (
|
||||||
|
`Drag 'n' drop some files here, or click to select files`
|
||||||
|
) : error ? (
|
||||||
|
<div className={styles.error}>{error}</div>
|
||||||
|
) : (
|
||||||
|
`Drag 'n' drop a file here, or click to select a file`
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
@ -8,8 +8,6 @@ import {
|
|||||||
} from '../../../models/PublishForm'
|
} from '../../../models/PublishForm'
|
||||||
import useStoredValue from '../../../hooks/useStoredValue'
|
import useStoredValue from '../../../hooks/useStoredValue'
|
||||||
import { MetaDataDexFreight } from '../../../@types/MetaData'
|
import { MetaDataDexFreight } from '../../../@types/MetaData'
|
||||||
import useOcean from '../../../hooks/useOcean'
|
|
||||||
import useWeb3 from '../../../hooks/useWeb3'
|
|
||||||
import { File, MetaData } from '@oceanprotocol/squid'
|
import { File, MetaData } from '@oceanprotocol/squid'
|
||||||
import { isBrowser, toStringNoMS } from '../../../utils'
|
import { isBrowser, toStringNoMS } from '../../../utils'
|
||||||
import { toast } from 'react-toastify'
|
import { toast } from 'react-toastify'
|
||||||
@ -17,6 +15,7 @@ import { useRouter } from 'next/router'
|
|||||||
import styles from './PublishForm.module.css'
|
import styles from './PublishForm.module.css'
|
||||||
import utils from 'web3-utils'
|
import utils from 'web3-utils'
|
||||||
import AssetModel from '../../../models/Asset'
|
import AssetModel from '../../../models/Asset'
|
||||||
|
import { useWeb3, useOcean } from '@oceanprotocol/react'
|
||||||
|
|
||||||
declare type PublishFormProps = {}
|
declare type PublishFormProps = {}
|
||||||
|
|
||||||
@ -84,9 +83,7 @@ export function transformPublishFormToMetadata(
|
|||||||
supportEmail
|
supportEmail
|
||||||
},
|
},
|
||||||
// ------- curation -------
|
// ------- curation -------
|
||||||
curation: {
|
curation: AssetModel.curation
|
||||||
...AssetModel.curation
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dateRange) {
|
if (dateRange) {
|
||||||
@ -105,7 +102,7 @@ export function transformPublishFormToMetadata(
|
|||||||
const PublishForm: React.FC<PublishFormProps> = () => {
|
const PublishForm: React.FC<PublishFormProps> = () => {
|
||||||
const [buttonDisabled, setButtonDisabled] = useState(false)
|
const [buttonDisabled, setButtonDisabled] = useState(false)
|
||||||
const { web3, web3Connect } = useWeb3()
|
const { web3, web3Connect } = useWeb3()
|
||||||
const { ocean } = useOcean(web3)
|
const { ocean } = useOcean()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const [data, updateData] = useStoredValue(
|
const [data, updateData] = useStoredValue(
|
||||||
PUBLISH_FORM_LOCAL_STORAGE_KEY,
|
PUBLISH_FORM_LOCAL_STORAGE_KEY,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styles from './Wallet.module.css'
|
import styles from './Wallet.module.css'
|
||||||
import Button from '../../atoms/Button'
|
import Button from '../../atoms/Button'
|
||||||
import useWeb3 from '../../../hooks/useWeb3'
|
|
||||||
import { formatNumber } from '../../../utils'
|
import { formatNumber } from '../../../utils'
|
||||||
|
import { useWeb3 } from '@oceanprotocol/react'
|
||||||
|
|
||||||
const Wallet = ({ balanceOcean }: { balanceOcean: string }) => {
|
const Wallet = ({ balanceOcean }: { balanceOcean: string }) => {
|
||||||
const { account, balance, web3Connect } = useWeb3()
|
const { account, balance, web3Connect } = useWeb3()
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Web3Feedback from '.'
|
import Web3Feedback from '.'
|
||||||
import {
|
|
||||||
InjectedProviderStatus,
|
|
||||||
context,
|
|
||||||
Web3Context
|
|
||||||
} from '../../../context/Web3Context'
|
|
||||||
import web3Mock from '../../../../tests/unit/__mocks__/web3'
|
import web3Mock from '../../../../tests/unit/__mocks__/web3'
|
||||||
import web3ProviderMock from '../../../../tests/unit/__mocks__/web3provider'
|
import web3ProviderMock, {
|
||||||
|
context
|
||||||
|
} from '../../../../tests/unit/__mocks__/web3provider'
|
||||||
import { Center } from '../../../../.storybook/helpers'
|
import { Center } from '../../../../.storybook/helpers'
|
||||||
|
import { InjectedProviderStatus } from '@oceanprotocol/react'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Molecules/Web3Feedback',
|
title: 'Molecules/Web3Feedback',
|
||||||
@ -18,7 +16,7 @@ export const NoWeb3Browser = () => {
|
|||||||
const mock = {
|
const mock = {
|
||||||
...web3ProviderMock,
|
...web3ProviderMock,
|
||||||
web3: null
|
web3: null
|
||||||
} as Web3Context
|
} as any
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<context.Provider value={mock}>
|
<context.Provider value={mock}>
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import useOcean, { OceanConnectionStatus } from '../../../hooks/useOcean'
|
|
||||||
import { InjectedProviderStatus } from '../../../context/Web3Context'
|
|
||||||
import Status from '../../atoms/Status'
|
import Status from '../../atoms/Status'
|
||||||
import Wallet from './Wallet'
|
import Wallet from './Wallet'
|
||||||
import styles from './index.module.css'
|
import styles from './index.module.css'
|
||||||
import useWeb3 from '../../../hooks/useWeb3'
|
import {
|
||||||
|
useWeb3,
|
||||||
|
useOcean,
|
||||||
|
InjectedProviderStatus,
|
||||||
|
OceanConnectionStatus
|
||||||
|
} from '@oceanprotocol/react'
|
||||||
|
|
||||||
export declare type Web3Error = {
|
export declare type Web3Error = {
|
||||||
status: 'error' | 'warning' | 'success'
|
status: 'error' | 'warning' | 'success'
|
||||||
@ -17,20 +20,18 @@ export default function Web3Feedback({
|
|||||||
}: {
|
}: {
|
||||||
isBalanceInsufficient?: boolean
|
isBalanceInsufficient?: boolean
|
||||||
}) {
|
}) {
|
||||||
const { web3, ethProviderStatus } = useWeb3()
|
const { ethProviderStatus } = useWeb3()
|
||||||
const { oceanConnectionStatus, balance } = useOcean(web3)
|
const { status, balanceInOcean } = useOcean()
|
||||||
|
|
||||||
const isEthProviderAbsent =
|
const isEthProviderAbsent =
|
||||||
ethProviderStatus === InjectedProviderStatus.NOT_AVAILABLE
|
ethProviderStatus === InjectedProviderStatus.NOT_AVAILABLE
|
||||||
const isEthProviderDisconnected =
|
const isEthProviderDisconnected =
|
||||||
ethProviderStatus === InjectedProviderStatus.NOT_CONNECTED
|
ethProviderStatus === InjectedProviderStatus.NOT_CONNECTED
|
||||||
const isOceanDisconnected =
|
const isOceanDisconnected = status === OceanConnectionStatus.NOT_CONNECTED
|
||||||
oceanConnectionStatus === OceanConnectionStatus.NOT_CONNECTED
|
|
||||||
const isOceanConnectionError =
|
const isOceanConnectionError =
|
||||||
oceanConnectionStatus === OceanConnectionStatus.OCEAN_CONNECTION_ERROR
|
status === OceanConnectionStatus.OCEAN_CONNECTION_ERROR
|
||||||
const hasSuccess =
|
const hasSuccess =
|
||||||
ethProviderStatus === InjectedProviderStatus.CONNECTED &&
|
ethProviderStatus === InjectedProviderStatus.CONNECTED &&
|
||||||
oceanConnectionStatus === OceanConnectionStatus.CONNECTED
|
status === OceanConnectionStatus.CONNECTED
|
||||||
|
|
||||||
const state = isEthProviderAbsent
|
const state = isEthProviderAbsent
|
||||||
? 'error'
|
? 'error'
|
||||||
@ -73,7 +74,7 @@ export default function Web3Feedback({
|
|||||||
</div>
|
</div>
|
||||||
{!isEthProviderAbsent && (
|
{!isEthProviderAbsent && (
|
||||||
<div className={styles.walletcontainer}>
|
<div className={styles.walletcontainer}>
|
||||||
<Wallet balanceOcean={balance} />
|
<Wallet balanceOcean={balanceInOcean} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
37
src/components/organisms/Compute.module.css
Normal file
37
src/components/organisms/Compute.module.css
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
.jobButtonWrapper {
|
||||||
|
margin-top: var(--spacer);
|
||||||
|
}
|
||||||
|
.selectType {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: var(--spacer);
|
||||||
|
}
|
||||||
|
.feedback {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: var(--spacer);
|
||||||
|
padding-top: var(--spacer);
|
||||||
|
border-top: 1px solid var(--color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.compute {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: calc(var(--spacer) * 1.5);
|
||||||
|
}
|
||||||
|
.compute button {
|
||||||
|
margin-left: var(--spacer);
|
||||||
|
}
|
||||||
|
.compute button:first {
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
padding-bottom: calc(var(--spacer) * 1.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
padding-top: calc(var(--spacer) * 0.5);
|
||||||
|
padding-bottom: var(--spacer);
|
||||||
|
border-top: 1px solid var(--color-secondary);
|
||||||
|
}
|
22
src/components/organisms/Compute.stories.tsx
Normal file
22
src/components/organisms/Compute.stories.tsx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import Compute from './Compute'
|
||||||
|
import ddo from '../../../tests/unit/__fixtures__/ddo'
|
||||||
|
import web3Mock from '../../../tests/unit/__mocks__/web3'
|
||||||
|
import { DDO } from '@oceanprotocol/squid'
|
||||||
|
import oceanMock from '../../../tests/unit/__mocks__/ocean-mock'
|
||||||
|
import { context } from '../../../tests/unit/__mocks__/web3provider'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Organisms/Consumejob',
|
||||||
|
decorators: [
|
||||||
|
(storyFn: () => React.FC) => (
|
||||||
|
<div style={{ maxWidth: '40rem', margin: 'auto' }}>{storyFn()}</div>
|
||||||
|
)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Default = () => (
|
||||||
|
<context.Provider value={web3Mock}>
|
||||||
|
<Compute ddo={ddo as DDO} ocean={oceanMock as any} balance="1000000" />
|
||||||
|
</context.Provider>
|
||||||
|
)
|
147
src/components/organisms/Compute.tsx
Normal file
147
src/components/organisms/Compute.tsx
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
import React, { useState, useEffect } from 'react'
|
||||||
|
import { DDO, MetaDataAlgorithm, Ocean, DID } from '@oceanprotocol/squid'
|
||||||
|
import { ServiceMetadata } from '@oceanprotocol/squid/dist/node/ddo/Service'
|
||||||
|
import { fromWei } from 'web3-utils'
|
||||||
|
import compareAsBN, { Comparisson } from '../../utils/compareAsBN'
|
||||||
|
import Loader from '../atoms/Loader'
|
||||||
|
import { config } from '../../config/ocean'
|
||||||
|
import Web3Feedback from '../molecules/Web3Feedback'
|
||||||
|
import Dropzone from '../atoms/Dropzone'
|
||||||
|
import Price from '../atoms/Price'
|
||||||
|
import { findServiceByType } from '../../utils'
|
||||||
|
import {
|
||||||
|
computeOptions,
|
||||||
|
useCompute,
|
||||||
|
readFileContent
|
||||||
|
} from '@oceanprotocol/react'
|
||||||
|
import styles from './Consume.module.css'
|
||||||
|
import Button from '../atoms/Button'
|
||||||
|
|
||||||
|
export default function Compute({
|
||||||
|
ddo,
|
||||||
|
balance,
|
||||||
|
ocean
|
||||||
|
}: {
|
||||||
|
ddo: DDO | null
|
||||||
|
balance: string | null
|
||||||
|
ocean: Ocean | null
|
||||||
|
}) {
|
||||||
|
if (!ddo) return null
|
||||||
|
const { compute, computeStep, computeStepText } = useCompute()
|
||||||
|
const [isJobStarting, setIsJobStarting] = useState(false)
|
||||||
|
const [step, setStep] = useState(99)
|
||||||
|
const [error, setError] = useState('')
|
||||||
|
const [isBalanceSufficient, setIsBalanceSufficient] = useState(false)
|
||||||
|
|
||||||
|
const [computeType, setComputeType] = useState('')
|
||||||
|
const [computeContainer, setComputeContainer] = useState({
|
||||||
|
entrypoint: '',
|
||||||
|
image: '',
|
||||||
|
tag: ''
|
||||||
|
})
|
||||||
|
const [algorithmRawCode, setAlgorithmRawCode] = useState('')
|
||||||
|
const [isPublished, setIsPublished] = useState(false)
|
||||||
|
const [file, setFile] = useState(null)
|
||||||
|
|
||||||
|
const metadata = findServiceByType(ddo, 'metadata') as ServiceMetadata
|
||||||
|
const { price } = metadata.attributes.main
|
||||||
|
|
||||||
|
const isFree = price === '0'
|
||||||
|
|
||||||
|
const [isTermsAgreed, setIsTermsAgreed] = useState(false)
|
||||||
|
const isComputeButtonDisabled =
|
||||||
|
isJobStarting ||
|
||||||
|
file === null ||
|
||||||
|
computeType === '' ||
|
||||||
|
!ocean ||
|
||||||
|
!isBalanceSufficient ||
|
||||||
|
!isTermsAgreed
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setIsBalanceSufficient(
|
||||||
|
isFree ||
|
||||||
|
(balance !== null &&
|
||||||
|
compareAsBN(balance, fromWei(price), Comparisson.gte))
|
||||||
|
)
|
||||||
|
}, [balance])
|
||||||
|
|
||||||
|
const onDrop = async (files: any) => {
|
||||||
|
setFile(files[0])
|
||||||
|
const fileText = await readFileContent(files[0])
|
||||||
|
setAlgorithmRawCode(fileText)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSelectChange = (event: any) => {
|
||||||
|
const comType = event.target.value
|
||||||
|
setComputeType(comType)
|
||||||
|
|
||||||
|
const selectedComputeOption = computeOptions.find(x => x.name === comType)
|
||||||
|
if (selectedComputeOption !== undefined)
|
||||||
|
setComputeContainer(selectedComputeOption.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
const startJob = async () => {
|
||||||
|
try {
|
||||||
|
if (!ocean) return
|
||||||
|
setIsJobStarting(true)
|
||||||
|
setIsPublished(false)
|
||||||
|
setError('')
|
||||||
|
// compute(ddo.id, algorithmRawCode, computeContainer)
|
||||||
|
setIsPublished(true)
|
||||||
|
setFile(null)
|
||||||
|
} catch (error) {
|
||||||
|
setError('Failed to start job!')
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
setIsJobStarting(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCheck(event: any) {
|
||||||
|
console.log(event, event.target.checked)
|
||||||
|
setIsTermsAgreed(event.target.checked)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.compute}>
|
||||||
|
<Price price={fromWei(price)} className={styles.price} />
|
||||||
|
|
||||||
|
<div className={styles.info}>
|
||||||
|
<div className={styles.selectType}>
|
||||||
|
{/* <input
|
||||||
|
type="search"
|
||||||
|
className={large ? `${styles.input} ${styles.large}` : styles.input}
|
||||||
|
placeholder={placeholder || 'What are you looking for?'}
|
||||||
|
value={value}
|
||||||
|
onChange={e => handleChange(e)}
|
||||||
|
required
|
||||||
|
/> */}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Dropzone multiple={false} handleOnDrop={onDrop} />
|
||||||
|
|
||||||
|
<div className={styles.jobButtonWrapper}>
|
||||||
|
<Button
|
||||||
|
onClick={() => startJob()}
|
||||||
|
disabled={isComputeButtonDisabled}
|
||||||
|
>
|
||||||
|
Start job
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{/* <TermsCheckbox onChange={onCheck} /> */}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{isJobStarting && <Loader message={computeStepText} />}
|
||||||
|
{error !== '' && <div className={styles.feedback}>{error}</div>}
|
||||||
|
{isPublished && (
|
||||||
|
<div className={styles.feedback}>
|
||||||
|
<p>Your job started! Watch the progress in the history page.</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer className={styles.feedback}>
|
||||||
|
<Web3Feedback isBalanceInsufficient={!isBalanceSufficient} />
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { context } from '../../context/Web3Context'
|
|
||||||
import Consume from './Consume'
|
import Consume from './Consume'
|
||||||
import ddo from '../../../tests/unit/__fixtures__/ddo'
|
import ddo from '../../../tests/unit/__fixtures__/ddo'
|
||||||
import web3Mock from '../../../tests/unit/__mocks__/web3'
|
import web3Mock from '../../../tests/unit/__mocks__/web3'
|
||||||
import { DDO } from '@oceanprotocol/squid'
|
import { DDO } from '@oceanprotocol/squid'
|
||||||
|
import { context } from '../../../tests/unit/__mocks__/web3provider'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Organisms/Consume',
|
title: 'Organisms/Consume',
|
||||||
|
@ -6,35 +6,25 @@ import compareAsBN, { Comparisson } from '../../utils/compareAsBN'
|
|||||||
import Button from '../atoms/Button'
|
import Button from '../atoms/Button'
|
||||||
import File from '../atoms/File'
|
import File from '../atoms/File'
|
||||||
import Price from '../atoms/Price'
|
import Price from '../atoms/Price'
|
||||||
import usePurchase from '../../hooks/usePurchase'
|
|
||||||
import { MetaDataDexFreight } from '../../@types/MetaData'
|
import { MetaDataDexFreight } from '../../@types/MetaData'
|
||||||
import Web3Feedback from '../molecules/Web3Feedback'
|
import Web3Feedback from '../molecules/Web3Feedback'
|
||||||
import useOcean from '../../hooks/useOcean'
|
|
||||||
import useWeb3 from '../../hooks/useWeb3'
|
|
||||||
import styles from './Consume.module.css'
|
import styles from './Consume.module.css'
|
||||||
import Loader from '../atoms/Loader'
|
import Loader from '../atoms/Loader'
|
||||||
|
import { useWeb3, useOcean, useConsume } from '@oceanprotocol/react'
|
||||||
export const feedback: { [key in number]: string } = {
|
|
||||||
99: 'Decrypting file URL...',
|
|
||||||
0: '1/3 Asking for agreement signature...',
|
|
||||||
1: '1/3 Agreement initialized.',
|
|
||||||
2: '2/3 Asking for two payment confirmations...',
|
|
||||||
3: '2/3 Payment confirmed. Requesting access...',
|
|
||||||
4: '3/3 Access granted. Consuming file...'
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Consume({ ddo }: { ddo: DDO | undefined }) {
|
export default function Consume({ ddo }: { ddo: DDO | undefined }) {
|
||||||
if (!ddo) return null
|
if (!ddo) return null
|
||||||
|
|
||||||
const { web3 } = useWeb3()
|
const { web3 } = useWeb3()
|
||||||
const { ocean, balance } = useOcean(web3)
|
const { ocean, balanceInOcean } = useOcean()
|
||||||
const { purchaseAsset, isLoading, feedbackStep } = usePurchase()
|
const { consume, consumeStepText, isLoading } = useConsume()
|
||||||
const { attributes } = findServiceByType(ddo, 'metadata')
|
const { attributes } = findServiceByType(ddo, 'metadata')
|
||||||
const { price } = attributes.main
|
const { price } = attributes.main
|
||||||
const file = (attributes as MetaDataDexFreight).main.files[0]
|
const file = (attributes as MetaDataDexFreight).main.files[0]
|
||||||
const isFree = price === '0'
|
const isFree = price === '0'
|
||||||
const isBalanceSufficient =
|
const isBalanceSufficient =
|
||||||
isFree || compareAsBN(balance, Web3.utils.fromWei(price), Comparisson.gte)
|
isFree ||
|
||||||
|
compareAsBN(balanceInOcean, Web3.utils.fromWei(price), Comparisson.gte)
|
||||||
const isDisabled = !ocean || !isBalanceSufficient || isLoading
|
const isDisabled = !ocean || !isBalanceSufficient || isLoading
|
||||||
|
|
||||||
const PurchaseButton = () => {
|
const PurchaseButton = () => {
|
||||||
@ -43,13 +33,9 @@ export default function Consume({ ddo }: { ddo: DDO | undefined }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return isLoading ? (
|
return isLoading ? (
|
||||||
<Loader message={feedback[feedbackStep]} isHorizontal />
|
<Loader message={consumeStepText} isHorizontal />
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<Button primary onClick={() => consume(ddo.id)} disabled={isDisabled}>
|
||||||
primary
|
|
||||||
onClick={() => purchaseAsset(new DDO(ddo))}
|
|
||||||
disabled={isDisabled}
|
|
||||||
>
|
|
||||||
{isFree ? 'Download' : 'Buy'}
|
{isFree ? 'Download' : 'Buy'}
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect } from 'react'
|
||||||
import { toast } from 'react-toastify'
|
import { toast } from 'react-toastify'
|
||||||
import useWeb3 from '../../../hooks/useWeb3'
|
|
||||||
import Rating from '../../atoms/Rating'
|
import Rating from '../../atoms/Rating'
|
||||||
import rateAsset from '../../../utils/rateAsset'
|
import rateAsset from '../../../utils/rateAsset'
|
||||||
import { DID } from '@oceanprotocol/squid'
|
import { DID } from '@oceanprotocol/squid'
|
||||||
import styles from './RatingAction.module.css'
|
import styles from './RatingAction.module.css'
|
||||||
import getAssetRating from '../../../utils/getAssetRating'
|
import getAssetRating from '../../../utils/getAssetRating'
|
||||||
import Loader from '../../atoms/Loader'
|
import Loader from '../../atoms/Loader'
|
||||||
|
import { useWeb3 } from '@oceanprotocol/react'
|
||||||
export default function RatingAction({
|
export default function RatingAction({
|
||||||
did,
|
did,
|
||||||
onVote
|
onVote
|
||||||
@ -20,6 +20,7 @@ export default function RatingAction({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function getOwnRating() {
|
async function getOwnRating() {
|
||||||
|
if (!account) return
|
||||||
const currentRating = await getAssetRating(did, account)
|
const currentRating = await getAssetRating(did, account)
|
||||||
currentRating && setRating(currentRating.vote)
|
currentRating && setRating(currentRating.vote)
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import RatingAction from './RatingAction'
|
|||||||
import styles from './index.module.css'
|
import styles from './index.module.css'
|
||||||
import { config } from '../../../config/ocean'
|
import { config } from '../../../config/ocean'
|
||||||
import { findServiceByType } from '../../../utils'
|
import { findServiceByType } from '../../../utils'
|
||||||
|
import { useMetadata, useWeb3 } from '@oceanprotocol/react'
|
||||||
|
|
||||||
export declare type AssetDetailsPageProps = {
|
export declare type AssetDetailsPageProps = {
|
||||||
title: string
|
title: string
|
||||||
@ -37,22 +38,19 @@ const AssetDetailsPageMeta = ({
|
|||||||
description,
|
description,
|
||||||
copyrightHolder,
|
copyrightHolder,
|
||||||
categories,
|
categories,
|
||||||
tags
|
tags,
|
||||||
|
access
|
||||||
} = attributes.additionalInformation
|
} = attributes.additionalInformation
|
||||||
const { curation } = attributes
|
const { curation } = attributes
|
||||||
|
|
||||||
|
const { getCuration } = useMetadata()
|
||||||
const [rating, setRating] = useState<number>(curation ? curation.rating : 0)
|
const [rating, setRating] = useState<number>(curation ? curation.rating : 0)
|
||||||
const [numVotes, setNumVotes] = useState<number>(
|
const [numVotes, setNumVotes] = useState<number>(
|
||||||
curation ? curation.numVotes : 0
|
curation ? curation.numVotes : 0
|
||||||
)
|
)
|
||||||
|
const isCompute = access && access === 'Compute'
|
||||||
const onVoteUpdate = async () => {
|
const onVoteUpdate = async () => {
|
||||||
const aquarius = new Aquarius(config.aquariusUri as string, Logger)
|
const { rating, numVotes } = await getCuration(ddo.id)
|
||||||
const newDdo = await aquarius.retrieveDDO(ddo.id)
|
|
||||||
if (!newDdo) return
|
|
||||||
console.log(newDdo)
|
|
||||||
const { attributes } = findServiceByType(newDdo, 'metadata')
|
|
||||||
const { rating, numVotes } = (attributes as MetaDataDexFreight).curation
|
|
||||||
|
|
||||||
setRating(rating)
|
setRating(rating)
|
||||||
setNumVotes(numVotes)
|
setNumVotes(numVotes)
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
import React from 'react'
|
|
||||||
import Web3 from 'web3'
|
|
||||||
import Core from 'web3connect/lib/core'
|
|
||||||
|
|
||||||
export enum InjectedProviderStatus {
|
|
||||||
NOT_AVAILABLE = -1,
|
|
||||||
NOT_CONNECTED = 0,
|
|
||||||
CONNECTED = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Web3Context {
|
|
||||||
web3: null | Web3
|
|
||||||
web3Connect: Core
|
|
||||||
ethProviderStatus: InjectedProviderStatus
|
|
||||||
account: string
|
|
||||||
balance: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export const context = React.createContext<Web3Context | undefined>(undefined)
|
|
@ -1,126 +0,0 @@
|
|||||||
import React, { useState, useEffect } from 'react'
|
|
||||||
import Web3Connect from 'web3connect'
|
|
||||||
import Web3 from 'web3'
|
|
||||||
import { context, InjectedProviderStatus } from './Web3Context'
|
|
||||||
import getFromFaucet from '../utils/getFromFaucet'
|
|
||||||
|
|
||||||
export default function Web3Provider({ children }: { children: any }) {
|
|
||||||
const [web3, setWeb3] = useState<null | Web3>(null)
|
|
||||||
const [ethProvider, setEthProvider] = useState<any>(null)
|
|
||||||
const [ethProviderStatus, setEthProviderStatus] = useState(
|
|
||||||
InjectedProviderStatus.NOT_AVAILABLE
|
|
||||||
)
|
|
||||||
const [web3Connect, setWeb3Connect] = useState<any>(null)
|
|
||||||
const [account, setAccount] = useState('')
|
|
||||||
const [balance, setBalance] = useState('')
|
|
||||||
|
|
||||||
function init(networkId?: string | number) {
|
|
||||||
const instance = new Web3Connect.Core({
|
|
||||||
network: `${networkId}`,
|
|
||||||
providerOptions: {}
|
|
||||||
})
|
|
||||||
setWeb3Connect(instance)
|
|
||||||
|
|
||||||
if (Web3Connect.checkInjectedProviders().injectedAvailable) {
|
|
||||||
setEthProviderStatus(InjectedProviderStatus.NOT_CONNECTED)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// On mount setup Web3Connect instance & check for injected provider
|
|
||||||
useEffect(() => {
|
|
||||||
init()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
async function getAccount(web3: Web3) {
|
|
||||||
const accounts = await web3.eth.getAccounts()
|
|
||||||
return accounts[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getBalance(web3: Web3, address: string) {
|
|
||||||
const balance = await web3.eth.getBalance(address)
|
|
||||||
return Web3.utils.fromWei(balance)
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Listen for provider, account & network changes
|
|
||||||
// and react to it
|
|
||||||
//
|
|
||||||
const handleConnect = async (provider: any) => {
|
|
||||||
console.debug("Handling 'connect' event with payload", provider)
|
|
||||||
setEthProvider(provider)
|
|
||||||
setEthProviderStatus(InjectedProviderStatus.CONNECTED)
|
|
||||||
|
|
||||||
const web3 = new Web3(provider)
|
|
||||||
setWeb3(web3)
|
|
||||||
|
|
||||||
const account = await getAccount(web3)
|
|
||||||
setAccount(account)
|
|
||||||
|
|
||||||
const balance = await getBalance(web3, account)
|
|
||||||
setBalance(balance)
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleAccountsChanged = async (accounts: string[]) => {
|
|
||||||
console.debug("Handling 'accountsChanged' event with payload", accounts)
|
|
||||||
if (accounts.length > 0) {
|
|
||||||
setAccount(accounts[0])
|
|
||||||
|
|
||||||
if (web3) {
|
|
||||||
const balance = await getBalance(web3, accounts[0])
|
|
||||||
setBalance(balance)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleNetworkChanged = async (networkId: string | number) => {
|
|
||||||
console.debug("Handling 'networkChanged' event with payload", networkId)
|
|
||||||
ethProvider.autoRefreshOnNetworkChange = false
|
|
||||||
init(networkId)
|
|
||||||
handleConnect(ethProvider)
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Setup event listeners.
|
|
||||||
// Web3Connect only supports a 'connect', 'error', and 'close' event,
|
|
||||||
// so we use the injected provider events to handle the rest.
|
|
||||||
//
|
|
||||||
useEffect(() => {
|
|
||||||
web3Connect && web3Connect.on('connect', handleConnect)
|
|
||||||
|
|
||||||
if (ethProvider) {
|
|
||||||
ethProvider.on('accountsChanged', handleAccountsChanged)
|
|
||||||
ethProvider.on('networkChanged', handleNetworkChanged)
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
ethProvider.removeListener('accountsChanged', handleAccountsChanged)
|
|
||||||
ethProvider.removeListener('networkChanged', handleNetworkChanged)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, [web3, web3Connect, ethProvider])
|
|
||||||
|
|
||||||
//
|
|
||||||
// Automatically request ETH from Faucet
|
|
||||||
//
|
|
||||||
useEffect(() => {
|
|
||||||
async function getEth(): Promise<null> {
|
|
||||||
if (!account || !balance) return null
|
|
||||||
|
|
||||||
const hasEnough = Number(balance) > 0
|
|
||||||
if (hasEnough) return null
|
|
||||||
|
|
||||||
await getFromFaucet(account)
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
getEth()
|
|
||||||
}, [account, balance])
|
|
||||||
|
|
||||||
const contextValue = {
|
|
||||||
web3,
|
|
||||||
web3Connect,
|
|
||||||
ethProviderStatus,
|
|
||||||
account,
|
|
||||||
balance
|
|
||||||
}
|
|
||||||
|
|
||||||
return <context.Provider value={contextValue}>{children}</context.Provider>
|
|
||||||
}
|
|
@ -1,82 +0,0 @@
|
|||||||
import { useState, useEffect } from 'react'
|
|
||||||
import Web3 from 'web3'
|
|
||||||
import { Ocean } from '@oceanprotocol/squid'
|
|
||||||
import { config, CHAIN_IDS, OceanConfig } from '../config/ocean'
|
|
||||||
|
|
||||||
export enum OceanConnectionStatus {
|
|
||||||
OCEAN_CONNECTION_ERROR = -1,
|
|
||||||
NOT_CONNECTED = 0,
|
|
||||||
CONNECTED = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function useOcean(web3: null | Web3) {
|
|
||||||
const [ocean, setOcean] = useState<null | Ocean>(null)
|
|
||||||
const [oceanConnectionStatus, setOceanConnectionStatus] = useState(
|
|
||||||
OceanConnectionStatus.NOT_CONNECTED
|
|
||||||
)
|
|
||||||
const [account, setAccount] = useState('')
|
|
||||||
const [balance, setBalance] = useState('')
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
async function init() {
|
|
||||||
// @FIXME: the effect assumes that this verification will run once when
|
|
||||||
// web3 is available, but Metamask might stop reloading the page on
|
|
||||||
// network change (the reload behavior can even be disabled):
|
|
||||||
// https://github.com/MetaMask/metamask-extension/issues/3599
|
|
||||||
// https://metamask.github.io/metamask-docs/API_Reference/Ethereum_Provider
|
|
||||||
if (!web3) return
|
|
||||||
|
|
||||||
const chainId = await web3.eth.getChainId()
|
|
||||||
|
|
||||||
if (CHAIN_IDS.indexOf(chainId) < 0) {
|
|
||||||
console.error('Network/chainId not supported.')
|
|
||||||
setOceanConnectionStatus(OceanConnectionStatus.NOT_CONNECTED)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
console.debug('Connecting to Ocean...')
|
|
||||||
// TODO: quick jest/storybook fix
|
|
||||||
// should be removed once we know how to mock Ocean in Jest
|
|
||||||
if (!web3.currentProvider) return
|
|
||||||
|
|
||||||
const oceanInstance = await Ocean.getInstance({
|
|
||||||
web3Provider: web3.currentProvider,
|
|
||||||
...config
|
|
||||||
} as OceanConfig)
|
|
||||||
console.debug('Ocean instance ready.')
|
|
||||||
setOcean(oceanInstance)
|
|
||||||
setOceanConnectionStatus(OceanConnectionStatus.CONNECTED)
|
|
||||||
|
|
||||||
const oceanAccounts = await oceanInstance.accounts.list()
|
|
||||||
oceanAccounts && setAccount(oceanAccounts[0].getId())
|
|
||||||
const balance = await oceanAccounts[0].getOceanBalance()
|
|
||||||
setBalance(`${balance}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
init()
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error.message)
|
|
||||||
setOceanConnectionStatus(OceanConnectionStatus.OCEAN_CONNECTION_ERROR)
|
|
||||||
throw error.message
|
|
||||||
}
|
|
||||||
}, [web3])
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
async function debug() {
|
|
||||||
if (!ocean) return
|
|
||||||
console.debug(
|
|
||||||
`Ocean instance initiated with:\n ${JSON.stringify(config, null, 2)}`
|
|
||||||
)
|
|
||||||
console.debug(await ocean.versions.get())
|
|
||||||
}
|
|
||||||
debug()
|
|
||||||
}, [ocean])
|
|
||||||
|
|
||||||
return {
|
|
||||||
ocean,
|
|
||||||
account,
|
|
||||||
balance,
|
|
||||||
oceanConnectionStatus
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
import { useState } from 'react'
|
|
||||||
import { Logger, DDO } from '@oceanprotocol/squid'
|
|
||||||
import useOcean from './useOcean'
|
|
||||||
import useWeb3 from './useWeb3'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Consume/purchase asset hook.
|
|
||||||
*/
|
|
||||||
export default function usePurchaseAsset() {
|
|
||||||
const { web3 } = useWeb3()
|
|
||||||
const { ocean } = useOcean(web3)
|
|
||||||
const [error, setError] = useState(null)
|
|
||||||
const [isLoading, setIsLoading] = useState(false)
|
|
||||||
const [feedbackStep, setFeedbackStep] = useState(99)
|
|
||||||
|
|
||||||
const purchaseAsset = async (ddo: DDO) => {
|
|
||||||
if (!ocean) return
|
|
||||||
|
|
||||||
setIsLoading(true)
|
|
||||||
|
|
||||||
try {
|
|
||||||
const account = (await ocean.accounts.list())[0]
|
|
||||||
const agreements = await ocean.keeper.conditions.accessSecretStoreCondition.getGrantedDidByConsumer(
|
|
||||||
account.getId()
|
|
||||||
)
|
|
||||||
const agreement = agreements.find((el: any) => el.did === ddo.id)
|
|
||||||
const agreementId = agreement
|
|
||||||
? agreement.agreementId
|
|
||||||
: await ocean.assets
|
|
||||||
.order(ddo.id, account)
|
|
||||||
.next(step => setFeedbackStep(step))
|
|
||||||
|
|
||||||
// manually add another step here for better UX
|
|
||||||
setFeedbackStep(4)
|
|
||||||
const path = await ocean.assets.consume(agreementId, ddo.id, account, '')
|
|
||||||
Logger.log('path', path)
|
|
||||||
} catch (error) {
|
|
||||||
setError(error)
|
|
||||||
Logger.error('error', error.message)
|
|
||||||
} finally {
|
|
||||||
setIsLoading(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return { purchaseAsset, isLoading, feedbackStep, error }
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
import { useContext } from 'react'
|
|
||||||
import { context, Web3Context } from '../context/Web3Context'
|
|
||||||
|
|
||||||
export default function useWeb3() {
|
|
||||||
const web3Context = useContext(context)
|
|
||||||
|
|
||||||
if (web3Context === null) {
|
|
||||||
throw new Error('useWeb3Context must be used in children of Web3Provider')
|
|
||||||
}
|
|
||||||
|
|
||||||
return web3Context as Web3Context
|
|
||||||
}
|
|
@ -25,7 +25,8 @@ const AssetModel: MetaDataDexFreight = {
|
|||||||
dateRange: undefined,
|
dateRange: undefined,
|
||||||
granularity: undefined,
|
granularity: undefined,
|
||||||
supportName: undefined,
|
supportName: undefined,
|
||||||
supportEmail: undefined
|
supportEmail: undefined,
|
||||||
|
access: 'Download'
|
||||||
},
|
},
|
||||||
curation: {
|
curation: {
|
||||||
rating: 0,
|
rating: 0,
|
||||||
|
@ -3,7 +3,6 @@ import { AppProps } from 'next/app'
|
|||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import { DefaultSeo } from 'next-seo'
|
import { DefaultSeo } from 'next-seo'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import Web3Provider from '../context/Web3Provider'
|
|
||||||
import NProgress from '../components/atoms/NProgress'
|
import NProgress from '../components/atoms/NProgress'
|
||||||
import { title, description, url } from '../../site.config'
|
import { title, description, url } from '../../site.config'
|
||||||
import { toast } from 'react-toastify'
|
import { toast } from 'react-toastify'
|
||||||
@ -13,6 +12,7 @@ import '@oceanprotocol/typographies/css/ocean-typo.css'
|
|||||||
import 'react-toastify/dist/ReactToastify.css'
|
import 'react-toastify/dist/ReactToastify.css'
|
||||||
import '../styles/global.css'
|
import '../styles/global.css'
|
||||||
import '../components/atoms/NProgress.css'
|
import '../components/atoms/NProgress.css'
|
||||||
|
import { Web3Provider, OceanProvider } from '@oceanprotocol/react'
|
||||||
|
|
||||||
export default function dexfreightApp({ Component, pageProps }: AppProps) {
|
export default function dexfreightApp({ Component, pageProps }: AppProps) {
|
||||||
const { asPath } = useRouter()
|
const { asPath } = useRouter()
|
||||||
@ -26,6 +26,24 @@ export default function dexfreightApp({ Component, pageProps }: AppProps) {
|
|||||||
require('../styles/datepicker.css')
|
require('../styles/datepicker.css')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
nodeUri: process.env.NODE_URI || 'https://pacific.oceanprotocol.com',
|
||||||
|
aquariusUri:
|
||||||
|
process.env.AQUARIUS_URI ||
|
||||||
|
'https://aquarius.pacific.dexfreight.dev-ocean.com',
|
||||||
|
brizoUri:
|
||||||
|
process.env.BRIZO_URI || 'https://brizo.pacific.dexfreight.dev-ocean.com',
|
||||||
|
brizoAddress:
|
||||||
|
process.env.BRIZO_ADDRESS || '0xeD792C5FcC8bF3322a6ba89A6e51eF0B6fB3C530',
|
||||||
|
secretStoreUri:
|
||||||
|
process.env.SECRET_STORE_URI || 'https://secret-store.oceanprotocol.com',
|
||||||
|
faucetUri: process.env.FAUCET_URI || 'https://faucet.oceanprotocol.com',
|
||||||
|
ratingUri:
|
||||||
|
process.env.RATING_URI ||
|
||||||
|
'https://rating.pacific.dexfreight.dev-ocean.com',
|
||||||
|
verbose: 3
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
@ -54,7 +72,9 @@ export default function dexfreightApp({ Component, pageProps }: AppProps) {
|
|||||||
/>
|
/>
|
||||||
<NProgress />
|
<NProgress />
|
||||||
<Web3Provider>
|
<Web3Provider>
|
||||||
<Component {...pageProps} />
|
<OceanProvider config={config}>
|
||||||
|
<Component {...pageProps} />
|
||||||
|
</OceanProvider>
|
||||||
</Web3Provider>
|
</Web3Provider>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -140,3 +140,12 @@ export function setProperty<T extends Record<string, unknown>>(
|
|||||||
delete objectToBeUpdated[propertyName]
|
delete objectToBeUpdated[propertyName]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function formatBytes(a: number, b: number) {
|
||||||
|
if (a === 0) return '0 Bytes'
|
||||||
|
const c = 1024
|
||||||
|
const d = b || 2
|
||||||
|
const e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
||||||
|
const f = Math.floor(Math.log(a) / Math.log(c))
|
||||||
|
return parseFloat((a / Math.pow(c, f)).toFixed(d)) + ' ' + e[f]
|
||||||
|
}
|
||||||
|
20
tests/unit/__fixtures__/job.ts
Normal file
20
tests/unit/__fixtures__/job.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { ComputeJob } from '@oceanprotocol/squid'
|
||||||
|
|
||||||
|
// ComputeJob need to be updated in squid
|
||||||
|
const job: Partial<ComputeJob> = {
|
||||||
|
agreementId:
|
||||||
|
'ccc60b8d33ae4986b224551b69f521761171159994474debbb5353f45286e206',
|
||||||
|
algorithmLogUrl:
|
||||||
|
'https://compute-publish.s3.amazonaws.com/605fb38b076844b7a2ee912b229a3f73/data/logs/algorithm.log',
|
||||||
|
dateCreated: '1585828421.03217',
|
||||||
|
dateFinished: '1585828541.73514',
|
||||||
|
jobId: '605fb38b076844b7a2ee912b229a3f7333',
|
||||||
|
owner: '0x4D156A2ef69ffdDC55838176C6712C90f60a2285',
|
||||||
|
resultsUrls: [
|
||||||
|
'https://compute-publish.s3.amazonaws.com/605fb38b076844b7a2ee912b229a3f73/data/outputs/output.log'
|
||||||
|
],
|
||||||
|
status: 70,
|
||||||
|
statusText: 'Job finished'
|
||||||
|
}
|
||||||
|
|
||||||
|
export default job
|
91
tests/unit/__mocks__/ocean-mock.ts
Normal file
91
tests/unit/__mocks__/ocean-mock.ts
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
import ddo from '../__fixtures__/ddo'
|
||||||
|
import job from '../__fixtures__/job'
|
||||||
|
|
||||||
|
const oceanMock = {
|
||||||
|
accounts: {
|
||||||
|
list: () => ['xxx', 'xxx']
|
||||||
|
},
|
||||||
|
aquarius: {
|
||||||
|
queryMetadata: () => {
|
||||||
|
return {
|
||||||
|
results: [] as any[],
|
||||||
|
totalResults: 1,
|
||||||
|
totalPages: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
compute: {
|
||||||
|
status: (account: string) => {
|
||||||
|
return [job]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
assets: {
|
||||||
|
query: () => {
|
||||||
|
return {
|
||||||
|
results: [ddo] as any[],
|
||||||
|
page: 1,
|
||||||
|
/* eslint-disable @typescript-eslint/camelcase */
|
||||||
|
total_pages: 1611,
|
||||||
|
total_results: 1611
|
||||||
|
/* eslint-enable @typescript-eslint/camelcase */
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resolve: () => null as any,
|
||||||
|
order: () => {
|
||||||
|
return {
|
||||||
|
next: () => null as any
|
||||||
|
}
|
||||||
|
},
|
||||||
|
consume: () => null as any,
|
||||||
|
getFreeWhiteList: () => Promise.resolve([])
|
||||||
|
},
|
||||||
|
keeper: {
|
||||||
|
conditions: {
|
||||||
|
accessSecretStoreCondition: {
|
||||||
|
getGrantedDidByConsumer: () => {
|
||||||
|
return {
|
||||||
|
find: Promise.resolve(
|
||||||
|
'did:op:e6fda48e8d814d5d9655645aac3c046cc87528dbc1a9449799e579d7b83d1360'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
agreementStoreManager: {
|
||||||
|
getAgreement: (agreementId: string) =>
|
||||||
|
Promise.resolve({
|
||||||
|
did:
|
||||||
|
'did:op:e6fda48e8d814d5d9655645aac3c046cc87528dbc1a9449799e579d7b83d1360'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
versions: {
|
||||||
|
get: () =>
|
||||||
|
Promise.resolve({
|
||||||
|
squid: {
|
||||||
|
name: 'Squid-js',
|
||||||
|
status: 'Working'
|
||||||
|
},
|
||||||
|
aquarius: {
|
||||||
|
name: 'Aquarius',
|
||||||
|
status: 'Working'
|
||||||
|
},
|
||||||
|
brizo: {
|
||||||
|
name: 'Brizo',
|
||||||
|
network: 'Nile',
|
||||||
|
status: 'Working',
|
||||||
|
contracts: {
|
||||||
|
hello: 'hello',
|
||||||
|
hello2: 'hello2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
ok: true,
|
||||||
|
network: true,
|
||||||
|
contracts: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default oceanMock
|
@ -1,9 +0,0 @@
|
|||||||
import web3Mock from './web3'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
web3: web3Mock,
|
|
||||||
ethProviderStatus: -1,
|
|
||||||
account: '0x0000',
|
|
||||||
balance: '',
|
|
||||||
web3Connect: {} as any
|
|
||||||
}
|
|
22
tests/unit/__mocks__/web3provider.tsx
Normal file
22
tests/unit/__mocks__/web3provider.tsx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import web3Mock from './web3'
|
||||||
|
import React from 'react'
|
||||||
|
import { Web3ProviderValue } from '@oceanprotocol/react'
|
||||||
|
|
||||||
|
export const context = React.createContext<Web3ProviderValue | undefined>({
|
||||||
|
web3: web3Mock,
|
||||||
|
ethProviderStatus: -1,
|
||||||
|
account: '0x0000',
|
||||||
|
balance: '',
|
||||||
|
chainId: 1,
|
||||||
|
web3Connect: {} as any,
|
||||||
|
enable: () => null as any
|
||||||
|
})
|
||||||
|
export default {
|
||||||
|
web3: web3Mock,
|
||||||
|
ethProviderStatus: -1,
|
||||||
|
account: '0x0000',
|
||||||
|
balance: '',
|
||||||
|
chainId: 1,
|
||||||
|
web3Connect: {} as any,
|
||||||
|
enable: () => null as any
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { render } from '@testing-library/react'
|
import { render } from '@testing-library/react'
|
||||||
import Web3Provider from '../../../src/context/Web3Provider'
|
import { Web3Provider } from '@oceanprotocol/react'
|
||||||
|
|
||||||
describe('Web3Provider', () => {
|
describe('Web3Provider', () => {
|
||||||
it('renders without crashing', () => {
|
it('renders without crashing', () => {
|
||||||
|
@ -3,8 +3,7 @@ import { render } from '@testing-library/react'
|
|||||||
import AssetDetails, { getMetadata } from '../../../src/pages/asset/[did]'
|
import AssetDetails, { getMetadata } from '../../../src/pages/asset/[did]'
|
||||||
import ddo from '../__fixtures__/ddo'
|
import ddo from '../__fixtures__/ddo'
|
||||||
import { findServiceByType } from '../../../src/utils'
|
import { findServiceByType } from '../../../src/utils'
|
||||||
import { context } from '../../../src/context/Web3Context'
|
import web3ProviderMock, { context } from '../__mocks__/web3provider'
|
||||||
import web3ProviderMock from '../__mocks__/web3provider'
|
|
||||||
import { MetaDataDexFreight } from '../../../src/@types/MetaData'
|
import { MetaDataDexFreight } from '../../../src/@types/MetaData'
|
||||||
|
|
||||||
const { attributes } = findServiceByType(ddo, 'metadata')
|
const { attributes } = findServiceByType(ddo, 'metadata')
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { render } from '@testing-library/react'
|
import { render } from '@testing-library/react'
|
||||||
import Publish from '../../../src/pages/publish'
|
import Publish from '../../../src/pages/publish'
|
||||||
import web3ProviderMock from '../__mocks__/web3provider'
|
import web3ProviderMock, { context } from '../__mocks__/web3provider'
|
||||||
import { context } from '../../../src/context/Web3Context'
|
|
||||||
|
|
||||||
describe('Home', () => {
|
describe('Home', () => {
|
||||||
it('renders without crashing', () => {
|
it('renders without crashing', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user