{"_id":"redstone-wasm-metering","_rev":"7-d471e3cefd20d7eb99982f600e4c0744","name":"redstone-wasm-metering","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"redstone-wasm-metering","version":"1.0.0","description":"RedStone implementation of wasm-metering","main":"index.js","scripts":{"coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls","coverage":"nyc npm test","lint":"standard","test":"node --harmony ./test/index.js"},"bin":{"wasm-meter":"bin/wasm-meter"},"author":{"name":"Redstone Team","email":"dev@redstone.finance"},"license":"MPL-2.0","dependencies":{"leb128":"^0.0.4","redstone-wasm-json-toolkit":"1.0.0"},"devDependencies":{"coveralls":"^3.0.0","nyc":"^11.6.0","standard":"^11.0.0","tape":"^4.9.0"},"keywords":["wasm","metering","webassembly"],"repository":{"type":"git","url":"git+https://github.com/redstone-finance/redstone-wasm-metering.git"},"bugs":{"url":"https://github.com/redstone-finance/redstone-wasm-metering/issues"},"homepage":"https://github.com/redstone-finance/redstone-wasm-metering","standard":{"ignore":["test/wabt"],"globals":["WebAssembly"]},"gitHead":"96700cd8f637fb46e76a47965454149aaf4f06d9","_id":"redstone-wasm-metering@1.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-NsthdSoiEBh8jRq4kNqNZ77J9ZgPbvQaPYx+SqDctsQdz0aPFyD5czkv4Sn6K2L2p8DvfWxGqCJXp0Q0WneG8g==","shasum":"d41772fdd2e01ae3bd55502c3f9deb659a741da2","tarball":"https://registry.npmjs.org/redstone-wasm-metering/-/redstone-wasm-metering-1.0.0.tgz","fileCount":65,"unpackedSize":106474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJh6jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlDhAAmoXZpd5GOFC/PbQXBKQjVEef74fkCoF3NfZbaxpUJXYUkVIR\r\noHs00POO+mUQuvTtZNHmRqoRCLUNtncXC70eLSLA5qqayW35BYOEcCB9Rent\r\nVCWKm6s5PSOVZN0os7DWLZj6LozSlHtf1Y5dvu0bZPIew2GrVkzpbA7goCXt\r\nxdthyOBAJG9WDzwrObjrLQIw/y8mqGhbmzuWoOKH//6eALJcUqNaPP66JsID\r\narvJbhyF+tdyWTlPT3juMBvoNa0bJd2fdWdqXQcBAk8zGncgGjM/Xew38IU8\r\ntXtP6/sASzVGHdELbapGbEDqNgehFegEkFCPgZKehbxeR6QdtbgQLI2jKFi1\r\nce2VE3od0h7qvEqYHbtB40Xw08sD3iwX97UROoBumAzfTmYuHDuF1tbxERyW\r\nprfZKpfmbwnOMLylw6vaVbCX/qjGcc6GEGk5rvtIlzR2owMUDzxagWSOqIBH\r\nA9lDonxcNz/PWrIhu12jsVuMOmBRs0x2VSnjClf5l2JbYMYvbNt4eNFA1Xc4\r\nOVyTx87+c9Sx5ftcP0JNQg64V+ne3igBTkvHdSkkT+C1lxvDmd879XWi6tXx\r\nzNzi+3I5phZBCD/4TUx12kGMVD+YGQ6olotoCuI266WdWbW+0FNxQvqS9cQe\r\nK6axfFSYrsgbTqPkSN6Ksqtzsw6Aqjg9tO8=\r\n=1+xa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC702NzNuzc3ewALXvxzM2FSGBL6423MNVAGnNRGbpBSAiBEjwFpzudWxVzFReHiiQz+G2wwZIFjcPVThzaUnts0cg=="}]},"_npmUser":{"name":"redstone-finance","email":"dev@redstone.finance"},"directories":{},"maintainers":[{"name":"redstone-finance","email":"dev@redstone.finance"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redstone-wasm-metering_1.0.0_1646665379515_0.6554862602279516"},"_hasShrinkwrap":false,"deprecated":"redstone-wasm-metering has been renamed to warp-wasm-metering. Please install new package."},"1.0.1":{"name":"redstone-wasm-metering","version":"1.0.1","description":"RedStone implementation of wasm-metering","main":"index.js","scripts":{"coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls","coverage":"nyc npm test","lint":"standard","test":"node --harmony ./test/index.js"},"bin":{"wasm-meter":"bin/wasm-meter"},"author":{"name":"Redstone Team","email":"dev@redstone.finance"},"license":"MPL-2.0","dependencies":{"leb128":"^0.0.4","redstone-wasm-json-toolkit":"1.0.1"},"devDependencies":{"coveralls":"^3.0.0","nyc":"^11.6.0","standard":"^11.0.0","tape":"^4.9.0"},"keywords":["wasm","metering","webassembly"],"repository":{"type":"git","url":"git+https://github.com/redstone-finance/redstone-wasm-metering.git"},"bugs":{"url":"https://github.com/redstone-finance/redstone-wasm-metering/issues"},"homepage":"https://github.com/redstone-finance/redstone-wasm-metering","standard":{"ignore":["test/wabt"],"globals":["WebAssembly"]},"gitHead":"1b7655d1bad4f25a5ff7a360d2936871362c7b6f","_id":"redstone-wasm-metering@1.0.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-cJuNgSUWRWBVhND1NXvjRHGN1aQETGyRgLfPM2E33T9XSE3Gfk+KoRV7rDXXj+P8qXqTSepxpjpCGLbTMuJ2Zg==","shasum":"813206f6894d4ae8cdbbf09ee954640d11aa8c55","tarball":"https://registry.npmjs.org/redstone-wasm-metering/-/redstone-wasm-metering-1.0.1.tgz","fileCount":65,"unpackedSize":106474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJji1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqurw//SIXnOeGqWzjQSCLMeyIMDgvIlC2130XCrSUhJQGaTuDIGmuw\r\nkUhOJuNftDQUFE7dVIIxPANRQUP8cyJi6hsa6VJG+VZTwRu4fDnu0kl9bd9u\r\nEK73jPPdeNaqmY9RFJaQy8pRu6qyMuN3zgKHHIIhtXvkuNDLUQUqTNoIiGax\r\n4V5jg4xV+vXXI+VG8jCYNz4hXCkpDTjDhJmvhGvVyrNp93NSAVR++eSIzGQe\r\nvLmrL3HVCtoBMFDrdLJRT0NwK3R1pzsZDN1O7nLiM/jxm+XuZ2BZcosIYjfW\r\nCn+0qWS/xKAoRPQTbCe1eTfSgO/f+7cww5HRE5Gs9WxWq/L6BZImUFAcE/kG\r\nsgoTBiOpt3ft6f3ppZbNJtq/rHK148Rl4Z6RBZ9Ylo7A9W+6refUq29JEho5\r\nV2WVzkWKu0zKelZc3TvG2BDuFZVCTeu7P8R7/bkY79eAe4qhsSUnUX9UoTcW\r\nRtjtOh7AmWU7X8EOUP1RPbNMSvFPUt8z84RN2OL8aZUboG6utgXf00ZraY61\r\ntiWz7YPu0qzHOD+d7GaPepal+9DWBoCONSHgFL7tYGsalmONif7FBLscs6Oe\r\nTx/X3QYbsQ/kkmQBP9i9C92JjmsFGS5OqARnL78nltOASQvmQBgoijZWNYdO\r\nSIHaFly+v5Zih1lmsP/WVAGbFx9/8glA+M0=\r\n=7TEi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFuaTamq3ZtE/XAHDC0rOzhxiOqc5PE5B1/LPjqpcf7GAiBnAdE7uB9BEqaf3KAGWD4eBk+MFhcJ+wq7x5wfZ5erdA=="}]},"_npmUser":{"name":"redstone-finance","email":"dev@redstone.finance"},"directories":{},"maintainers":[{"name":"redstone-finance","email":"dev@redstone.finance"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redstone-wasm-metering_1.0.1_1646672053239_0.7680501930022909"},"_hasShrinkwrap":false,"deprecated":"redstone-wasm-metering has been renamed to warp-wasm-metering. Please install new package."},"1.0.2":{"name":"redstone-wasm-metering","version":"1.0.2","description":"RedStone implementation of wasm-metering","main":"index.js","scripts":{"coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls","coverage":"nyc npm test","lint":"standard","test":"node --harmony ./test/index.js"},"bin":{"wasm-meter":"bin/wasm-meter"},"author":{"name":"Redstone Team","email":"dev@redstone.finance"},"license":"MPL-2.0","dependencies":{"leb128":"^0.0.4","redstone-wasm-json-toolkit":"^1.0.2"},"devDependencies":{"coveralls":"^3.0.0","nyc":"^11.6.0","standard":"^11.0.0","tape":"^4.9.0"},"keywords":["wasm","metering","webassembly"],"repository":{"type":"git","url":"git+https://github.com/redstone-finance/redstone-wasm-metering.git"},"bugs":{"url":"https://github.com/redstone-finance/redstone-wasm-metering/issues"},"homepage":"https://github.com/redstone-finance/redstone-wasm-metering","standard":{"ignore":["test/wabt"],"globals":["WebAssembly"]},"gitHead":"5f56295e785e50ccda86d09c0dcc5c93df9fd6fe","_id":"redstone-wasm-metering@1.0.2","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-ImXn7iZiYOmahJvEHpykadicMQxJQ3u/8iYlvh98iHlVI2qdot8WxNGj/S27aA7LxUGVylaxKI4PmUCyGA5FMg==","shasum":"c55717dd55942537fac32501a3426a60332567d2","tarball":"https://registry.npmjs.org/redstone-wasm-metering/-/redstone-wasm-metering-1.0.2.tgz","fileCount":66,"unpackedSize":257474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFrC/YhgwxC8WPUmAmWtj2abmU6ku8fnG7w6J3EOFVQLAiEAx7MuYmYYXr7yCZ+k3vXLehCV126t5rUud8t5LlS2S5s="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2lGvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLdQ//d+YFaSRgcoFRNYFdGk1lSlO/+gi/dEgeQDJGT1Myzk4wh/bh\r\nn/3UUbH7H4wUc+JGJPIycknVFInDlHj6JRm7iJsQUujO3Pl741Ua/MfGzfCr\r\nsCNJemL0gYpMky20I2AkWZM0EGXXxJ4moN878rVTGzvqIWeozYXYmnNqi0Fj\r\n/UHehHzTDFLWYbvB/lQseY5OsYVEGHd2NtUlFc8UFIWbUdVw7m/H3IPBMjxz\r\nXlqIls/pNNdKJvS2J7LVa4/7xl9d+9mVVbbu4PXhyk0RjKAxkMCl5nhNjhHJ\r\nv59O9CwSZ0+iP5mK4Vs1cBdhyOitvhSsNw2uF97FS7E5bQjoAIZ0dbXdJiST\r\nPZfCI2smNk7T+j+Bp8MgjyDTepEj4L9O7snnYrv0wj0SqPWsfupaL7F3g+/j\r\nLGh77uoXu4wGSQzFZCqzqP7SsW16IW6kvYUQRB4jYdQPPXj6l0t/ylU13FPp\r\ncNk1kKzs+cHvY4BJk9sOLcEWVep0jZXsPxZhDFAlFN4Q9CdTXSE6J2DCsF5I\r\nfbE7N+PhYix9czOHYXOVqQlQW/obbdvX5gtyXtMjGjASKtKj3VDHe8OeDn/8\r\nXAxL++Vw3v59PTLwFXwJa3bCtKLxufd4VohNPxwna/HYGBGKzup0QwP4KtMR\r\nwV0sfVHSTuvGHVvdtirunWGH7SN0NtlpBEM=\r\n=51F2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"redstone-finance","email":"dev@redstone.finance"},"directories":{},"maintainers":[{"name":"redstone-finance","email":"dev@redstone.finance"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redstone-wasm-metering_1.0.2_1658474927607_0.8424155119917875"},"_hasShrinkwrap":false,"deprecated":"redstone-wasm-metering has been renamed to warp-wasm-metering. Please install new package."},"1.0.3":{"name":"redstone-wasm-metering","version":"1.0.3","description":"RedStone implementation of wasm-metering","main":"index.js","scripts":{"coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls","coverage":"nyc npm test","lint":"standard","test":"node --harmony ./test/index.js"},"bin":{"wasm-meter":"bin/wasm-meter"},"author":{"name":"Redstone Team","email":"dev@redstone.finance"},"license":"MPL-2.0","dependencies":{"leb128":"^0.0.4","redstone-wasm-json-toolkit":"1.0.3"},"devDependencies":{"coveralls":"^3.0.0","nyc":"^11.6.0","standard":"^11.0.0","tape":"^4.9.0"},"keywords":["wasm","metering","webassembly"],"repository":{"type":"git","url":"git+https://github.com/redstone-finance/redstone-wasm-metering.git"},"bugs":{"url":"https://github.com/redstone-finance/redstone-wasm-metering/issues"},"homepage":"https://github.com/redstone-finance/redstone-wasm-metering","standard":{"ignore":["test/wabt"],"globals":["WebAssembly"]},"gitHead":"49c7974a60a67963cb227ab6a77fc598acf2e48d","_id":"redstone-wasm-metering@1.0.3","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-hrvvzjTdc3TEY/6DuqHQtvbX6/iSmvIyFIOY/yw4qPcJIueD9AAPK7JrGpssKSAYEcgJhgRhZOXksC+3TvgRQg==","shasum":"3fc12b24c814b9fc114ac552fbeed0d545a4bfa1","tarball":"https://registry.npmjs.org/redstone-wasm-metering/-/redstone-wasm-metering-1.0.3.tgz","fileCount":66,"unpackedSize":257473,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7533SM1rAT5aEK1vRivIbM1jn60u387vAuujFHa9TTAiEA/v0mbgofGoJ9BkxIcwTT/ogGaVLyu3THZjI2ibbOSG0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2mHMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrB9xAAo0WK/RQBVgY+t8kM2Bs8dBOaf7o0i/bhyW4MEtF8WM3SjEoh\r\nnTlRe7yUZC5H6+sVCiicFJRJhlEMY0QN31JpHhB+zU0ftYMJIjQmBXHZ9K6+\r\n7zG2ccrcOKuJkIRGU4VBZnfyroe4rF2gOdfsLlRHVkYaLPodyxhRYNUwCw3O\r\nwR8QbnXD7YXIecVOjneIbLTZ3+mqxoiHqR+wHdUtZWNPFXoCaay154pfE9c3\r\nlAsjO9qzqRdYzTd2l5BLqwkVpVolWmkBDD8Nzy4OopNJGIqZgivL//FO9Oy9\r\n3C5HxFmL68PE/JEnSCUYCEINbh6+lgmNZoNpmwA+PWz0sNnlLumappr/ziIA\r\n1PHptS+avZmjDLID1MV0TVSPDm4bqXiqs6Vt0CQfF0yzMsZBVBnIcXQ5v76Q\r\nKUswPNrVcQ8XaskfWOR4yPzEld6vCTcdgM+FN9uNG4r1SNgIe29hsYtCNsdb\r\nkBtA+lBULzmRMvmDrIoiecYFzMR3dkrKatfPYD7WyfHayO8h86BXLD2zHnHp\r\nm+e4jjsvPt0cqznDiC3xiHofBx8L1q5Qf7/q7jJ2uoW5l9GzFH/qqicL3okf\r\nFkOOGwibj8dv2C5Rlqj+cuaKRBgo992L92fMnq/i9VXkhGJOIsxAj4zwbTVH\r\nXJJ/kGygzR70kOJozxxTJ6nqdIK2+06W/Uc=\r\n=0jUi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"redstone-finance","email":"dev@redstone.finance"},"directories":{},"maintainers":[{"name":"redstone-finance","email":"dev@redstone.finance"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redstone-wasm-metering_1.0.3_1658479052340_0.9297584930577631"},"_hasShrinkwrap":false},"1.0.4":{"name":"redstone-wasm-metering","version":"1.0.4","description":"RedStone implementation of wasm-metering","main":"index.js","scripts":{"coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls","coverage":"nyc npm test","lint":"standard","test":"node --harmony ./test/index.js"},"bin":{"wasm-meter":"bin/wasm-meter"},"author":{"name":"Redstone Team","email":"dev@redstone.finance"},"license":"MPL-2.0","dependencies":{"leb128":"^0.0.4","redstone-wasm-json-toolkit":"1.0.4"},"devDependencies":{"coveralls":"^3.0.0","nyc":"^11.6.0","standard":"^11.0.0","tape":"^4.9.0"},"keywords":["wasm","metering","webassembly"],"repository":{"type":"git","url":"https://github.com/redstone-finance/redstone-wasm-metering.git"},"bugs":{"url":"https://github.com/redstone-finance/redstone-wasm-metering/issues"},"homepage":"https://github.com/redstone-finance/redstone-wasm-metering","standard":{"ignore":["test/wabt"],"globals":["WebAssembly"]},"_id":"redstone-wasm-metering@1.0.4","dist":{"shasum":"39390a1c7e1adcaa4efb66d7fd0848676189bdc4","integrity":"sha512-wVqDmUDRuxZXhET9R3aGnEgJpGLy5M4LejhJWk2NpgnGZh7uUFx2I4KP/BPeB9kiNuXRF9Zf8k4S6TLksWyEBA==","tarball":"https://registry.npmjs.org/redstone-wasm-metering/-/redstone-wasm-metering-1.0.4.tgz","fileCount":78,"unpackedSize":106474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHI01QYSo1eVAu3OE/SB6b1gcJt1AFKaVbaqLvdc8Ch1AiBihaRP8aWAMcvtqN2vnNziQ/74kjO4dkuWWvSCFGKVAA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwT2iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoniRAAgE14KgJGoIuhx03Ck7WZ9bbh0SdzyLlzeOMiMoyqRb3/+88m\r\naqZmGgoOd48ENOzixuE2v3n2fODIEuw/KfrDVABil5L6pUd4DbWny3c6nwHk\r\nYq60OF5PDBvQ4RktK2KrcO5AU83oY+UEBLkH137keu2E4m2l0zUbU/7Xrj5z\r\nrZCHTb2K4SGZjuS6ArzYSCU5w9g4JScEtONJnA+monjY1nDR4WJVEsouoFJ+\r\nXvAvLSVCM6IkdisTGQsBtjsJ1+/PydzxxhwyK0R9g/7ugyIZqlMOySoAV7gP\r\nDrjwMMf+42xuDojPnwngWIYkDa4tTYWAlezJ6Wc5RNxvqK8tZ31Z7tlZTGm5\r\nOVRPGl/5Aw5MEA0UP/uGG46KS8oBC0Xu0an7t863ic3KcBVn79fBtS+aNOXx\r\nyUrvrIQPBfLs4iix1glnJ7/RNs9WLtM1oU56UM1QTTILj6N6H4HDb8smHXy3\r\nYZJ5nXmyox1H/5ctrC7xQD78TXOxX6+Gmzb9/7hEK6XRC9O6n8Af/vQsjZ3T\r\nfYzg5GsQ04JCoNcXnvTFSxh5mOBaIusHuKrzw9rwlQ0j5ZlqXSnEggNNnMKz\r\n+fuwOXvQeB3wv0FbvvA6Ylh1LIovGVICycsZpF2CmX+ayMxFFsrNtrmdRjsW\r\n2knAjoJ/SQr7mecLVROwmsT9u7NLpfjCgMo=\r\n=o0Ad\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"redstone-finance","email":"dev@redstone.finance"},"directories":{},"maintainers":[{"name":"redstone-finance","email":"dev@redstone.finance"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redstone-wasm-metering_1.0.4_1673608610710_0.26545956168143836"},"_hasShrinkwrap":false},"1.0.5":{"name":"redstone-wasm-metering","version":"1.0.5","description":"RedStone implementation of wasm-metering","main":"index.js","scripts":{"coveralls":"npm run coverage && nyc report --reporter=text-lcov | coveralls","coverage":"nyc npm test","lint":"standard","test":"node --harmony ./test/index.js"},"bin":{"wasm-meter":"bin/wasm-meter"},"author":{"name":"Redstone Team","email":"dev@redstone.finance"},"license":"MPL-2.0","dependencies":{"leb128":"^0.0.4","redstone-wasm-json-toolkit":"1.0.5"},"devDependencies":{"coveralls":"^3.0.0","nyc":"^11.6.0","standard":"^11.0.0","tape":"^4.9.0"},"keywords":["wasm","metering","webassembly"],"repository":{"type":"git","url":"https://github.com/redstone-finance/redstone-wasm-metering.git"},"bugs":{"url":"https://github.com/redstone-finance/redstone-wasm-metering/issues"},"homepage":"https://github.com/redstone-finance/redstone-wasm-metering","standard":{"ignore":["test/wabt"],"globals":["WebAssembly"]},"_id":"redstone-wasm-metering@1.0.5","dist":{"shasum":"fac2f8e6f6b28945f37aa1920489adca7ff809e9","integrity":"sha512-A8XGdH5OBVMLk/s2To2WjfAmOssiy0Jrh3GZ2i0zhdKcTltMD2t+EC/46iNZAsxWpfMJPajxrJ1dNgrgWkY3Zw==","tarball":"https://registry.npmjs.org/redstone-wasm-metering/-/redstone-wasm-metering-1.0.5.tgz","fileCount":78,"unpackedSize":106474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXUvJ5u2veSIcL0PsNwTZtmzS2PdLpuB3vbZnCa4NoWAiBjqY89hWgw1hqwiJX6wPmGNlD3iaeieuWL7oiqvLYGcw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwUEDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcqRAAh/az2BrTfkZhOwDsCpLtXuw2KLXcbCaXBJNoFESTu1R1ktq7\r\nBKyRFRgIn1Ht2TSIJAh5mtSXXW3UtxpoBMa3OlhexrU3gdK0cWvCmeOj5tQi\r\nQGhr7cKSA3OX7yluUHcbf0GrOgosLNi7J8lTG75ggqXqFB+ySPZTzrRHS1zX\r\neyABMqcEzoYejWW2xVZs4Hl6TcXY7aLmYl6mmAiy/N64mOKuRAAFDBdLrf21\r\ntIolxAqgUjBBHIANZjrB7wmbMQ7kp+EBnlAoI2zz1oqvnolVZhj9wp4e60sZ\r\nMNgN/iwfuGPARiqYOtx0Dt2r6O3lPExhhMWxYvCiHSe4gtOn2hCe9rzH7qHG\r\nMjHuF8nQmG3sT7Qlvk02EXwmMvokJzOuQNtGpztiktnk9lMELpchf42p7BMF\r\ncUqOcLtfX1gQ1sTbbTwv+mCv791xoQ2SDRhMfp/s/DYQvT6qpUpaXmiq8/5v\r\n32G3+aTxf65SDUQUrpDCcknfHRU14fShcwJW7vIogD3j9gQ8LIv5+AuqPekh\r\n2FlO6VG4dT/ctPiNYwrNERvB2IWOlhXNXlBByq07dSLkhgByQ9mnVUL/VgGo\r\n0XXwBVHlh5IijyPoqSxMKpz+rfzE1Bn8TZ09L8PJdMSknyO5ZBhA6nzCW2ce\r\nCHverMWVENjzoXwz6uqPVese3kqx643R7QU=\r\n=YNHq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"redstone-finance","email":"dev@redstone.finance"},"directories":{},"maintainers":[{"name":"redstone-finance","email":"dev@redstone.finance"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redstone-wasm-metering_1.0.5_1673609475730_0.17954128744223796"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-07T15:02:59.514Z","1.0.0":"2022-03-07T15:02:59.668Z","modified":"2023-01-19T09:31:00.419Z","1.0.1":"2022-03-07T16:54:13.396Z","1.0.2":"2022-07-22T07:28:47.757Z","1.0.3":"2022-07-22T08:37:32.555Z","1.0.4":"2023-01-13T11:16:50.861Z","1.0.5":"2023-01-13T11:31:15.932Z"},"maintainers":[{"name":"redstone-finance","email":"dev@redstone.finance"}],"description":"RedStone implementation of wasm-metering","homepage":"https://github.com/redstone-finance/redstone-wasm-metering","keywords":["wasm","metering","webassembly"],"repository":{"type":"git","url":"https://github.com/redstone-finance/redstone-wasm-metering.git"},"author":{"name":"Redstone Team","email":"dev@redstone.finance"},"bugs":{"url":"https://github.com/redstone-finance/redstone-wasm-metering/issues"},"license":"MPL-2.0","readme":"# SYNOPSIS\n\n[![NPM Package](https://img.shields.io/npm/v/wasm-metering.svg?style=flat-square)](https://www.npmjs.org/package/wasm-metering)\n[![Build Status](https://img.shields.io/travis/ewasm/wasm-metering.svg?branch=master&style=flat-square)](https://travis-ci.org/ewasm/wasm-metering)\n[![Coverage Status](https://img.shields.io/coveralls/ewasm/wasm-metering.svg?style=flat-square)](https://coveralls.io/r/ewasm/wasm-metering)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n**redstone-wasm-metering is a fork of https://github.com/ewasm/wasm-metering. It uses redstone-wasm-json-toolkit instead of wasm-json-toolkit which provides consistent API for Buffer object between server and client by using `safe-buffer` library for node and `buffer` for browser.**\n\nInjects metering into webassembly binaries. The metering counts computation\ntime for a given program in units of `gas`. The metered wasm binary expects an\nimport that functions as the gas counter. This works for binary version 0x1.\nFor a more detailed description of how this works see [metering.md](https://github.com/ewasm/design/blob/master/metering.md)\n\n# INSTALL\n\n`npm install wasm-metering`\n\n# USAGE\n\n```javascript\nconst fs = require('fs');\nconst metering = require('wasm-metering');\n\nconst wasm = fs.readFileSync('fac.wasm');\nconst meteredWasm = metering.meterWASM(wasm, {\n  meterType: 'i32',\n});\n\nconst limit = 90000000;\nlet gasUsed = 0;\n\nconst mod = WebAssembly.Module(meteredWasm.module);\nconst instance = WebAssembly.Instance(mod, {\n  metering: {\n    usegas: (gas) => {\n      gasUsed += gas;\n      if (gasUsed > limit) {\n        throw new Error('out of gas!');\n      }\n    },\n  },\n});\n\nconst result = instance.exports.fac(6);\nconsole.log(`result:${result}, gas used ${gasUsed * 1e-4}`); // result:720, gas used 0.4177\n```\n\n[Source](./example/index.js)\n\n# API\n\n## meterJSON\n\n[./index.js:104-224](https://github.com/ewasm/wasm-metering/blob/5ab76de89bc07d0abfaa6d0c776c204a752a0d9d/./index.js#L104-L224 'Source code on GitHub')\n\nInjects metering into a JSON output of [wasm2json](https://github.com/ewasm/wasm-json-toolkit#wasm2json)\n\n**Parameters**\n\n- `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the json tobe metered\n- `opts` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**\n  - `opts.costTable` **\\[[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)]** the cost table to meter with. See these notes about the default. (optional, default `defaultTable`)\n  - `opts.moduleStr` **\\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the import string for the metering function (optional, default `'metering'`)\n  - `opts.fieldStr` **\\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the field string for the metering function (optional, default `'usegas'`)\n  - `opts.meterType` **\\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the register type that is used to meter. Can be `i64`, `i32`, `f64`, `f32` (optional, default `'i64'`)\n\nReturns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the metered json\n\n## meterWASM\n\n[./index.js:236-240](https://github.com/ewasm/wasm-metering/blob/5ab76de89bc07d0abfaa6d0c776c204a752a0d9d/./index.js#L236-L240 'Source code on GitHub')\n\nInjects metering into a webassembly binary\n\n**Parameters**\n\n- `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the json tobe metered\n- `opts` **\\[[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)](default {})**\n  - `opts.costTable` **\\[[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)]** the cost table to meter with. See these notes about the default. (optional, default `defaultTable`)\n  - `opts.moduleStr` **\\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the import string for the metering function (optional, default `'metering'`)\n  - `opts.fieldStr` **\\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the field string for the metering function (optional, default `'usegas'`)\n  - `opts.meterType` **\\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the register type that is used to meter. Can be `i64`, `i32`, `f64`, `f32` (optional, default `'i64'`)\n- `wasm`\n\nReturns **[Buffer](https://nodejs.org/api/buffer.html)**\n\n## costTable\n\nThe costTable option defines the cost of each of the operations.\nCost Tables consist of an object whose keys are sections in a wasm binary.\nFor example\n\n```\nmodule.exports = {\n  'start': 1,\n  'type': {\n    'params': {\n      'DEFAULT': 1\n    },\n    'return_type': {\n      'DEFAULT': 1\n    }\n  },\n  'import': 1,\n  'code': {\n    'locals': {\n      'DEFAULT': 1\n    },\n    'code': {\n      'DEFAULT': 1\n    }\n  },\n  'memory': (entry) => {\n    return entry.maximum * 10\n  },\n  'data': 5\n}\n\n```\n\nKeys can either map to a function which will be given that section's entries or\nan integer which will be used as the cost for each entry or an object whose\nkeys are matched against the [JSON representation](https://github.com/ewasm/wasm-json-toolkit) of the code.\nThe default cost table used is from [here](https://github.com/ewasm/design/blob/master/determining_wasm_gas_costs.md)\n\nThe cost table can use a special key 'DEFAULT' that will be used as the cost value for any fields in a section that are not defined.\n\n## Initial Cost\n\nThe Initial cost for instantation for the module is calculated from all the\nsections other than the code section (which is metered at runtime). This information is\nstored as a [custom section](https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#name-section)\nthat is inserted directly after the preamble. It uses the the name `initCost` and\nits payload contains the initial cost encoded as an unsigned leb128 interger.\n\n# LICENSE\n\n[MPL-2.0](<https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)>)\n","readmeFilename":"README.md"}