{"_id":"@aloe2/statics","name":"@aloe2/statics","dist-tags":{"aloe-bbc82c9c9":"7.0.20228282226","latest":"7.0.20228282226"},"versions":{"7.0.20228282226":{"name":"@aloe2/statics","version":"7.0.20228282226","description":"dependency-free static configuration for the bitgo platform","main":"./dist/src/index.js","types":"./dist/src/index.d.ts","scripts":{"test":"yarn unit-test","unit-test":"nyc -- mocha","build":"yarn tsc --build --incremental --verbose .","fmt":"prettier --write .","check-fmt":"prettier --check .","clean":"rm -r ./dist","prepare":"npm run build"},"author":{"name":"BitGo SDK Team","email":"sdkteam@bitgo.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/BitGo/BitGoJS.git","directory":"modules/statics"},"devDependencies":{"nyc":"^15.0.0"},"lint-staged":{"*.{js,ts}":["yarn prettier --write","yarn eslint --fix"]},"publishConfig":{"access":"public"},"nyc":{"extension":[".ts"]},"gitHead":"ff34e1949ea30d3016d4a8e17d459eee4436eda5","bugs":{"url":"https://github.com/BitGo/BitGoJS/issues"},"homepage":"https://github.com/BitGo/BitGoJS#readme","_id":"@aloe2/statics@7.0.20228282226","_nodeVersion":"14.18.0","_npmVersion":"lerna/5.5.0/node@v14.18.0+x64 (darwin)","dist":{"integrity":"sha512-Tvfo7YxSJMNP0z0tKNzZkU7t0XsnrX0KgRnAxTk4T7hCHQ3GY0qUC+6oTNTpdn1S58Opd2kJlf4J8PxHQ258qQ==","shasum":"a86c60b5315200cd5f0a663500556fc1fed8cab1","tarball":"https://registry.npmjs.org/@aloe2/statics/-/statics-7.0.20228282226.tgz","fileCount":64,"unpackedSize":8830298,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHPHyTtD82MhNz4kg2JGSpCjQt8QVBQivx6e6ZaPazjjAiBBOMbmrx77jSm4Gw7ew0CekX+adsdYLP/mKmkZjEXy1A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNS5SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnBg//ZoeLdeL4bVUoKESEdHwxCTaOZmUc6cf8ax7fX78gpqlPqolS\r\nxjg6JBQUCGWF/kSL8org4QU45DHuBwv4DFneAhk93jj6TWlQXaTjTr3pdDjG\r\n6SJQusu94P+UGGAI3PsRYFFX0crzM4/VQy2X3oYAU+f1t1nDIEA5h9y+ON/P\r\nAYQB1NPoZIlBB5huD58xaYLhVuHVZC9B5DnD+0+rgQh/SOCZP0d9C6dLfy7S\r\nHF4f3gBMhAkXOPhyBsSTXuTDfcPMHqtyXKzT1RWzyuv3ioSWk4hzkcXM4lwk\r\n0eTM62/VCNWAIvgiADkOChtWq+JtAC9oZh0BXroHZ1rzTLcuhEhu91vCJ/vG\r\naImiEY14sEZo1OUKCZng3M1rw9RDY6ZJo3LWSo/fBZ39co7AZNcv871BuLlQ\r\nup7zUZslYnDKFAiUx6XQqg7WV+AOhZVV4oLljz/qZMvauvldNsH/KZtlywI/\r\njspX0T722wNhozZda9B/pygxLss5xN/0J9Pn0mQslEHsfhEvBVDjjLrpeBnZ\r\nkFODQxFB0CoF98L6+qS3feb+Jq3kKrEq0Il50Y5pUZhNBMtXC7bViYdXPoTz\r\nijsy7x2z5h9I23Yv0c/U5Xse4F7lrEgFG33UbB1O8M5ACl0TQytPHfPhuv7u\r\nClbmgfijoCv8/lwYtZWGxHKGLKaD6V4MbGQ=\r\n=vmqO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaronloe","email":"aaronloe@gmail.com"},"directories":{},"maintainers":[{"name":"aaronloe","email":"aaronloe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/statics_7.0.20228282226_1664429650082_0.062335227502435586"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-29T05:34:09.963Z","7.0.20228282226":"2022-09-29T05:34:10.315Z","modified":"2022-09-29T05:34:10.483Z"},"maintainers":[{"name":"aaronloe","email":"aaronloe@gmail.com"}],"description":"dependency-free static configuration for the bitgo platform","homepage":"https://github.com/BitGo/BitGoJS#readme","repository":{"type":"git","url":"git+https://github.com/BitGo/BitGoJS.git","directory":"modules/statics"},"author":{"name":"BitGo SDK Team","email":"sdkteam@bitgo.com"},"bugs":{"url":"https://github.com/BitGo/BitGoJS/issues"},"license":"Apache-2.0","readme":"<h1 style=\"text-align: center;\">\n  <pre>@bitgo/statics</pre>\n</h1>\n<h3 style=\"text-align: center;\">\n  Static config for the BitGo platform\n</h3>\n\n## Goals\n\n- Provide an \"encyclopedia\" of all relevant constants which are sprinkled throughout the BitGo stack.\n- Separate _static_ config data from _dynamic_ config data\n- Strong typing for static config properties, with full type information for configuration items\n- Ability to export static configuration as JSON for consumption by non-javascript projects\n\n## Examples\n\n### Get the number of decimal places in a Bitcoin\n\n#### JavaScript\n\n```js\nconst { coins } = require('@bitgo/statics');\n\nconst btc = coins.get('btc');\nconsole.log(btc.decimalPlaces);\n```\n\n#### TypeScript\n\n```typescript\nimport { coins } from '@bitgo/statics';\n\nconst btc = coins.get('btc');\nconsole.log(btc.decimalPlaces);\n```\n\n### Get the contract address for the OmiseGo ERC20 Token\n\n#### JavaScript\n\n```js\nconst { coins } = require('@bitgo/statics');\n\nconst omg = coins.get('omg');\nconsole.log(omg.contractAddress);\n```\n\n#### TypeScript\n\n```typescript\nimport { coins, Erc20Coin } from '@bitgo/statics';\n\nconst omg = coins.get('omg');\nif (omg instanceof Erc20Coin) {\n  console.log(omg.contractAddress);\n}\n```\n\n### List full names of all defined coins\n\n#### JavaScript\n\n```js\nconst { coins } = require('@bitgo/statics');\n\ncoins.forEach((coin) => {\n  console.log(coin.fullName);\n});\n```\n\n#### TypeScript\n\n```typescript\nimport { coins } from '@bitgo/statics';\n\ncoins.forEach((coin) => {\n  console.log(coin.fullName);\n});\n```\n\n## Repo Status\n\n- UTXO and account base types are defined\n- Documentation is mostly source code comments and README examples\n- This library can be depended on, but expect some changes going forward\n\n## Project Structure\n\n- `src/base.ts`: Interfaces and enums used by coin implementation classes.\n- `src/coins.ts`: Coin definitions.\n- `src/networks.ts`: Network interfaces and implementation classes.\n- `src/utxo.ts`: Unspent Transaction Output (UTXO) based coin classes and factory function.\n- `src/account.ts`: Account-based coin classes and factory methods. Includes ERC20 factory functions.\n- `src/errors.ts`: Custom Error classes.\n\n## Installation + Building\n\nTo install the project locally, run the following steps:\n\n```\n$ # clone the project locally\n$ git clone git@github.com:BitGo/statics.git\n\n$ # npm install dependencies (optionally use node >8.6.0)\n$ # (optionally) nvm install 8.6.0 -- required to run the linter which is executed pre-commit\n$ # (optionally) nvm use 8.6.0\n$ npm install\n```\n\nTo build the project (from TypeScript to JavaScript):\n\n```\n$ npm run build\n```\n\nThis builds the JavaScript and adds it to `dist/src/`. You will receive compilation errors if you have invalid syntax.\n\n## Tests\n\nTo run tests:\n\n```\n$ npm run test\n```\n","readmeFilename":"README.md"}