{"_id":"@abmprotocl/dtbtc","_rev":"1-5eba0a07299c50175913807dc0bfe4b0","name":"@abmprotocl/dtbtc","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@abmprotocl/dtbtc","version":"0.1.0","contributors":[],"description":"Library for interacting with the dotBtc coin sysm.","license":"MIT","keywords":["dotBtc","mkr","dai","cdp","eth","margin"],"bugs":{"url":"https://github.com/makerdao/dotbtc.js/issues","email":"wouter@makerdao.com"},"repository":{"type":"git","url":"git+https://github.com/makerdao/dotBtc.js.git"},"main":"dist/src/index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","scripts":{"build":"yarn clean && yarn build:cjs && yarn build:umd","build:umd":"webpack --config ../../webpack.config.js","build:cjs":"./scripts/build-backend.sh","clean":"rm -rf ./dist ./umd","testchain":"../../scripts/run-testchain.sh","coverage":"yarn test --coverage","test":"yarn testchain --ci jest --runInBand","test:debug":"yarn testchain --ci node --inspect-brk ../../node_modules/.bin/jest --runInBand","build:backend:watch":"sane ./scripts/build-backend.sh src --wait=10","build:backend:src:watch":"./scripts/watch-backend-src.sh","prepublishOnly":"yarn build","test:watch":"yarn test --watch","test:mainnet":"export NETWORK='mainnet' && jest --runInBand --config ./test/config/jestIntegrationConfig.json","test:kovan":"export NETWORK='kovan' && jest --runInBand --config ./test/config/jestIntegrationConfig.json","test:integration":"export NETWORK='test' && yarn test --config ./test/config/jestIntegrationConfig.json","test:build":"yarn test --config ./test/config/jestBuildConfig.json","repl":"../../node_modules/.bin/babel-node --experimental-repl-await scripts/repl.js"},"dependencies":{"@babel/runtime":"^7.3.4","@makerdao/currency":"0.9.9","@makerdao/multicall":"^0.11.0","@makerdao/services-core":"^0.9.9","@makerdao/test-helpers":"^0.2.1","assert":"^1.4.1","bignumber.js":"^7.2.1","chalk":"^2.4.1","debug":"^3.1.0","ethereumjs-util":"^5.2.0","ethers":"^3.0.15","ethers-web3-bridge":"0.0.1","eventemitter2":"^5.0.1","invariant":"^2.2.2","isomorphic-fetch":"^2.2.1","lodash":"^4.17.11","promise-props":"^1.0.0","rxjs":"^6.5.4","toposort":"^2.0.2","web3":"1.2.9","web3-provider-engine":"github:makerdao/provider-engine#kovan-fix-dist"},"engines":{"node":">=10.16"},"devDependencies":{"gray-matter":"^4.0.2"},"homepage":"https://github.com/makerdao/dotBtc.js#readme","directories":{"test":"test"},"author":{"name":"abmprotocol"},"_id":"@abmprotocl/dtbtc@0.1.0","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-2aqhLNPVMMT9szRNlPeNTU22vX8FfZzBLZ7tM1OzA2XSys/INUVRhcPgy9k5NfGYbrqiaZDNlJOoR55MXr0U6Q==","shasum":"1059de8912ef7c00b3ec545009cbb68a74198b13","tarball":"https://registry.npmjs.org/@abmprotocl/dtbtc/-/dtbtc-0.1.0.tgz","fileCount":105,"unpackedSize":12403498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVaDCCRA9TVsSAnZWagAAAQIP/RO/hNFH2v8+ZBvMv1BG\nYorP0MavTJ4Elavmwa5KkKEC0CULEID8siM0bNQbZpaepeXrssvbg1X2EoOK\nqqYdgouaNcKlr0B+kS47h7rH2Jh2lpFHwtq51y9T5Tqk0ODynVvhd9GFUZJC\nI1mZbQby7lQn2W41Wo0T9ilfQjgDr0F8hF/prtCFQfH7u02eBWDKx+ISq8Nl\n6Cv2BWPpb9q+VvrgNV6FGv0331GYK1IRyCKHIdJnC9aS+N1sGc6I6TZ1Lfcr\nOyABDwP+oJOuEqj7xfPCvT30bTjo6QdVLpHKErgGdnkvPwRHZxyeJ2JujLez\nEmFaXGzU6biDwCb2n5I0gnqtdBliqu0FMTZ2ISk0KAgpwRDQo94AnVLBPTfu\nxveotaQh7AxcrmGULsM3xNNz4pAB8Wp7PkmS9cmD9iQ8pJtPpchNbkb/Ha3f\nYtXCX3HjbKElsf9ixGewNkdFIRMHEeeRuXCOfP4paQm0F3E3caw7/hE3Vgno\nAB2CqicggE5D1S2FoC8Z234l28KfxSQNn9XS6o5vfdwgUCvplDXQX5CsFF5A\n6t2z3o7Wmb7laHPCRNFQC0F7uUH0EQYpy93mA2UhxeVuzsbjvvYJkTICTQGd\nc70EFZ0MJlGHdVHOYsrkQQifqY/MzQHOLPEe/zPqHJtG/O5PFWG4agK/fUqy\naY7M\r\n=zYTq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0dV+td4Z7gJQTxgsKLJa3IrrMGKpOaG600SP63J3nHgIgEEAGYezenvNl525Qe4YedA9TuAJpNB+X+67B7t3nGGY="}]},"_npmUser":{"name":"abmprotocl","email":"abmprotocol@gmail.com"},"maintainers":[{"name":"abmprotocl","email":"abmprotocol@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dtbtc_0.1.0_1616224449853_0.667526890975012"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-20T07:14:09.813Z","0.1.0":"2021-03-20T07:14:10.084Z","modified":"2022-04-04T10:59:58.038Z"},"maintainers":[{"name":"abmprotocl","email":"abmprotocol@gmail.com"}],"description":"Library for interacting with the dotBtc coin sysm.","homepage":"https://github.com/makerdao/dotBtc.js#readme","keywords":["dotBtc","mkr","dai","cdp","eth","margin"],"repository":{"type":"git","url":"git+https://github.com/makerdao/dotBtc.js.git"},"contributors":[],"author":{"name":"abmprotocol"},"bugs":{"url":"https://github.com/makerdao/dotbtc.js/issues","email":"wouter@makerdao.com"},"license":"MIT","readme":"# Dai.js\n\n[![GitHub License][license]][license-url]\n[![NPM][npm]][npm-url]\n[![Build Status][build]][build-url]\n[![Coverage Status][cover]][cover-url]\n[![Bundle Size][bundle]][bundle-url]\n\n**Dai.js** is a JavaScript library that makes it easy to build applications on top of [MakerDAO][makerdao]'s Dai Stablecoin System. You can use Maker's contracts to open Collateralized Debt Positions, withdraw loans in Dai, trade tokens on OasisDEX, and more.\n\nThe library features a pluggable, service-based architecture, which allows users maximal control when integrating the Maker functionality into existing infrastructures. It also includes convenient configuration presets for out-of-the-box usability, a powerful smart contract state inspector, and support for both front-end and back-end applications.\n\nMaker's entire suite of contracts will eventually be accessible through this library—including the DAO governance and the upcoming multi-collateral release—but functionality is limited in the current alpha version to the following areas:\n\n- Opening and shutting CDPs\n- Locking and unlocking collateral\n- Withdrawing and repaying Dai\n- Automated token conversions\n- Token contract functionality for WETH, PETH, MKR, Dai, and ETH\n- Buying and selling MKR and Dai with built-in DEX integration\n\n## Usage\n\nUse NPM or Yarn to install the library:\n\n```\nnpm install @makerdao/dai\n```\n\nThen include it:\n\n```js\nimport Maker from '@makerdao/dai';\n// or:\nconst Maker = require('@makerdao/dai');\n```\n\nExample for transferring Dai:\n\n```js\nimport Maker from '@makerdao/dai';\nconst maker = Maker.create('test');\nawait maker.authenticate();\n\ntransferDai(address, amount) {\n  const dai = maker.service('token').getToken('DAI');\n  return dai.transfer(address, amount);\n }\n```\n\nExample for using CDPs:\n\n```js\nimport Maker from '@makerdao/dai';\nconst maker = Maker.create('test');\nawait maker.authenticate();\nconst cdp = await maker.openCdp();\nconst info = await cdp.getInfo();\nconsole.log(info);\n```\n\nFor full documentation, please refer to [docs.makerdao.com](https://docs.makerdao.com/dai.js).\n\nFor example code that consumes the library, check out [this repository](https://github.com/makerdao/integration-examples).\n\n## Developing\n\n1. `git clone https://github.com/makerdao/dai.js`\n2. `yarn install`\n3. Install testchain - `git submodule update --init --recursive`\n4. Install [dapptools](https://dapp.tools/) - `curl https://dapp.tools/install | sh`\n\n### Running the unit tests\n\nThe test suite is configured to run on a Ganache test chain. Before running the tests with `yarn test`, the test chain will start from a snapshot that has the Maker contracts deployed to it.\n\nIf you want to re-run the tests whenever you make a change to the code, use `yarn test:watch`.\n\nIf you want to start a test chain and leave it running, use `yarn test:net`.\n\n### Running the integration tests\n\nThere are also automated tests that send transactions through either the Kovan test network or the Ethereum main network. To use them, first set your private key for the appropriate network to an environment variable:\n\n`export PRIVATE_KEY=\"0x...\"`\n\nThen, use either `yarn test:kovan` or `yarn test:mainnet` to run the tests.\n\nSince these networks run much more slowly than Ganache, you might want to set the debug environment variable (in order to see some relevant output along the way):\n\n`export DEBUG=\"dai:testing\"`\n\nYou can also run these tests on the local test network with the command `yarn test:integration`.\n\n### Handling changes to contract code\n\nIf you have deployed contract code changes to the testchain, run `scripts/install-testchain-outputs.sh` to copy any updated ABI files and contract addresses to their expected locations.\n\n### Commands\n\n- `yarn build:cjs` - create a commonJS build in `dist` folder\n- `yarn build:umd` - create a UMD build in `umd` folder\n- `yarn lint` - run an ESLint check\n- `yarn coverage` - run code coverage and generate report in the `coverage` folder\n- `yarn test` - start a test chain and run all tests\n- `yarn test:watch` - start a test chain and run all tests in watch mode\n- `yarn test:net` - just start a test chain\n- `yarn test:kovan` - run integration tests on Kovan\n- `yarn test:mainnet` - run integration tests on mainnet\n- `yarn test:integration` - run integration tests on Ganache\n\n## Changelog\n\n### 0.17.0\n\n- **BREAKING CHANGE**: Importing a file directly from the package must now be done by\n  prefixing the path with `dist`. E.g. `/contracts/addresses/kovan.json` now becomes\n  `/dist/contract/addresses/kovan.json`.\n\n## License\n\n**Dai.js** is available under the MIT license included with the code.\n\n[npm]: https://img.shields.io/npm/v/@makerdao/dai.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@makerdao/dai\n[tests]: http://img.shields.io/travis/makerdao/dai.js.svg\n[tests-url]: https://travis-ci.org/makerdao/dai.js\n[license]: https://img.shields.io/badge/license-MIT-blue.svg\n[license-url]: https://github.com/makerdao/dai.js/blob/dev/LICENSE\n[build]: https://travis-ci.com/makerdao/dai.js.svg?branch=dev\n[build-url]: https://travis-ci.com/makerdao/dai.js\n[cover]: https://codecov.io/gh/makerdao/dai.js/branch/dev/graph/badge.svg\n[cover-url]: https://codecov.io/github/makerdao/dai.js?branch=dev\n[bundle]: https://badgen.net/bundlephobia/min/@makerdao/dai\n[bundle-url]: https://bundlephobia.com/result?p=@makerdao/dai\n[makerdao]: https://makerdao.com\n[wiki]: https://github.com/makerdao/dai.js/wiki\n","readmeFilename":"README.md"}