{"_id":"@atomicloans/eth-contracts","_rev":"2-e24a3380e16d3025b6d56a7c959d9492","name":"@atomicloans/eth-contracts","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@atomicloans/eth-contracts","version":"0.1.0","dependencies":{"@liquality/crypto":"0.4.11","@liquality/ethereum-utils":"0.4.11","@mblackmblack/bitcoinjs-lib":"5.1.6","@mblackmblack/to-seconds":"^0.1.0","@summa-tx/bitcoin-spv-sol":"^2.1.0","axios":"^0.19.0","bignumber.js":"^9.0.0","decimal.js":"^10.2.0","dotenv":"^8.1.0","is-ci":"^2.0.0","lodash":"^4.17.13","openzeppelin-solidity":"^2.2.0","truffle":"5.1.5","truffle-contract":"^4.0.29","truffle-hdwallet-provider":"^1.0.9","truffle-plugin-verify":"^0.3.3","web3":"^1.2.1"},"scripts":{"test":"truffle test --timeout 600000","test:funds":"truffle test ./test/funds.js","test:loans":"truffle test ./test/loans.js","test:sales":"truffle test ./test/sales.js","test:compound":"truffle test ./test/compound.js","test:alcompound:js":"truffle test ./test/alcompound.js","test:alcompound:sol":"truffle test ./test/TestALCompound.sol","test:alcompound":"truffle test ./test/alcompound.js ./test/TestALCompound.sol","test:bytes":"truffle test ./test/bytes.js","test:e2e":"truffle test ./test/e2e.js","test:interest_increase":"truffle test ./test/interestIncrease.js","test:interest_decrease":"truffle test ./test/interestDecrease.js","test:spv":"truffle test ./test/spv.js","test:p2wsh":"truffle test ./test/p2wsh.js","coverage":"truffle run coverage","build-contracts":"sol-merger \"./contracts/*.sol\" ./build"},"devDependencies":{"@atomicloans/loan-bundle":"0.3.5","@atomicloans/provider":"0.3.5","@codechecks/client":"^0.1.5","@liquality/bundle":"0.4.11","bitcoinjs-lib":"^5.1.3","chai":"^4.2.0","chai-bignumber":"^3.0.0","chai-bn":"^0.2.0","coveralls":"^3.0.5","eth-gas-reporter":"0.2.14","openzeppelin-test-helpers":"^0.5.0","solidity-coverage":"0.7.0"},"gitHead":"88eaf91385e71a6048d0a1545d011bedcba1c498","description":"[![Build Status](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts.svg?branch=master)](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts) [![Coverage Status](https://coveralls.io/repos/github/AtomicLoans/atomicloans-eth-contracts/badge","_id":"@atomicloans/eth-contracts@0.1.0","_nodeVersion":"8.12.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-c8vqERvzsECJe8sRudehZn7GMdeKSbATVvRTp5oP8vWVfJjMRn8Y5xuZcsqdIZVjtdYPSWHQnT+KIuID/usgYw==","shasum":"9f8189e9bc89102c085fdb7f48699bbada7d7ac8","tarball":"https://registry.npmjs.org/@atomicloans/eth-contracts/-/eth-contracts-0.1.0.tgz","fileCount":76,"unpackedSize":811898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF65ICRA9TVsSAnZWagAA+lMP/1Rdpv/AlS22di0TgtuK\nZV6FY/BW28zdMC0PcDouMIXJmWe2w+J3eO1glBFUuaxBqObQhT1ul5R65BlX\nW2117nHPpYJNEkGG2OOyDFbhWmbE1E5TYcqp+PzkYZQOHAHpABJounj3L8jh\ndh7DpZgy/+24qHUSi9UNzU8Ee1zYU00zk/3qluBY+JdV412E+ZTtDGhn730/\nlQzy7JE0GST66Vk7ym+yAQG1+MR33lyvpSIxiH4HAJhwrRh4+ONVLRdwY93V\nn0LOzfJagnYIqz9PY9TQE7IUHNPcfksaPM9Apre5budBPjzSCXD841pm0owY\nrxtzG+vdez48SvUC19vR+0G6jc2HfqDAPANQLVgHptpMli18+BUwtrnNECQ0\nNVwsrGd3GT04RZKGJHCDLejvdBCseJNiyFW/O93PuQ9crqKQe3gUKFBRopjv\nSf4LzoxF56Isk35qc8z5KjZ4STWfqhpY3Fok5+89Yc5Z9NbTXTD5kUXJIbZ8\ntm6/B5jXtrRzmpVmQgbMKzqIZH+upzVBZ0SiZisbymcGPROafG546WLOKW1E\nXd8rB58q2gP96Te3d0lzZa2qY9tTnJEaWpgNgWV7Kwr8oH1NNI8GvKkX/sf9\noxemlwZU+9ta0A8gDHneqdyiX/E/mL7XvwUv7O0hKUQyXEjsEpxkFvZnXRdv\n/d5E\r\n=pVt1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFx3JvB+Vc112whphYoZAr1gtUJ4Yp2TNbkBpgme+k5zAiEA8gZWDc/bzvRiUSATX2IjJfzGR8jGCpwLtMT8bl+LVwI="}]},"maintainers":[{"name":"mblackmblack","email":"mblackmblackmblack@gmail.com"}],"_npmUser":{"name":"mblackmblack","email":"mblackmblackmblack@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eth-contracts_0.1.0_1578610248228_0.7183003762883775"},"_hasShrinkwrap":false},"0.1.1":{"name":"@atomicloans/eth-contracts","version":"0.1.1","dependencies":{"@liquality/crypto":"0.4.11","@liquality/ethereum-utils":"0.4.11","@mblackmblack/bitcoinjs-lib":"5.1.6","@mblackmblack/to-seconds":"^0.1.0","@summa-tx/bitcoin-spv-sol":"^2.1.0","axios":"^0.19.0","bignumber.js":"^9.0.0","decimal.js":"^10.2.0","dotenv":"^8.1.0","fs":"^0.0.1-security","is-ci":"^2.0.0","lodash":"^4.17.13","openzeppelin-solidity":"^2.2.0","truffle":"5.1.5","truffle-contract":"^4.0.29","truffle-hdwallet-provider":"^1.0.9","truffle-plugin-verify":"^0.3.3","web3":"^1.2.1"},"scripts":{"test":"truffle test --timeout 600000","test:funds":"truffle test ./test/funds.js","test:loans":"truffle test ./test/loans.js","test:sales":"truffle test ./test/sales.js","test:compound":"truffle test ./test/compound.js","test:alcompound:js":"truffle test ./test/alcompound.js","test:alcompound:sol":"truffle test ./test/TestALCompound.sol","test:alcompound":"truffle test ./test/alcompound.js ./test/TestALCompound.sol","test:bytes":"truffle test ./test/bytes.js","test:e2e":"truffle test ./test/e2e.js","test:interest_increase":"truffle test ./test/interestIncrease.js","test:interest_decrease":"truffle test ./test/interestDecrease.js","test:spv":"truffle test ./test/spv.js","test:p2wsh":"truffle test ./test/p2wsh.js","coverage":"truffle run coverage","build-contracts":"sol-merger \"./contracts/*.sol\" ./build"},"devDependencies":{"@atomicloans/loan-bundle":"0.3.5","@atomicloans/provider":"0.3.5","@codechecks/client":"^0.1.5","@liquality/bundle":"0.4.11","bitcoinjs-lib":"^5.1.3","chai":"^4.2.0","chai-bignumber":"^3.0.0","chai-bn":"^0.2.0","coveralls":"^3.0.5","eth-gas-reporter":"0.2.14","openzeppelin-test-helpers":"^0.5.0","solidity-coverage":"0.7.0"},"gitHead":"006ee94aecf3a1cfac31696319ba1125a59d794f","description":"[![Build Status](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts.svg?branch=master)](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts) [![Coverage Status](https://coveralls.io/repos/github/AtomicLoans/atomicloans-eth-contracts/badge","_id":"@atomicloans/eth-contracts@0.1.1","_nodeVersion":"8.12.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-t68uXAscWoS3cdTD3cPI3KqPowzhLhFrgfP+dFEZAg0DuQOu5erjPjyTw9hzQ5N4sQ5G8pNzIfgUtYtqMgssGw==","shasum":"837e7713f1f7a05073d1a345861e0491e4aab784","tarball":"https://registry.npmjs.org/@atomicloans/eth-contracts/-/eth-contracts-0.1.1.tgz","fileCount":76,"unpackedSize":812639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeF9XCCRA9TVsSAnZWagAADFIQAJqC0XAWW5OE5BL1E7xd\n83x/gTmNmGFSQHg8dJ7o0VWq73AiKSgKIz3TwYy5EPIW472eDeXfJ3h4XGl9\nASbOQXUeGTdTwb5LhkUgLEnzEIfk7birVOVyODIR+iPhGG8QTzANyRXt77+L\nlOt4tALiWieuYNx9DwJa+4qnuXnKCJMyBjOoCyUynHzpOWwCPN8PIGi38CA4\n/kJe1zQtd2pfxb5CqfOq09c/guS5CNnqxD8IkuoEB3pJFBsJfK+/ylw9H8e+\nVp2DnM+OSl5CModrOYu3IEY5STkQafKY+KPxplzcfmJS1UZ+rCvNvVzK0w9H\ntfCEzelBm6d609TzirmQf0T9v0zrApfj719pMQVdb91xNBP9J049sheGfzx5\nDHJiFO5/fYseXcobjbqWvzGNAQ3BgrR5nU93WSyKou4nA5QnqJtxZneFdCwX\nWnAkfmfl+7pCY/YkXSQgbsKT+3lEgD9UOF+vY0oo9D021O7l4Zzo9VwTINrr\nx7MbsjkcEJIeL6SE7e6+NH5lzkaTAyMnW5myV6VuSYaCTThKaIv1GR+q0d43\nXXkp99MJ24/La5+wl1vYQmsQ+9KqkYC6VCp432kgDt4zOMili4u1TwWcWrxG\nGxqGWjQXEAvE8m81uuRFboO3IEGrmgxeeP2u8rtyaKB4CelFcSHGYrGY6IpF\nQRZr\r\n=sH90\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGI1pQZpIXdNOAQjA7hkN0Pgi2ydDe5QdUqWudZeBNnlAiEA2OVcInf5oD6J0tZMv/R/uxEruIy7yWhRP/034xOhT54="}]},"maintainers":[{"name":"mblackmblack","email":"mblackmblackmblack@gmail.com"}],"_npmUser":{"name":"mblackmblack","email":"mblackmblackmblack@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eth-contracts_0.1.1_1578620353698_0.717646702219487"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-09T22:50:48.034Z","0.1.0":"2020-01-09T22:50:48.346Z","modified":"2022-04-04T16:15:05.440Z","0.1.1":"2020-01-10T01:39:13.967Z"},"maintainers":[{"name":"mblackmblack","email":"mblackmblackmblack@gmail.com"}],"description":"[![Build Status](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts.svg?branch=master)](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts) [![Coverage Status](https://coveralls.io/repos/github/AtomicLoans/atomicloans-eth-contracts/badge","readme":"\n# Atomic Loans Ethereum Contracts\n\n[![Build Status](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts.svg?branch=master)](https://travis-ci.org/AtomicLoans/atomicloans-eth-contracts)\n[![Coverage Status](https://coveralls.io/repos/github/AtomicLoans/atomicloans-eth-contracts/badge.svg)](https://coveralls.io/github/AtomicLoans/atomicloans-eth-contracts)\n[![MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](./LICENSE.md)\n[![Telegram](https://img.shields.io/badge/chat-on%20telegram-blue.svg)](https://t.me/Atomic_Loans)\n[![Greenkeeper badge](https://badges.greenkeeper.io/AtomicLoans/atomicloans-eth-contracts.svg)](https://greenkeeper.io/)\n\nLoan Contracts\n\n## How to run\n\n### Requirements\n\n- Git\n- Node.Js\n- Truffle\n\nSteps:\n\n```\ngit clone https://github.com/AtomicLoans/ethereum-contracts.git\ncd ethereum-contracts\nnpm install\n```\n\nNow run the tests:\n\n`truffle test`\n\n## License\n\nMIT\n\n## Glossary\n\n### `Fund`\n```\nActions:\n\n   create            create new loan fund\n   deposit           post additional toks to fund\n   generate          generate secret hashes for loan fund\n   request           request loan from fund\n   withdraw          withdraw unused funds from the loan fund\n   update            update loan fund request details\n\n\nGetters:\n\n   arbiter             optional automated arbiter\n   balance             amount of unused funds deposited in loan fund\n   lender              loan fund owner\n   fee                 optional automation fee\n   interest            interest rate\n   liquidationRatio    liquidation ratio\n   maxLoanAmt          max loan amount\n   maxLoanDur          max loan duration\n   minLoanAmt          min loan amount\n   minLoanDur          min loan duration\n   penalty             liquidation penalty\n   token               debt token\n\n\nVars:\n\n   fundIndex           get the last fund id\n   pubKeys             address pubkeys\n   secretHashes        address secret hashes\n   secretHashIndex     address secret hash index\n\n```\n\n\n### `Loan`\n```\nActions:\n\n   accept                accept loan and remove funds\n   approve               approve locking of collateral\n   cancel                cancel loan and remove funds\n   create                create new loan\n   fund                  fund loan\n   liquidate             liquidate loan collateral in case of loan position being not safe or default\n   refund                refund debt repayment \n   repay                 repay debt\n   setSecretHashes       set secret hashes for loan\n   withdraw              withdraw loan\n\n\nGetters:\n\n   acceptExpiration      acceptance expirataion\n   arbiter               optional automation arbiter address\n   approveExpiration     approval expiraation\n   liquidationExpiration liquidation expiration\n   borrower              borrower address\n   collateral            collateral amount\n   collateralValue       current collateral value\n   fee                   optional fee paid to automator arbiter if address not 0x0\n   interest              loan interest rate\n   lender                lender address\n   liquidationRatio      liquidation ratio\n   minCollateralValue    minimum collateral value to be safe\n   off                   loan repayment accepted or loan cancelled\n   owedForLiquidation    deductible amount from collateral in the case of liquidation\n   owedForLoan           principal + interest + fee\n   owedToLender          amount lent by lender\n   penalty               liquidation penalty in case not safe or defaulted\n   principal             loan principal\n   pushed                loan funded\n   repaid                amount paid back for loan\n   safe                  loan is safe from liquidation\n\n\nVars:\n\n   fundIndex             loan fund index\n   loanIndex             get the last loan id\n   repayments            amount of loan paid back\n   \n```\n\n### `Sales`\n```\nActions:\n\n   accept                withdraw discountBuy (accept discountBuy and disperse funds to rightful parties)\n   create                create new liquidation (can only be called by loan)\n   provideSecret         provide secret\n   provideSig            provide signature to move collateral to collateral swap\n   refund                refund discountBuy\n\n\nGetters:\n\n   accepted              discountBuy accepted\n   arbiter               optional automated arbiter\n   arbiterSigs           arbiter refundable and seizable signatures\n   discountBuy           discount purchase of collateral by liquidator\n   liquidator            address of individual that liquidates the loan position when it's not safe\n   borrower              address borrower\n   borrowerSigs          borrower refundable and seizable signatures\n   hasSecrets            2 of 3 secrets from bor, lend, and arbiter are correct\n   lender                address lender\n   lenderSigs            lender refundable and seizable signatures\n   next                  get the last liquidation id by loan\n   pubKeyHash            liquidator pubkeyhash\n   salesExpiration       sales expiration\n   secretA               Secret A\n   secretB               Secret B\n   secretC               Secret C\n   secretD               Secret D\n   secretHashA           Secret Hash A\n   secretHashB           Secret Hash B\n   secretHashC           Secret Hash C\n   secretHashD           Secret Hash D\n   settlementExpiration  liquidation settlement expiration\n   \n   \nVars:\n\n   saleIndexByLoan       loan liquidation (find by loanIndex)\n\n```\n\n","readmeFilename":"README.md"}