{"bugs":{"url":"https://github.com/trufflesuite/ganache-core/issues"},"dist":{"shasum":"606d5a14150030c9fd6f5099e12d1c51570761ae","tarball":"https://registry.npmjs.org/@ganache/filecoin/-/filecoin-0.1.6-internal.1341.tgz","fileCount":8,"integrity":"sha512-gRFvRDAz8Gf4QbFF+nc/k4z/G1XXPrmV86Joz6AkZhn7zQjPk0dfoE21mW7Kn70EThAce42qv0b/n9NMwHuvOg==","signatures":[{"sig":"MEYCIQDYfVp5x3D9Ws5Wye6/wkp5AuXkjBie9o2tq6I8MFHhogIhAP/oP1Vt0VmOu/629qtjaDkf9FZ/RP97LrduvnElsmge","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1319265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCXx5CRA9TVsSAnZWagAAWCUQAIbd+LHvnWa/sNHv3/kx\njcvRSGOPJQXSInK28EM9OeOMStZ8nclztmmWYVL1W2R51wJpEnr8Rkhuxz9l\nO9Q74qydmW4X1aBgSRmY+dIDuXy+VHULiZ73Tuzc+Noep8rU7sGKUEW/p3kp\ndeOGypQTK/mMveZv+rnWdTndZRtoQVoXaak0m0eghw2B55ewx8nc2Slcjjts\nd0a139391WEpce5DgJ+2XVDhjmSWbBj4RhN1DwcZsSOVeBdJcXZ7G3P+aKpt\nWJ7gXWO8R5NLRSMCVYk3yg2gPK0i8dKdp3sfVf+eJMm+p/8t7tupPhiUUcmJ\nLTUpDgYVz7b9chjtJn1yYUN9j07gg23usJGtEtxu2xdwE8Yut30Jw31iBQDm\nm9Vvc30unx79YJQD++QyAyJCLGjHZGj7LcWQzEQ5E2wEfsyrqnbKCHBD7lV+\n5UAIUUczA4nClxrwFX1Uyk79Bb/Spe9Fw9uL4H/tFCLTswybFIUwWHXcVf6T\nF4pfewqw9axADnUmHDROddxgt0YuzYhT/c4Mx+lPABSm5ftXFfPR44Grm6TI\nWUVQ0dLum30MzZUARfKb32E/LFbVII9KzkLc4enm2gzR/QRQlWjHIrFWUruX\nkVEBcu7kHTwwM0N3lr9j+DfsPWV/k0E0UYScE+s6SfygjYrCnxSYRM7fSnMh\n2zWO\r\n=+R45\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"@ganache/filecoin","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":"f3e1b8f0152ffc404d4aee0a73237ba6ba57ada7","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/4.0.0/node@v10.23.0+x64 (linux)","description":"Ganache's Filecoin client implementation","directories":{"lib":"lib","test":"tests"},"maintainers":[{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"micaiahreid","email":"micaiahreid@gmail.com"}],"_nodeVersion":"10.23.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":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.1341+f3e1b8f0","@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.1341+f3e1b8f0","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.1341_1628011641373_0.12317638096938843","host":"s3://npm-registry-packages"},"_id":"@ganache/filecoin@0.1.6-internal.1341","version":"0.1.6-internal.1341"}