{"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"2ad988bbdf544d9aeee7a6f10f7c483b35fdb325","tarball":"https://registry.npmjs.org/@ganache/filecoin/-/filecoin-0.5.2-alpha.3.tgz","fileCount":7,"integrity":"sha512-JSUdvUmY3vQf6vYyiZgGILpJdOa44WSCQsqH86pT7cz1rRlnvT+PDWjpRiyMjDcKmg9eFARFjYrQuXCL+5fSow==","signatures":[{"sig":"MEQCIAMh686cnVB9vOV/WjD599kJuqSOdg0pn6enUjjdfWCBAiB7vqRUbVqG4WbDW/sCiHmjlCb6sXPzsMxbg2HIDan8ew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":925929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjF6yDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCqw/+KETdzDMomYnHWU6EO6qDiGJB66QgH19iT7jpPGHZFxCbw+l6\r\nGuFibzhMwh2kFkFZWp4ZBQjNu8gd+FFX3VXNObb9DTIHzxN7cLC3pvXYJ7Q5\r\nya7x8IFD0WkK76SNLD9rpQs9JhmzrBu9zefx9x2Bh7tXxym6UpvRBGPHFVjZ\r\nMv0pj5qEGiQ/yjnCuX7m4cB1gijZ4G+oEUrxcr4DDKuh5gAkxFjZFHK2IuQC\r\n4Jm8dkTTF0f61c5AUK8tEtqQ7XfAWPruEp5OlDT7vbP+gN60gXF9FDASfvDY\r\n0XkDhSi7aDr7DHuiSa7vTjfGz2iM7jWJK6q6Fdk7CMqZco9lFosuYb/D8Bdz\r\nbEql7OOppRJIhWgn6HIvbhnXvyfrJJmJOEo+NXDJgNV5bnIZhu1lF8Pxc2f0\r\n90uqHMKAXDaFJ0IEnysBd495WK7ZlBuYqB3PYlOeRUcAGG4Y4PN1n3mhVDq9\r\nprZ1xJN0HIM3g56mV8rgjGuliNYYceLBsehyJId12WqAUhGTK4jBPBAHEMqJ\r\nFsKDA2EeZgxuNJ1/BogX+9EnqshZ64LMqEJRUhUJ2of3d+pN1mDW1FJtszgO\r\nFgwiPT0qGHTUqFij84RcQ8Ezy2oUZ562r87aoSv8J5J/lcdbXYmaUf6JLu23\r\nRDK3Vw8Iu+rrqwFpjzaoYDJICetuDn0wwGI=\r\n=8bTA\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.14.4","node":">=12.17.0 <17.0.0"},"gitHead":"bec1d7f374b760b2873e16a09849769e4a4386a9","license":"MIT","scripts":{"tsc":"tsc --build","test":"ts-node-cwd ../../../../scripts/require-engines.ts || nyc --reporter lcov npm run mocha","build":"webpack","mocha":"ts-node-cwd ../../../../scripts/require-engines.ts || cross-env 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":"truffle-cicd","email":"david+truffle@trufflesuite.com"},"homepage":"https://github.com/trufflesuite/ganache/tree/develop/src/filecoin#readme","keywords":["ganache","ganache-filecoin","filecoin","blockchain","smart contracts","dapps","web3","tooling"],"repository":{"url":"git+https://github.com/trufflesuite/ganache.git","type":"git","directory":"src/chains/filecoin"},"_npmVersion":"lerna/4.0.0/node@v14.20.0+x64 (linux)","description":"Ganache's Filecoin client implementation","directories":{"lib":"lib","test":"tests"},"maintainers":[{"name":"jeff.smale","email":"jeff.smale@consensys.net"},{"name":"truffle-cicd","email":"david+truffle@trufflesuite.com"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"micaiahreid","email":"micaiahreid@gmail.com"}],"_nodeVersion":"14.20.0","dependencies":{"ipfs":"0.52.3","leveldown":"6.1.0","secp256k1":"4.0.3","ipld-dag-cbor":"0.17.0","ipfs-http-server":"0.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ws":"8.2.3","nyc":"15.1.0","borc":"2.1.2","bn.js":"5.2.1","mocha":"9.1.3","blakejs":"1.2.1","levelup":"5.1.1","ts-node":"10.4.0","typedoc":"0.22.10","webpack":"5.65.0","emittery":"0.10.0","@types/ws":"7.4.7","cross-env":"7.0.3","ts-loader":"9.2.6","async-sema":"3.1.0","deep-equal":"2.0.3","multicodec":"2.1.0","seedrandom":"3.0.5","typescript":"4.6.4","node-loader":"1.0.2","tmp-promise":"3.0.2","webpack-cli":"4.9.1","@types/bn.js":"5.1.0","@types/mocha":"9.0.0","multihashing":"0.3.3","subleveldown":"6.0.1","encoding-down":"7.1.0","@ganache/utils":"0.5.2-alpha.2","@types/levelup":"5.1.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.1","@types/encoding-down":"5.0.0","terser-webpack-plugin":"5.2.5","@types/lodash.clonedeep":"4.5.6","@ganache/filecoin-options":"0.5.2-alpha.2","@types/abstract-leveldown":"7.2.0","@types/terser-webpack-plugin":"5.0.2","@trufflesuite/uws-js-unofficial":"20.10.0-unofficial.1","@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.5.2-alpha.3_1662495875722_0.7756335737486373","host":"s3://npm-registry-packages"},"_id":"@ganache/filecoin@0.5.2-alpha.3","version":"0.5.2-alpha.3"}