upd: readme and matic.js package in example
MODIFY
examples/README.md
examples/README.md
@@ -9,7 +9,7 @@ This folder contains different example for different cases. All example are node
### 1. Set configuration
-Open `config.js` and set the keys like `privateKey`, `address` in user1, parent rpc etc.
+You need to configure your environment variables now. Copy `.env.example` and rename as `.env`. Now provide values for the keys mentioned there.
There are some prefilled data in `config.js` but feel free to change anything as per your needs.

MODIFY
examples/package-lock.json
examples/package-lock.json
"@ethersproject/bytes": "^5.5.0",
"@ethersproject/logger": "^5.5.0",
"bn.js": "^4.11.9"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"@ethersproject/bytes": {
"bn.js": "^4.11.9",
"elliptic": "6.5.4",
"hash.js": "1.1.7"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"@ethersproject/strings": {
}
},
"@maticnetwork/maticjs": {
- "version": "3.0.0-beta.10",
- "resolved": "https://registry.npmjs.org/@maticnetwork/maticjs/-/maticjs-3.0.0-beta.10.tgz",
- "integrity": "sha512-yABYo/Dj7RkN4ZRFC2i60lerbpzTgCJPlrgY/uAd3rWtH4mRV6i1wnmx3/P1CS0w5o2T03A135hrfvbZnlKefA==",
+ "version": "3.0.0-beta.15",
+ "resolved": "https://registry.npmjs.org/@maticnetwork/maticjs/-/maticjs-3.0.0-beta.15.tgz",
+ "integrity": "sha512-xccRJLow5tOoe+7FCpkyUJBWc/djYdcYrKy9QichlnVN0nSfGAp5lItk7NOuFDlqiH8HJOxeTUjhcle5wh4FYg==",
"requires": {
- "bn.js": "5.0.0",
"eth-sig-util": "^2.5.3",
"ethereumjs-block": "2.2.0",
"ethereumjs-tx": "1.3.7",
}
},
"@maticnetwork/maticjs-web3": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/@maticnetwork/maticjs-web3/-/maticjs-web3-0.2.0.tgz",
- "integrity": "sha512-cyp5MqIssFN6RxtjmdTq+T0rF+6VlwcjglR0z5KE1BZ+ytOab3syE7YmXnZp8pm/sZ+uh5XV3Ce7e5V52Y36MA==",
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@maticnetwork/maticjs-web3/-/maticjs-web3-0.6.0.tgz",
+ "integrity": "sha512-dF1wc3VlvwBIIg3hTxN1v64CSwKg3ogcDASGPxVIXPe+hRKYYC2iYmgk0lww4AH7he8eZjRtB7+X1KR2ksh1ig==",
"requires": {
"web3": "^1.6.0"
}
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0",
"safer-buffer": "^2.1.0"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"assert-plus": {
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
"bn.js": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.0.0.tgz",
- "integrity": "sha512-bVwDX8AF+72fIUNuARelKAlQUNtPOfG2fRxorbVvFk4zpHbqLrPdOGfVg5vrKwVzLLePqPBiATaOZNELQzmS0A=="
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
},
"body-parser": {
"version": "1.19.0",
"requires": {
"bn.js": "^5.0.0",
"randombytes": "^2.0.1"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ }
}
},
"browserify-sign": {
"requires": {
"bn.js": "^4.1.0",
"elliptic": "^6.5.3"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"create-hash": {
"bn.js": "^4.1.0",
"miller-rabin": "^4.0.0",
"randombytes": "^2.0.0"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"dom-walk": {
"servify": "^0.1.12",
"ws": "^3.0.0",
"xhr-request-promise": "^0.1.2"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"eth-query": {
"requires": {
"bn.js": "^4.0.0",
"brorand": "^1.0.1"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"mime": {
"parse-asn1": "^5.0.0",
"randombytes": "^2.0.1",
"safe-buffer": "^5.1.2"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"pump": {
"@types/node": "*"
}
},
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- },
"eth-lib": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz",
"requires": {
"bn.js": "^4.11.9",
"web3-utils": "1.6.0"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- }
}
},
"web3-eth-personal": {
"@types/node": "*"
}
},
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- },
"ethereumjs-util": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz",

MODIFY
examples/package.json
examples/package.json
"author": "",
"license": "ISC",
"dependencies": {
- "@maticnetwork/maticjs": "^3.0.0-beta.10",
- "@maticnetwork/maticjs-web3": "^0.2.0",
+ "@maticnetwork/maticjs": "^3.0.0-beta.15",
+ "@maticnetwork/maticjs-web3": "^0.6.0",
"@truffle/hdwallet-provider": "^1.5.1-alpha.1",
"dotenv": "^10.0.0"
}

upd: readme and matic.js package in example