Estoy siguiendo los tutoriales de Get Started de theta js. Y no puedo importar todos los objetos, según sea necesario. El siguiente es el código inicial:
import './style.css' import * as THETA from "@thetalabs/theta-js"; console.log(THETA) const provider = new THETA.providers.HttpProvider() const privateKey = "0x0000000000000000000000000000000000000000000000000000000000000000" const wallet = new THETA.Wallet(privateKey) console.log(wallet)Aquí, recibo el siguiente error en la línea donde se crea la billetera:
Uncaught TypeError: can't access property "fromRed", this.x is null getX thetajs.umd.js:37573 _encode thetajs.umd.js:37078 encode thetajs.umd.js:37087 getPublic thetajs.umd.js:38496 SigningKey thetajs.umd.js:39004 Wallet thetajs.umd.js:56009 <anonymous> script.js:9 <anonymous> bundle.bc5303e438ec3245.js:70102 <anonymous> bundle.bc5303e438ec3245.js:70104 thetajs.umd.js:37573 getX thetajs.umd.js:37573 _encode thetajs.umd.js:37078 encode thetajs.umd.js:37087 getPublic thetajs.umd.js:38496 SigningKey thetajs.umd.js:39004 Wallet thetajs.umd.js:56009 <anonymous> script.js:9 <anonymous> bundle.bc5303e438ec3245.js:70102 <anonymous> bundle.bc5303e438ec3245.js:70104Las dependencias de mi paquete json son:
"dependencies": { "@babel/core": "^7.15.8", "@babel/preset-env": "^7.15.8", "@thetalabs/theta-js": "^0.0.67", "babel-loader": "^8.2.3", "clean-webpack-plugin": "^4.0.0", "copy-webpack-plugin": "^9.0.1", "css-loader": "^6.5.0", "file-loader": "^6.2.0", "html-loader": "^3.0.0", "html-webpack-plugin": "^5.5.0", "mini-css-extract-plugin": "^2.4.3", "portfinder-sync": "0.0.2", "raw-loader": "^4.0.2", "style-loader": "^3.3.1", "webpack": "^5.60.0", "webpack-cli": "^4.9.1", "webpack-dev-server": "^4.4.0", "webpack-merge": "^5.8.0" } ``` since I am using webpack for serving the webpage. I tried searching online but couldn't find any reliable solutions. How to fix this?