{"bugs":{"url":"https://github.com/trufflesuite/ganache-core/issues"},"dist":{"shasum":"362c7b44f4830d4d2e9b0bbcba5d94eb63b742d9","tarball":"https://registry.npmjs.org/@ganache/filecoin/-/filecoin-0.1.3.tgz","fileCount":8,"integrity":"sha512-FFFa1BuDOPH/FwpIL0KZmFXQIBJhgbX3hz4lf2bu5XmlZ6MRf46a+uWtHNF4S1wH2j9TEZ9joiT6ZnnkM96mqg==","signatures":[{"sig":"MEYCIQCSDIPkiQeRtuVukriWN65zNuCk9VtNk5xRDG0ibU/HGQIhAMXeLXv2UL5lWD1XV+9KWl2G0vD9+icPQgT4z3eX1WD5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4457468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWjv4CRA9TVsSAnZWagAAPCEP/2uQyA83L7P6IYMJ1t80\nX1gBVQjv9fngaV5ZKBLTiUEmZzgoR+IXPlEPsh8ckG2ZM6q3qOVQDUiDClvU\nOeQAtsSXNaqHF7kHETyA2c/7nL2U5iNBGH3va/7UpUWx1xFWHn69t9aPNjph\nBVXuL3Yk20Zpf6zoWv/V2Bde//9Xw2wdHih/iBrVAwsefzK9mYuqOsQZdRhp\ngKor9anPXJfGx3ByegtpD1IXZN654kyzW9bcbe3/MkOht8tIPAgVZTyryeEL\nWDZO6ojxZ4VwA+VFNo2/atocINu6SQdAQqRzUGivMF/gbpTn5RlvGn550rmS\nhAf592VnhoLFO8o6/lbBp2nUivhX4eKE9fI9rVVZScjmITTe3xftJwmtLmu+\nNxHLAaEZH481IlFuUp4de3T340oovnofxP8mWL7XjZRZGYD8JzM6ePKl1Qvo\np3in2wto5A8JUYHMCYmE66/U1y18nRhm3cEu9mySvounIO0rBJYvYruIbFma\nFQvlK6UWXPSbL0Er/K0IbkPDGHQbvby+I4E7aP1isCu5rwwtU2xs9Lwdgfdt\nmd+5V8nw5nXBb76CA1/g+wprRSC9+rui9tpVpasu2iP1zKXNWQLrusX0vh9S\nakw8BfyRbjh+T+FQ+muDZPYHYauL+4P3DffIfiIdJUW9yQOXibc5NEZq6k1P\nlPor\r\n=56rz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"@ganache/filecoin","_from":"file:ganache-filecoin-0.1.3.tgz","types":"lib/index.d.ts","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 it's `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","source":"index.ts","engines":{"npm":">=6.4.1","node":">=12.13.0 <=14.14.0"},"license":"MIT","scripts":{"tsc":"ttsc --build","test":"ts-node ../../../../scripts/skip-if-less-than-node-12.ts || nyc --reporter lcov npm run mocha","build":"npx --node-arg=--max-old-space-size=10000 webpack","mocha":"ts-node ../../../../scripts/skip-if-less-than-node-12.ts || cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=tsconfig.test.json mocha --timeout 10000 --no-parallel --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'","docs.build":"rm -rf ./lib/docs ./lib/api.json && npm run docs.typedoc","docs.preview":"ws --open --port 3012 --directory ../../../","docs.typedoc":"typedoc --options ./typedoc.json --readme ./README.md --out ../../../docs/typedoc --json ../../../docs/typedoc/api.json src/api.ts","tsc.declarations":"ttsc --build tsconfig.declarations.json"},"_npmUser":{"name":"davidmurdoch","email":"david@davidmurdoch.com"},"homepage":"https://github.com/trufflesuite/ganache-core/tree/develop/src/filecoin#readme","keywords":["ganache","ganache-filecion","filecion","blockchain","smart contracts","dapps","web3","tooling"],"_resolved":"","_integrity":"","repository":{"url":"git+https://github.com/trufflesuite/ganache-core.git","type":"git","directory":"src/chains/filecoin"},"_npmVersion":"6.14.11","description":"Ganache's Filecoin client implementation","directories":{"lib":"lib","test":"tests"},"maintainers":[{"name":"davidmurdoch","email":"david@davidmurdoch.com"}],"_nodeVersion":"10.13.0","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"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ws":"7.4.2","nyc":"15.1.0","borc":"2.1.2","bn.js":"5.1.2","mocha":"8.0.1","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","babel-loader":"8.2.2","multihashing":"0.3.3","subleveldown":"5.0.1","encoding-down":"6.3.0","@ganache/utils":"0.1.0","@types/levelup":"4.3.0","base32-encoding":"1.0.0","noble-bls12-381":"0.4.3","@ganache/options":"0.1.0","@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.1","@types/terser-webpack-plugin":"5.0.2","@seesemichaelj/uwebsockets.js":"18.15.3","@filecoin-shipyard/lotus-client-rpc":"0.0.11","@babel/plugin-proposal-private-methods":"7.12.13","@filecoin-shipyard/lotus-client-schema":"2.0.0","@babel/plugin-proposal-class-properties":"7.12.13","@filecoin-shipyard/lotus-client-provider-browser":"0.0.14"},"_npmOperationalInternal":{"tmp":"tmp/filecoin_0.1.3_1616526328006_0.6388389224729694","host":"s3://npm-registry-packages"},"_id":"@ganache/filecoin@0.1.3","version":"0.1.3"}