{"bugs":{"url":"https://github.com/trufflesuite/ganache-core/issues"},"dist":{"shasum":"7667e6c6826cfd3295ca92be3e3a337c7a190daf","tarball":"https://registry.npmjs.org/@ganache/filecoin/-/filecoin-0.1.6-internal.1326.tgz","fileCount":8,"integrity":"sha512-7pnQi7yiMcppGHaUdPUKVV2NutbEyZWZ4irheq0mqDiJBmrAT8piA5I8E7isxIWyVl3D/+GW6a2zvKXc+B/rKQ==","signatures":[{"sig":"MEUCIQCl+vfOy46qRKOdyYxvbIL1juYDl+3luj02DXz5H92QCAIgdvNtWoIDUb8e/0jP2m9EH0qZemTPxNOCcVlWMpR1CqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1319217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg56CvCRA9TVsSAnZWagAAEtMP/Rt5OmbBMj7poLMx0cfT\nlvL9JWr3JxImUFvCGioF+xbIquWDQgZViSLvUAvniMjtHQOdzt4FcwuTmgoI\nKd9EsswcyZTKTtGkKMrF6U+TFftubULfytDlxTCxOLLgbONF/18OawGDLRFe\nozYIGlN0HI+zvAzCC1Epa7p0gC3FX5QMW+XHGjtnGL3rgCWFB96+eZQ85Qv0\nRjqHSpcJ/rHuQItGxUtalY3j8l2zJoj6Z3s5tzW3cMeaTKcwPqKsmauqGTAa\n2O0QtOO/wCVfmZSXYHxineGWGgYVkIYQNRkEWn5W09NQ0g1r/D8MtY/Li+Oq\n21nVEW2AtviPHNWSrqfLmiWCivy/SKmgc7ExmtxOKEpeuJgQ9VjIA4F2ZYY2\n7f68WLDddyFVBUG6OpD7jMoazwWWsJYB7VUdYUSl7qmmGA/XCTKEgXEKqVMK\nYJIY/ucIzK1yl/tL7m0gUNnuoCxd+upf8rGkEpfN+F3Uq1q+w4LplNlXmWhy\nMr4t1MZWj0wFhoA+EbFH+rUavxOGkGxC8yUgiE2ihoo7UM9gM4gu25qXJhFe\nA3N+fiVAftOaFOyABlwxmN46Lk8sySEeEU+40gX9m8mRHYdaxbK/hhxXJXtb\nDQ1DEtjNDuG99mV4Bp4Wb7PqHQecWSHZAFIAUjZWZ79iSAzuxNEEtJ1jKZ7H\nsDJ2\r\n=HIPJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"@ganache/filecoin","access":"public","author":{"name":"Tim Coulter"},"readme":"# `@ganache/filecoin`\n\nThis package provides Ganache's Filecoin client implementation.\n\n## Table of Contents\n\n1. [CLI Usage](#cli-usage)\n1. [NodeJS Usage](#nodejs-usage)\n1. [Startup Options](#startup-options)\n1. [Supported RPC Methods](#supported-rpc-methods)\n\n## CLI Usage\n\nTo use Filecoin-flavored Ganache via the CLI, follow the below instructions:\n\n1. Remove any existing version of Ganache CLI\n   ```bash\n   npm uninstall --global ganache-cli\n   npm uninstall --global ganache\n   ```\n1. Install the `ganache` package globally with the `filecoin` tag (note that we're **not** installing the old `ganache-cli` package)\n   ```bash\n   npm install --global ganache@filecoin\n   ```\n1. Install the `@ganache/filecoin` globally\n   ```bash\n   npm install --global @ganache/filecoin\n   ```\n1. Run Filecoin-flavored Ganache\n   ```bash\n   ganache filecoin\n   ```\n1. See available [options](#startup-options)\n   ```bash\n   ganache filecoin --help\n   ```\n1. You can use Ethereum-flavored Ganache still\n\n   ```bash\n   # Running \"ganache\" defaults to Ethereum\n   ganache\n\n   # or you can specify ethereum as the flavor\n   ganache ethereum\n   ```\n\n## NodeJS Usage\n\n### Install\n\nIf you're using Filecoin-flavored Ganache as a NodeJS dependency, you need to make sure you install both the `ganache` package (with the `filecoin` tag) and the `@ganache/filecoin` package.\n\n```bash\n# install the base Ganache package\nnpm install ganache@filecoin\n\n# install the Filecoin peer dependency package\nnpm install @ganache/filecoin\n```\n\n### Usage\n\nIn your code, you will use the `ganache` package directly to instantiate the Filecoin flavor. Below is an example on how to do that with the default [options](#startup-options).\n\n```javascript\nimport Ganache from \"ganache\";\n\nconst startupOptions = {\n  flavor: \"filecoin\";\n}\n\n// Provider usage\nconst provider = Ganache.provider(startupOptions);\nconst result = await provider.send({\n  jsonrpc: \"2.0\",\n  id: \"0\",\n  method: \"Filecoin.Version\",\n  params: []\n});\n\n// Server usage (starts up a HTTP and WebSocket server)\nconst server = Ganache.server(startupOptions);\nserver.listen(7777, () => {\n  console.log(\"Lotus RPC endpoint listening at http://localhost:7777/rpc/v0\");\n});\n```\n\n## Startup Options\n\nSee available startup options [in `@ganache/filecoin-options`](../options/README.md).\n\n## Supported RPC Methods\n\n`@ganache/filecoin` does not support all of the RPC methods implemented within Lotus; further, it implements some custom methods. Below is a list of each method.\n\n### Ganache Specific RPC Methods\n\n- `Ganache.MineTipset`: Manually mine a tipset immediately. Mines even if the miner is disabled. No parameters.\n- `Ganache.EnableMiner`: Enables the miner. No parameters.\n- `Ganache.DisableMiner`: Disables the miner. No parameters.\n- `Ganache.MinerEnabled`: The current status on whether or not the miner is enabled. The initial value is determined by the option `miner.mine`. If true, then auto-mining (`miner.blockTime = 0`) and interval mining (`miner.blockTime > 0`) will be processed. If false, tipsets/blocks will only be mined with `Ganache.MineTipset`. No parameters.\n- `Ganache.MinerEnabledNotify`: A subscription method that provides an update whenever the miner is enabled or disabled. No parameters.\n- `Ganache.GetDealById`: Retrieves an internal `DealInfo` by its `DealID`. Takes a single parameter, `DealID`, of type `number`.\n\n### Supported Lotus RPC methods\n\n- `Filecoin.ChainGetBlock`\n- `Filecoin.ChainGetBlockMessages`\n- `Filecoin.ChainGetGenesis`\n- `Filecoin.ChainGetMessage`\n- `Filecoin.ChainGetTipSet`\n- `Filecoin.ChainGetTipSetByHeight`\n- `Filecoin.ChainHead`\n- `Filecoin.ChainNotify`\n- `Filecoin.ClientFindData`\n- `Filecoin.ClientGetDealInfo`\n- `Filecoin.ClientGetDealStatus`\n- `Filecoin.ClientGetDealUpdates`\n- `Filecoin.ClientListDeals`\n- `Filecoin.ClientRetrieve`\n- `Filecoin.ClientStartDeal`\n- `Filecoin.ID` - Returns a hardcoded ID of `bafzkbzaced47iu7qygeshb3jamzkh2cqcmlxzcpxrnqsj6yoipuidor523jyg`\n- `Filecoin.MpoolBatchPush` - FIL transfer only (`Method = 0`)\n- `Filecoin.MpoolBatchPushMessage` - FIL transfer only (`Method = 0`)\n- `Filecoin.MpoolClear`\n- `Filecoin.MpoolGetNonce`\n- `Filecoin.MpoolPending`\n- `Filecoin.MpoolPush` - FIL transfer only (`Method = 0`)\n- `Filecoin.MpoolPushMessage` - FIL transfer only (`Method = 0`)\n- `Filecoin.MpoolSelect`\n- `Filecoin.StateListMiners`\n- `Filecoin.StateMinerInfo`\n- `Filecoin.StateMinerPower`\n- `Filecoin.WalletBalance`\n- `Filecoin.WalletDefaultAddress`\n- `Filecoin.WalletDelete`\n- `Filecoin.WalletExport`\n- `Filecoin.WalletHas`\n- `Filecoin.WalletImport` - `KeyInfo.Type` of type `secpk1-ledger` is not supported\n- `Filecoin.WalletList`\n- `Filecoin.WalletNew` - `KeyInfo.Type` of type `secpk1-ledger` is not supported\n- `Filecoin.WalletSetDefault`\n- `Filecoin.WalletSign`\n- `Filecoin.WalletSignMessage`\n- `Filecoin.WalletValidateAddress`\n- `Filecoin.WalletVerify`\n- `Filecoin.ActorAddress`\n- `Filecoin.Version`\n","engines":{"npm":">=6.4.1","node":">=12.13.0 <=14.14.0"},"gitHead":"068d165086a08ef30557157b9314b836fa4795cb","license":"MIT","scripts":{"tsc":"ttsc --build","test":"ts-node ../../../../scripts/skip-if-less-than-node-12.ts || nyc --reporter lcov npm run mocha","build":"webpack","mocha":"ts-node ../../../../scripts/skip-if-less-than-node-12.ts || cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true TS_NODE_PROJECT=tsconfig.test.json mocha --timeout 60000 --no-parallel --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"},"typings":"typings","_npmUser":{"name":"davidmurdoch","email":"david@davidmurdoch.com"},"homepage":"https://github.com/trufflesuite/ganache-core/tree/develop/src/filecoin#readme","keywords":["ganache","ganache-filecoin","filecoin","blockchain","smart contracts","dapps","web3","tooling"],"repository":{"url":"git+https://github.com/trufflesuite/ganache-core.git","type":"git","directory":"src/chains/filecoin"},"_npmVersion":"lerna/3.22.1/node@v12.22.1+x64 (linux)","description":"Ganache's Filecoin client implementation","directories":{"lib":"lib","test":"tests"},"maintainers":[{"name":"micaiahreid","email":"micaiahreid@gmail.com"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"}],"_nodeVersion":"12.22.1","dependencies":{"ipfs":"0.52.3","leveldown":"5.6.0","secp256k1":"4.0.2","ipld-dag-cbor":"0.17.0","ipfs-http-server":"0.1.4"},"_hasShrinkwrap":true,"readmeFilename":"README.md","devDependencies":{"ws":"7.4.2","nyc":"15.1.0","borc":"2.1.2","bn.js":"5.1.2","mocha":"8.4.0","blakejs":"1.1.0","levelup":"4.4.0","typedoc":"0.17.8","webpack":"5.21.2","emittery":"0.7.2","@types/ws":"7.4.0","cross-env":"7.0.2","ts-loader":"8.0.7","async-sema":"3.1.0","deep-equal":"2.0.3","multicodec":"2.1.0","seedrandom":"3.0.5","node-loader":"1.0.2","tmp-promise":"3.0.2","webpack-cli":"4.5.0","@types/bn.js":"5.1.0","multihashing":"0.3.3","subleveldown":"5.0.1","encoding-down":"6.3.0","@ganache/utils":"^0.1.1-internal.1326+068d1650","@types/levelup":"4.3.0","base32-encoding":"1.0.0","noble-bls12-381":"0.4.3","@types/secp256k1":"4.0.1","ipfs-http-client":"48.1.3","lodash.clonedeep":"4.5.0","@types/deep-equal":"1.0.1","@types/seedrandom":"3.0.0","abstract-leveldown":"6.3.0","terser-webpack-plugin":"5.0.3","@types/lodash.clonedeep":"4.5.6","@ganache/filecoin-options":"^0.1.4-internal.1326+068d1650","ts-transformer-inline-file":"0.1.1","@types/terser-webpack-plugin":"5.0.2","@trufflesuite/uws-js-unofficial":"18.14.0-unofficial.3","@filecoin-shipyard/lotus-client-rpc":"0.2.0","@filecoin-shipyard/lotus-client-schema":"2.0.0","@filecoin-shipyard/lotus-client-provider-browser":"0.0.14"},"_npmOperationalInternal":{"tmp":"tmp/filecoin_0.1.6-internal.1326_1625792686808_0.4118396118108869","host":"s3://npm-registry-packages"},"_id":"@ganache/filecoin@0.1.6-internal.1326","version":"0.1.6-internal.1326"}