{"_id":"@primitivefi/rmm-ethers","_rev":"30-aa37acec48b9b1aa2fa97865d24cd03e","name":"@primitivefi/rmm-ethers","dist-tags":{"rc":"1.0.0-rc.8","latest":"1.2.0-rc.1"},"versions":{"0.0.1-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.1-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.1-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"ab2de4f1b27faacbe14f7ff9156ca64d12ef6dc7","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.1-beta.1.tgz","fileCount":76,"integrity":"sha512-QvpSt4hKkWrkw/qNskHjEURnzQtgJscUMy5XvBTsRnISijowatUhFJ+l3d1LG9Kvd95YwyX6pzcy/EzvZpB5VQ==","signatures":[{"sig":"MEUCIDFrGLDqgDKRZ7Rn9Q4Dmi0fQqFOxS3UGWKRzP3YLDQHAiEAx44D6tSAIFHWALsfDkOkWcoofL23qq45MWCmXCuyF1o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":536104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1lJWCRA9TVsSAnZWagAA1OwP/A5TNlct+ZIAEz/l7IpR\nw5tsw6jUbfRDUSAhpf0wYd6m2gm3mEo4jgbBe7WLo9QGZjRsIn+JMyghrSkK\nYKCaQ5O1sC8d9Gurmy/JpmoDBuqcS2CzVk21CY1vVDUOQCggi8Bb38E0X043\nk1JPJqG+VWTso8hVuzU4KrxwzWUGU6LvhZCiQp4Tk2FhvGm/PCqWG43CKUIR\nuAyEpSngWMl5FEoBj4eYXhYLZYW/fTPZgD+IbCOorMsV/47AuKJSYl1mm+eK\nZLkHXvi9EY1HJvqu1JmUioNh53w3nR21N/rCjmK4k15kT1DOcLoAI/UexRiC\nNbJOUTpcUdinFBGLiKPV/5S1HRBintzo89EFj9Rlw2dWHxTFwLoE9zdBw3gW\nMlwBUEFmkHwXgTohDF4e7nSbEFmwgTO1IBmCqZh3QlT5Q+nUOQmDiCQ3M7Fo\nxSU2WwseIJuj1Q3WXX+WsKFX4ZYe+eeRtIbLcUB8q7j4K1rAlnFGFYqtNZHv\nb/r9SdK5gU9IaVVDTAQOcK+zv9lxVldc055DGQt7JlOlfuZo7pt3XivTfIxy\nJuvDn4dtu6BGlP4J7UHzquuNGajaZZRg+WHe7SNm2MoxheW9lwZ4MQJQub+z\ncO/HSNzQY8d197ryroABKzzt3yktWeduYKg3CHAzvsuejvpKE/hqiF7w75n2\nm1A2\r\n=I/PZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsc --project tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.1-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.1-beta.1_1641435733636_0.952125479716609","host":"s3://npm-registry-packages"}},"0.0.2-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.2-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.2-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"beaae6d8864f1eb98df630745b7124d677b9ebfa","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.2-beta.1.tgz","fileCount":76,"integrity":"sha512-cbD0yGlZDNKRS+XaB7ZzM/gRP97EEVxJidA8mY9a1EtFPpcQPV8ThiMk6weTp4owIO3lDNVAPrniz7OffXGOGg==","signatures":[{"sig":"MEUCIA2dQXkuAi8GSzCI3KNtJ0PcpfYIS9cX/1BAcjtmUDvUAiEA39VsuQqdeAm6bRsf56qguJd/W3U4D589S6A7dxLZYdo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":536143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh10FzCRA9TVsSAnZWagAAfYAQAJVCL8+aSBMnZNNEu4Fq\nsS3J8KgGrr4tRNPqK4DcZUoE7ypsy1jhGPU6wgR842Dg4IHB54/b0/MLBrOz\nHAvfO/8owIh0/sDfH5vgo3j7QqX6muoclIXSLDWgMt8aKGeLQTYOCQUrM4Sb\nimVhzENW4wXaYLM1fu0pXFE5t/ImhpESpHeiAMUtoyTgGI8tfNs2CMDYZIgR\nuEp4GR3Vx2gu+YNbtQWdDgVkpOAP/T8iNS9GRYEtosCTUDUA66a328KXFikh\nXIp5YgB9rXFh3OsPOYN5hfiDJ+Q6kXa4et2mpsGrudJReDlGmzZhOHQ+zqp/\nHEdM70h7otFX4gDXpcP0H2/2l08GfjetZMLZNN6G5zo/4gUCye1kbd2GDLjN\nvUCaKe2Ab7VqwJuhwCiS7aBnymAvKubQrN5owoInhQcRNssBLmCgzqvaVt6q\nj9MFpCDwVJslMR5lHRVcInDi+jK2qmRohDD0fxFPGEnIBlFs9Nt9PGGUPgsC\nd6mdAjZu1ipcqMXOM2j2Ym17jNLfjkj8z+fuXUfmiYFW9rCPW3dFxwNhjzqv\no9NsQR9Ah2bf6Bn0lOFKoBJmyNkQW/T8iC/cVkD+QAYP3ct0euZhkFJyBNky\n1xV7+dEs6XYlu6/n7La2N5rEOjui90QTZHGG3J9y4IACPO7YhL9E6cU7IwFI\neo2P\r\n=jnAw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsc --project tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.1-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.2-beta.1_1641496947775_0.9854230223801868","host":"s3://npm-registry-packages"}},"0.0.3-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.3-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.3-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"f0126950dbfd5920bd97429d15f840afdfa647e1","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.3-beta.1.tgz","fileCount":142,"integrity":"sha512-jdMOENBN2bp39XAUKRwbMZxH4xFiheT/RvuP5Pnm+2hkQRhS0qA8HKIjlw+tbhoODoz3GQOLxK5ZjtfN1C3fQg==","signatures":[{"sig":"MEQCIEMHsFwLJWUXnmkG+L3gLugNX9SMnqabWBNHLTmlfHyiAiAlc8CGLp+Y03KmcEzrHcIoP+cv+NOXaaiEP2nUMnob2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921121,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh10XGCRA9TVsSAnZWagAAa68QAJAplrj/G2SLtr373VFC\n4waIoKNIFgLqK5fw7vgyAXcEl2uNi9F2SC2frnDzZnJjv0aYjfBzkQKe6YeN\nPkTV8x2nmxAEbFtyadoWIFv3UJkx7i9DS7FDcP4nUNCAISKnHgk7s2P2Ojts\nEcSwLjhb2+rdMQ0PxmBvwtVEkEGYzjcZeAQjDtyn/mkmzP89Ifj82TopiM4v\nNcVRHp4DUVjHrbMHwMzfBffGglbEwcIw17hBqSOeg4MQeF59eaRDsnopiXB4\nw+eurz/oQ+zxCkMJicu/C2c5zsYcAcinLchtCZdMGqjkXxGfJHd8yIIHlU0Z\n9t9lk6VIz4cYQNeejB+dPXQSB515ymTQGnyOKD9f2+EwBwkwNvZXuc1UEH3h\njEDrsdGKfIpwaiHrhYykvT6m7NoHsr3VlgZg8YNs4goIwxLVu/D+38DerHJV\ntNvh6DFPyTle4n9WnpCEkXVhYoQ9HdZLb8x7ZWZLbjrmzZtfIblJhHtaADUM\n5xB6LYTKYlsQgdXE5cEsM1sfTWfEsRnbE6Cv0bFTzAhGcN/ILuhJi8yIzCgc\nQm4v1E1ZP4E6CClTS1MkJBi8ElqxzSxlFsthjP+5d8MkIiLj3NllS6cDOYME\n+TX3ZI9gzG8JMHDe30aRlbeNX8ufV7D6p5jNeqM8lbxyUfBaiz3t+FnE/rOG\nZfQJ\r\n=IBjs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsc --project tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.1-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.3-beta.1_1641498054172_0.6535112757339916","host":"s3://npm-registry-packages"}},"0.0.4-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.4-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.4-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"4ea390056193051958ffc3e074e210643470df6a","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.4-beta.1.tgz","fileCount":142,"integrity":"sha512-WnxxY5kSVMYkwrO9tKTAoRZfLnEr8k7hFFB9WU8eOWY68UUsmdwN4Re4eGGqXHWNX3RDgPs4ckRxkiWSbzeX1w==","signatures":[{"sig":"MEUCIG1l3MiXWzOf8q/X0hAqAztB16lxS4pmhFkjuXsxjJfKAiEAt4DVRtxEH9aoi1p6qdLJeX9z52bSiwomTeoh4NSDup0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":913567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh10hUCRA9TVsSAnZWagAA8tQP/jgI5DzTmNfHAd+MIfkz\ndqjIeh9AsFM8jYjx2esYLTDLqCf7txFSeEoCHIcIQDPHBu31QhQ6nWTq4ypM\nv/6FxtUAmfwHimS6p5iJbN77pRM5AaawDL2DQvgWRcL1lZmc8+KIG1AvcfRj\nQi1rW84RSKV/vRRfml2tjZH0yrkUT6yAmREa0+Xkw0EwuiBN0Ait5s+McCNj\nwJaz50B2mvL+g5HJ6NutGwM1oN/c9bV+EC8IIFBlTrKXTk3Nt0QF4to8z5bg\nWV+z/phGKlFGy15bLmNi1Rh0MI/pR/6lNk4VQKuri5cg+Esq6pLdOMMwfu+P\nlyitIpg3gnX5aiPG7AXw6Q5gp8fOpLXqyguhfhpT0ZxFezIwpxn98Adc36wY\ncoMUtJrjkwzqJtsSdI0FzQHHkxAxsHSVafNaI3cyJObYBsNd8ny08JBhAKd8\nTVnZZEYbmUuVXIpFV0EZ96bZ4ig0tuCfvZKW5cuUPK3S3ByDfRJ14UiorvIx\np6J7LDkHSuJEiWL+qBQ58n+VkfH+ixcIelibEcrYSzCKy3z6UsymGo1OqZGb\n7AAj/6UsU9CaOH1yNtNx9zqZnnxWgESe09XuGb97q8xGoagVE0sjra+tTQGR\nDXev01gCe/6GGrLL9eQ4J2J4Pu//dNkAM3Oc4Vtov5vKzUIiDyq5QN58Z+9q\nJn4T\r\n=YSWA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsc --project tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.1-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.4-beta.1_1641498708079_0.5196070908333508","host":"s3://npm-registry-packages"}},"0.0.5-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.5-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.5-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"9dc32ea73730eb61d3a86f0f8082bc6b4b9a6143","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.5-beta.1.tgz","fileCount":142,"integrity":"sha512-w+iHP3FqFJhSlX53tHGzoehTm+dV+XH5bqUmp5CEp8kVjQrRcPIqCTOQruRlRDSiVL0Yq869156OKAnQOFwJUA==","signatures":[{"sig":"MEQCIQCq8atuYWS8uhfSWk9CGEtUkJvLNQEdwkS3seF9V/3MOAIfUDJRMUl8ftNXKgv8nb87NwBftPuv38li/h8bsTJGcA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":912115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh10ohCRA9TVsSAnZWagAAY58P/joDzUvG3VQ368nKuEk8\nDWelu+lkFVpGCuuRxZBc/KBqMeKFHKkayder5tFqzoCpowRnc3v5gmAIWP7D\nmDPCvJU8caaF86q7zz1cc4KNgJlY48SpzSTK8CBpRy5XpYlm40TW8lijSz1n\nGlvlFnRKCXlK0Yf6qTLXjliczk4/EzafoshYKymV5bN3rZM9OxGqv5zvq+Jv\nUCQuuzFbEylpTDQ4JxcIbco68KEEgQJ8leiyqCprk2FaK9bkfhgFttZ61jv/\nF2/whU0O9GI7/AtPnH/JZWRogWCNRCHuAJXO7dLOjbO1PXKsENYKWCyWhFKG\nDL0/TKI8fNRgP5xBynWaCHegYZ2FpS5vLDwURL+CFXe0ScBna6rhWFV5Us1l\nFQlIaKjRsgqBTmKBLM33KYB8posRH8orJqtQd4T6h+005XX+O2eHcxjB7xsh\ncHB2/Ty/5pXgzsBo5TP/t/Bcyn4FAf0c+0LeTLnKWGsBmkgfp9S5R6YK2mWg\nXKFtIJk4eqaS5mw6EScuPeRZOXKyzXcfe4XxZmQOdAiQ04f/Q2pTH8oiNR88\nZM9+SwKDAbbIzY49NiU3dABgIca4E0m0u08jeQTzf9zzEJ9WHJlhl+r9BMhw\nkdVVEfORNlV08U+CVJiJpCKnfRKHdPemqs6QyBaxdqDAWWhIx03ewxwBbzuD\no2fc\r\n=CyTv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsc --project tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.1-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.5-beta.1_1641499168852_0.17741230366230387","host":"s3://npm-registry-packages"}},"0.0.6-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.6-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.6-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"2c53b50b4c8b7828d723cfbeaa6eafd4e6e9a82d","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.6-beta.1.tgz","fileCount":41,"integrity":"sha512-O9DaYZphmiAstgwfWsHTygK/kVJODQvtjOqb8jbPcvJXXmnfG5yvjjiWfKHdROX/smun8kSjhOVpI7O5yUwdoQ==","signatures":[{"sig":"MEQCICbsCFnrP+XkrO5XAy30dQr9qpKCnC4FoI7eHA4V43obAiAdohiR225Zckh7ADpjcrqG27wgxr25yfPl9gTgQXRBSA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":706893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh102rCRA9TVsSAnZWagAA97MQAI9xOPqz7+o+f/lPXpTY\nhPawsEcrovvmGdzJsD6F3Q3Gy3AiX1x+rq0ZRmahQz/xF+sG717yYp3fBeNt\nm2CdCEOIeVWLSyo7k5H5pDLs4PtNicyjmjW4ONeAE3s2Ci5Oo5WAT5PPoe4T\nEA8+9VxuXdDwXUwb9hW25ToBddcunpLqYd5wJZE1ZGHMvJ7C82Ns6EOpJSR2\n0aUigv65rzCVPDvqxq6vvIQqc8HPxbckLRI4jwr2RL/sPq+M9Te3BdtX4UdW\nJTO5fQ40/TeKqhnOaX4uUwyPKUwLdMWjDFxsL9KNhJxBPzOqSSIOe/Rg18SM\nD5p6Q5/14wX1LHZNfxUwPA+oYHyCyx4gLg4JBAoFp0ZecKHqBaG/ZZVjDklf\n0d9ihKalghtQJfX3WQYq1RRvd13RbWubD3K86Z7A7ultbGYBV8bKl8jD7qH3\niSy1SrrnDU+qq2fW2u/7URmtlhSoDFORX8LWPs6m8haQPtof2Za+OwSsDOMD\n3hLIfPWX6wXgiYR8w31FEstkHCE+CB2EygxAw1q3qKud+8dErWp9te70YXAA\nJVJMw2HHOywe8nmWeZ23ss9CvFEOQ0sCSnp8UBZrLcFlmkaWj30BEwx3P+Ct\n6To/Y30h5R+gRS2VFJxXfty4LWsJl63pl6YgBecF4APFRW+67LopOagAjJIw\nRQrs\r\n=OSZf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.1-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.6-beta.1_1641500074683_0.06651801799499824","host":"s3://npm-registry-packages"}},"0.0.7-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.7-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.7-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"38e09e9a570083b2adfcbce2aaa02cf38f39a92f","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.7-beta.1.tgz","fileCount":45,"integrity":"sha512-5pG497Ahg14sKI/+uKmN+xpDAN/bHg4jRhdp7KwX85EV1M3hy74sYmdurYUTOAskdoaWVhisr7J7nLMFNvPysA==","signatures":[{"sig":"MEQCIH4OoZt5EEWSwX9TZrPk4twnBEEOruFvPbAhsOt8hR5WAiApc1M11nKcMFvAoYqI+RNn6iH16fMxTZeyvG10RsVjmA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh153gCRA9TVsSAnZWagAA2RgQAJSTGCljLcRXMtZge8cN\nK1U0UcVAWpfgqvqvOXSWWmsNI0q5/GiPggJ0EeyppXX/r/8G4+3o7YiWXpuK\nTf5qy2OxKjcrThh9mBBLVMMCG0XKjTwiFTXov84OL7eGmC09X5NQMgyoHhyh\nU1kwbbdfwNQwYtdOJg9A44OGVKzktB903deBcpjCxXsFvezaGxdFEh7nZykc\nCbCQeJc2V+BpM2xnN6NcRwsi/vbdZZCW1gBSt9SyKIWELx+yidAbmAGfj15e\nSW7XZsi1+6eVbCR8NowqF6Lhxl1i7q+ZuPRENfsDKfYhroP2N/bO/SdM4hDH\nmmj0LDrvUPFsWU4+jMkqZIp/EdF4hwUitcU1eR2vK5yOaNljz3CWVBZUv4Vz\n3lVaZUOIgSdg2p8EKCQuY3SQAPIEoA0Tldxds3f5HKOMSNzN9uNugeHVPez+\nW6mrpZwlE3zbt2AXRWBktLMzA8dEMw87km9VXY8smM0HtkOS16y1edzPkB72\nqYBbpcDkSV73ScbUnWdI+LfDVRsTOw9F82AvI/7TnmVPiZYGSOZvzUbTT5df\n3P2HflMJfQebTW0yZ1rhgyAJNyda/OqT9PxrIHNCmZqNnY/WApkPBfkaRpbL\nGxc4pMGjPi49moSNYjGOm989Qt6YPjt4dZF/WB9I2sAt5pxq6RyM2kATidOc\nWWh0\r\n=92ja\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.2-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.7-beta.1_1641520608688_0.7294592719356805","host":"s3://npm-registry-packages"}},"0.0.8-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.8-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.8-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"213fd5fa9b2cb99bbb042ede4e5ebe11869b082f","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.8-beta.1.tgz","fileCount":45,"integrity":"sha512-d7Fz8s/DvGOqpQTpHx5mlqzOF9da01siHF47/CdukzMUXtqe1A0sblJ39eP3XGwVWqCakV/M+0Z7+pZo/c3vZg==","signatures":[{"sig":"MEUCIQCX1QoQEPryJ4xOPdHrZ5YHkA7/WU/m9NbCWmIVsKmCFQIgBTom31N1uvib7SV//BcGeUr3OciyZxqMfXEp4s6DZ9c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh16GnCRA9TVsSAnZWagAA6aoP/03NpENIko6HECKwl7ba\nExCgQBojLjnKjvJjefUt+cJv2p+oPdslpkIVAkJTMkLw2ycpfxn/+bm/aXv1\n0l/T1Em5h+PXaAdUU2a0SQ1bkWF68KGu6NupOJT8kbSPip0zkepPjRWNC/Ip\nBXL3Nk0QbjETH+BqPuvN/sP4UpJH8kSZkVsaquVs+eG5o1FPJc77kY76Nm1Z\n6rOjHJ6uFiIw+zqkOOi6DwZ3Km2CeU5Gr8Azex92vCtjGH/e7K6N/Y+HKExc\nrUkz34V7HH70lbzuVijFjfI398JeCoOJh6EkcvRjvnelqTNIK/zCLaJYqHQ1\nCnRpsGg+bEHTveA8K/nb+a7v7wcidzcHbfRlKpvQA3PhKvIQEbWXT4G+uz6L\npgZFgdv8PUC0jtUISh1fu9PtrssPvLQ1uvHmHyqcbOK2xENu1qDmdhpUrPKu\nquONF7gSfTr9/4sAzlkSd/bXDJ+JayT17wlF/EmTnqG4RT9yZJdJ3tCrMW2I\nKBP+wfTQ7apjp7qZSwpDzgjbFi384lRtBo2rIyMOvdZ14B6/Iu+/heDKoAvo\nZteyPHYpp7McUFqSMQqPGbiYS0MA9lPVaLoyxyQiS1V7lpnleGAtPnWw6LgV\nbyUHh8VGv8dYaIsD38FLcPQWVcI5Ks+8+wIlikcjcQLwbrSEYiPTlZSYDD7a\nbJEW\r\n=J+44\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.2-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.8-beta.1_1641521574948_0.46186028044623817","host":"s3://npm-registry-packages"}},"0.0.9-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.9-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.9-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"33e92db3012fa80d6f8c455052b4757d8d679ca5","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.9-beta.1.tgz","fileCount":45,"integrity":"sha512-iQFB+gv4sr9p0HdXdMtMJUQ8LdDZQ8fR8lgvk/S7QWHw/GBWmuXiCoRAsJydP2zmq7hJOC0iHxWxOmKL++i43w==","signatures":[{"sig":"MEUCIGAaU7G1BxZ91la91FgU+sgsHzKW6JY78AS30n6DeR37AiEA646CZhc2VghSTnzpeJmQml3p1sPvugvZ8WxpeKttVrI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh16evCRA9TVsSAnZWagAArGoQAI4q8c+9E9TobRy5W0m4\ngaqCzG3n1yqrt0RGLkjxqW2jJCsxZ1V0xBufMHT0lvp1OCPzifEL/3bZsL8j\nPzvlRHp4UIwK9vQFxrR9RBYtI9sylWHh3DBLBT/8NvITTrEOoThPo2IsCnE7\nNJsQPXRlCav7EkHHp0ok/jFJ9VI5h6LkCLzT4dsIzfscJ0wijVlIFFc0zqbQ\nAtZqnAeruprmMZs6WA+kCEK04uL2IchW8q7u7rx40S/Fax4Pf1yYN53BHwqF\nf1GiAAjUKAy1HkeFEZOx6j1UCLl2OCtP9AlXfEkl6GYgkrOuvw/H8v/iKsEP\nZwiqZiK4cGSGsZLpdymhT117k+w1b0c/gRrIqQyhb3XaLYBnmiaEuzmc7yMG\nWsOOv6YkrM7oAoilqxnrrM/r2GkSgAJe4gKDCl1nTwqLHd7PtkEeqTGrdAwy\nnkmMHKSn30q7JvaegLAfLj0pHim2Rd8FhiKivGQSPyQijH1R1BrPgNqvQNBe\n3Jhy6lszDq2mhuksNLmr/NJzP9yostqE0l2p2UlbYKBLnlpsgwdh3s8TkCQD\nGedk2es26EKQGxZLsZE9ds6gegOD990gWD0EKNdlGi7ZKpB4wXmKqb5oU8ac\nGp87dFFJydvgiBZUrpSInXzYdT2J8lhH7p/oGKDMK/v8bkPfGMZDd9ZqFwBE\nT1iv\r\n=kSWz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.2-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.9-beta.1_1641523119186_0.8639998398381477","host":"s3://npm-registry-packages"}},"0.0.10-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.10-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.10-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"a773e78d204a6d22b51aed313d40509381b530ec","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.10-beta.1.tgz","fileCount":45,"integrity":"sha512-1n740LEMcM67rKYwVN3tBCF/EyU3jjXqqKeFUxtpdlDfRlW6KmoPuoT0Y7BqxH0qzmaUeBLO68G/H1YE+a/mXw==","signatures":[{"sig":"MEUCIQDkK6I681bDgm3KhRDjUAMzzWIJ/wijq5AMFySgAEEjWQIgQrTEQbea22lteeSVaxYVq5tOIBo4kD1ljAJGpcic2KQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":760264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh164QCRA9TVsSAnZWagAA8wAP/30CfxHLZJOxCCK5Bfxh\nGgTw6tcHlmZpMQr8kv0RbqsxE1Qbqo0dFITJ9LWmX7UU/+soVMeoO2q+I2RW\n19PvqLc8z+O1VD0ezq9WwpTJ/VnayHYA6L8uH/z5MCGEWSGP5aPMEvxyILOI\nkEZrekjacxESvy4z/uvBuI/VhF4VVOA47x/nI+vehxYNJJi+5dYwM8joZdhT\naUCcJPe/bysCnbKUoK2B8wxX35tgO7UghqL2urbOgvypTLaIrCTpNXopY62i\nT5lj9zT+sjBhqkjs3+BF3MofDO+E7Dpmh7bnU8ijGdChTYerHbrzJz/DzWbU\nM6e+lRGrjlnDun6L1NSfgyDDJZapIJzwGoRa1MEczlsxUTy8kntR8cT6BitU\nnB7Pq6R/EuA4pe3IcUj5lp+NWnvYYPFxz/2BHB4aZPS9qsJyXE75MJ6DgIvh\n9zrF9SQvH2OaLC6TR+vc3Jn8lKcii0YozsCcdr96v8c/svE9sy5f3kPE+nQ4\nxvDW6ywcpEvR1kgGlKhPa7gejy8OZTxFch39W0NLcgp8KLcLThsgVx2lpFhc\n7LkrlWqLlsFb3vnduXkjC8f4oZJ/r/NUX/e0RAxNRuPvQ85RcjOtmee/vwCw\nhuM7SKS+bkZ0QCeSnMSxk1fO0TJKArqQeXGHuNEJQTcSFZ0ZhV/izSs+0jRF\n5T4d\r\n=l8t8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.2-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.10-beta.1_1641524752582_0.7769094130456775","host":"s3://npm-registry-packages"}},"0.0.11-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.11-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.11-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"329836eea7ae77492825a85ae8fdd6a2274403b5","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.11-beta.1.tgz","fileCount":45,"integrity":"sha512-Fqi6oEk+fJL93DRNT+xDupBXwTOBXw4DMv7b86aUi0nV57UIL3qK0PCXR145pHbGFSmqensN0U3mVLrHPQmOEA==","signatures":[{"sig":"MEUCIQCTfgOJmaX8JgrKlBDgiBR5xs4J6DOPyPWeeAveLrncIwIgHPEjKMJLDEOvvFhtjIXeeB86pDzonp3T5MF936BOp7Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":761278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh18F7CRA9TVsSAnZWagAAOF8QAIQC4JNUif2hmGV8hR31\nok1RIVFsq1xBMv0e0rcz82LQosMLgUvPvk7Chwemg2EMPPUuAT5UO4jT6asw\n4xQpfaeytOQG0QK/M3oT4t+J9Lt1BNQ8GEKS6LKVSVkHyu/x0jAlR0zusFZO\nRZfiuluhG2sfQ+X2DDZ/whpsS5dRuKu+IwEIdzIzjYUnGtVZc0z6f0htRWFl\nEVMdIXW4kcE/DINJAenUM66FAoo3V8Js/BKIQv05z4DxwDIgzkKrvSZFyGcF\n4n/3W79e2VLH06hqbjnp+kmZDJyApFLf9Tb0m4+vjH+7jUKwNQAG/UQCXYhp\nN8+oixKJYMPLoWHnCoHWIX4gSzcRvLQzUy+ztPNwvsxW+bUOhAZcBhXP6jSd\n5TymgcygvL3sjeKZZd7TpwyMFJZyVsE/52ASYOrKQwuv6bD0I/v+55MRmorF\nN+BLz3RDt8TOgietO0pNUCe7NG92RKULDhYRMDXEVhnrZMz9p7H43Frw8/d6\n3+9Fi9Qg/WxBZbouato4RypLK3Huv7KNeSvrqaq23R2Ff6VKgadgIkdrrF9G\njjb4D7wIcR/FVBEpm4sc3b4t88Mm9uZ0MK786LLvQXt8bmPgZ9daXUbZHneC\nkHJK/xL12JrXkcorF3t8e4IDFWdCk460H0Hbtb2LNrPvnMBTxsY85RbYXVWf\n//9x\r\n=U4vO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:com":"hardhat compile","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","prepare:typ":"hardhat typechain","docs:collect-apis":"node scripts/collect-api.js","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:set-version":"node scripts/set-version.js"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^3.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.2-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@primitivefi/hardhat-dodoc":"^0.1.3","@nomiclabs/hardhat-etherscan":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.11-beta.1_1641529723214_0.3798752592872423","host":"s3://npm-registry-packages"}},"0.0.12-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.0.12-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.0.12-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"89349f6a788d257e4a5978fbc3a60519668521a3","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.0.12-beta.1.tgz","fileCount":119,"integrity":"sha512-x0CNaGhXMEKs/PmInXB9A5gDyAUb4iQgB98f8MvLzIs0+10+XgOaGIFZ0gh1Q8mNvKcDZF0F6+Yc21JsRpjxUw==","signatures":[{"sig":"MEQCIHXEmGQNz3NfxNgakO/+v9ZMwbPJ+j+DkGxHt/UxV57pAiBnoUpjVbNnbCnMI38Zfj1MItcmFSsG+o3O8IVRrv2rAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1046795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh25sFCRA9TVsSAnZWagAAHXYP/i+/+xKFdEhvNIhFnqF6\n9K/dqYkeN2G5IA2At730gjq9HEYmSIqcLJohuPLjI7G1/Q2Tusq1udnS7yl3\npbWD9PI6z56zfMXkC7o0bX1n5hZKkYYSAqMjGhbJ1vVPs25WRc3rzTLFfOx7\nSjWVGD+rprrSWDiHZdbyS/M8PS77FPwPp0NrNj70AGtn6xDOngsWvhHG/Y0j\nmnXGNC7SoYm+J7XhOMoz4wJnd4SoOeOH82eBTHc2+eHAyIm8CKZT2+oej5bz\n7lPGpMeSxM41HXpQCKEV9JWCwZSPBfuvaRqWtl1u0CLH6rQZnfvtjvAK73Jw\n4ofJIovdZNUa3+qUmC9pd4qoof1JFNdkkEarK3FpDBmjJAu4JesSMdy4N+JY\nn+EnwK0sKjuJbjyG5mn8kmoCksGa0oyNFlLAwlTJYTjHFKNFbcDdhb1CtGu+\nvqbxky3Tz+PiQMXz+auGmpvBObnQMSJi3ANDhrXaZxToiWwJbBQVEg8o3+TV\nc9nJNWqOVZQHICN0dEJU5rPuZQt+DS5skS63Jv4S+SAi9bsWDwgsyf0+gVwv\no26kwmoLiCmxtr0PY9a5zOr/gv/7b9OnKpeLBn33fKsi4szjA0hrjRMJxUMC\n9vbM23k6b0b9TQQCo7T+kbYfZVEjeBEZaAqRPlMcFgDoPxOE/7YmdCdm0RvN\nQJIM\r\n=mwZA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.0.3-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.0.12-beta.1_1641782021278_0.4771494383896413","host":"s3://npm-registry-packages"}},"0.1.0-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.1.0-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.1.0-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"103b8cc119eb9075dbc737ae6d02bc358283a750","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.1.0-beta.1.tgz","fileCount":119,"integrity":"sha512-DX086hC921xp5pQCzQWNiJzoNcw5gRHR1th02UI1vPI7gGabuW2qy0KyNulkLzwOnMS+PZwAP2km8/hlaw19kg==","signatures":[{"sig":"MEQCIDoRSBHfWl0INegzi0DTh5GgAHA9UZr8yI6M2xU5qgblAiB98tpSayXMBj/m4ms5vplml9KYnSKtqSn47Qtx0KnAcA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1046855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh34yXCRA9TVsSAnZWagAA5F0P/jz0FJHEJQAjdeXUtg6W\nRqdxn6+jolM6a/VTAtgpF83rrlf7QMMkUc2qdcla+wjRbrcWeZwRE8tf8nWz\nKWaBz4MtIx+MU/JSTWJz4VRDcb7g3GZr015hih/+5RzDR375FPI0wq6YTUqM\nk0ItwulGKuyW2gMB6UhYpYXSIPRy3+1/RHjLL3k/kfaet2XkgKNy1AKod8Wx\nHscCIFr6setOsCHEEhnF6D3uc22Pz8G4dG0+cCTuHAg5Xc/kbjl//CX9/+VC\nnlR17c2GT73pmUWfEqruz2D65RujEZfpDfBL2W6rsx1n7vHk9wMuNWEyX2eB\nYg5pnAdQPmimg0jGPQ94hGSC+sb+TRxtFzSruX8CGZNJwemucq+uZb0Ta69t\n2E414NBciwRdb3aVdVbh5dyhudeuPFjdqnn///6RwF/GEoUcfGaoC5a4oub3\n1cILDBEFrw9fENjDginhq6P0LV+uO8XaSPBvgvB/KiTIiDVAoO0EmYWBBiRH\nvJH+8FTEUMHsiQotZcuhFunW9k35smZ7krLmrErxmI6EHko19/XclhELvzgJ\nwYu8xuWNoTHbo/ek68WJLfW6IG6cISK4GxPEviIiHt8PK9OgmJ1BKDABIaFB\nhZLlNaijl7TeeQ1ahSWD5ZkzOanFaMktBrEh89AYoLOxoORVAJJPaONh5EZh\nKDKG\r\n=Vynq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@primitivefi/rmm-sdk":"^1.1.0-beta.5","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.1.0-beta.1_1642040471584_0.8217924002322774","host":"s3://npm-registry-packages"}},"0.1.1-beta.1":{"name":"@primitivefi/rmm-ethers","version":"0.1.1-beta.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@0.1.1-beta.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"9adf27d94d011822d5904d9ef1ce9beceda7704a","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-0.1.1-beta.1.tgz","fileCount":119,"integrity":"sha512-NPuIUzGSAZhsXpn95OPeb9fF4SDJ99dWyjvheh5mqoY7ihg0+dGE92eezWwWr4hdOylXZyrvfrjgAaQnCOwzOw==","signatures":[{"sig":"MEQCID5raE04bd2cSHUWd00q86713K+84l4XwValoOBQQ9E0AiAGCX8XiBQTE9Hi0/aXxRU5vg5leEF/K5tIz7Ul/UpDGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1046855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh34/5CRA9TVsSAnZWagAAZOEP/32sC4UXyaqXuLh7a+le\n4eL+kpj+YWnbo3dffAMq50J8HkLBMA6nwY5mydC+DQlrqFW1jJWaK4+Ypl5u\nMaBy8hkNokjCIEKPWeJG1W0kKst+1iTVWjl/ydL+If/tpNN3w26uYfAqpUEh\npguH8uWnX/5+O896rAg5pbSwPFVeZr03FxQJYWdSiFB4yoPY4KiD4/xlcXCF\nawkxJlwL+Jmd+IGknbCNcvWU4X7sZ8a7SdLLeo+huaEtxKnSluS7Cyxx8Jsh\nU9ZiMsL+4QskTvLXaMPQt9U48Fh2px+D7rLZXjBIVcXtGncXc784C/fyG0l4\nyTqn7Vf9kEkZQngwgbMtodBUTgLRFwxW8TA/GQuder3RePw8cAW8RSUzeZaS\nPxHwYiHeN9atsE+CTescqD0yeK0cail+KgJYfz40WYrGZeQr4OsHijEQwapM\nfkCWzPhakasUJoSVEt6q2xjfZ+quhqwq1II6+hM6Yvnw6E1kyT63DWOa6U6+\nwaPnh2bTovJONKnsAZIu5dCbdR8S6JAKAlGIK60xEl7bbatq4una84oMWRoc\nswG90fbMvBU8QBF17uinLLeQE6NFnFvkonJkptTkHGuW9ufxBaI8eOlkhvhS\nWrpgxV/iMyIsjWdfKcu72RDWGuH8GK4cwBL3uIWdFqAhxditlCEu1bJ6X6Ro\nC3q6\r\n=VxWP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"@primitivefi/rmm-sdk":"^1.1.0-beta.5","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_0.1.1-beta.1_1642041337410_0.9464391346908445","host":"s3://npm-registry-packages"}},"1.0.0-beta.2":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-beta.2","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-beta.2","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance/","dist":{"shasum":"d847df30557583178dfff3fc81fbc7a1b82ce278","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-beta.2.tgz","fileCount":119,"integrity":"sha512-uZfAG3g3oV23ru2ASB9a9c6ICwJsJjFk+rgLyf4Jz1wssmtDXK+HJTXuz7LA7g2OReK99YC7HXOEPEoQenU28w==","signatures":[{"sig":"MEYCIQDU25lqcWuO+4zoOEX/zb6Z3LeXZ/bm4d3j4sYnawttCAIhAJI0rTrAZozUmwDSV66Vu+f/R3BZfG0d0hHAmzfV99t+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1056734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4dNVCRA9TVsSAnZWagAA1qwP/jqeHrsHITGA2Ve7Yk8+\nTWs5rDzHTB0GK6U6MWCXMeEURJhiuVVzQClIcpFOTUMbId5lryk9Z04ePLiq\n8pSJwLXSDm3Rn5+Cw5W0xTfJdODlbzAv1VM5efk3RXgEC+Fuuz4TZTAMP+mj\nGRFhKDzPwzCfjN/a4Dd4dXzrn7w0ZXJ3dy9wy5uNcB7yGSlwOKUpFTZO0y/d\nib6VYFJCK4JMXP5PTwxVWqEcJ15ivK6ELKkJJL/xLJht6E55ZnZ6/s2Arg/A\nlhi9aVGJwDCREAL3yr1vTX+19mj8KLpst6b4o3q379mnAiLqavsCWrcnStg6\nh336qmiA3J1/eMjkJ9m0wKlkJzlnR7Bg9bS6jGoX9MIJD0dkcnFsvp19GNW2\nvhppmwNafGh42NMM6WMU0nZAT7Zs++UHFVX3st9KB5eNKBioEI9LDbdhvgGj\nqYoadIg9nPAANSnlBe76WvI8p3/3HUN4Bm2ykkwlQMZlMydp8p4TA3xLa+FP\nS92k7mNg2pkxs2cd7fsM2feaShmZYzcY6Ju2u2b8a22a+1p7y9lGRhKqB5OD\nKRCCVr8/9875jIq0Vg3usuV9w3kutG0myBpsfGTNTslg4NPpCkJsdmz5CxAv\ncGZ16L+8hTGdilpVq7sm0kyLPea9Jq6P3w+lSZC4Lcp9yV6oR/OGqLzxjqu5\nP4NB\r\n=OoVJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","release":{"branches":["main"]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2021 Alex Manuskin\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","postinstall":"hardhat typechain","dependencies":{"@primitivefi/rmm-sdk":"^1.1.0-beta.5","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-beta.2_1642189653274_0.7694095388408226","host":"s3://npm-registry-packages"}},"1.0.0-rc.1":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"7e02b1d7d67b14e188217be37232cf4b412fa83a","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.1.tgz","fileCount":112,"integrity":"sha512-vk8IzPxfOQ102uL14tXahl6iHALtbnztvWu2+fsde5qoswUT1rbAP+s3fcpsqN89lCgOkxbj5wV9nLpbJEEGxw==","signatures":[{"sig":"MEYCIQDMKiBD8H2ccBQvSXUN7UEaXWf9KSGtYgfrn/2DOeOpYwIhAMFJt/zNYlg91Wc0CcSXDR9MNhV9tZHl1fArR+Ot+kD5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1046774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh81feCRA9TVsSAnZWagAA+8oP/RnukWahe4UaDQPbebcu\nAJtC9Q7ay8cvVTztLctbTh5RtzWEP8wOGEtsgj9lWHLPeTZCXIAXFrYRi2de\n4tg3Z/mrBRyGrlEjFx02nxX+tljFwTW2lOwzyvRP6gcteeeMN7C+Neuhkd24\nA3aC+Tux4N2nwxbU0VJ5OrUAVt1VCU0XRPA0HRcQ3kivAB1tN5yfiCccFFFU\nYFl9MvSTKIDl586HnBhOpT5UsPvq2wOTWkoYS3tYMFSYb8Aa58PzBY6NfUCW\nMtqw0+T1wJ/sc0K5mtgGhMe7feX4mJ4lFg3IYBJKsxsYiYEu+OBNZk+VxIyv\nycnDXkrMF1hSu26/iTzuYtIKLw/rwvdhsD5fW5GpvgYoqIS7aeVRHUgKqFUc\n/HzL2KMnbu1d+cMFn4OaP5J7YBal8XLiqwtDGEZK5jP8Gq2QDsavsKj7qKFT\nYJj74A3GqGxb10pdzUf8wuKJSIpJnOvQjqsQQwi6PqQzKoZemfIOpuspA4wG\nZKYuE2kxAlJkKMyoZd9vEyLPi5BdTNh/ipQgJz14JTRAi7qiBafCkhB+E9B0\n3YHQXSgjHYSEnRRi7ixW+OgK9OJlbToGcXQf+fIVWskuvbHb+/XWGkHdwS0w\nZ4T+155ozRd+UV2Prsx20dVpBBUlJmUjo54i7gF6MSCBE81LU8w4a9ThNr/S\nuefr\r\n=+MOE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":">=16"},"gitHead":"3293a3ba77bb9fd0e24b8852a83080d1e0f330cb","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.13.2","dependencies":{"@primitivefi/rmm-sdk":"^1.1.0-beta.5","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.1_1643337694735_0.40167345791995257","host":"s3://npm-registry-packages"}},"1.0.0-rc.2":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.2","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.2","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"2c51a4df8c7195c1ed0630ccd555cb3898939357","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.2.tgz","fileCount":112,"integrity":"sha512-+4fi8/Xwx614kEftFfarYYBwNbFr4L0oz7O97Et5zZyeQzhwiyioi9OUe4aBaWtBUZFCF7Hinn+V/Q91pU3lLA==","signatures":[{"sig":"MEUCIB/fwpdH3WEWvnWiATycDlWMabFiGnIIRhmHYc4msqprAiEAwEnguFfTxnRtHtyJVmU8uicl/KeTA2jEz91KwjLck04=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1046772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh81rTCRA9TVsSAnZWagAA2sMP/itLR6W877HIGykRZP1s\n5wwfKwVE3D07qh0/isyGeAygRqun3KqN7LVFlziZAonHfyVVglAdqGRgQEt1\nkOA9lB+T/ugosCdGr/05M4t6PoJrrT0jb4eL42VT5EFL429uoP9Dq640dM/B\n/jMrkgF7f+g6qKQJ3ek+1hGTofPRpK+gsnQ0sCaNrTCFCxbubK9mmW8h6hAK\nPnodm39msaLFD9L+qP/4gbbQ2mF2MT68cWd4nTOhSvXjEZxQL+nUcdAUNUqY\npVIcsf7EhFqgDIzSIRsqqi9EIpJITZWn8xVHGFzOL4QUSkSIJc1SRw6Ii5Ma\nt3nyqIMiPE5u+lKMpPHxNkTvcf1/G1L903wUSWD2fw1xKUOccyMSlkErWcmE\nCzgdK8rOv85G8zMnxkSOAZoHtWUfR+QUxi6CGI61JhKPNfOqRvpsDIv4bvIu\nr2aUTaeY3K08mwR8lhdw5cbWetJku3BP61rMgAafM5S2cX/ktLv4HX/mcUMf\n0V9S0871ucHTFPZSqxvugDKqRxVOQ6VDnEg54weeKGX/CmpINFqlXm5AxPsy\nrJ/ZajIUjqGkt6rNA8qar0I3tLfYFh3PDmBwrNP4cxIEkibNm2YZ5Adrso07\nLpNhIL0ow/SZih0FOKCAcNyiVefSIJyqVx1GPTPDVhIOYnHvkGRzn/b4CmZN\nX7VU\r\n=BimH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":">=16"},"gitHead":"0130d5c293a17ae380b71ff57c4a16d516f8757b","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.13.2","dependencies":{"@primitivefi/rmm-sdk":"^1.0.0-rc.1","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.2_1643338451730_0.7415147666364885","host":"s3://npm-registry-packages"}},"1.0.0-rc.3":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.3","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.3","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"adc0aa5ea5e5b8ec7b78fcc2153b8f1f1d5344d5","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.3.tgz","fileCount":113,"integrity":"sha512-lH9yJ7tez2VYyUeXCnKY02ylT95iF/VyeGc4B2s8AFb9E5Iyk522+84RnE+z5DFpM9uw7ue0D2n3x68Kepf0QA==","signatures":[{"sig":"MEUCIQCHFj5A9GYyU1ykpf6BfyNGWmX34IArNEzZW1QNG0rmbAIgKVpBjCz4jWAnxTPjcO1OTECWWZMcV/yLnk/ItzO3vB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1061132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh91TACRA9TVsSAnZWagAAk5oP/jEA+UNH4ToXreUwtLKi\n5hUeh+fTpemToUF83F+9XUN80ho/rcKKlcbY0IE8tUYDk19DscNNIdKadS/n\nJrvsp4ni+s8cP/kPf+FMV9NvFy3RyJfYS+3kbSMCNt5m47bVjUDVpdFkWvBu\nzjRKlUH8wWoYRErxQ1zwiagY8jg8SwBTw3j7wABCjX6Z7rsIllwjo4sy275m\nLTm2Ax8k91rkGjCowjHczKQpw6GydIM6boeRld3iPMj9sPIZ1YMywxw4oc+6\n83j9d5KE6gQ+cxmEUHwZApg6oJjgQAcs6wOiw11h5opXhI/qX9+mgYt46BAE\ni/cfISd3EAgYxv/pBqg9llwLHNnLXwrutQDYLwgt2NZ54y0IH9i0tNLG89aO\nXDZ34Xtde2NrydgvTIwsZVfq1T8NrH1H+5Av6GxypVI6voAN4cMCSb0aiMag\nI/PXyQJFD+7x+SjXYAZusE30OXPJHPn6C7bfnOxKqwtukq7Ds63N3x4jbsiY\naJNRZ1DNS/9uA/ndeboqOyWzLwjkWnEsBa1xKsaVfmvPksh5YQYgswBaRViL\nwydP2dhxR1ZD1jKznECLfKXjoxQf1fdW6Q2bFo+RczzlNjz2NYuvmda08R80\nGRmjVwq4eUNZOTOVjakZEZyl/401fsoT6tQ4ieoBEnYkpfYa3h2FY3GdfaoH\n8CH8\r\n=NPEd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":">=16"},"gitHead":"cf5a6fa7ef9c2e60ab2d71a51b8ecf7d13d77af7","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.13.2","dependencies":{"@primitivefi/rmm-sdk":"^1.1.0-rc.1","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.3_1643599039957_0.7059041858189252","host":"s3://npm-registry-packages"}},"1.0.0-rc.4":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.4","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.4","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"ba7d3b552dc10b096cc5621b5e3d6cb42bd782a7","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.4.tgz","fileCount":113,"integrity":"sha512-FfgoKm6gS9+c+GwZGMXaSov5Lyzj9sgZMQXVbbO+uBLPuTa5qqqdgAqhlbLSB11n93MvJqRWYPBZSlwgVtcPaA==","signatures":[{"sig":"MEYCIQChHAoEPIG2YlAa3DcPMR9fO7z8WNG7SQqW4vj3ZPxdsgIhALphgE85IeGyIoRjh2KSkD5KYBtZ9GrHvGB0KVEj/xTe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1061129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+GWYCRA9TVsSAnZWagAAHp4P/R7rlesgGmlZyKUltuCk\n27cNKnBm6HgruflKJVUIelKgteSYqZTjWl29gXebIyuvUsoxOsSUkmnit61M\nhWGdlNUkkKxudQVonuzXbLni1eD8hZCe3mqMjymK/2K7iXNSizLVHmjNjv1r\n2kxsl6rPLmcWJmFhvrLyQ3jOQFAfkwp0WfvcDeJRXXAXrPhnsgoFWnJ0PpqR\nlCmiOGx25uN3o7bcAivHeELU6swXDo7cgxdbBMJFSmrgglKtjBrB5bcdTTG3\n3+GEoWXM06ouqVk2+ZkOhEnheQ1H0SAN4FDEE+1erxiO/iLxWynV0uDE/Fly\n00n3SZtNUu1UMFWvNP6mY94fnzUx6dTOmy2Dy+U9fP/RAJ3xoy7tEufRI/R7\n7E+nG87/LVdE+7XPQZJFK1pK9RlmSQIrZn5KHrqRpnsQXdyyif6M3SphVzLZ\n6S3sS9/ckk+xMeFdc5s3IT5fSx1CKDL/f2mRd8Bt9ze103D1ugEnS/i/bJtH\n6qJnNPWpRXkULabY+sab/1+yqm/tb/MsQR2HQRONtXKgJ+ZTBLhkWNA7laeL\niYWK2II4u6/VBh39+XT1IpF0ScvsmlrityMHwUujb2EmMng/wKMV7Qgn7CUC\nNzoa1IkJGhxnM7N2YZ7uktl8ERFlQ3YogKUHvJz8NGQqaZd9os5Gvy8y0MEs\nsHWp\r\n=2Njc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":"*"},"gitHead":"28b9ccafd53d3d03ed10dddeaabf2cd3edd3eb0a","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.13.2","dependencies":{"@primitivefi/rmm-sdk":"^1.1.0-rc.2","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^3.1.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.4_1643668888534_0.9537626093277818","host":"s3://npm-registry-packages"}},"1.0.0-rc.5":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.5","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.5","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"7bbdbfb2f37f90acea3c21d0a008f94eb9332107","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.5.tgz","fileCount":55,"integrity":"sha512-qQ6sIaPoG1bf18cszQeP2HA5MiafaaPDHozRPDVztVh7D9WPML0YXhEzECXU0CiBYyRMI1AQZPPcSHU/pHqehQ==","signatures":[{"sig":"MEUCIEXACdWBuysqXYIpPEKgyaDiZCxAGalJjZq6k93WHqCoAiEAoIuxsjpOIrPKwProOg/xg1BrAt/E52cZP32XD70U0ks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1007599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+51xCRA9TVsSAnZWagAAftQP+gI7uetX02GUtni2K1W5\nAr4QH4Rac6F/pMoIQh8LN2JHuVq6cOyi3fdGDFboa8b9HOWqnMJyQPAzv5KD\nxA8GBZC5dXc8jSZhL3qiYKZwyLpnE/bwpwieD87t/qY8oMdkIAjAx/uah1tE\nGt0jb9LkUR6pX5rviArkQLRx7QhUsS0uFZo+iPrbVgm8Ujv/DO1CJpS+keN3\n+Fan9kVkZ4zw548RHjz9dQNbGghjsmFuWtCgX9FgvurIy/CHvoSNQS2iLbh/\n8XxQZZRldyVpNRIvMt7GV8EX0nCtadP8QAXYdn9GgrAaqCrgz9YUQ1IiB+Be\nvXuh9bGe7gBe029RfVMgzecP1K76uR+kdfbp4NZfow6lElXfENXvYkiWUFds\ndkvAZwOBwUZtzboLPLXanm3yJbJrg1x7FnMHx+mSkdLHVX6ZiZev+755l088\nJ+b72MmXQRad/RFhsXmKVCzivj1kSAzRu0rEAsjazZ6A/pxj6Uu2sP5sIADQ\nLpZ3e7VlCARQhqlxXYiTs5mpRo2mkJvKckVBflkSYIRIlanvY4AWmBsEcM45\nKAYugQGikjL/hX5vlcrL7YmAHQ1LL68kvfXeLtdLefMjckKv3n8VH1DXJz4c\nyJOtOUdO5tv+u7cPlyIq2k5K1qgm3xurjOYiicqlKoHgG347pI2q8h1sKtGe\n7CiM\r\n=kkB/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":"*"},"gitHead":"d965cd9497ed3b9ab42ed42d0455d7417312cdb6","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.13.2","dependencies":{"@primitivefi/rmm-sdk":"^1.1.0-rc.3","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^4.4.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","js-base64":"^3.7.2","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^4.0.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.5_1643879792822_0.9716522092215782","host":"s3://npm-registry-packages"}},"1.0.0-rc.6":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.6","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.6","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"2be94b91826e7502007a3756de73835d301c2aa3","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.6.tgz","fileCount":55,"integrity":"sha512-Ib3ivfj/ZcnysDrAiredIL/04zAMkB023gVOosVTKSgAK733bqDzYTu5DgSS9O6+74G1/1O4U0QTyXvhnjPOWQ==","signatures":[{"sig":"MEYCIQDLhgmwpti4ZgvpbZM1WyOPcCsx1ffGL7TROKnNhQox8gIhAPw/mH/HpnEiS58WjQtbZyDpAbh4NgB/WBqX0PRzvxJ3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1008102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIC0/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMdQ/8DAUP8URWf0EGs+2rYyQ9XYqTXcS8xG1lJnogghyjTqrFCk+T\r\nBxmvK/oz8ZRdWLGXYzKJUkvD3cAg+x4Bs0J1PfPJ9Y5LEnYIQv4v1Pn/YSY7\r\nLhqISEQPfr6P33trWfogeawi/4fiXyfYD0HnXlNab7fhdahQFVBTxo2oRRzl\r\n8SZANIzUC3Gs6EfS4rDv5k+ydGDw29Jf7M6TGTv3jUV8UkhKh47CSET8dZaI\r\nqbaTj8ztmlQ2VoXRqHHFbu9XgyFs37wAAFmqnDGrPrYOkQl/JwrtMZ+IUy5h\r\nLAkErUwTdJ2meGTKh5zTAMZOYt1FW1esbU+61GmaVyXnuRG8TpE/UlSUs/fr\r\nNWXosKtrcBc8nnD7QvZRF+3PnzpfgV/VmtdLVUQopta/RUwvLy66TTAs/zd2\r\nb9dwj64VdPKlyJhw9fgp3Zr6jO5ieqHvT2Osgvv3FArIJsigieEi/FgftUuD\r\ntsco+TciZp4S4vXPc4pt0O7Fa0oFOvXeAWR3lBrtHWw/4DKeJQn2attARpNj\r\nouU7pXNftfvTip2Rk2j7ew7Mpqgk+nfaq/vj5o6Fj7y2BAOFjR9W6Q6dexyC\r\n5ZNUqXun1vz5I/VaWcrOW57CaoqvgFaESup8XUTvq7S3qMG1jhdRp5R5cazz\r\n7S2jmVFY4s0bCPQOiBCN7IA1mz6xjIryZoE=\r\n=3HoW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":"*"},"gitHead":"ae6c200a36f9dfcc65346c8c7287e4ab06a0efb3","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.14.0","dependencies":{"@primitivefi/rmm-sdk":"1.1.0-rc.5","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^4.4.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.14.1","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^3.3.6","ts-node":"^10.0.0","prettier":"^2.3.1","js-base64":"^3.7.2","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^4.0.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.6_1646275903054_0.7718664121952057","host":"s3://npm-registry-packages"}},"1.0.0-rc.7":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.7","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.7","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"74d7fa9fd8d6f041e6b1a60c7eaa7449f5dd1315","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.7.tgz","fileCount":65,"integrity":"sha512-Y11unB229DgK4Cjs1BrvHV8uaiViUaNmrdfrRoxiWE4MwkW3amauFfDBzVwf+JwxDE77Of00akN7H0WkWHoVbw==","signatures":[{"sig":"MEUCIQDYeC28Z8HrsLkkos8g52Bs/OQwIi8OOyTsN5P3KjmiRQIgKcZxZDEdlvUmTUtTWt74AIjb1jOZp5bH5V2F0rF6YLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1052733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiL8yiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+Ug/+NGODvjgPtWntKo4RCFIJ0UCtGVwXgC+WzRboGcMG5lPe4lCi\r\np8YUm8p/ki+TY6VL6y9v6fyh9YVZu6n4xnzqGOlTu+Cqv+9YULeAYkpGLQQl\r\nk34LpXA3uRkqLV4yll5G5Mtv93u5XYo3aueP38nqRn1kuo63S+XHXTDg8eSx\r\nvfUgxFU49S/6I5rel+9TESyL9YY4SF31kJeELJ+4vTxvyi9C/brJaH04iWVJ\r\nTpooKUuEWMLLTZuI8qSbBjPjoMt5Z95Tmij1DqNBUGpAhq0WFCsprAERXHka\r\nyfHWhxGN8ZBQdJalYoomQraPGpx2WmpMhopAWrHmh9nxp2VPkjRcrMutXW8h\r\nClDt4HU0+qeslB8WVUe+HH88uFWInAlek/w/PlcsfGiQSikwErgcRwE2cIVK\r\nWoVPtB6s3fhZQ7PJCmwYrjDZn2fiPiXZyATlSxHMIkDueiO10XXWlidgGfxa\r\nR2in4flTOYkiZP/hChDdmMzwL416vdAU1uKl7OfR5SPq5+wXS6HHWix1lBjv\r\nJMCyf2SW8mswKyuiivNjFbVMNEx24ZtFa4qnozZm+wT80qhdkakD4Mujh3wu\r\nmsTL6udA+EZHtHB/JH66MxaK9N735ucW1N9wVspeAOp2dUt4e6G7N0qW9mka\r\nTTbPKQd3NYr9lYqiIbTbqukVrCZPjSz0xv0=\r\n=yXQZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":"*"},"gitHead":"2fb768fa7ceadc075eb21f7cf223da194e1dde26","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.14.0","dependencies":{"@primitivefi/rmm-sdk":"^1.1.0-rc.6","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^4.4.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.7.2","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^1.0.10","ts-node":"^10.0.0","prettier":"^2.3.1","js-base64":"^3.7.2","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^4.0.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.7_1647299746500_0.4107260108712092","host":"s3://npm-registry-packages"}},"1.0.0-rc.8":{"name":"@primitivefi/rmm-ethers","version":"1.0.0-rc.8","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0-rc.8","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"9492b24c853b85aa40c25763aedcaa0962dae2e9","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0-rc.8.tgz","fileCount":65,"integrity":"sha512-zYSFMMFBp83B4ejgMRmN/JwzfGaP4fxdA0tfqo0l/Z2+U23Z0LpzuudTZ8I0AuJDizZkWy6BrLnvL0K4CMllNw==","signatures":[{"sig":"MEUCIBo38EnvadVxnsdA6bA2u2uIDxFsIL/C3pA/iZoT7DroAiEA/8bKfrwqpYXJ7eEFWUD5YTtUhPtkOy2eN0R0XCsySEw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOjBNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoagBAAi7LPsjQvu8X3kR5dbRLjRGrb1UEgj9hiUzc7SuTOLP914mY1\r\nERbP/cW35zPaoykRuPB3s0Hi6O+ETemVWOO7LzFRmqO9qQ3fjQ4FbtTAJy/E\r\np3S07AyyxxZVAfIUQhB4M34Lp5BNDXJiBBwlsc6W8NpJch/rMXpIsQ+ZsOCJ\r\nz+rth+8GRi3AKtg9mOQKzzytJj6BeGqxRUZLjOObyd2tMDVXWWTH4FHdidoq\r\nBXKE2fQ3+GcC2lZwurB+aIFCO1ZIlCXxdf7/EfnPQ4O7hjHhquuhPaLy94VT\r\n46g3NSjD8RptYe3dltgR5at1cQfJxn5RuDSI4CeSkNx6ur8W8KbjPrJuyCIk\r\nMngyoQ5TtGruLT31iZwdpvL/oGm9CPkpCTbmfdFbMeIVCOQO62PWc1cXcXdV\r\nmf0yweLalLMwm48vWeNLe07h6e78aAzeyp4VbRKcCn4bnnViU37yzWzv7vsY\r\neYMSO9HQbsVgofhymxMhvCIPzJt5hQNAw7izZwRhXQiJj9+9fsk6ccG9sEB/\r\nmfwoCELJCywqB2uJ0psTk13TFu1x9Sa9/DECAAx3X0B37WFkzHeDahNM0Tc5\r\nUHaNhS6e6ceNy9e9iYe7VBoNwFoP74JOX7bwqBjKDOXKCDCmSRuJJ6HVqEvp\r\nsOgWfmq1lgu8cEtB9txItYGey2N4Lcz+J5w=\r\n=wfUI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","readme":"# 🍄 rmm-ethers\n\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\n\n> Easily connect and transact with RMM protocol.\n\n## 🧩 Features\n\n- 🌲 Deploy RMM protocol\n- ⚡️ Easily connect to an RMM deployment\n- 🌊 Create RMM pools\n- ☄️ Allocate or remove liquidity\n- 🎁 Transfer positions\n- 🔭 Read protocol data\n\n## 📦 Installation\n\n> This software is in Alpha.\n\nInstalling locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/primitivefinance/rmm-ethers.git\n\n# Install dependencies\nyarn install\n```\n\nInstalling as a package:\n\n```bash\n# Using yarn\nyarn add @primitivefi/rmm-ethers\n\n# Or using npm\nnpm i @primitivefi/rmm-ethers\n```\n\nUse it by connecting with a signer or provider:\n\n```typescript\n// Import the EthersRmm class\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\n// Use the class by connecting to a deployment\nawait EthersRmm.connect(signerOrProvider)\n```\n\n## ✏️ Usage as a Package\n\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\n\n### 🪝 As a react hook:\n\nHere is an example of a React hook that makes use of web3-react and SWR:\n\n```typescript\nimport useSWR, { SWRResponse } from 'swr'\nimport { useWeb3React } from 'web3-react'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\n\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\n  return async () => await EthersRmm.connect(signerOrProvider)\n}\n\n/**\n * Connects to EthersRmm deployment from the connected provider or signer.\n */\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\n  const { library: signerOrProvider, chainId } = useWeb3React()\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\n  const result = useSWR(\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\n    {\n      dedupingInterval: 60 * 1000,\n      refreshInterval: 60 * 1000,\n      suspense,\n    },\n  )\n\n  return result\n}\n```\n\n### 🌊 Fetch a pool\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPool(poolId: string): Promise<Pool> {\n  return rmm.getPool(poolId).then(data => data)\n}\n```\n\n### ⚱️ Fetching pool liquidity positions\n\n```typescript\nimport { Pool } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\n\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\n  return rmm.getPosition(pool, account).then(data => data)\n}\n```\n\n## Adjusting Positions\n\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\n\n```typescript\n/** Flag to use a native currency in a transaction.  */\nexport interface NativeOptions {\n  useNative?: NativeCurrency\n}\n\n/** Recipient address of any tokens which are output from transactions. */\nexport interface RecipientOptions {\n  recipient: string\n}\n\n/** Timestamp which will revert the transaction if not yet mined. */\nexport interface Deadline {\n  deadline?: BigNumber\n}\n\n/** Permit details on either risky or stable tokens. */\nexport interface PermitTokens {\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\n  permitRisky?: PermitOptions\n\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\n  permitStable?: PermitOptions\n}\n\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\n  amountRisky: Wei\n  amountStable: Wei\n}\n\n/** Token amounts to use for allocating liquidity. */\nexport interface LiquidityOptions {\n  /** Amount of risky tokens to provide as liquidity. */\n  delRisky: Wei\n  /** Amount of stable tokens to provide as Liquidity. */\n  delStable: Wei\n  /** Desired liquidity to mint. */\n  delLiquidity: Wei\n}\n\n/** Provide liquidity argument details. */\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  fromMargin: boolean\n  slippageTolerance: Percentage\n  createPool?: boolean\n}\n\n/** Remove liquidity argument details. */\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\n  expectedRisky: Wei\n  expectedStable: Wei\n  toMargin: boolean\n  slippageTolerance: Percentage\n}\n```\n\n### 🕳️ Allocating liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.allocate({ pool, options }).then(data => data)\n}\n```\n\n### 💎 Removing liquidity\n\n```typescript\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\n\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\n  return rmm.remove({ pool, options }).then(data => data)\n}\n```\n\n## 🧮 Usage locally\n\nBefore running any command, make sure to install dependencies:\n\n```bash\nyarn install\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```bash\nyarn compile\n```\n\n### Test\n\nRun the Mocha tests:\n\n```bash\nyarn test\n```\n\n## 📃 Deploy RMM\n\nDeploy the protocol to a network:\n\n```bash\nyarn deploy --network nameOfNetwork\n```\n\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\n\nHere are the options for the `deploy` task:\n\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\n- `--gasPrice` (optinal): Price to pay for gas.\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\n\n### Deploy Primitive Engines - Pair contracts\n\n```bash\nyarn deploy:engine --network nameOfNetwork\n```\n\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\n\n```typescript\nimport hre from 'hardhat'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\nimport { deployEngine } from '../utils/deployEngine'\n\ntype Signers = Signer | DefenderRelaySigner\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n\n  const rmm = await hre.connect(signer)\n  const chainId = rmm.connection.chainId\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\n\n  await deployEngine(rmm, risky, stable)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n### 🪞 Deploy RMM Pools Script\n\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\n\n> Work in progress: This script is still being improved! Consider it an alpha version.\n\nDeploy pools in the config of the `deploy-pools.ts` script:\n\n```bash\nyarn deploy:pools --network nameOfNetwork\n```\n\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\n\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\n\n```typescript\nimport hre from 'hardhat'\nimport { EthersRmm } from 'src/EthersRmm'\nimport { deployPools } from 'utils/deployPools'\nimport { poolDeployer } from 'utils/poolDeployer'\n\nexport async function main() {\n  const signer: Signers = await hre.run('useSigner')\n  const from = await signer.getAddress()\n\n  const rmm = await hre.connect(signer)\n\n  const chainId = rmm.connection.chainId\n\n  if (chainId === 1) throw new Error('Do not use this in prod!')\n\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\n\n  await deployPools(deployer)\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch(error => {\n    console.error(error)\n    process.exit(1)\n  })\n```\n\n## 📌 Misc. Scripts\n\nGenerate documentation locally:\n\n```\nyarn docs\n```\n\nDeploy to a local ganache-cli instance:\n\n```\nyarn deploy:devnet\n```\n\nDelete a local deployment to ganache-cli:\n\n```\nyarn delete-dev-deployments\n```\n\n## 🛡️ Use with Open Zeppelin Defender Relays\n\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\n\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\n\n```typescript\ndefender: {\n    [chainIds.rinkeby]: {\n      apiKey: RELAY_RINKEBY_API || '',\n      apiSecret: RELAY_RINKEBY_SECRET || '',\n    },\n}\n```\n\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\n\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\n\n🖋️ `useSigner`\n\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\n\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\n\n## ⛑ Contribute\n\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\n\n## Credits\n\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\n","engines":{"node":"*"},"gitHead":"4e505eccc7667cf35be80607149a7ea480ffc31a","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.14.0","dependencies":{"@primitivefi/rmm-sdk":"^1.0.1","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^4.4.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.3.4","tsdx":"^0.7.2","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^1.0.10","ts-node":"^10.0.0","prettier":"^2.3.1","js-base64":"^3.7.2","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^4.0.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0-rc.8_1647980620869_0.12094655719012803","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@primitivefi/rmm-ethers","version":"1.0.0","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.0.0","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"8f8546caf209f9dcfac5365915b05345de0c7055","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.0.0.tgz","fileCount":65,"integrity":"sha512-SiUFOJ7sjw9OkxjAMiAZIrfe5hCGxi3f9AhDi18YNxjo4xTbfWn/RGDeEtO/VFenGdY3c6xi1pcRLnjFSOpZnA==","signatures":[{"sig":"MEUCIGPDVqPGJ1tu5HMoLJ/z60qWGB7QsVExYQa+k3q75kvoAiEAjV0itQj3o5CK78z/0WHSlAkYiIAqNE7LTWF9S9jt97k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOjEaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWAw/+OK21wxjfSYYOMrdhTOKFDeCRBqd++Hon12fCq//fA2nn/vut\r\nrbmdh2tZxCXS8EPqe21WtLpoJ/wfvZ0n4/p3AgB/Bj9YCtsGeGPA2WeQ5ZBM\r\nb+Vz3hcAPdHQvlWyk5dBmENMn8G9aLqO/YyZnY+Z4g9o2WKj3DfSIqUCt2jk\r\nLAxs3V0GQ6XcD5ySp3HlOPNK/B0rWgafQTpiofgYzOTR0tqiiVS+jI/kVYXL\r\nVYiUovmoDseLpginxXZR7/g4JsJaY8qItgk1Y/wpEf/XpaaqDmwRHshtLDKo\r\noeZPAKAuBz17sTaV/vm9OjDgFzq/llnqvfEAFjA83K7rjb8DEXKqWElHrXsH\r\n7pq+26SJsp2b0KWnyQThEKscizgo8QpoLbrmcQETyMYCH+gveVyETng7xyeK\r\nrjmnhCC7wXBD+ctYsjt0AbHWx1OmQpUnw7CmKo4m6vQnz+cKyPeSb8Y9z04g\r\nRzGowK91SGWucIccoQps/SEV6/I2CuzTYExt5co1zD+IVKAnTgdWjAuNnvfG\r\nUzjJAedw7uXJINgUyUpni27f30WeWSDJxzdnkNq9sAAf7KRhwH33k1fN+IwZ\r\n0pFAq7w3INiu5Ysn+gXP0PIHfxk5+BOVb6mKV3v8lwhfTC+OeMmqdNhtI4mV\r\nn9TdL2oZ7EKIISPzkeBojuGNgrS54iNfLGU=\r\n=MuRr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","engines":{"node":"*"},"gitHead":"9d4c51e1f50788506db91b6f6fb08a4e06fcaa1a","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.14.0","dependencies":{"@primitivefi/rmm-sdk":"^1.0.1","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^4.4.2"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.7.2","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^1.0.10","ts-node":"^10.0.0","prettier":"^2.3.1","js-base64":"^3.7.2","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^4.0.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.0.0_1647980826735_0.3981712969228808","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@primitivefi/rmm-ethers","version":"1.1.0","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.1.0","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"0f1b68860f0167a3c2a15559c40a5b0917d39fe9","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.1.0.tgz","fileCount":65,"integrity":"sha512-9u27tggqvZYGm30MUsyEHb/Y/z/qI1d4A4CBntBl+xaEK3hnl4OUBN6GT5wOAdi5PMORYa1I0A01rDKHY/qDNg==","signatures":[{"sig":"MEUCIADBpDFwUraCPI8MQ9Ez64LpW4KkfiBzZ8xIv570LJQEAiEA7p0bybHXAcfjL5PQx2NAEgbhDNBqFQ4hstDHW1itLCM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTbV2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIcg/9FGSj+Oht2TOhkV3Crc0qPAkXekcSIpRc9Bw05I7lRmDgNsTq\r\ngGb6iaZQr0tl2e3+DY4RJe2yOtDRkoyoIZKSg64E8lVGZrdOfY7amHf+XgtB\r\nOSzPGmYsmWCp+hpHMpWfZiyqX65kEfiLEP7fFaltYpWVhG+BS46vSYfjUJgv\r\nVmQCIgKtTWmbjOFDCuSvsgHHiUJAuBA4wxTuQ5IRj2zWSzQgwIU5cFbClNUF\r\ni5P7IOm/DedeVaCFGnQ7MiF9aVhKHXvBRE/SIuZ2viTzsjrODu8SuTH/qbfe\r\narvWjpLxAzGsXzLp17gIyp6CXKX4XcjaUeUcdjHEYbUVJtLuNyq1DijGPRnT\r\nxO89PERABswXv5TdYTBPWuAaF2kbeUeLXw1UzvbN5K0E8bqgFkgX3MdNYD3F\r\nkwztysqH/gFfe7XShMS1aItCvrdxjzXnaIVQgJXjNChCxWXjzAWnPS4o0pSN\r\niMPDp2DHLnLmbwzFSe/nnU40041rSFJzWw9Jy8dH7yFrdDQ4eMAWdofhkXvn\r\nlmHOCx2YZFAG/FwJswkuzf+QQGbr9EHgRIoJYamD0gZsemMWyc7FFlcE3/Eg\r\nvoVqdLdbkhPo/qCOu41cilk/rZqO1YiZg3468bOXPF7VwVSl/OyI+cUweWoB\r\nWM9OTOelYYFlWYONlfd9jLPYBuc6YWBk0XQ=\r\n=rb08\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","engines":{"node":"*"},"gitHead":"1d1a07368740fc6d94fa3de86ab15cfae4d80e04","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"8.4.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.14.2","dependencies":{"@primitivefi/rmm-sdk":"^1.0.1","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^4.4.2"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.7.2","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^1.0.10","ts-node":"^10.0.0","prettier":"^2.3.1","js-base64":"^3.7.2","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^4.0.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.1.0_1649259893852_0.6501749184328225","host":"s3://npm-registry-packages"}},"1.2.0-rc.1":{"name":"@primitivefi/rmm-ethers","version":"1.2.0-rc.1","keywords":["Primitive","rmm","Ethereum","hardhat"],"author":{"name":"Primitive"},"license":"MIT","_id":"@primitivefi/rmm-ethers@1.2.0-rc.1","maintainers":[{"name":"clemlak","email":"clementlakhal@gmail.com"},{"name":"alexangelj","email":"alexangel.j@gmail.com"},{"name":"kinrezcprimitive","email":"matt@primitive.finance"}],"homepage":"https://primitive.finance","bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"dist":{"shasum":"ed23e962b5af3f2b91fd2f2d0b681a134d749600","tarball":"https://registry.npmjs.org/@primitivefi/rmm-ethers/-/rmm-ethers-1.2.0-rc.1.tgz","fileCount":67,"integrity":"sha512-Pqjh2rB/qo4qhXJOaRz9k12ovyJkpsWy01xGN9hciFH2rIi0oZDDUA8cQnXiKR15FkaZ2o2xAG9vk28GsTco2Q==","signatures":[{"sig":"MEUCIQCx1Dp/hkeuejYuEE+Ap4/kbMT2QZmb1HvnVLG4nI7PFQIgAWKgsu+Pg6ft/+eKTGDhfIQZPqVV3gR/zdLbRzyjZ0c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1079788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXaIKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq07BAAkNSXzvkkL3zENIMscw1cZBYQnXRDRait46JQ3SNCk5so4Aat\r\nYM5gc94e6iWDxZ+llP25sdtDFzT7rMMIhY5hR2PNBRBnA5NXAGobvhGE/lXw\r\n/XGOIcZeGeS4t7De+SphPZJFB43GtXGR1SkQRn6dEng+4XKJs+M7uhQ+H8ev\r\nBiBICLf3apNmojXJ3b/tjY7sekmnLLoiE5Rkh5P17/RZggHuLbROSjAiLeJE\r\njD3VB8EYDqV0V1K9TQi3YuSWzZoWhXC1ZQNsISBTUlhFQMnawvMx06t0/NsM\r\n4Ny1KQ9uRjGEbmXudQuPufARapV7Nw48J5JL+MgtI+38Lz4GzvfvfvNsQNh3\r\nlSeYR7v7p5yYCj0k+KccKOVKwZBkze0fwWA1jR53IW+uhweLk9k7a95rsb73\r\nOILNX9Rbk9p35wiCMJCU4+zm7TkLfiEJa74u/Q+ReCwwFCnEtYyR/WEhx/WB\r\nyf88X2y0FKPoSmQAuisdy9+8KZT7Ut1HIw2qkUR25YWVuCHGwWCgbA5Gwr85\r\nmwiBp/UVtTChVy3SykT5uhQHvruhdiTk410monCbFxxVHWF9d9bidNo1MTRM\r\noMnRA5PhKxcxG2YI03iARgG0CKbX/9FWqzJme7RaTc4xgHN1Fs7xMCNhTUim\r\nPe9j9x6znO40Xfs6FFnsExqbEMin1XsxpCk=\r\n=tNsd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/rmm-ethers.esm.js","engines":{"node":"*"},"gitHead":"874a4feb48c33a23e6dcb69c332044654900ebe3","release":{"plugins":["@semantic-release/commit-analyzer",["@semantic-release/release-notes-generator",{"preset":"angular","parserOpts":{"headerPattern":"^(\\w*)(?:\\((.*)\\))?!?: (.*)$"}}],"@semantic-release/npm","@semantic-release/github"],"branches":["main",{"name":"rc","channel":"rc","prerelease":"rc"}]},"scripts":{"docs":"run-s docs:*","test":"npx hardhat test","build":"yarn prepare","deploy":"npx hardhat deploy","compile":"npx hardhat compile","prepare":"run-s prepare:*","prepare:api":"api-extractor run --local","prepare:tsc":"tsdx build --tsconfig tsconfig.production.json","deploy:pools":"npx hardhat run ./scripts/deploy-pools.ts","prepare:lint":"eslint src","deploy:devnet":"run-s \"prepare\" \"deploy --network dev\" \"prepare:deployments\" \"deploy:pools --network dev\"","deploy:engine":"npx hardhat run ./scripts/deploy-engine.ts","deploy:testnet":"run-s \"prepare\" \"deploy --network rinkeby --defender\" \"deploy --network kovan --defender\" \"deploy --network goerli --defender\"","prepare:compile":"hardhat compile","copy-deployments":"ts-node scripts/copy-deployments.ts","docs:collect-apis":"node scripts/collect-api.js","prepare:typechain":"hardhat typechain","docs:api-documenter":"api-documenter generate -i temp/sdk-api -o docs/sdk","prepare:deployments":"ts-node scripts/copy-deployments.ts","prepare:set-version":"node scripts/set-version.js","deploy:testnet:pools":"run-s \"prepare\" \"deploy:pools --network rinkeby\" \"deploy:pools --network kovan\" \"deploy:pools --network goerli\"","delete-dev-deployments":"ts-node scripts/delete-dev-deployments.ts"},"typings":"./dist/index.d.ts","_npmUser":{"name":"alexangelj","email":"alexangel.j@gmail.com"},"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"_npmVersion":"7.10.0","description":"∇ Primitive RMM Protocol ethers-based implementation.","directories":{},"postinstall":"hardhat typechain","_nodeVersion":"16.0.0","dependencies":{"@primitivefi/rmm-sdk":"1.1.0-rc.9","@rari-capital/solmate":"^6.2.0","defender-relay-client":"^1.12.1","@openzeppelin/contracts":"^4.4.2"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","tsdx":"^0.7.2","dotenv":"^10.0.0","eslint":"^8.6.0","ethers":"^5.3.1","hardhat":"^2.3.3","solhint":"^1.0.10","ts-node":"^10.0.0","prettier":"^2.3.1","js-base64":"^3.7.2","typechain":"^6.1.0","typescript":"^4.3.2","web3-units":"^1.3.3","@types/chai":"^4.2.18","@types/node":"^15.12.2","npm-run-all":"^4.1.5","@types/mocha":"^8.2.2","ts-generator":"^0.1.1","semantic-release":"^19.0.2","yarn-upgrade-all":"^0.5.4","@typechain/hardhat":"^4.0.0","@typechain/ethers-v5":"^8.0.5","hardhat-gas-reporter":"^1.0.4","solhint-plugin-prettier":"^0.0.5","@microsoft/api-extractor":"^7.19.3","prettier-plugin-solidity":"^1.0.0-beta.13","@microsoft/api-documenter":"^7.13.78","@nomiclabs/hardhat-ethers":"^2.0.2","@typescript-eslint/parser":"^5.9.0","@primitivefi/hardhat-dodoc":"^0.1.3","hardhat-dependency-compiler":"^1.1.2","@nomiclabs/hardhat-etherscan":"^2.1.3","@typescript-eslint/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rmm-ethers_1.2.0-rc.1_1650303497956_0.5790173089937671","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-01-06T02:22:13.635Z","modified":"2024-11-25T20:21:20.057Z","0.0.1-beta.1":"2022-01-06T02:22:14.216Z","0.0.2-beta.1":"2022-01-06T19:22:27.954Z","0.0.3-beta.1":"2022-01-06T19:40:54.402Z","0.0.4-beta.1":"2022-01-06T19:51:48.353Z","0.0.5-beta.1":"2022-01-06T19:59:29.010Z","0.0.6-beta.1":"2022-01-06T20:14:35.222Z","0.0.7-beta.1":"2022-01-07T01:56:48.978Z","0.0.8-beta.1":"2022-01-07T02:12:55.154Z","0.0.9-beta.1":"2022-01-07T02:38:39.474Z","0.0.10-beta.1":"2022-01-07T03:05:52.837Z","0.0.11-beta.1":"2022-01-07T04:28:43.381Z","0.0.12-beta.1":"2022-01-10T02:33:41.577Z","0.1.0-beta.1":"2022-01-13T02:21:11.793Z","0.1.1-beta.1":"2022-01-13T02:35:37.669Z","1.0.0-beta.2":"2022-01-14T19:47:33.650Z","1.0.0-rc.1":"2022-01-28T02:41:34.958Z","1.0.0-rc.2":"2022-01-28T02:54:11.981Z","1.0.0-rc.3":"2022-01-31T03:17:20.167Z","1.0.0-rc.4":"2022-01-31T22:41:28.751Z","1.0.0-rc.5":"2022-02-03T09:16:33.201Z","1.0.0-rc.6":"2022-03-03T02:51:43.216Z","1.0.0-rc.7":"2022-03-14T23:15:46.749Z","1.0.0-rc.8":"2022-03-22T20:23:41.090Z","1.0.0":"2022-03-22T20:27:06.976Z","1.1.0":"2022-04-06T15:44:54.022Z","1.2.0-rc.1":"2022-04-18T17:38:18.140Z"},"bugs":{"url":"https://github.com/primitivefinance/rmm-ethers/issues"},"author":{"name":"Primitive"},"license":"MIT","homepage":"https://primitive.finance","keywords":["Primitive","rmm","Ethereum","hardhat"],"repository":{"url":"git+https://github.com/primitivefinance/rmm-ethers.git","type":"git"},"description":"∇ Primitive RMM Protocol ethers-based implementation.","maintainers":[{"email":"alexangel.j@gmail.com","name":"alexangelj"}],"readme":"# 🍄 rmm-ethers\r\n\r\n![version](https://img.shields.io/npm/v/@primitivefi/rmm-ethers) ![npm](https://img.shields.io/npm/dt/@primitivefi/rmm-ethers) ![license](https://img.shields.io/npm/l/@primitivefi/rmm-ethers) ![stars](https://img.shields.io/github/stars/primitivefinance/rmm-ethers?style=social&color=%23FFB31A)\r\n\r\n> Easily connect and transact with RMM protocol.\r\n\r\n## 🧩 Features\r\n\r\n- 🌲 Deploy RMM protocol\r\n- ⚡️ Easily connect to an RMM deployment\r\n- 🌊 Create RMM pools\r\n- ☄️ Allocate or remove liquidity\r\n- 🎁 Transfer positions\r\n- 🔭 Read protocol data\r\n\r\n## 📦 Installation\r\n\r\n> This software is in Alpha. Use at your own risk. Only use the latest version.\r\n\r\nInstalling locally:\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/primitivefinance/rmm-ethers.git\r\n\r\n# Install dependencies\r\nyarn install\r\n```\r\n\r\nInstalling as a package:\r\n\r\n```bash\r\n# Using yarn\r\nyarn add @primitivefi/rmm-ethers\r\n\r\n# Or using npm\r\nnpm i @primitivefi/rmm-ethers\r\n```\r\n\r\nUse it by connecting with a signer or provider:\r\n\r\n```typescript\r\n// Import the EthersRmm class\r\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\r\n\r\n// Use the class by connecting to a deployment\r\nawait EthersRmm.connect(signerOrProvider)\r\n```\r\n\r\n## ✏️ Usage as a Package\r\n\r\nThis package is designed to extend the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk) package. The SDK has the entity models and interfaces that are used by rmm-ethers to send transactions.\r\n\r\n### 🪝 As a react hook:\r\n\r\nHere is an example of a React hook that makes use of web3-react and SWR:\r\n\r\n```typescript\r\nimport useSWR, { SWRResponse } from 'swr'\r\nimport { useWeb3React } from 'web3-react'\r\nimport { Signer } from '@ethersproject/abstract-signer'\r\nimport { EthersRmm } from '@primitivefi/rmm-ethers'\r\n\r\nfunction getEthersRmm(signerOrProvider: Signer | Provider): () => Promise<EthersRmm> {\r\n  return async () => await EthersRmm.connect(signerOrProvider)\r\n}\r\n\r\n/**\r\n * Connects to EthersRmm deployment from the connected provider or signer.\r\n */\r\nexport function useRmmProtocol(suspense = false): SWRResponse<EthersRmm, Error> {\r\n  const { library: signerOrProvider, chainId } = useWeb3React()\r\n  const shouldFetch = !!signerOrProvider && typeof chainId !== 'undefined'\r\n  const result = useSWR(\r\n    shouldFetch ? [signerOrProvider, 'ethers-rmm', chainId] : null,\r\n    getEthersRmm(signerOrProvider?.getSigner() as Signer),\r\n    {\r\n      dedupingInterval: 60 * 1000,\r\n      refreshInterval: 60 * 1000,\r\n      suspense,\r\n    },\r\n  )\r\n\r\n  return result\r\n}\r\n```\r\n\r\n### 🌊 Fetch a pool\r\n\r\n```typescript\r\nimport { Pool } from '@primitivefi/rmm-sdk'\r\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\r\n\r\nasync function getPool(poolId: string): Promise<Pool> {\r\n  return rmm.getPool(poolId).then(data => data)\r\n}\r\n```\r\n\r\n### ⚱️ Fetching pool liquidity positions\r\n\r\n```typescript\r\nimport { Pool } from '@primitivefi/rmm-sdk'\r\nimport { EthersRmm, Position } from '@primitivefi/rmm-ethers'\r\n\r\nasync function getPoolPosition(pool: Pool, account: string): Promise<Position> {\r\n  return rmm.getPosition(pool, account).then(data => data)\r\n}\r\n```\r\n\r\n## Adjusting Positions\r\n\r\nWhen allocating or removing liquidity, the arguments must match the respective interfaces, which live in the [rmm-sdk](https://github.com/primitivefinance/rmm-sdk):\r\n\r\n```typescript\r\n/** Flag to use a native currency in a transaction.  */\r\nexport interface NativeOptions {\r\n  useNative?: NativeCurrency\r\n}\r\n\r\n/** Recipient address of any tokens which are output from transactions. */\r\nexport interface RecipientOptions {\r\n  recipient: string\r\n}\r\n\r\n/** Timestamp which will revert the transaction if not yet mined. */\r\nexport interface Deadline {\r\n  deadline?: BigNumber\r\n}\r\n\r\n/** Permit details on either risky or stable tokens. */\r\nexport interface PermitTokens {\r\n  /** If defined, risky token can be permitted, saving the user an approve tx. */\r\n  permitRisky?: PermitOptions\r\n\r\n  /** If defined, stable token can be permitted, saving the user an approve tx. */\r\n  permitStable?: PermitOptions\r\n}\r\n\r\n/** Token amounts to use for depositing or withdrawing into a margin account.  */\r\nexport interface MarginOptions extends PermitTokens, RecipientOptions, NativeOptions {\r\n  amountRisky: Wei\r\n  amountStable: Wei\r\n}\r\n\r\n/** Token amounts to use for allocating liquidity. */\r\nexport interface LiquidityOptions {\r\n  /** Amount of risky tokens to provide as liquidity. */\r\n  delRisky: Wei\r\n  /** Amount of stable tokens to provide as Liquidity. */\r\n  delStable: Wei\r\n  /** Desired liquidity to mint. */\r\n  delLiquidity: Wei\r\n}\r\n\r\n/** Provide liquidity argument details. */\r\nexport interface AllocateOptions extends PermitTokens, LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\r\n  fromMargin: boolean\r\n  slippageTolerance: Percentage\r\n  createPool?: boolean\r\n}\r\n\r\n/** Remove liquidity argument details. */\r\nexport interface RemoveOptions extends LiquidityOptions, RecipientOptions, NativeOptions, Deadline {\r\n  additionalRisky: Wei\r\n  additionalStable: Wei\r\n  toMargin: boolean\r\n  slippageTolerance: Percentage\r\n}\r\n```\r\n\r\n### 🕳️ Allocating liquidity\r\n\r\n```typescript\r\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\r\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\r\n\r\nasync function onAllocate(rmm: EthersRmm, pool: Pool, options: AllocateOptions): Promise<PositionAdjustmentDetails> {\r\n  return rmm.allocate({ pool, options }).then(data => data)\r\n}\r\n```\r\n\r\n### 💎 Removing liquidity\r\n\r\n```typescript\r\nimport { Pool, AllocateOptions } from '@primitivefi/rmm-sdk'\r\nimport { EthersRmm, PositionAdjustmentDetails } from '@primitivefi/rmm-ethers'\r\n\r\nasync function onRemove(rmm: EthersRmm, pool: Pool, options: RemoveOptions): Promise<PositionAdjustmentDetails> {\r\n  return rmm.remove({ pool, options }).then(data => data)\r\n}\r\n```\r\n\r\n## 🧮 Usage locally\r\n\r\nBefore running any command, make sure to install dependencies:\r\n\r\n```bash\r\nyarn install\r\n```\r\n\r\n### Compile\r\n\r\nCompile the smart contracts with Hardhat:\r\n\r\n```bash\r\nyarn compile\r\n```\r\n\r\n### Test\r\n\r\nRun the Mocha tests:\r\n\r\n```bash\r\nyarn test\r\n```\r\n\r\n## 📃 Deploy RMM\r\n\r\nDeploy the protocol to a network:\r\n\r\n```bash\r\nyarn deploy --network nameOfNetwork\r\n```\r\n\r\nThis will call a hardhat task that deploys the RMM protocol contracts from a loaded signer and saves the addresses to `/deployments`.\r\n\r\nHere are the options for the `deploy` task:\r\n\r\n- `--defender` (optional): Flag to attempt to use an Open Zeppelin Defender Relay Signer, if it exists in the hardhat.config.ts file.\r\n- `--channel` (optional): Directory name in /deployments/ to save the deployment to.\r\n- `--gasPrice` (optinal): Price to pay for gas.\r\n- `--testweth` (optional): Only for test networks, allows specifying a WETH9 address.\r\n\r\n### Deploy Primitive Engines - Pair contracts\r\n\r\n```bash\r\nyarn deploy:engine --network nameOfNetwork\r\n```\r\n\r\nThis is a script that runs which requires two of the token addresses. Here is the script, which should be edited to suit the deployment needs:\r\n\r\n```typescript\r\nimport hre from 'hardhat'\r\nimport { Signer } from '@ethersproject/abstract-signer'\r\nimport { DefenderRelaySigner } from 'defender-relay-client/lib/ethers'\r\nimport { deployEngine } from '../utils/deployEngine'\r\n\r\ntype Signers = Signer | DefenderRelaySigner\r\n\r\nexport async function main() {\r\n  const signer: Signers = await hre.run('useSigner')\r\n\r\n  const rmm = await hre.connect(signer)\r\n  const chainId = rmm.connection.chainId\r\n  if (chainId === 1) throw new Error('Do not use this in prod!')\r\n\r\n  const risky = '0xc778417E063141139Fce010982780140Aa0cD5Ab' // rinkeby:WETH: FIX\r\n  const stable = '0x522064c1EafFEd8617BE64137f66A71D6C5c9aA3' // rinkeby:USDC: FIX\r\n\r\n  await deployEngine(rmm, risky, stable)\r\n}\r\n\r\nmain()\r\n  .then(() => process.exit(0))\r\n  .catch(error => {\r\n    console.error(error)\r\n    process.exit(1)\r\n  })\r\n```\r\n\r\n### 🪞 Deploy RMM Pools Script\r\n\r\n> Warning: Currently failing for node versions above 14.7.4. Unresolved promises are not handled in the higher node versions, and instead the process is exited with a non-zero error code.\r\n\r\n> Work in progress: This script is still being improved! Consider it an alpha version.\r\n\r\nDeploy pools in the config of the `deploy-pools.ts` script:\r\n\r\n```bash\r\nyarn deploy:pools --network nameOfNetwork\r\n```\r\n\r\nCreating RMM pools is a process that requires connecting to the protocol, fetching token metadata, and building the transaction's arguments. This script handles loading tokens from a saved pool deployment, located in `/deployments/*/pools.json`.\r\n\r\nAll the logic executed by a hardhat script must exist in the script file. Here is an example:\r\n\r\n```typescript\r\nimport hre from 'hardhat'\r\nimport { EthersRmm } from 'src/EthersRmm'\r\nimport { deployPools } from 'utils/deployPools'\r\nimport { poolDeployer } from 'utils/poolDeployer'\r\n\r\nexport async function main() {\r\n  const signer: Signers = await hre.run('useSigner')\r\n  const from = await signer.getAddress()\r\n\r\n  const rmm = await hre.connect(signer)\r\n\r\n  const chainId = rmm.connection.chainId\r\n\r\n  if (chainId === 1) throw new Error('Do not use this in prod!')\r\n\r\n  const deployer = new PoolDeployer(chainId, POOL_DEPLOYMENTS_SAVE, POOL_CONFIG_TO_DEPLOY, rmm)\r\n\r\n  await deployPools(deployer)\r\n}\r\n\r\nmain()\r\n  .then(() => process.exit(0))\r\n  .catch(error => {\r\n    console.error(error)\r\n    process.exit(1)\r\n  })\r\n```\r\n\r\n## 📌 Misc. Scripts\r\n\r\nGenerate documentation locally:\r\n\r\n```\r\nyarn docs\r\n```\r\n\r\nDeploy to a local ganache-cli instance:\r\n\r\n```\r\nyarn deploy:devnet\r\n```\r\n\r\nDelete a local deployment to ganache-cli:\r\n\r\n```\r\nyarn delete-dev-deployments\r\n```\r\n\r\n## 🛡️ Use with Open Zeppelin Defender Relays\r\n\r\nThe OZ Defender relayers are a safer way to execute transactions on-chain.\r\n\r\nThe `hardhat.config.ts` is extended to include OZ defender relay API key and secret:\r\n\r\n```typescript\r\ndefender: {\r\n    [chainIds.rinkeby]: {\r\n      apiKey: RELAY_RINKEBY_API || '',\r\n      apiSecret: RELAY_RINKEBY_SECRET || '',\r\n    },\r\n}\r\n```\r\n\r\nAdding this to the hardhat config will expose the relay signer through the task `useSigner`.\r\n\r\nThis task is currently only used in the `deployPools.ts` script, so pools can be deployed safely from the OZ defender relay.\r\n\r\n🖋️ `useSigner`\r\n\r\nIf this subtask is run from task run with a `--network` flag, and the network has an OZ relayer config in the hardhat config file, this task will return the `Signer` object for the relayer. Else, useSigner will default to the `ethers.getSigners()`. This subtask can be used in custom scripts so you can choose to use a relayer or a private key stored in `.env`.\r\n\r\n- `--i` (optional): Index of the signer to use from `ethers.getSigners()`\r\n\r\n## ⛑ Contribute\r\n\r\nFeel free to suggest changes by opening a pull request, or posting an issue. There is a dedicated `dev` channel in the [Primitive discord](https://discord.gg/primitive).\r\n\r\n## Credits\r\n\r\nInspired by [Liquity Ethers](https://github.com/liquity/dev/tree/main/packages/lib-ethers).\r\n","readmeFilename":"README.md"}