{"_id":"@dmihal/tabookey-gasless","_rev":"3-4b886d8aab95a01167a40d33e7e68b23","name":"@dmihal/tabookey-gasless","dist-tags":{"latest":"0.4.5"},"versions":{"0.4.1":{"version":"0.4.1","description":"Tabookey Gasless Relay Framework","name":"@dmihal/tabookey-gasless","license":"MIT","repository":{"url":"https://github.com/tabookey-dev/tabookey-gasless","type":"git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Dror Tirosh","email":"dror@tabookey.com"},{"name":"Yoav Weiss","email":"yoav@tabookey.com"},{"name":"Shahaf Nacson","email":"shahaf@tabookey.com"},{"name":"Alex Forshtat","email":"alex@tabookey.com"}],"bin":{"gsn-stat":"./scripts/gsn-stat.js","gsn-dock-relay":"./scripts/gsn-dock-relay","gsn-dock-relay-ganache":"./scripts/gsn-dock-relay-ganache"},"scripts":{"test":"npm run test-server && npm run test-js","test-server":"make test-server","test-js":"make build-server && run-with-testrpc --port 8544 --gasLimit 8000000 --defaultBalanceEther 1000 --deterministic 'npx truffle --network npmtest test'","webtools-pack":"webpack-cli --config ./webtools.webpack.js","webtools":"webpack-cli --config ./webtools.webpack.js && http-server webtools/ -o","lint":"eslint ./src ./test -f unix","gsn-dock-relay":"./scripts/gsn-dock-relay","gsn-dock-relay-ganache":"./scripts/gsn-dock-relay-ganache","web":"./restart-relay.sh web","trace":"MODE=trace truffle test","coverage":"./scripts/run-coverage","clean-coverage":"shx rm -rf coverage coverage.json","coverage-if-changed":"./scripts/run-coverage-if-changed.sh npm run coverage"},"dependencies":{"@0x/contracts-utils":"3.1.1","abi-decoder":"^2.2.0","axios":"^0.18.0","big-js":"^3.1.3","big.js":"^5.2.2","eth-crypto":"^1.2.7","ethereumjs-tx":"^1.3.7","ethereumjs-util":"^6.0.0","ethereumjs-wallet":"^0.6.3","openzeppelin-solidity":"^2.3.0","request-promise":"^4.2.2","web3":"^1.2.1","web3-utils":"^1.2.1","webpack-bundle-analyzer":">=3.3.2"},"devDependencies":{"@0x/sol-compiler":"^3.1.8","@0x/sol-coverage":"^3.0.5","@0x/sol-profiler":"^3.1.7","@0x/sol-trace":"^2.0.13","@0x/subproviders":"^4.1.0","bignumber.js":"^9.0.0","browser-request":"^0.3.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"^6.6.0","ganache-cli":"^6.4.3","http-server":"^0.11.1","istanbul":"^0.4.5","lodash":"~>4.17.13","openzeppelin-test-helpers":"^0.4.0","opn-cli":"^4.0.0","promisify":"0.0.3","rlp":"^2.2.3","run-with-testrpc":"^0.3.0","shx":"^0.3.2","solc":"0.5.10","tar":">=4.4.2","truffle":"^5.0.21","truffle-contract":"^4.0.2","truffle-flattener":"^1.3.0","truffle-hdwallet-provider":"^1.0.1","web3-provider-engine":"^14.1.0","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"main":"src/js/relayclient/index.js","licenseText":"MIT License\n\nCopyright (c) 2018 Tabookey\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@dmihal/tabookey-gasless@0.4.1","dist":{"shasum":"c469cef63739329f7533e5b497568bfc5f6d30c9","integrity":"sha512-UjbRjV/zqkerKuENm4IPsmilYvLVxfkjUCsUKDLGAwGc1Jw8GfRyQw98GcvZiAM/6fCux1FQJgziXrKUENK7Sg==","tarball":"https://registry.npmjs.org/@dmihal/tabookey-gasless/-/tabookey-gasless-0.4.1.tgz","fileCount":46,"unpackedSize":152124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3GAiCRA9TVsSAnZWagAAijQQAIOah6cJt3P2Ii946b0u\net8m3iLlHVEgq8xdZXdpq/JwBGsN6mSS0y5tnXUcd3qNCguKYHQDyBEcw9h2\nFYsmyu0wIk6epedZmgWgwKREA/nIigfvJmJrDBweErSM0BdNUJLBrH5ke1bA\ndoual5wr+CuT2I5Xc3VCF3yNuM2mZFkHWNu/rY52cO/tbuYuLVo0ITaSPfHm\ntk0MJQv8QfbCktdSdMrfAYp7zeSuaYH9o3MHg3IGpFNpLj6zS1qvO95JYI+b\n3PGx02USNCGJcvQuIG9r+4CTNSZz3zAWwtEpgjJ3jkxUGHPGUTTGc3zWhxl5\nWl+izHsGT48/9XNospDgb8ZX8p6MVgQ+jPKJN7w2/4OJt6LU7/C21gU7q0rq\nPSxbDFFmYuCBD6g5hRhyDpE4RGIsC0wZN8t7oikSNik2ue9mfpGFXYH3sex0\nqbcHpgvYEmV1dC2/hAC/nQOCvoGOzA9yBjuq73bPJajQZsb7df6Lm/qmu5Nf\nmR/TvkTAogBlxWMaZ8YjsbIFl10817+e5IPm7POWHIw0vkqttfERja1yLUVs\n/XXOv0eU6S8KtnIxGU1FhQauVFR3jK3joYAz/tIzCBfcYlCkm+rD3ufZbd5d\nG/0Fy2OhDLRMkRsZcBGAHNKXVSCad2Py4O5qQZX0sTo/fscZMotwRVW+lriH\nU9Rm\r\n=rrf0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDhXNHVQeoFclYxkxtUfIOn5qi9MDGCL45UnE2ogRSZgAiEA2/4H7QHpEjzCXQCRB5mCuotDHi3tbZdJjBjgteH3vmQ="}]},"maintainers":[{"name":"dmihal","email":"david@dmihal.com"}],"_npmUser":{"name":"dmihal","email":"david@dmihal.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tabookey-gasless_0.4.1_1574723618316_0.7939433784337242"},"_hasShrinkwrap":false},"0.4.2":{"version":"0.4.2","description":"Tabookey Gasless Relay Framework","name":"@dmihal/tabookey-gasless","license":"MIT","repository":{"url":"https://github.com/tabookey-dev/tabookey-gasless","type":"git"},"contributors":[{"name":"Dror Tirosh","email":"dror@tabookey.com"},{"name":"Yoav Weiss","email":"yoav@tabookey.com"},{"name":"Shahaf Nacson","email":"shahaf@tabookey.com"},{"name":"Alex Forshtat","email":"alex@tabookey.com"}],"bin":{"gsn-stat":"./scripts/gsn-stat.js","gsn-dock-relay":"./scripts/gsn-dock-relay","gsn-dock-relay-ganache":"./scripts/gsn-dock-relay-ganache"},"scripts":{"test":"npm run test-server && npm run test-js","test-server":"make test-server","test-js":"make build-server && run-with-testrpc --port 8544 --gasLimit 8000000 --defaultBalanceEther 1000 --deterministic 'npx truffle --network npmtest test'","webtools-pack":"webpack-cli --config ./webtools.webpack.js","webtools":"webpack-cli --config ./webtools.webpack.js && http-server webtools/ -o","lint":"eslint ./src ./test -f unix","gsn-dock-relay":"./scripts/gsn-dock-relay","gsn-dock-relay-ganache":"./scripts/gsn-dock-relay-ganache","web":"./restart-relay.sh web","trace":"MODE=trace truffle test","coverage":"./scripts/run-coverage","clean-coverage":"shx rm -rf coverage coverage.json","coverage-if-changed":"./scripts/run-coverage-if-changed.sh npm run coverage"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"dependencies":{"@0x/contracts-utils":"3.1.1","abi-decoder":"^2.2.0","axios":"^0.18.0","big-js":"^3.1.3","big.js":"^5.2.2","eth-crypto":"^1.2.7","ethereumjs-tx":"^1.3.7","ethereumjs-util":"^6.0.0","ethereumjs-wallet":"^0.6.3","openzeppelin-solidity":"^2.3.0","request-promise":"^4.2.2","web3":"^1.2.1","web3-utils":"^1.2.1","webpack-bundle-analyzer":">=3.3.2"},"devDependencies":{"@0x/sol-compiler":"^3.1.8","@0x/sol-coverage":"^3.0.5","@0x/sol-profiler":"^3.1.7","@0x/sol-trace":"^2.0.13","@0x/subproviders":"^4.1.0","bignumber.js":"^9.0.0","browser-request":"^0.3.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"^6.6.0","ganache-cli":"^6.4.3","http-server":"^0.11.1","istanbul":"^0.4.5","lodash":"~>4.17.13","openzeppelin-test-helpers":"^0.4.0","opn-cli":"^4.0.0","promisify":"0.0.3","rlp":"^2.2.3","run-with-testrpc":"^0.3.0","shx":"^0.3.2","solc":"0.5.10","tar":">=4.4.2","truffle":"^5.0.21","truffle-contract":"^4.0.2","truffle-flattener":"^1.3.0","truffle-hdwallet-provider":"^1.0.1","web3-provider-engine":"^14.1.0","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"main":"src/js/relayclient/index.js","licenseText":"MIT License\n\nCopyright (c) 2018 Tabookey\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@dmihal/tabookey-gasless@0.4.2","dist":{"shasum":"8d01f16b0f188e7bb4efd349f54cab8ffcee9e3b","integrity":"sha512-7w5WrMQEcHdAtfc2+PvAIa3EFrPAJpoG9SaRJ6xzo7NlsyyL6rb+KEDHs++YLeSb2AucVciU5vg9lY+QrCSWWA==","tarball":"https://registry.npmjs.org/@dmihal/tabookey-gasless/-/tabookey-gasless-0.4.2.tgz","fileCount":46,"unpackedSize":152106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3I5FCRA9TVsSAnZWagAAYZcP/R9W9Tmu8HGx4YhilHOW\n2gkhgOiTRvuyWOeS7ZA9dyjoz1IfvaPf7Eb+hX2qD/W+k0iW0Fr6nzlbNCvT\nEj7VRvtSUX1ercfZtiYlrYuOT8Qeun2Oks+1dc+kf3fW9LIw86GInD9v7i0x\nRB7gpQqkrB1Z5frOkz2rtbBbOIpGSN2Evee1U4ggHIdiKNoEEZyE9CLiuUPu\nOrWFTugirtFvxDQjZgteK0obVu4zfCj5/9C+W+OuzS+/tz4as879hMyeGm+P\n4Jme3JRXcZqUAKbyNmLKDCZdYhKpsnr4iFRhU4YTGoW3Kx/5ZP6BHq3i9Z4e\nbcWwocQcsdI1wmqccXRTNtGBxNZgrmbDyAJwIPRiQ+0ozfZHoE/H3La8Ucx6\nQx862HkPE/4Py/Ed5Ns5EmYboSOYIvZp6IKalCD86rKEtdUonFa5kz+d+KVS\nj5B1c+d+ONXdnyqVfd5b9470AsTVJHAQujuQb8yf5Pe1rb2eKExkPj7ApurG\n0A02074zL4v86CTgorabXLfGrvsFQrM6J7nJTfwh0+pQ8rXbN77nrqiRMAD/\n4A0V9qeKn/fNQzynNzO5JSF8ZOGkcwOFO+fP8xmKS6+OSiG7+S94BTjKzbjw\ntef7+4TMwHgGdejflL0z2f/mbTh04ey68rxDYZc3u7456bm6pYMD0+l45q8E\ncRN7\r\n=HB8Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC09NFrZtRGKvTOHVeGy9zhApLVH8iPuz3x+1WjA41fUgIgX88cq2cTb56B9pT3ZCoeTpOeyozVkhE8EpKIq0Xd17Y="}]},"maintainers":[{"name":"dmihal","email":"david@dmihal.com"}],"_npmUser":{"name":"dmihal","email":"david@dmihal.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tabookey-gasless_0.4.2_1574735429161_0.5664568484515622"},"_hasShrinkwrap":false},"0.4.5":{"version":"0.4.5","description":"Tabookey Gasless Relay Framework","name":"@dmihal/tabookey-gasless","license":"MIT","repository":{"url":"https://github.com/tabookey-dev/tabookey-gasless","type":"git"},"contributors":[{"name":"Dror Tirosh","email":"dror@tabookey.com"},{"name":"Yoav Weiss","email":"yoav@tabookey.com"},{"name":"Shahaf Nacson","email":"shahaf@tabookey.com"},{"name":"Alex Forshtat","email":"alex@tabookey.com"}],"bin":{"gsn-stat":"scripts/gsn-stat.js","gsn-dock-relay":"scripts/gsn-dock-relay","gsn-dock-relay-ganache":"scripts/gsn-dock-relay-ganache"},"scripts":{"test":"npm run test-server && npm run test-js","test-server":"make test-server","test-js":"make build-server && run-with-testrpc --port 8544 --gasLimit 8000000 --defaultBalanceEther 1000 --deterministic 'npx truffle --network npmtest test'","webtools-pack":"webpack-cli --config ./webtools.webpack.js","webtools":"webpack-cli --config ./webtools.webpack.js && http-server webtools/ -o","lint":"eslint ./src ./test -f unix","gsn-dock-relay":"./scripts/gsn-dock-relay","gsn-dock-relay-ganache":"./scripts/gsn-dock-relay-ganache","web":"./restart-relay.sh web","trace":"MODE=trace truffle test","coverage":"./scripts/run-coverage","clean-coverage":"shx rm -rf coverage coverage.json","coverage-if-changed":"./scripts/run-coverage-if-changed.sh npm run coverage"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"dependencies":{"@0x/contracts-utils":"3.1.1","abi-decoder":"^2.2.0","axios":"^0.18.0","big-js":"^3.1.3","big.js":"^5.2.2","eth-crypto":"^1.2.7","ethereumjs-tx":"^1.3.7","ethereumjs-util":"^6.0.0","@dmihal/ethereumjs-wallet":"^0.6.3","openzeppelin-solidity":"^2.3.0","request-promise":"^4.2.2","web3":"^1.2.1","web3-utils":"^1.2.1","webpack-bundle-analyzer":">=3.3.2"},"devDependencies":{"@0x/sol-compiler":"^3.1.8","@0x/sol-coverage":"^3.0.5","@0x/sol-profiler":"^3.1.7","@0x/sol-trace":"^2.0.13","@0x/subproviders":"^4.1.0","bignumber.js":"^9.0.0","browser-request":"^0.3.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"^6.6.0","ganache-cli":"^6.4.3","http-server":"^0.11.1","istanbul":"^0.4.5","lodash":"~>4.17.13","openzeppelin-test-helpers":"^0.4.0","opn-cli":"^4.0.0","promisify":"0.0.3","rlp":"^2.2.3","run-with-testrpc":"^0.3.0","shx":"^0.3.2","solc":"0.5.10","tar":">=4.4.2","truffle":"^5.0.21","truffle-contract":"^4.0.2","truffle-flattener":"^1.3.0","truffle-hdwallet-provider":"^1.0.1","web3-provider-engine":"^14.1.0","webpack":"^4.37.0","webpack-cli":"^3.3.6"},"main":"src/js/relayclient/index.js","licenseText":"MIT License\n\nCopyright (c) 2018 Tabookey\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@dmihal/tabookey-gasless@0.4.5","dist":{"shasum":"dee93bb7df32212dda8e3d8c63ad0afa8f7d05d3","integrity":"sha512-zm650Siz3IjymWYrpN9RNMnQeSxQplAZtxe4pvnGfPWFoe1/bb+hJyTxeI2/24Bhkn39dL/N912s0Issge+6vw==","tarball":"https://registry.npmjs.org/@dmihal/tabookey-gasless/-/tabookey-gasless-0.4.5.tgz","fileCount":46,"unpackedSize":153063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefWYiCRA9TVsSAnZWagAADukQAJno1qTiMmIW2tfoDdiG\nCLzojGWW1l0tH8lNpmsVEynAMuxemKnoifRCwM9k3VXzYgCy5FofY5Tz20iN\nTVNeP7O3S26GT4GsyCTFPg38UWF7/bLPJSwYr28S+IVmWlF3+4fwAU7WlL6c\netYMGZqUR/maXCUxmGDmrJT+Ck4DP1azxRKcZ731Lem/lbHBvQgSqToaeMxl\nWD7eamfVkOaPberfIyFuSC45DH2nKFqMPkYA4/5hE59eqBCavF41/yTwPaD4\nZBNeBvx8mUhgIgIUMvcBW7oDMVEo+M2FWaDK4OOP469FP/KMa0fPTn7E30HV\n20uEIqQ8EJr48F6d1cq7fhZbXsHIZR3l5m6n217DTqMG8S/8rjjq4kuQR7J9\nA1dTc5tHDN656fHoMf8xFSGXS0tG3OrFRa612yaBUjGlpWhv8jK+5co/8GDZ\nGuzfl+hh6cXBpsjJbQxKxpBLdo+kY8arel0hLvXvl3Z1rZgWnSLV7FCdGJH5\nMEGFUhDTgf1uHI+8zmuWK4F3PrmKEGAFSdBcCyaRDKIlGgXSyU8mqXhKhOco\nhKYRbwZVsjRm1YbALuj8yayrJTw2Jd4bYL7FQE4EftA6Uwk/jCaFz9+cvFKZ\n9s8POFuHGNR18ScgfGEXXXyDar7b1ho6tqrfjQjJ88rD7idSVleOho6UBCzk\nj+07\r\n=H3yz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYY+4YL6lr1ez8Pyl45hky4Y5tWqADMUA69LuwvqYFdQIgUmtAcLjz+LO15+JxWrkHXvdOGNtf3D3M6rn/4rXLTEs="}]},"maintainers":[{"name":"dmihal","email":"david@dmihal.com"}],"_npmUser":{"name":"dmihal","email":"david@dmihal.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tabookey-gasless_0.4.5_1585276449680_0.9355104014828057"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-25T23:13:38.077Z","0.4.1":"2019-11-25T23:13:38.412Z","modified":"2022-04-05T04:58:33.417Z","0.4.2":"2019-11-26T02:30:29.279Z","0.4.5":"2020-03-27T02:34:09.840Z"},"maintainers":[{"name":"dmihal","email":"david@dmihal.com"}],"description":"Tabookey Gasless Relay Framework","repository":{"url":"https://github.com/tabookey-dev/tabookey-gasless","type":"git"},"contributors":[{"name":"Dror Tirosh","email":"dror@tabookey.com"},{"name":"Yoav Weiss","email":"yoav@tabookey.com"},{"name":"Shahaf Nacson","email":"shahaf@tabookey.com"},{"name":"Alex Forshtat","email":"alex@tabookey.com"}],"license":"MIT","readme":"# Tabookey Relay Network\n\n## What is it?\n\nIt's a mechanism for dApps to work with gas-less clients.\nUsers are no longer required to install browser extensions, or buy Ether in order to use the dApp. \n\nThe dApp owner decides which clients or what calls are allowed, and pays for the calls. It may use its own mechanism to manage its users.\n\nExamples\n\n- Allow first-time install of an app, before the user buys any ether.\n- Allow users to pay for transactions with their credit cards and manage their credit.\n- For enterprise: trust employees to access the enterprise dApp. \n\nIts very simple to adapt an existing contract and apps to use the Relays\n\n## How it works?\n\nFor a full techincal description, see our [EIP draft](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1613.md)\n\nThe client has an account (address and private key) just like any other ethereum account - except that it never has to have any money in it.\n\nIt makes an off-chain request to a Relay Service, outside of the ethereum network.\n\nThe relay transfers the request to the target contract (through a public RelayHub contract)\n\nThe relay gets **compensated** by the target contract for its effort.\n\nThe system is completely decentralized and trust-less: the client doesn't trust on the Relay Service, and the Relay service  \ndoesn't trust neither the client nor the target contract, yet none can compromise the system.\n\n## Do I need Metamask/Mist/Hardware wallet ?\n\nSince clients no longer carry ether, you're not *required* to use strong wallet - you can keep the client's private key\nis a local file (cookie). \nThe client can use your local web3 account (e.g. MetaMask), or create a local private-key. \n\n## Is it safe?\n\nAbsolutely.\nIn our \"mutual-distrust\" model, neither the client or contract has to trust the relay to work correctly, nor the relay trusts the contract or client.\nAll transaction are signed, both by the client (though its account doesn't have to carry any ether) and by the relay.\n\n- The contract knows that only trusted requests will ever be relayed to it, and that it's only liable to pay for those.\n- The relay can be sure it will be compensated by the contract for its service.\n- The client can be sure the relay did its job to relay the request, and didn't try to fool either the client or contract.\n- The Relay, even though its an off-chain component, is not trusted in any way, and can't DoS the system or steal funds. Any such attempt is cryptographically proven, and penalizes the relay before banning it from the network.\n\nNeither the relays in the network, nor the RelayHub contract are controlled by Tabookey in any way. \nWe will operate relays in the network, to make sure there's availability of relays, but so can anyone else. \nThe relays network is a free market, where relays compete based on transaction fees and quality of service, on equal grounds.\n\n## Usage:\n\nPrerequisites:\n\n-\tnode, yarn\n- \ttruffle\n-\tdocker\n\nInstall node pakcages:\n\n\tyarn\n\n\n\nCompile and run tests: (For Docker users)\n\n\t./dock/run.sh yarn\n\n\t./dock/run.sh yarn test\n\nThe above is a docker wrapper, containing build prerequisites (`go`, `abigen`, `solc`). If you have them installed, you can run instead:\n\n\tyarn test\n\n### Running a web client\n\nHere's how to download and run our modified \"MetaToken\", modified to demonstrate supoprt for gasless transaction.\nIn the tabookey-gasless folder do:\n\n\t./dock/run.sh ./restart-relay.sh web\n\nConfigure your MetaMask to Localhost:8545\nopen your browser to `http://localhost:8080/`\n\nNotes\n\n- The MetaCoin app was modified to give initial 10000 META for every account.\n- It prompts you whether to use MetaMask account or \"ephemeral\" private key, saved as browser cookie.\n- Once you enter an amount and hit \"transfer\", a metamask \"SIGN\" dialog would appear.\n- After successful transaction, the amount of META tokens left is updated, to signify the transaction succeeded.\n- Restarting the `restart-relay.sh` script will kill ganache, so you must run `truffle migrate && truffle test` again\n\tin the `webpack-box project`, to re-deploy the MetaCoin, and fund it with initial ether \n\t(remember: it's the contract that pays for transactions, not the calling webapp!)\n- MetaMask gets confused after node restart, so switch to another network (e.g. mainnet) and back to localhost.\n\n\n### Components:\n\n- **RelayHub** - master contract on the blockchain, to manage all relays, and help clients find them.\n- **RelayServer** - a relay service daemon, running as a geth module or standalone HTTP service.  Advertises itself (through the RelayHub) and waits for client requests.\n- **RelayClient** - a javascript library for a client to access the blockchain through a relay.\n\tProvides APIs to find a good relay, and to send transactions through it.\n\tThe library hooks the local web3, so that any loaded contract API will go through the relay.\n\nnote that `yarn test` above runs the entire suite: it compiles the server, then launches *ganache-cli* node, deploys the needed component and starts the relay server. then it launches truffle test to run the client tests against the relay server and the contracts on the blockchain.\n\n### Client modifications.\n\n\n\ttabookey = require( 'tabookey-gasless')\n    provider = new tabookey.RelayProvider(web3.currentProvider, {} )\n    web3.setProvider(provider) \n\n\t//from now on, any transaction through this web3 will go through a relay\n\t\n\tMyContract = new web3.eth.Contract(...)\n\n\tmyContract = MyContract.at('...')\n\tmyContract.someMethod()\n\n\n#### RelayClient options:\n\nA relay client can receive various options:\n\n- `force_gasLimit` - use specific gas limit for all transactions. if not set, the user must supply gas limit for each transaction.\n- `force_gasprice` - if not set, then the client will use `web3.eth.gasPrice` with the factor (below)\n- `gaspriceFactorPercent` - how much above default `gasPrice` to use. default is 20% which means we use gasPrice*1.2\n- `minStake` - ignore relays with lower stake\n- `minDelay` - ignore relays with lower stake delay\n- `verbose` - show logs of client requests/responses\n\n### Contract modifications\n\nIn order to support relayed transactions, the contract must implement the `RelayRecipient` contract. This way it can check (before the call) the caller, and decide whether to accept the call.\n\nHere's a basic contract, which accepts requests from known users.\n\n```javascript\ncontract MyContract is RelayRecipient {\n    constructor() {\n        // this is the only hub I trust to receive calls from\n        init_relay_hub(RelayHub(0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab));\n    }\n\n    mapping (address => bool) public my_users;\n\n    // this method is called by the RelayHub, before relaying the transaction.\n    // the method should return zero if and only if the contract accepts this transaction, and is willing to pay\n    // the relay for its service.\n    // it can check the user, the relay or the actual function call data.\n    // note that when the RelayHub calls this method, its after it did validation of the relay and caller signatures.\n    function accept_relayed_call(address relay, address from, bytes encoded_function, uint gas_price, uint transaction_fee ) external view returns(uint32) {\n\n        // we simply trust all our known users.\n        if ( !my_users[from] ) return 10;\n        return 0;\n    }\n\n    // This is a sample contract method. \n    // note that when receiving a request from a relay, the msg.sender is always a RelayHub.\n    // You must change your contract to use get_sender() to get the real sender.\n    // (its OK if someone calls this method directly: if no relay is involved, get_sender() returns msg.sender)\n    function my_method() {\n        require ( my_users[ get_sender() ] );\n        ...\n    }\n}\n\t\n```\n\nIn the [samples/contracts](samples/contracts) folder there are several sample RelayRecipient implementations for general use-cases.\n","readmeFilename":"README.md"}