{"_id":"@1coinnetwork/node-types","_rev":"3-b9a3d5a4dc1107ec773ba83b5b0858d2","name":"@1coinnetwork/node-types","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@1coinnetwork/node-types","version":"1.0.0","description":"Type definitions for coinnet chain.","main":"dist/src/index.js","engines":{"node":">=14.0.0"},"dependencies":{},"devDependencies":{"@polkadot/api":"^4.12.1","@polkadot/typegen":"^4.12.1","ts-node":"^8.6.2","typescript":"^4.0.5"},"scripts":{"generate":"yarn generate:defs && yarn generate:meta","generate:defs":"ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package '.' --input ./src/interfaces","generate:meta":"ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --package '.' --endpoint ./coinnet.json --output ./src/interfaces","build":"tsc","test":"echo \"Error: no test specified\" && exit 1","lint":"tsc --noEmit --pretty"},"repository":{"type":"git","url":"git+https://github.com/1coinnetwork/node-types.git"},"author":{"name":"jake@commonwealth.im"},"license":"ISC","bugs":{"url":"https://github.com/1coinnetwork/node-types/issues"},"homepage":"https://github.com/1coinnetwork/node-types#readme","gitHead":"43d62632d2f98826750232f144ee543791e8f873","_id":"@1coinnetwork/node-types@1.0.0","_nodeVersion":"14.17.1","_npmVersion":"7.19.0","dist":{"integrity":"sha512-116i3rZ8b78wh8Kq5AFRyZ0ZAZCs/tMh0/INn+bYnvU1k9P81Ehg2ougZXy64+8UitQfU96iqhN5ogiNHSgp6w==","shasum":"74ddba1d783762458c5334be1d7c224d29396ed1","tarball":"https://registry.npmjs.org/@1coinnetwork/node-types/-/node-types-1.0.0.tgz","fileCount":2,"unpackedSize":4115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLWNOCRA9TVsSAnZWagAAHkEQAIXryxfkDVXLtNYSuSAl\nDQHPp2PBM1lkApnpZYwj4wKyfbpgiW5BapAgHLNRLalw3vRLo9mphOLuNJ+N\nocoAveobbSDE+d3oSenpKXQXOgjZfy8lveTFRRw6mOMTMzSYR4nV/Gq1eOGS\nefRMjCoHJmb6t1UEIMxZRfVab9xLyV6IV1KVAjHejqSLs3kcIzoBIeNLTsmf\nyZcq/KJFwley2KHqmqNbG9swTJqXdOJjbwpbJiPM4F+L2nitQKdBJt5DfyFq\nRiIrvP1oDH1olCU6XthoqabYprrzIDmnr9v/53G01f8x3HmbKyR1JOVxugC0\nzQXbnZsvvsgU3XiYgr9IS0m/SUT3ks3zC9etfWNHCHUyI5QJz0Q/VldONMrN\nKWgRNkc30neWS9WXcXWGHIny7kKrRxqMXQGaVG8sbsoWvK19w2lVVu3RuaCl\nc5955D63MXLVRLkkFs3QZJUseT6YlnaZe0HYbHqXSe5U8IiFHtFQ/eH4DYF/\nl526H4hGZr+QHfPCku5hJnP9XryI3e7+wL63GpzXr9h6SFDX1asrc9M6t41u\nLL9oWv1wfa0Yu5WT0rewQ53qUKYh0Oj71gHsmq/2vKxYG9k/iax3RA9Kisd/\nrAX9mfbLQvvrNeNn5rX91FGS00j13oDWb1kiLHYKor/6boJ9VhMvoB3r+zsZ\nsE/R\r\n=Noex\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhwCXkCOHqfP4mGsvgwQ8vC7zln2TJXkeSNSgxrds/9AiBJICXoyGyO/0bfLoHs5uERqbIwUx/dZ/hSqny4/WSGDQ=="}]},"_npmUser":{"name":"1coinassets","email":"aaron@1coin.io"},"directories":{},"maintainers":[{"name":"1coinassets","email":"aaron@1coin.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-types_1.0.0_1630364493672_0.9798278164558154"},"_hasShrinkwrap":false},"1.0.1":{"name":"@1coinnetwork/node-types","version":"1.0.1","description":"Type definitions for coinnet chain.","main":"dist/src/index.js","engines":{"node":">=14.0.0"},"dependencies":{},"devDependencies":{"@polkadot/api":"^4.12.1","@polkadot/typegen":"^4.12.1","ts-node":"^8.6.2","typescript":"^4.0.5"},"scripts":{"generate":"yarn generate:defs && yarn generate:meta","generate:defs":"ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package '.' --input ./src/interfaces","generate:meta":"ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --package '.' --endpoint ./coinnet.json --output ./src/interfaces","build":"tsc","test":"echo \"Error: no test specified\" && exit 1","lint":"tsc --noEmit --pretty"},"repository":{"type":"git","url":"git+https://github.com/1coinnetwork/coinnet-node-types.git"},"author":{"name":"jake@commonwealth.im"},"license":"ISC","bugs":{"url":"https://github.com/1coinnetwork/coinnet-node-types/issues"},"homepage":"https://github.com/1coinnetwork/coinnet-node-types#readme","gitHead":"e384758b072bd9c1338076121814b901305ab820","_id":"@1coinnetwork/node-types@1.0.1","_nodeVersion":"14.17.1","_npmVersion":"7.19.0","dist":{"integrity":"sha512-9TQ/L83FDSvj5uJJLJXdxnnNN8+Tll7oKvJLN1qf/ToMk0U3X4lqM/NEdlyS4Rk861GpVmY86x5cCyGFSkUAaA==","shasum":"00f4da1b6234ca6aef2e173625f6240286141229","tarball":"https://registry.npmjs.org/@1coinnetwork/node-types/-/node-types-1.0.1.tgz","fileCount":28,"unpackedSize":588588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLWb5CRA9TVsSAnZWagAA+jgP/2Zb5+z/KigxyRjOYy83\nE8GjE1Eugn0FL1svlfiAgD8gs/mqK7CwX7+PSwvD5GU1cW5Fus85Y7+8LDJK\nzagAPFqaxZ/LwmQq92RD2aUwYVhnOa7umh51y2UJaCJTzULykO83o0qc2oyy\nle9vpkLR7DoPwXK/03SJYoLR9Y+Sn5pgZDneEyHI6x40pTds/AFYde4c6uoo\n3l/Z7E/64PZ/krT3g1vYj1uqUVhMVCBZjZ9tFytoNBSdtkTpU0Xtnytd/uqq\nuO9p+/BenuugBegUrnJ8bTzCqim7czlCtKW9XRRvf6z2fb5et2LaAIhhBQTX\nSI3rGDG2yfZEG+GjxYqZ1ySKfDwVw5uVal3y+URIzD7bZAAAo5IIpsuRy748\nc3n2EYuICN5SGuIZpVY+oOh6wDEHGlHIIM2zPq2G7NbPWtSAwzWbY68whtPU\nDMVyFqmImDPP8bM18cuyiqea1ZOBlWv5yS17+nz4A2tURTezY+MvvwEWwsRv\nSMBMCTBrdSIAhOaddrR3ApIQn17kEMl030bGkvK9bzFFiyLbD0sEGStiHnrL\nC9j6wxfO46+MNBW5IR7ryrJG+i3DyPaM7FVxOb+84abJoPq33cUzz6lDoaBy\nK1UevbFx2YIFU9qgU1VcCZ9yfkEA/RUrfrhzQjd+6oHDVCF13GN9OJr3tSqf\nG4j0\r\n=ofG1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1ZwrVzpkBvZ9GvBu5fs74ZC9Mhj0MtiL7mHt0dAXEiwIhAPz+k9csAZbH7gKFZy+q8/fe1dVklrR7ko4fSUgWLF1Q"}]},"_npmUser":{"name":"1coinassets","email":"aaron@1coin.io"},"directories":{},"maintainers":[{"name":"1coinassets","email":"aaron@1coin.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-types_1.0.1_1630365433095_0.4037731636388586"},"_hasShrinkwrap":false},"1.0.2":{"name":"@1coinnetwork/node-types","version":"1.0.2","description":"Type definitions for coinnet chain.","main":"dist/index.js","engines":{"node":">=14.0.0"},"dependencies":{},"devDependencies":{"@polkadot/api":"^4.12.1","@polkadot/typegen":"^4.12.1","ts-node":"^8.6.2","typescript":"^4.0.5"},"scripts":{"generate":"yarn generate:defs && yarn generate:meta","generate:defs":"ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package '.' --input ./src/interfaces","generate:meta":"ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --package '.' --endpoint ./coinnet.json --output ./src/interfaces","build":"tsc","test":"echo \"Error: no test specified\" && exit 1","lint":"tsc --noEmit --pretty"},"repository":{"type":"git","url":"git+https://github.com/1coinnetwork/coinnet-node-types.git"},"author":{"name":"jake@commonwealth.im"},"license":"ISC","bugs":{"url":"https://github.com/1coinnetwork/coinnet-node-types/issues"},"homepage":"https://github.com/1coinnetwork/coinnet-node-types#readme","gitHead":"b141329aa38fbecaccc39cec95eacf55a1a438c1","_id":"@1coinnetwork/node-types@1.0.2","_nodeVersion":"14.17.1","_npmVersion":"7.19.0","dist":{"integrity":"sha512-XGHiIuwFkA1jJGg1szN6vuh/M45dg77eZbptyNmLu9tgNpjar06LBO+Dq0FJRYesRZPWGT0TpuioiJc2fjlNLA==","shasum":"4da48734d63a115bd09e442702a4daca172725a7","tarball":"https://registry.npmjs.org/@1coinnetwork/node-types/-/node-types-1.0.2.tgz","fileCount":28,"unpackedSize":588584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLYycCRA9TVsSAnZWagAA4osQAIo01a1pamB3QArOWKTs\nz7/ZtDvImm9A3VCZ5IZMTrqUvQhztNEyOvr37+OMu7aFv74F+T5WAzVImYgV\nAeMoydJ7nA2hHGbMhpaQsFI8lfbyc9NopbTTtLIk80gk1QoJXrS1cXOZ7JDT\n5PPx2koX4lUZFcPv53l2xGQMt2SaN3GUicJzL7hVVbAZk8/pBsTRJX8I74hy\nqc5RslAUiIxPAGeE5jU1npR0/iHul9kmZ118HnG+op+HaJZXvSGSIoo1YvX3\njFJQuDASyAmuHMxs+AwVGKUqOTT4RjXdfF8J35asFtonXfLLW7/CELY62b5h\nOCwD1hK6hhutUyuI68XwPNQpcc/D1YqqmrRUdiiTGpq0aibPS8oUSZdlJze8\n5dNyOJTRJCORfpqqF+aUxa4nmeHR9x5bCT+VLhD++ifrlNHu6cQNoaCAwCnx\nzrbfXiatASDQQZJiXbkvbsO4HpCsr+fiQb/c+2jt5EhqeLsJQ0/2XgvA4GnM\nBoRgXFfrxrOvF4VypAoutrIksQj73t35dD7l+kPwZ/1p/GgKK+O9+/2RPyB7\nSqWk8HMXH3FIUTPOLjYB/4G28X/3+p/0dsFMH098kl6xwdnjreIahjSovgi6\nt98Kx6QOTCDeODnPO7ILjkSMpSJdvzULscvX4TVkvghF7Kv76HCO4HP0XQvp\np8GK\r\n=xgjd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF4p3F+xCZHZahDUO/+fs2AjVT2d7jUdnC9gP98bUWViAiBfBCitixqiMcY9PBC2gRh8zCN5NO5/1D5RmUrtIm2yfQ=="}]},"_npmUser":{"name":"1coinassets","email":"aaron@1coin.io"},"directories":{},"maintainers":[{"name":"1coinassets","email":"aaron@1coin.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-types_1.0.2_1630375067856_0.9977586129968548"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-30T23:01:33.606Z","1.0.0":"2021-08-30T23:01:34.024Z","modified":"2022-04-04T10:32:47.511Z","1.0.1":"2021-08-30T23:17:13.253Z","1.0.2":"2021-08-31T01:57:48.000Z"},"maintainers":[{"name":"1coinassets","email":"aaron@1coin.io"}],"description":"Type definitions for coinnet chain.","homepage":"https://github.com/1coinnetwork/coinnet-node-types#readme","repository":{"type":"git","url":"git+https://github.com/1coinnetwork/coinnet-node-types.git"},"author":{"name":"jake@commonwealth.im"},"bugs":{"url":"https://github.com/1coinnetwork/coinnet-node-types/issues"},"license":"ISC","readme":"# coinnet-node-types\n\n## Usage\n\nThis repo contains Typescript bindings for custom coinnet-node modules.\n\nIn order to use the standard API against 1COIN Network you must initialize the API's options object as follows:\n\n```\nimport { spec } from '@1coinnetwork/node-types';\n\nconst options: ApiOptions = {\n  provider : new WsProvider('ws://localhost:9944'),\n  ...spec,\n};\n\nconst api = new ApiPromise(options);\n```\n\nYou will also need to update the `tsconfig.json` of your project to include the following:\n\n```\n{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@polkadot/api/augment\": [\"./node_modules/@1coinnetwork/node-types/interfaces/augment-api.d.ts\"],\n      \"@polkadot/types/augment\": [\"./node_modules/@1coinnetwork/node-types/interfaces/augment-types.d.ts\"],\n    }\n  }\n}\n```\n\n### Dependencies\n\nYour project's @polkadot-js dependency versions **must match the versions used in this project**, including `@polkadot/api`, `@polkadot/keyring`, and all associated packages, as well as `rxjs` (if using `ApiRx` instead of `ApiPromise`) and `typescript`. To verify the versions required, inspect the @polkadot package.json files for the version specified in this project's package.json.\n\n## Building\n\nThis project depends on the [@polkadot/typegen](https://github.com/polkadot-js/api/tree/master/docs/examples/promise/90_typegen) project, which has a step-by-step guide to building this project.\n\nThe 1COIN-specific version is as follows:\n\n1. Ensure in [package.json](package.json) that `@polkadot/api` is set to the correct version, and that `@polkadot/typegen` is set to the same version as `@polkadot/api`. Increase the `@1coinnetwork/node-types` version if necessary for publication.\n\n1. Ensure that all the `definitions.ts` files in `src/interfaces` are updated to the latest versions of each type, if any 1coin network modules changed.\n\n1. Run an [coinnet-node](https://github.com/1coinnetwork/coinnet-node) chain on localhost.\n\n1. You will notice that the output of the lint command contains an error. This is because the typegen script does not handle relative paths well for custom modules that depend on each other. You will have to make a manual change to [signaling/types.ts](src/interfaces/signaling/types.ts) as follows:\n\n   ```diff\n   - import { VoteStage } from './voting';\n   + import { VoteStage } from '../voting';\n   ```\n\n1. Upgrade all [spec files](src/spec) with any changes necessary as per the [@polkadot-js changelog](https://github.com/polkadot-js/api/blob/master/CHANGELOG.md) and the underlying Substrate version of the chain.\n\n1. To compile the Typescript to Javascript for npm publication, run `yarn build`. This command should not produce any errors and will output build files to the [dist](dist/) directory.\n\n1. Run a simple test of the newly-built API against a live coinnet node with `yarn verify [mainnet | testnet]`.\n\n1. Publish the new version with `npm publish`.\n","readmeFilename":"README.md"}