diff --git a/README.md b/README.md index 8f73232..fff599f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # azimuth-cli -The azimuth-cli is "Bridge for the command line." It should allow ship owners and operators to do the same things that they can in [Bridge](https://bridge.urbit.org/) but via the command line, and in batch mode. -The primary usage of the cli is to query and modify the [azimuth contracts](https://github.com/urbit/azimuth) on Ethereum. +This is a command line tool to work with Urbit ID, which is the idenity layer behind [Urbit](https://urbit.org/) and is managed as a set of NFTs on the Ethereum blockchain. + +The azimuth-cli is "Bridge for the command line." It should allow Urbit ship owners and operators to do the same things that they can in [Bridge](https://bridge.urbit.org/) but via the command line, and in batch mode. + +The primary functionality of the cli is to query and modify the [azimuth contracts](https://github.com/urbit/azimuth) on Ethereum. ## Install @@ -12,6 +15,8 @@ Due to an issues when building the azimuth-js package (as described [here](https Simply install the npm package globally: `npm install -g azimuth-cli` +**When Upgrading to the L2 version:** Make sure to delete the `cli-config.json` file in your home directory, usually in a folder called `.azimuth/`. + ### Development or Manual Install 1) Clone this [repo](https://github.com/lukebuehler/azimuth-cli) 1) run `npm install` @@ -24,11 +29,19 @@ To run the tests: ## Usage + +*Note: Using the CLI with a L2 roller is WIP, see [here for instructions](docs/roller.md).* + After installing the npm package, just type `azimuth-cli` in the command line to see the options. You can also use `azi` for short. -There are three main types of commands: `list`, `generate`, and `modify`. First, the `list` commands do not make any changes, they just print information to the command line. But `generate` commands usually save something to the current work directory; use this, for example, to generate HD wallets. The `modify` commands actually change the blockchain and usually require the private key of the address that owns the urbit point you are making a change to. The `modify` commands also save data to the work directory, such as Ethereum transaction receipts. +There are three main types of commands: `get`, `generate`, and `modify`. First, the `get` commands do not make any changes, they just print information to the command line. But `generate` commands usually save something to the current work directory; use this, for example, to generate HD wallets. + +The `modify` commands actually change the blockchain and usually require the private key of the address that owns the urbit point you are making a change to. The `modify` commands have two versions: `modify-l1` and `modify-l2`. This is because Urbit IDs can either be modified directly through an Ethereum smart contract called Azimuth, aka "L1", or via a Layer 2 solution that is cheaper, which uses a "roller" that gathers transactions that modify Urbit IDs and then submits them as one batch to Ethereum, and is called the "L2" solution. The `modify` commands also save data to the work directory, such as Ethereum or roller transaction receipts. -More complicated operations--such as spawning ships, keying them, and transfering them to master tickets--cannot be executed in a single command. Multiple commands need to be called in order (see the example below). +More complicated operations--such as spawning ships, keying them, and transfering them to master tickets--cannot be executed in a single command. Multiple commands need to be called in order (see the examples below). + +### Setting Up Your Own Layer 2 Roller +If you want to modify large batches of points in one go--for example spawn 200 planets--then you need to [run your own roller](docs/roller.md). By default, the CLI points to the official roller run by Urbit. See the `--roller-provider` option in the CLI. ### Work Directory & Idempotent Commands Many commands, especially the `generate` and `modify` ones, need a work directory to fulfill their function. The reason for this is that a command may be called multiple times, but the end effect needs to always be the same. For example, if you call `azi generate spawn-list --count=10` multiple times, the resulting `spawn-list.txt` file will only be created once, and will not change in subsequent calls (unless the `--force` option is provided). The same goes for the `modify` commands. @@ -42,35 +55,43 @@ The work directory is the current folder or can be supplied with the `--work-dir For the full documentation, please install the cli and explore the commands and sub-commands with the `--help` option. `aimuth-cli` - * `list` - Prints azimuth data to the console. + * `get` - Retrieves data about points, rollers, and azimuth, and prints it to the console. By default, uses a L2 roller to get the information. * `children ` - Lists all child points of a certain Urbit point. * `owner
` - Lists all points owned by that Ethereum address. * `details ` - Prints details about the point. - * `gas-price` - Outputs the current Etherum gas prices. This is helpful if you want to provide a gas limit in the `modify` commands. + * `gas-price` - Outputs the current Etherum gas prices. This is helpful if you want to provide a gas limit in the `modify-l1` commands. + * `roller-info` - Prints details about the L2 roller. + * `roller-info` - Prints pending roller transactions. * `generate` - Generates various files that can be used in the `modify` commands. * `spawn-list ` - Creates a `spawn-list.txt` file that contains a number of points that can be spawned under the provided point. * `wallet` - Generates an HD wallet for each provided point and saves each wallet in JSON format in the current work directory. Use this especially if you plan to give the points away. Then, in subsequent commands, supply the `--use-wallet-files` option. * `network-keys` - Creates the network keyfile for each supplied point, and either creates a JSON file with the private and public network keys or uses the network keys from the walled files. * `report` - Generates a CSV report for the provided points, containing patp, p, ticket, network keys, addresses, and transactions executed so far. - * `modify` - Modifies the state of one or more points on the Ethereum blockchain (the azimuth contracts). For many of these commands to work, other files will have to have been generated with the `generate` commands. + * `modify-l1` - Modifies the state of one or more points on the Ethereum blockchain (the azimuth contracts). For many of these commands to work, other files will have to have been generated with the `generate` commands. * `spawn` - Spawns multiple points to the supplied address * `management-proxy` - Sets the management proxy address for the points. * `spawn-proxy` - Sets the spawn-proxy address for the points. * `network-key` - Sets the network keys for the points, which is required to be able to boot the Urbit. * `transfer` - Transfers the point to a target address or the wallet files. - + * `modify-l2` - Modifies the state of one or more points via a L2 roller. The roller then submits the changes to the L2 Ethereum contract. Any point modified via this command, needs to be on L2. + * `spawn` - Spawns multiple points to the supplied address. The galaxy or star that spawns needs to be on L2 or the spawn proxy needs to be on L2. + * `management-proxy` - Sets the management proxy address for the points. + * `network-key` - Sets the network keys for the points, which is required to be able to boot the Urbit. + * `transfer` - Transfers the point to a target address or the wallet files. ### Examples -#### Spawn, Set Network Keys, and Transfer to Master Ticket +#### Spawn, Set Network Keys, and Transfer to Master Ticket on Azimuth (L1) This is an example of spawning planets and creating a master ticket for them. You would do this if you want to give some planets away to friends. It is similar to what you can do in Bridge, but we do it for 5 planets in one go. Generating a master ticket itself is not enough, though. Ownership needs to be transferred to the owner address that is associated with the master ticket. But for the master ticket to be usable, networking keys need to be set. Hence, we first spawn to a temporary address (usually the same as the owner or spawn-proxy of the star, here ~sardys), then set the keys, and only then move the planet to its own address--that of the HD wallet. +The star you are spawning from needs to be on L1! + ``` # create a directory for your work mkdir spawn-planets cd spawn-planets # pick 5 random, unspawned planets under ~sardys and save them in a file -azi generate spawn-list ~sardys --count=5 --pick=random +azi generate spawn-list ~sardys --count=5 --pick=random --use-azimuth # now, generate HD wallet files based on the previous list azi generate wallet --points-file=spawn-list.txt @@ -82,15 +103,35 @@ azi generate network-key --use-wallet-files # spawn the 5 planets that can be found in the wallet files, # providing the PK of the wallet that owns ~sardys, or is the spawn proxy -azi modify spawn --use-wallet-files --address=0xSardysOwnershipAddress --private-key=0x1234567890 +azi modify-l1 spawn --use-wallet-files --address=0xSardysOwnershipAddress --private-key=0x1234567890 # set the network keys on the blockchain -azi modify network-key --use-wallet-files --private-key=0x1234567890 +azi modify-l1 network-key --use-wallet-files --private-key=0x1234567890 # transfer each planet ownership to the address of the wallet -azi modify transfer --use-wallet-files --private-key=0x1234567890 +azi modify-l1 transfer --use-wallet-files --private-key=0x1234567890 ``` +#### Spawn, Set Network Keys, and Transfer to Master Ticket on Azimuth (L2) +This is the same example as above but using a roller to spawn the planets. + +The star you are spawning from needs to be on L2 or have the spawn proxy set to L2! Here is more info about the [Layer 2 solution](https://urbit.org/docs/azimuth/l2/layer2). + +``` +azi generate spawn-list ~sampel --count=2 --pick=random --use-roller + +azi generate wallet --points-file=spawn-list.txt + +azi generate network-key --use-wallet-files + +azi modify-l2 spawn --use-wallet-files --address=0xSpawnProxy --private-key=0xSpawnProxyKey + +azi modify-l2 management-proxy --use-wallet-files --address=0xManagementProxy --private-key=0xSpawnProxyKey + +azi modify-l2 network-key --use-wallet-files --private-key=0xSpawnProxyKey + +azi modify-l2 transfer --use-wallet-files --private-key=0xSpawnProxyKey +``` diff --git a/cli-config.json b/cli-config.json index f5365dc..43150f1 100644 --- a/cli-config.json +++ b/cli-config.json @@ -1,5 +1,7 @@ { - "ethProviderGanache": "'http://localhost:8545'", + "ethProviderGanache": "http://localhost:8545", "ethProviderRopsten": "https://ropsten.infura.io/v3/f23d3259814348dbb693726415858db8", - "ethProviderMainnet": "https://mainnet.infura.io/v3/f23d3259814348dbb693726415858db8" + "ethProviderMainnet": "https://mainnet.infura.io/v3/f23d3259814348dbb693726415858db8", + "rollerLocal": "http://localhost:8080/v1/roller", + "rollerUrbit": "https://roller.urbit.org/v1/roller" } \ No newline at end of file diff --git a/cli.js b/cli.js index 3ef372c..2b515b7 100755 --- a/cli.js +++ b/cli.js @@ -26,6 +26,12 @@ function getUniversalOptions() choices: ['ganache', 'ropsten', 'mainnet'], type: 'string' }, + 'roller-provider':{ + describe: 'What L2 roller provider to use.', + default: 'urbit', + choices: ['local', 'urbit'], + type: 'string' + }, 'config-file':{ describe: 'What config file to use.', default: files.ensureDefaultConfigFilePath(), diff --git a/cmds/generate_cmds/report.js b/cmds/generate_cmds/report.js index dcdd71b..ee13002 100644 --- a/cmds/generate_cmds/report.js +++ b/cmds/generate_cmds/report.js @@ -2,7 +2,7 @@ const ob = require('urbit-ob') const kg = require('urbit-key-generation'); const ticket = require('up8-ticket'); const _ = require('lodash') -const {files, validate, eth, findPoints} = require('../../utils') +const {files, validate, eth, findPoints, rollerApi} = require('../../utils') const ajs = require('azimuth-js') exports.command = 'report' @@ -36,27 +36,47 @@ exports.builder = (yargs) =>{ if (!argv.pointsFile && !argv.points && !argv.useWalletFiles) throw new Error('You must provide either --points-file, --points, or --use-wallet-files') return true }); + + yargs.option('use-roller',{ + describe: 'Enforce using the roller (L2) for all data and do not allow fallback to azimuth (L1).', + type: 'boolean', + conflicts: 'use-azimuth' + }); + yargs.option('use-azimuth',{ + describe: 'Enforce using azimuth (L1) for all data and do not allow fallback to the roller (L2).', + type: 'boolean', + conflicts: 'use-roller' + }); } exports.handler = async function (argv) { - const workDir = files.ensureWorkDir(argv.workDir); - const ctx = await eth.createContext(argv); + const source = await rollerApi.selectDataSource(argv); + let ctx = null; + let rollerClient = null; + if(source == 'azimuth'){ + ctx = await eth.createContext(argv); + } + else{ + rollerClient = rollerApi.createClient(argv); + } + const workDir = files.ensureWorkDir(argv.workDir); const wallets = argv.useWalletFiles ? findPoints.getWallets(workDir) : null; const points = findPoints.getPoints(argv, workDir, wallets); const csvHeader = - 'patp,p,ship_type,master_ticket,network_keyfile,' + - 'owner_address,proxy_address,' + //management_address is omitted because there is currently no API to retrieve the management proxy address + 'patp,p,ship_type,parent_patp,master_ticket,network_keyfile,' + + 'dominion,owner_address,spawn_proxy_address,management_proxy_address,' + 'spawn_transaction,management_proxy_transaction,spawn_proxy_transaction,network_key_transaction,transfer_transaction'; let csvLines = [csvHeader]; console.log(`Will process ${points.length} points for the report.`); for (const p of points) { const patp = ob.patp(p); + const patpParent = ob.sein(patp); const shipType = ob.clan(patp); - let csvLine = `${patp},${p},${shipType},`; + let csvLine = `${patp},${p},${shipType},${patpParent},`; //see if we have a wallet to get the master from let masterTicket = ''; @@ -73,19 +93,41 @@ exports.handler = async function (argv) } csvLine += `${masterTicket},${networkKeyfileContents},`; - //get the addresses - const ownerAddress = await ajs.azimuth.getOwner(ctx.contracts, p); - const spawnProxyAddress = await ajs.azimuth.getSpawnProxy(ctx.contracts, p); - csvLine += `${ownerAddress},${spawnProxyAddress},`; - - //try to get the transaction reciepts - let spawnTransaction = tryGetTransactionHash(patp, workDir, 'spawn'); - let managementProxyTransaction = tryGetTransactionHash(patp, workDir, 'managementproxy'); - let spawnProxyTransaction = tryGetTransactionHash(patp, workDir, 'spawnproxy'); - let networkkeyTransaction = tryGetTransactionHash(patp, workDir, 'networkkey'); - let transferTransaction = tryGetTransactionHash(patp, workDir, 'transfer'); - csvLine += `${spawnTransaction},${managementProxyTransaction},${spawnProxyTransaction},${networkkeyTransaction},${transferTransaction}`; + //use azimuth + if(source == 'azimuth'){ + //get the addresses + const dominion = 'L1'; //todo: try to get the dominion via ajs + const ownerAddress = await ajs.azimuth.getOwner(ctx.contracts, p); + const spawnProxyAddress = await ajs.azimuth.getSpawnProxy(ctx.contracts, p); + const managementProxyAddress = ''; //does not work yet: await ajs.azimuth.getManagementProxy(ctx.contracts, p); + csvLine += `${dominion},${ownerAddress},${spawnProxyAddress},${managementProxyAddress},`; + + //try to get the transaction receipts + let spawnTransaction = tryGetTransactionHash(patp, workDir, 'spawn'); + let managementProxyTransaction = tryGetTransactionHash(patp, workDir, 'managementproxy'); + let spawnProxyTransaction = tryGetTransactionHash(patp, workDir, 'spawnproxy'); + let networkkeyTransaction = tryGetTransactionHash(patp, workDir, 'networkkey'); + let transferTransaction = tryGetTransactionHash(patp, workDir, 'transfer'); + csvLine += `${spawnTransaction},${managementProxyTransaction},${spawnProxyTransaction},${networkkeyTransaction},${transferTransaction}`; + } + //L2 roller + else{ + //get the addresses + const pointInfo = await rollerApi.getPoint(rollerClient, p); + const dominion = pointInfo.dominion; + const ownerAddress = pointInfo.ownership.owner.address; + const spawnProxyAddress = pointInfo.ownership.spawnProxy.address; + const managementProxyAddress = pointInfo.ownership.managementProxy.address; + csvLine += `${dominion},${ownerAddress},${spawnProxyAddress},${managementProxyAddress},`; + //try to get the transaction receipts + let spawnTransaction = tryGetTransactionHashL2(patp, workDir, 'spawn'); + let managementProxyTransaction = tryGetTransactionHashL2(patp, workDir, 'setManagementProxy'); + let spawnProxyTransaction = tryGetTransactionHashL2(patp, workDir, 'setSpawnProxy'); + let networkkeyTransaction = tryGetTransactionHashL2(patp, workDir, 'configureKeys'); + let transferTransaction = tryGetTransactionHashL2(patp, workDir, 'transferPoint'); + csvLine += `${spawnTransaction},${managementProxyTransaction},${spawnProxyTransaction},${networkkeyTransaction},${transferTransaction}`; + } csvLines.push(csvLine); } @@ -95,11 +137,19 @@ exports.handler = async function (argv) } function tryGetTransactionHash(patp, workDir, operationPostfix){ - const transactionFile = `${patp.substring(1)}-reciept-${operationPostfix}.json`; + const transactionFile = `${patp.substring(1)}-receipt-${operationPostfix}.json`; if(files.fileExists(workDir, transactionFile)){ return files.readJsonObject(workDir, transactionFile).transactionHash; } return ''; } +function tryGetTransactionHashL2(patp, workDir, method){ + const transactionFile = `${patp.substring(1)}-receipt-L2-${method}.json`; + if(files.fileExists(workDir, transactionFile)){ + return files.readJsonObject(workDir, transactionFile).hash; + } + return ''; +} + const DEFAULT_REVISION = 1; diff --git a/cmds/generate_cmds/spawn-list.js b/cmds/generate_cmds/spawn-list.js index f5e536a..2e98a78 100644 --- a/cmds/generate_cmds/spawn-list.js +++ b/cmds/generate_cmds/spawn-list.js @@ -1,8 +1,7 @@ const ob = require('urbit-ob') const ajs = require('azimuth-js') const _ = require('lodash') - -const {files, validate, eth} = require('../../utils') +const {files, validate, eth, rollerApi} = require('../../utils') exports.command = 'spawn-list ' exports.desc = 'Create a list of child points to spawn from . If the file already exists, this command will be a no-op.' @@ -32,21 +31,40 @@ exports.builder = (yargs) =>{ default: 'random', type: 'string', }); + + yargs.option('use-roller',{ + describe: 'Enforce using the roller (L2) for all data and do not allow fallback to azimuth (L1).', + type: 'boolean', + conflicts: 'use-azimuth' + }); + yargs.option('use-azimuth',{ + describe: 'Enforce using azimuth (L1) for all data and do not allow fallback to the roller (L2).', + type: 'boolean', + conflicts: 'use-roller' + }); } exports.handler = async function (argv) { const point = validate.point(argv.point, true); + const workDir = files.ensureWorkDir(argv.workDir); - if(files.fileExists(workDir, argv.output) && !argv.force) { console.log('Spawn list file already exists, will not recreate it.'); return; } - const ctx = await eth.createContext(argv); - var childPoints = await ajs.azimuth.getUnspawnedChildren(ctx.contracts, point); + const source = await rollerApi.selectDataSource(argv); + let childPoints = []; + if(source == 'azimuth'){ + const ctx = await eth.createContext(argv); + childPoints = await ajs.azimuth.getUnspawnedChildren(ctx.contracts, point); + } + else{ + const rollerClient = rollerApi.createClient(argv); + childPoints = await rollerApi.getUnspawned(rollerClient, point); + } var spawnList = pickChildPoints(childPoints, argv.count, argv.pick); var spawnListPatp = _.map(spawnList, p => ob.patp(p)); diff --git a/cmds/get.js b/cmds/get.js new file mode 100644 index 0000000..cdb6789 --- /dev/null +++ b/cmds/get.js @@ -0,0 +1,6 @@ +exports.command = 'get ' +exports.desc = 'Retrieve information about Urbit points, L2 rollers, and Ethereum gas prices.' +exports.builder = function (yargs) { + return yargs.commandDir('get_cmds') +} +exports.handler = function (argv) {} \ No newline at end of file diff --git a/cmds/get_cmds/children.js b/cmds/get_cmds/children.js new file mode 100644 index 0000000..b39eaaa --- /dev/null +++ b/cmds/get_cmds/children.js @@ -0,0 +1,77 @@ +const ob = require('urbit-ob') +const ajs = require('azimuth-js') +const {validate, eth, azimuth, rollerApi} = require('../../utils') + +exports.command = 'children ' +exports.desc = 'List all children for , where is patp or p.' +exports.builder = (yargs) =>{ + yargs.option('unspawned',{ + alias: 'u', + describe: 'Only include unspawned points.', + type: 'boolean', + conflicts: 'spawned' + }); + yargs.option('spawned',{ + alias: 's', + describe: 'Only include spawned points.', + type: 'boolean', + conflicts: 'unspawned' + }); + + yargs.option('use-roller',{ + describe: 'Enforce using the roller (L2) for all data and do not allow fallback to azimuth (L1).', + type: 'boolean', + conflicts: 'use-azimuth' + }); + yargs.option('use-azimuth',{ + describe: 'Enforce using azimuth (L1) for all data and do not allow fallback to the roller (L2).', + type: 'boolean', + conflicts: 'use-roller' + }); +} + +exports.handler = async function (argv) { + const point = validate.point(argv.point, true); + + const source = await rollerApi.selectDataSource(argv); + let childPoints = + source == 'azimuth' + ? (await getchildPointsFromL1(argv, point)) + : (await getchildPointsFromL2(argv, point)); + + console.log(`listing ${childPoints.length} children under ${ob.patp(point)} (${point}):`); + for(const p of childPoints) + { + const patp = ob.patp(p); + console.log(`${patp} (${p})`); + } +} + +async function getchildPointsFromL1(argv, point){ + const ctx = await eth.createContext(argv); + if(argv.spawned){ + return await ajs.azimuth.getSpawned(ctx.contracts, point); + } + else if(argv.unspawned){ + return await ajs.azimuth.getUnspawnedChildren(ctx.contracts, point); + } + else{ + return azimuth.getChildren(point); + } +} + +async function getchildPointsFromL2(argv, point){ + const rollerClient = rollerApi.createClient(argv); + console.log('here') + if(argv.spawned){ + return await rollerApi.getSpawned(rollerClient, point); + } + else if(argv.unspawned){ + return await rollerApi.getUnspawned(rollerClient, point); + } + else{ + return azimuth.getChildren(point); + } +} + + diff --git a/cmds/get_cmds/details.js b/cmds/get_cmds/details.js new file mode 100644 index 0000000..eaece12 --- /dev/null +++ b/cmds/get_cmds/details.js @@ -0,0 +1,115 @@ +const ob = require('urbit-ob') +const ajs = require('azimuth-js') +const {validate, eth, azimuth, rollerApi} = require('../../utils') + +exports.command = 'details ' +exports.desc = 'Outputs various information about a . Such as owner and proxy addresses.' +exports.builder = (yargs) =>{ + yargs.option('use-roller',{ + describe: 'Enforce using the roller (L2) for all data and do not allow fallback to azimuth (L1).', + type: 'boolean', + conflicts: 'use-azimuth' + }); + yargs.option('use-azimuth',{ + describe: 'Enforce using azimuth (L1) for all data and do not allow fallback to the roller (L2).', + type: 'boolean', + conflicts: 'use-roller' + }); +} + +exports.handler = async function (argv) { + const p = validate.point(argv.point, true); + const source = await rollerApi.selectDataSource(argv); + + //print some info that does not require a connection to azimuth or the roller + const patp = ob.patp(p); + console.log(`urbit ID (patp): ${patp}`); + console.log(`urbit ID number (p): ${p}`); + const shipType = ob.clan(patp); + console.log(`ship type: ${shipType}`); + const parentPatp = ob.sein(patp); + const parentP = ob.patp2dec(parentPatp); + console.log(`parent: ${parentPatp}`); + + //depending on the data source, print info from azimuth or the roller + if(source == 'azimuth'){ + await printDetailsFromL1(argv, p); + } + else{ + await printDetailsFromL2(argv, p); + } +} + +function sanitizeAddress(address){ + if(address && !ajs.utils.addressEquals('0x0000000000000000000000000000000000000000', address)){ + return address.toLowerCase(); + } + return null; +} + +async function printDetailsFromL1(argv, p){ + const ctx = await eth.createContext(argv); + + const sponsorP = await ajs.azimuth.getSponsor(ctx.contracts, p); + const sponsorPatp = ob.patp(sponsorP); + const hasSponsor = await ajs.azimuth.hasSponsor(ctx.contracts, p); + console.log(`sponsor: ${hasSponsor ? sponsorPatp : 'null'}`); + + const dominion = await azimuth.getDominion(ctx.contracts, p); + console.log(`dominion: ${dominion}`); + + const ownerAddress = sanitizeAddress(await ajs.azimuth.getOwner(ctx.contracts, p)); + console.log(`owner address: ${ownerAddress}`); + + const spawnProxyAddress = sanitizeAddress(await ajs.azimuth.getSpawnProxy(ctx.contracts, p)); + console.log(`spawn proxy address: ${spawnProxyAddress}`); + + const networkKeysSet = await ajs.azimuth.hasBeenLinked(ctx.contracts, p); + console.log(`network keys set: ${networkKeysSet}`); + const networkKeysRevision = await ajs.azimuth.getKeyRevisionNumber(ctx.contracts, p); + console.log(`network keys revision: ${networkKeysRevision}`); + + const continuityNumber = await ajs.azimuth.getContinuityNumber(ctx.contracts, p); + console.log(`continuity number: ${continuityNumber}`); + + const spawnedChildrenCount = await ajs.azimuth.getSpawnCount(ctx.contracts, p); + console.log(`spawned children: ${spawnedChildrenCount}`); +} + +async function printDetailsFromL2(argv, p){ + const rollerClient = rollerApi.createClient(argv); + + let pointInfo = null + try{ + pointInfo = await rollerApi.getPoint(rollerClient, p); + } + catch(error){ + if(error.message.includes('Resource not found')){ + console.log('planet does not exist on L2, please try again with the --use-azimuth option.') + } + else{ + console.log(error); + } + return; + } + + const sponsorP = Number(pointInfo.network.sponsor.who); + const sponsorPatp = ob.patp(sponsorP); + const hasSponsor = pointInfo.network.sponsor.has; + console.log(`sponsor: ${hasSponsor ? sponsorPatp : 'null'}`); + + console.log(`dominion: ${pointInfo.dominion}`); + + console.log(`owner address: ${pointInfo.ownership.owner.address}`); + console.log(`spawn proxy address: ${pointInfo.ownership.spawnProxy.address}`); + console.log(`management proxy address: ${pointInfo.ownership.managementProxy.address}`); + console.log(`transfer proxy address: ${pointInfo.ownership.transferProxy.address}`); + + console.log(`network keys set: ${pointInfo.network.keys.auth ? 'true' : 'false'}`); + console.log(`network keys revision (life): ${pointInfo.network.keys.life}`); + + console.log(`continuity number (rift): ${pointInfo.network.rift}`); + + const spawnedChildren = await rollerApi.getSpawned(rollerClient, p); + console.log(`spawned children: ${spawnedChildren.length}`); +} \ No newline at end of file diff --git a/cmds/list_cmds/gas-price.js b/cmds/get_cmds/gas-price.js similarity index 67% rename from cmds/list_cmds/gas-price.js rename to cmds/get_cmds/gas-price.js index 406b0e1..2fbead0 100644 --- a/cmds/list_cmds/gas-price.js +++ b/cmds/get_cmds/gas-price.js @@ -1,8 +1,7 @@ -const ajs = require('azimuth-js') -const {validate, eth} = require('../../utils') +const {eth} = require('../../utils') exports.command = 'gas-price' -exports.desc = 'Lists the current ethereum gas prices computed by etherscan.io. These can be used to set the max-fee in the modify commands. API is rate limited.' +exports.desc = 'Lists the current Ethereum gas prices computed by etherscan.io. These can be used to set the max-fee in the modify commands. API is rate limited.' exports.builder = (yargs) =>{ } diff --git a/cmds/get_cmds/owner.js b/cmds/get_cmds/owner.js new file mode 100644 index 0000000..6f2c9e8 --- /dev/null +++ b/cmds/get_cmds/owner.js @@ -0,0 +1,43 @@ +const ob = require('urbit-ob') +const ajs = require('azimuth-js') +const {validate, eth, rollerApi} = require('../../utils') + +exports.command = 'owner ' +exports.desc = 'List points of which the is owner.' +exports.builder = (yargs) =>{ + yargs.positional('addr', {type: 'string'}); + + yargs.option('use-roller',{ + describe: 'Enforce using the roller (L2) for all data and do not allow fallback to azimuth (L1).', + type: 'boolean', + conflicts: 'use-azimuth' + }); + yargs.option('use-azimuth',{ + describe: 'Enforce using azimuth (L1) for all data and do not allow fallback to the roller (L2).', + type: 'boolean', + conflicts: 'use-roller' + }); +} + +exports.handler = async function (argv) { + let addr = validate.address(argv.addr, true); + + let points = []; + const source = await rollerApi.selectDataSource(argv); + if(source == 'roller'){ + let rollerClient = rollerApi.createClient(argv); + points = await rollerApi.getShips(rollerClient, addr); + } + else + { + const ctx = await eth.createContext(argv); + points = await ajs.azimuth.getOwnedPoints(ctx.contracts, addr); + } + + console.log(`listing ${points.length} owned points by ${addr}:`); + for(const p of points) + { + const patp = ob.patp(p); + console.log(`${patp}, ${p}`); + } +} \ No newline at end of file diff --git a/cmds/get_cmds/roller-info.js b/cmds/get_cmds/roller-info.js new file mode 100644 index 0000000..89e32d8 --- /dev/null +++ b/cmds/get_cmds/roller-info.js @@ -0,0 +1,26 @@ +const {rollerApi} = require('../../utils') + +exports.command = 'roller-info' +exports.desc = 'Outputs information about the roller, including next batch time.' +exports.builder = (yargs) =>{ +} + +exports.handler = async function (argv) { + const rollerClient = rollerApi.createClient(argv); + + const rollerConfig = await rollerApi.getRollerConfig(rollerClient); + console.log(`roller config:`); + console.log(JSON.stringify(rollerConfig, null, 2)); + + const nextBatchTime = getNextBatchTime(rollerConfig); + console.log(`next batch: ${nextBatchTime} GMT`); +} + +function getNextBatchTime(rollerConfig){ + var date = new Date(rollerConfig.nextBatch * 1000); + var hours = date.getHours(); + var minutes = "0" + date.getMinutes(); + var seconds = "0" + date.getSeconds(); + var formattedTime = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); + return formattedTime; +} \ No newline at end of file diff --git a/cmds/get_cmds/roller-pending.js b/cmds/get_cmds/roller-pending.js new file mode 100644 index 0000000..454d1b1 --- /dev/null +++ b/cmds/get_cmds/roller-pending.js @@ -0,0 +1,14 @@ +const ob = require('urbit-ob') +const {validate, rollerApi} = require('../../utils') + +exports.command = 'roller-pending' +exports.desc = 'Outputs the pending roller transactions.' +exports.builder = (yargs) =>{ +} + +exports.handler = async function (argv) { + const rollerClient = rollerApi.createClient(argv); + const data = await rollerApi.getAllPending(rollerClient); + console.log(`data from roller:`); + console.log(JSON.stringify(data, null, 2)); +} \ No newline at end of file diff --git a/cmds/list.js b/cmds/list.js deleted file mode 100644 index 2cb3539..0000000 --- a/cmds/list.js +++ /dev/null @@ -1,6 +0,0 @@ -exports.command = 'list ' -exports.desc = 'List Azimuth points' -exports.builder = function (yargs) { - return yargs.commandDir('list_cmds') -} -exports.handler = function (argv) {} \ No newline at end of file diff --git a/cmds/list_cmds/children.js b/cmds/list_cmds/children.js deleted file mode 100644 index 7965ccd..0000000 --- a/cmds/list_cmds/children.js +++ /dev/null @@ -1,45 +0,0 @@ -const ob = require('urbit-ob') -const ajs = require('azimuth-js') -const {validate, eth, azimuth} = require('../../utils') - -exports.command = 'children ' -exports.desc = 'List all children for , where is patp or p.' -exports.builder = (yargs) =>{ - yargs.option('unspawned',{ - alias: 'u', - describe: 'Only include unspawned points.', - type: 'boolean', - conflicts: 'spawned' - }); - yargs.option('spawned',{ - alias: 's', - describe: 'Only include spawned points.', - type: 'boolean', - conflicts: 'unspawned' - }); -} - -exports.handler = async function (argv) { - const point = validate.point(argv.point, true); - const ctx = await eth.createContext(argv); - - let childPoints = null; - if(argv.spawned){ - childPoints = await ajs.azimuth.getSpawned(ctx.contracts, point); - } - else if(argv.unspawned){ - childPoints = await ajs.azimuth.getUnspawnedChildren(ctx.contracts, point); - } - else{ - childPoints = azimuth.getChildren(point); - } - - console.log(`listing ${childPoints.length} children under ${ob.patp(point)} (${point}):`); - for(const p of childPoints) - { - const patp = ob.patp(p); - console.log(`${patp} (${p})`); - } -} - - diff --git a/cmds/list_cmds/details.js b/cmds/list_cmds/details.js deleted file mode 100644 index 1dc1171..0000000 --- a/cmds/list_cmds/details.js +++ /dev/null @@ -1,52 +0,0 @@ -const ob = require('urbit-ob') -const ajs = require('azimuth-js') -const {validate, eth} = require('../../utils') - -exports.command = 'details ' -exports.desc = 'Outputs various information about a . Such as owner and proxy addresses.' -exports.builder = (yargs) =>{ -} - -exports.handler = async function (argv) { - const ctx = await eth.createContext(argv); - const p = validate.point(argv.point, true); - const patp = ob.patp(p); - console.log(`urbit ID (patp): ${patp}`); - console.log(`urbit ID number (p): ${p}`); - - const shipType = ob.clan(patp); - console.log(`ship type: ${shipType}`); - - const parentPatp = ob.sein(patp); - const parentP = ob.patp2dec(parentPatp); - console.log(`parent: ${parentPatp}`); - - const sponsorP = await ajs.azimuth.getSponsor(ctx.contracts, p); - const sponsorPatp = ob.patp(sponsorP); - const hasSponsor = await ajs.azimuth.hasSponsor(ctx.contracts, p); - console.log(`sponsor: ${hasSponsor ? sponsorPatp : 'null'}`); - - const ownerAddress = sanitizeAddress(await ajs.azimuth.getOwner(ctx.contracts, p)); - console.log(`owner address: ${ownerAddress}`); - - const spawnProxyAddress = sanitizeAddress(await ajs.azimuth.getSpawnProxy(ctx.contracts, p)); - console.log(`spawn proxy address: ${spawnProxyAddress}`); - - const networkKeysSet = await ajs.azimuth.hasBeenLinked(ctx.contracts, p); - console.log(`network keys set: ${networkKeysSet}`); - const networkKeysRevision = await ajs.azimuth.getKeyRevisionNumber(ctx.contracts, p); - console.log(`network keys revision: ${networkKeysRevision}`); - - const continuityNumber = await ajs.azimuth.getContinuityNumber(ctx.contracts, p); - console.log(`continuity number: ${continuityNumber}`); - - const spawnedChildrenCount = await ajs.azimuth.getSpawnCount(ctx.contracts, p); - console.log(`spawned children: ${spawnedChildrenCount}`); -} - -function sanitizeAddress(address){ - if(address && !ajs.utils.addressEquals('0x0000000000000000000000000000000000000000', address)){ - return address.toLowerCase(); - } - return null; -} \ No newline at end of file diff --git a/cmds/list_cmds/owner.js b/cmds/list_cmds/owner.js deleted file mode 100644 index b61519f..0000000 --- a/cmds/list_cmds/owner.js +++ /dev/null @@ -1,21 +0,0 @@ -const ob = require('urbit-ob') -const ajs = require('azimuth-js') -const {validate, eth} = require('../../utils') - -exports.command = 'owner ' -exports.desc = 'List points of which the is owner.' -exports.builder = (yargs) =>{ - yargs.positional('addr', {type: 'string'}) -} - -exports.handler = async function (argv) { - let addr = validate.address(argv.addr, true); - const ctx = await eth.createContext(argv); - let points = await ajs.azimuth.getOwnedPoints(ctx.contracts, addr); - console.log(`listing ${points.length} owned points by ${addr}:`); - for(const p of points) - { - const patp = ob.patp(p); - console.log(`${patp}, ${p}`); - } -} \ No newline at end of file diff --git a/cmds/modify.js b/cmds/modify-l1.js similarity index 94% rename from cmds/modify.js rename to cmds/modify-l1.js index fc718ac..0444a5c 100644 --- a/cmds/modify.js +++ b/cmds/modify-l1.js @@ -1,5 +1,5 @@ -exports.command = 'modify ' -exports.desc = 'Make changes to the on-chain state on Azimuth.' +exports.command = 'modify-l1 ' +exports.desc = 'Make changes to the on-chain state on Azimuth (Layer 1).' exports.builder = function (yargs) { yargs.option('address',{ @@ -80,6 +80,6 @@ exports.builder = function (yargs) { return true }); - return yargs.commandDir('modify_cmds', {exclude:'common'} ) + return yargs.commandDir('modify-l1_cmds', {exclude:'common'} ) } exports.handler = function (argv) {} \ No newline at end of file diff --git a/cmds/modify_cmds/management-proxy.js b/cmds/modify-l1_cmds/management-proxy.js similarity index 100% rename from cmds/modify_cmds/management-proxy.js rename to cmds/modify-l1_cmds/management-proxy.js diff --git a/cmds/modify_cmds/network-key.js b/cmds/modify-l1_cmds/network-key.js similarity index 100% rename from cmds/modify_cmds/network-key.js rename to cmds/modify-l1_cmds/network-key.js diff --git a/cmds/modify_cmds/spawn-proxy.js b/cmds/modify-l1_cmds/spawn-proxy.js similarity index 100% rename from cmds/modify_cmds/spawn-proxy.js rename to cmds/modify-l1_cmds/spawn-proxy.js diff --git a/cmds/modify_cmds/spawn.js b/cmds/modify-l1_cmds/spawn.js similarity index 100% rename from cmds/modify_cmds/spawn.js rename to cmds/modify-l1_cmds/spawn.js diff --git a/cmds/modify_cmds/transfer.js b/cmds/modify-l1_cmds/transfer.js similarity index 100% rename from cmds/modify_cmds/transfer.js rename to cmds/modify-l1_cmds/transfer.js diff --git a/cmds/modify-l2.js b/cmds/modify-l2.js new file mode 100644 index 0000000..85a91ca --- /dev/null +++ b/cmds/modify-l2.js @@ -0,0 +1,66 @@ +exports.command = 'modify-l2 ' +exports.desc = 'Make changes to a point via a roller (Layer 2).' +exports.builder = function (yargs) { + + yargs.demandOption('d'); + + yargs.option('address',{ + alias: 'a', + describe: 'The target address of the operation (spawn to, transfer to, etc.).', + type: 'string', + }); + + yargs.option('private-key',{ + alias: 'k', + describe: 'The private key that signs the transaction. Must be the key of the owner or proxy address.', + type: 'string', + conflicts: ['private-key-file', 'private-key-wallet-file', 'private-key-ticket'] + }); + yargs.option('private-key-file',{ + describe: 'A file that contains the private key that signs the transaction. Must be the key of the owner or proxy address.', + type: 'string', + conflicts: ['private-key', 'private-key-wallet-file', 'private-key-ticket'] + }); + yargs.option('private-key-wallet-file',{ + describe: 'A wallet JSON file that contains the private key that signs the transaction. Must be the key of the owner or proxy address.', + type: 'string', + conflicts: ['private-key', 'private-key-file', 'private-key-ticket'] + }); + yargs.option('private-key-ticket',{ + describe: 'A UP8 ticket to derrive the private key that signs the transaction. Must be the key of the owner or proxy address.', + type: 'string', + conflicts: ['private-key', 'private-key-file', 'private-key-wallet-file'] + }); + + + yargs.check(argv => { + if (!argv.privateKey && !argv.privateKeyFile && !argv.privateKeyWalletFile && !argv.privateKeyTicket) + throw new Error('You must provide either --private-key, --private-key-file, --private-key-wallet-file, or --private-key-ticket that signs the transaction.') + return true + }); + + yargs.option('points-file',{ + describe: `A file containing the points, with each point on a separate line, can be p or patp.`, + type: 'string', + conflicts: ['points', 'use-wallet-files'] + }); + yargs.option('points',{ + alias: ['p', 'point'], + describe: `One or more points, can be p or patp.`, + type: 'array', + conflicts: ['points-file', 'use-wallet-files'] + }); + yargs.option('use-wallet-files',{ + describe: `Use the wallet JSON files in the current work directory as the points.`, + type: 'boolean', + conflicts: ['points-file', 'points'] + }); + yargs.check(argv => { + if (!argv.pointsFile && !argv.points && !argv.useWalletFiles) throw new Error('You must provide either --points-file, --points, or --use-wallet-files.') + if(!argv.useWalletFiles && !argv.address) throw new Error('You must provide either --address or --use-wallet-files, or both.') + return true + }); + + return yargs.commandDir('modify-l2_cmds', {exclude:'common'} ) +} +exports.handler = function (argv) {} \ No newline at end of file diff --git a/cmds/modify-l2_cmds/management-proxy.js b/cmds/modify-l2_cmds/management-proxy.js new file mode 100644 index 0000000..e635a85 --- /dev/null +++ b/cmds/modify-l2_cmds/management-proxy.js @@ -0,0 +1,73 @@ +const ob = require('urbit-ob') +const _ = require('lodash') +const ajsUtils = require('azimuth-js').utils; +var Accounts = require('web3-eth-accounts'); +const {files, validate, eth, findPoints, rollerApi} = require('../../utils') + +exports.command = 'management-proxy' +exports.desc = 'Set the management proxy of one or more L2 points.' + +exports.builder = function(yargs) { +} + +exports.handler = async function (argv) +{ + const rollerClient = rollerApi.createClient(argv); + const workDir = files.ensureWorkDir(argv.workDir); + const privateKey = await eth.getPrivateKey(argv); + const account = new Accounts().privateKeyToAccount(privateKey); + const signingAddress = account.address; + + const wallets = argv.useWalletFiles ? findPoints.getWallets(workDir) : null; + const points = findPoints.getPoints(argv, workDir, wallets); + + console.log(`Will set mgmt. proxy for ${points.length} points`); + for (const p of points) + { + let patp = ob.patp(p); + console.log(`Trying to set mgmt. proxy for ${patp} (${p}).`); + + const pointInfo = await rollerApi.getPoint(rollerClient, patp); + if(pointInfo.dominion != 'l2'){ + console.log(`This point in not on L2, please use the L1 modify command.`); + continue; + } + + let wallet = argv.useWalletFiles ? wallets[patp] : null; + let targetAddress = + argv.address != undefined + ? argv.address + : argv.useWalletFiles + ? wallet.management.keys.address : + null; //fail + targetAddress = validate.address(targetAddress, true); + + if(ajsUtils.addressEquals(pointInfo.ownership.managementProxy.address, targetAddress)){ + console.log(`Target address ${targetAddress} is already mgmt. proxy for ${patp}.`); + continue; + } + + //the proxy type must be 'own', indicating that the signing address is the same as the point owner, + // bc only the point owner can set the mgmt proxy + if((await rollerApi.getManagementProxyType(rollerClient, patp, signingAddress)) != 'own'){ + console.log(`Cannot set mgmt. proxy for ${patp}, must be owner.`); + continue; + } + + //create and send tx + var receipt = await rollerApi.setManagementProxy(rollerClient, patp, targetAddress, signingAddress, privateKey); + console.log("Tx hash: "+receipt.hash); + + let receiptFileName = patp.substring(1)+`-receipt-L2-${receipt.type}.json`; + files.writeFile(workDir, receiptFileName, receipt); + } //end for each point + + process.exit(0); +}; + + + + + + + diff --git a/cmds/modify-l2_cmds/network-key.js b/cmds/modify-l2_cmds/network-key.js new file mode 100644 index 0000000..88d84ea --- /dev/null +++ b/cmds/modify-l2_cmds/network-key.js @@ -0,0 +1,93 @@ +const ob = require('urbit-ob') +const _ = require('lodash') +const ajsUtils = require('azimuth-js').utils; +var Accounts = require('web3-eth-accounts'); +const {files, validate, eth, findPoints, rollerApi} = require('../../utils') + +exports.command = 'network-key' +exports.desc = 'Set the network key for one or more L2 points.' + +exports.builder = function(yargs) { + yargs.option('breach',{ + describe: 'Do a factory reset of the ship.', + default: false, + type: 'boolean', + }); +} + +exports.handler = async function (argv) +{ + const rollerClient = rollerApi.createClient(argv); + const workDir = files.ensureWorkDir(argv.workDir); + const privateKey = await eth.getPrivateKey(argv); + const account = new Accounts().privateKeyToAccount(privateKey); + const signingAddress = account.address; + + const wallets = argv.useWalletFiles ? findPoints.getWallets(workDir) : null; + const points = findPoints.getPoints(argv, workDir, wallets); + + console.log(`Will set network keys for ${points.length} points`); + for (const p of points) + { + let patp = ob.patp(p); + console.log(`Trying to set network key for ${patp} (${p}).`); + + const pointInfo = await rollerApi.getPoint(rollerClient, patp); + if(pointInfo.dominion != 'l2'){ + console.log(`This point in not on L2, please use the L1 modify command.`); + continue; + } + + const currentKeys = pointInfo.network.keys; + + //retrieve the network keypair + let wallet = argv.useWalletFiles ? wallets[patp] : null; + const currentRevision = currentKeys.life; //network key revision number == life. + const revision = currentRevision+1; + const keysFileName = `${patp.substring(1)}-networkkeys-${revision}.json`; + + let networkKeyPair = null; + if(wallet){ + networkKeyPair = wallet.network.keys; + } + else if(files.fileExists(workDir, keysFileName)){ + networkKeyPair = files.readJsonObject(workDir, keysFileName); + } + else{ + console.error(`Could not find network keys for ${patp}: provide them either via wallet or network key file.`); + process.exit(1); + } + + if(!(await rollerApi.getManagementProxyType(rollerClient, patp, signingAddress))){ + console.log(`Cannot set network keys for ${patp}, must be owner or management proxy.`); + continue; + } + + //we are using the public keys because in the contract only the public keys should be visible, the private keys are used to generate the arvo key file + var publicCrypt = ajsUtils.addHexPrefix(networkKeyPair.crypt.public); + var publicAuth = ajsUtils.addHexPrefix(networkKeyPair.auth.public); + + if(currentKeys.crypt == publicCrypt && currentKeys.auth == publicAuth) + { + console.log(`The network key is already set for ${patp}`); + // console.log(JSON.stringify(networkKeyPair, null, 2)); + // console.log(JSON.stringify(currentKeys, null, 2)); + continue; + } + + var receipt = await rollerApi.configureKeys(rollerClient, patp, publicCrypt, publicAuth, argv.breach, signingAddress, privateKey); + console.log("Tx hash: "+receipt.hash); + + let receiptFileName = patp.substring(1)+`-receipt-L2-${receipt.type}.json`; + files.writeFile(workDir, receiptFileName, receipt); + } //end for each point + + process.exit(0); +}; + + + + + + + diff --git a/cmds/modify-l2_cmds/spawn.js b/cmds/modify-l2_cmds/spawn.js new file mode 100644 index 0000000..4cd0b92 --- /dev/null +++ b/cmds/modify-l2_cmds/spawn.js @@ -0,0 +1,62 @@ +const ob = require('urbit-ob') +const _ = require('lodash') +var Accounts = require('web3-eth-accounts'); +const {files, validate, eth, findPoints, rollerApi} = require('../../utils') + +exports.command = 'spawn' +exports.desc = 'Spawn one or more points on L2, where the points are patp or p. Can also provide the points to spawn via files. See options.' + +exports.builder = function(yargs) { + yargs.demandOption('address'); + //yargs.demandOption('signing-address'); +} + +exports.handler = async function (argv) +{ + const rollerClient = rollerApi.createClient(argv); + const workDir = files.ensureWorkDir(argv.workDir); + const privateKey = await eth.getPrivateKey(argv); + const account = new Accounts().privateKeyToAccount(privateKey); + const signingAddress = account.address; + + const wallets = argv.useWalletFiles ? findPoints.getWallets(workDir) : null; + const points = findPoints.getPoints(argv, workDir, wallets); + + //for spawning points, we do not allow it to be spawned directly to the ownership address of the master ticket, even if useWalletFiles is set. + // .. at least not yet + const targetAddress = validate.address(argv.address, true); + + console.log(`Will spawn ${points.length} points`); + for (const p of points) + { + const patp = ob.patp(p); + console.log(`Trying to spawn ${patp} (${p}).`); + + const parentPoint = ob.sein(patp); + + const parentPointInfo = await rollerApi.getPoint(rollerClient, parentPoint); + if(parentPointInfo.dominion == 'l1'){ + console.log(`The parent, ${parentPoint}, of this point, ${patp}, cannont spawn on L2, please transfer it to L2 or set the spawn proxy to L2.`); + continue; + } + + // console.log("parent p: "+parentPoint); + // console.log("p to spawn: "+p); + // console.log("targetAddress: "+targetAddress); + // console.log("signingAddress: "+signingAddress); + // console.log("privateKey: "+privateKey); + var receipt = await rollerApi.spawn(rollerClient, parentPoint, patp, targetAddress, signingAddress, privateKey); + console.log("Tx hash: "+receipt.hash); + + let receiptFileName = patp.substring(1)+`-receipt-L2-${receipt.type}.json`; + files.writeFile(workDir, receiptFileName, receipt); + } //end for each point + + process.exit(0); +}; + + + + + + diff --git a/cmds/modify-l2_cmds/transfer.js b/cmds/modify-l2_cmds/transfer.js new file mode 100644 index 0000000..e6c74e1 --- /dev/null +++ b/cmds/modify-l2_cmds/transfer.js @@ -0,0 +1,78 @@ +const ob = require('urbit-ob') +const _ = require('lodash') +const ajsUtils = require('azimuth-js').utils; +var Accounts = require('web3-eth-accounts'); +const {files, validate, eth, findPoints, rollerApi} = require('../../utils') + +exports.command = 'transfer' +exports.desc = 'Transfer one or more L2 points, either to the wallet address or to the provided target addess.' + +exports.builder = function(yargs) { + yargs.option('reset',{ + describe: 'If the network keys and proxies should be reset in the process of the transfer. Do not set to true when moving to a HD wallet address.', + default: false, + type: 'boolean', + }); +} + +exports.handler = async function (argv) +{ + const rollerClient = rollerApi.createClient(argv); + const workDir = files.ensureWorkDir(argv.workDir); + const privateKey = await eth.getPrivateKey(argv); + const account = new Accounts().privateKeyToAccount(privateKey); + const signingAddress = account.address; + + const wallets = argv.useWalletFiles ? findPoints.getWallets(workDir) : null; + const points = findPoints.getPoints(argv, workDir, wallets); + + console.log(`Will transfer ${points.length} points`); + for (const p of points) + { + let patp = ob.patp(p); + console.log(`Trying to transfer ${patp} (${p}).`); + + let wallet = argv.useWalletFiles ? wallets[patp] : null; + let targetAddress = + argv.address != undefined + ? argv.address + : argv.useWalletFiles + ? wallet.ownership.keys.address : + null; //fail + targetAddress = validate.address(targetAddress, true); + + let pointInfo = await rollerApi.getPoint(rollerClient, patp); + if(pointInfo.dominion != 'l2'){ + console.log(`This point in not on L2, please use the L1 modify command.`); + continue; + } + + if(ajsUtils.addressEquals(pointInfo.ownership.owner.address, targetAddress)){ + console.log(`Target address ${targetAddress} is already owner of ${patp}.`); + continue; + } + + //use the transfer proxy check to see if the singing address is either owner or transfer proxy + if(!(await rollerApi.getTransferProxyType(rollerClient, patp, signingAddress))){ + console.log(`Signing address ${signingAddress} must be owner or transfer proxy.`); + continue; + } + + //create and send tx + var receipt = await rollerApi.transferPoint(rollerClient, patp, argv.reset, targetAddress, signingAddress, privateKey); + console.log("Tx hash: "+receipt.hash); + + let receiptFileName = patp.substring(1)+`-receipt-L2-${receipt.type}.json`; + files.writeFile(workDir, receiptFileName, receipt); + } //end for each point + + process.exit(0); +}; + + + + + + + + diff --git a/docs/grant.md b/docs/grant.md index 812cb58..35a1b39 100644 --- a/docs/grant.md +++ b/docs/grant.md @@ -132,12 +132,18 @@ As soon as the Layer 2 solution is released, the CLI should also support actions Deliverables: -- Move points that are on Azimuth to L2, or move just the spawn proxy of stars. -- Connect to a Roller instead of an ETH node -- Spawn points on L2 -- Set Network Keys on L2 -- Set Proxies on L2 -- Transfer points on L2 +- (DONE) Connect to a Roller instead of an ETH node +- (DONE) Spawn points on L2 +- (DONE) Set Network Keys on L2 +- (DONE) Set Proxies on L2 +- (DONE) Transfer points on L2 +- (DONE) Ensure that L2 operations are on an l2 point, and L1s on a L1 point +- (DONE) combine l1 and l2 list commands +- (DONE) review generate commands for roller compat +- (DONE) rename 'list' to 'get' (breaking change) +- (DONE) better error when roller is not available and l2 is needed (in modify and get) +- (DONE) rename 'modify' to 'modify-l1' +- (DONE) merge documentation, and update documentation ### Milestone 4 - Additional Features @@ -149,9 +155,10 @@ Adding a set of features that will make the CLI much more usable and secure Deliverables: +- Move points that are on Azimuth to L2, or move just the spawn proxy of stars. - Hardware Wallet support (signing transactions on the wallet not using the web3 lib) - Retrieving private keys from key-chains, at least MacOS or Linux -- More point list/search functionality +- (DONE) More point list/search functionality - Search for unspawned planets (for example, by English language worlds, like Venetia, or custom strings) -- Query Azimuth (and L2) for ship state: is it spawned, is it keyed, etc. (this is helpful to check if, say, a galaxy is likely to be alive when buying a star). +- (DONE) Query Azimuth (and L2) for ship state: is it spawned, is it keyed, etc. (this is helpful to check if, say, a galaxy is likely to be alive when buying a star). - Utils (p to patp) \ No newline at end of file diff --git a/docs/links.md b/docs/links.md index 0a15fc9..dfbeb58 100644 --- a/docs/links.md +++ b/docs/links.md @@ -2,7 +2,8 @@ ## Urbit Docs * azimuth-js docs https://github.com/urbit/azimuth-js/blob/master/docs/api.md - + * roller tutorial: https://urbit.org/docs/azimuth/l2/roller-tutorial + ## yargs Links * Main site: http://yargs.js.org/ diff --git a/docs/roller.md b/docs/roller.md new file mode 100644 index 0000000..74beca2 --- /dev/null +++ b/docs/roller.md @@ -0,0 +1,86 @@ +# Using the Azimuth-CLI with your own L2 Roller + +The [Layer 2 (L2) scaling solution](https://urbit.org/docs/azimuth/l2/layer2) was introduced in early 2022 as an alternative way to manage Urbit IDs, to aleviate the problem of high transaction costs on Ethereum. Before L2, each Urbit ID transaction had to be executed on the Ethereum blockchain, with costs per transaction ranging from $20-$100. + +The offcial Urbit roller (running here: https://roller.urbit.org/v1/roller) has quite a low quota of transaction per ship. If you want to, say, spawn 100 planets, you need to run your own roller. + +## Setting Up Ethereum Accounts + +Before you can start, you need a few Ethereum accounts. We will assume you have a star that wants to spawn and manage planets, but the setup would work similarly in other scenarios too. + +Use something like MetaMask to manage your accounts. The nice thing is, once your star is migrated to L2, most of the accounts listed here do not need any ETH to work. The roller will pay for the transactions. + +To indicate what address and private key is referd to later, we'll give each an alias here, e.g., 0xOwner, 0xOwnerKey. Of course, they should be substituted by the actual Ethereum address and private key. + +To get the private key in MetaMask, click on an account, select "Account Details" and then "Export Private Key". + +### 1) Transfer Star or Spawn to L2 +Assuming you own a star, log in to [Bridge](https://bridge.urbit.org/) and migrate your star or the spawn capability of your star to L2 (I recommend that you only move the ability to spwan). This is an L1 transaction and the account needs ETH. + +`0xOwner`, `0xOwnerKey` + +### 2) Create Spawn Proxy Account and Configure Star (Optional) +Create a new account that will act as the L2 spawn proxy for your planets. In Bridge, once the migration to L2 has completed, set the spawn proxy to this address. + +`0xSpawnProxy`, `0xSpawnProxyKey` + +### 2) Create Management Proxy Account (Optional) +This is only needed if you plan to host the planets, because you'll want to be able to transfer ownership while remaining management proxy of the planets, which is needed to set and reset the network keys. + +Create a new account that will act as the L2 management proxy for your planets. + +`0xManagementProxy` + +### 2) Create Roller Account +The roller needs access to ETH. Create an account to which you can transfer some ETH. I recommend to transfer first $100 or so while testing. This should allow to spawn at least 50 planets. + +`0xRoller`, `0xRollerKey` + +## Setting Up the Roller + +### Preliminaries + +*This is based on this tutorial: https://pastebin.com/wQDw7nHv* + +Make sure you have Urbit v1.8 or later [installed](https://urbit.org/getting-started/cli). + +Create an account with [Infura](https://infura.io/) and make sure to copy the infura URL, something like: `https://mainnet.infura.io/v3/YOURSPECIALKEY`. Alternatively you can also use your own Ethereum node, but we will assume you are using Infura. + +### Configure a Roller +1) Boot a fakezod: `./urbit -F zod` +2) Once booted, set the Ethereum node: `:azimuth|watch 'https://mainnet.infura.io/v3/YOURSPECIALKEY' %default` +3) Make sure the subscription works: `:azimuth %resub` +4) Start roller agents: `|rein %base [& %roller] [& %roller-rpc] [& %azimuth-rpc]` +5) Set roller Ethereum node: `:roller|endpoint 'https://mainnet.infura.io/v3/YOURSPECIALKEY' %mainnet` +6) Give the roller access to your "Roller Account" (see above): `:roller|setkey '0xRollerKey'` +7) Increase the quota, so you can do larger batches: `:roller|quota 100` +8) If you want to also connect via a local Brige instance, also set this: `|cors-approve 'http://localhost:3000'` + +To test, you can now do requests via command line: +``` +curl --location --request POST 'http://localhost:8080/v1/roller' --header 'Content-Type: application/json' --data-raw '{ + "jsonrpc": "2.0", + "method": "getPoint", + "params": { + "ship": "~sampel" + }, + "id": "1234" +}' +``` +Replace `~sampel` with your star name. It should show dominion as `l2` or `spawn`. + +For a more cURL examples, [see here](https://documenter.getpostman.com/view/16338962/Tzm3nx7x). + +### Helpful Dojo Commands + + * Send the current batch to the blockchain (by default, the batch is sent on the hour, every hour): `:roller|commit` + * Check if there is any Ethereum state pending (it should return 0): `:eth-watcher +dbug [%state '(lent pending-logs:(~(got by dogs) /azimuth))']` + * See how many azimuth logs there are: `:azimuth +dbug [%state '(lent logs)']` + +### Using the Local Roller in the CLI +When you use `modify-l1` commands, make sure you include the following option: `--roller-provider=local`. Otherwise, the CLI will use the official Urbit roller. + + + + + diff --git a/package-lock.json b/package-lock.json index a0f01c5..fa32301 100644 --- a/package-lock.json +++ b/package-lock.json @@ -341,9 +341,9 @@ "dev": true }, "@babel/runtime": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", - "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "requires": { "regenerator-runtime": "^0.13.4" }, @@ -677,57 +677,58 @@ } }, "@graphql-tools/batch-execute": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.3.1.tgz", - "integrity": "sha512-63kHY8ZdoO5FoeDXYHnAak1R3ysMViMPwWC2XUblFckuVLMUPmB2ONje8rjr2CvzWBHAW8c1Zsex+U3xhKtGIA==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.3.2.tgz", + "integrity": "sha512-ICWqM+MvEkIPHm18Q0cmkvm134zeQMomBKmTRxyxMNhL/ouz6Nqld52/brSlaHnzA3fczupeRJzZ0YatruGBcQ==", "optional": true, "requires": { - "@graphql-tools/utils": "^8.5.1", + "@graphql-tools/utils": "^8.6.2", "dataloader": "2.0.0", "tslib": "~2.3.0", "value-or-promise": "1.0.11" } }, "@graphql-tools/delegate": { - "version": "8.4.3", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.4.3.tgz", - "integrity": "sha512-hKTJdJXJnKL0+2vpU+Kt7OHQTIXZ9mBmNBwHsYiG5WNArz/vNI7910r6TC2XMf/e7zhyyK+mXxMDBmDQkkJagA==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.5.1.tgz", + "integrity": "sha512-/YPmVxitt57F8sH50pnfXASzOOjEfaUDkX48eF5q6f16+JBncej2zeu+Zm2c68q8MbIxhPlEGfpd0QZeqTvAxw==", "optional": true, "requires": { - "@graphql-tools/batch-execute": "^8.3.1", - "@graphql-tools/schema": "^8.3.1", - "@graphql-tools/utils": "^8.5.4", + "@graphql-tools/batch-execute": "^8.3.2", + "@graphql-tools/schema": "^8.3.2", + "@graphql-tools/utils": "^8.6.2", "dataloader": "2.0.0", + "graphql-executor": "0.0.18", "tslib": "~2.3.0", "value-or-promise": "1.0.11" } }, "@graphql-tools/merge": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.1.tgz", - "integrity": "sha512-Q240kcUszhXiAYudjuJgNuLgy9CryDP3wp83NOZQezfA6h3ByYKU7xI6DiKrdjyVaGpYN3ppUmdj0uf5GaXzMA==", + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.3.tgz", + "integrity": "sha512-XCSmL6/Xg8259OTWNp69B57CPWiVL69kB7pposFrufG/zaAlI9BS68dgzrxmmSqZV5ZHU4r/6Tbf6fwnEJGiSw==", "optional": true, "requires": { - "@graphql-tools/utils": "^8.5.1", + "@graphql-tools/utils": "^8.6.2", "tslib": "~2.3.0" } }, "@graphql-tools/schema": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.1.tgz", - "integrity": "sha512-3R0AJFe715p4GwF067G5i0KCr/XIdvSfDLvTLEiTDQ8V/hwbOHEKHKWlEBHGRQwkG5lwFQlW1aOn7VnlPERnWQ==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.2.tgz", + "integrity": "sha512-77feSmIuHdoxMXRbRyxE8rEziKesd/AcqKV6fmxe7Zt+PgIQITxNDew2XJJg7qFTMNM43W77Ia6njUSBxNOkwg==", "optional": true, "requires": { - "@graphql-tools/merge": "^8.2.1", - "@graphql-tools/utils": "^8.5.1", + "@graphql-tools/merge": "^8.2.3", + "@graphql-tools/utils": "^8.6.2", "tslib": "~2.3.0", "value-or-promise": "1.0.11" } }, "@graphql-tools/utils": { - "version": "8.6.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz", - "integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.2.tgz", + "integrity": "sha512-x1DG0cJgpJtImUlNE780B/dfp8pxvVxOD6UeykFH5rHes26S4kGokbgU8F1IgrJ1vAPm/OVBHtd2kicTsPfwdA==", "optional": true, "requires": { "tslib": "~2.3.0" @@ -741,42 +742,6 @@ "requires": { "normalize-path": "^2.0.1", "through2": "^2.0.3" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "optional": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } } }, "@improbable-eng/grpc-web": { @@ -1115,14 +1080,6 @@ "requires": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -1134,6 +1091,14 @@ "multibase": "^4.0.1", "uint8arrays": "^3.0.0", "varint": "^5.0.2" + }, + "dependencies": { + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true + } } }, "uint8arrays": { @@ -1144,6 +1109,12 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -1270,9 +1241,9 @@ }, "dependencies": { "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "optional": true } } @@ -1360,6 +1331,12 @@ "requires": { "browser-headers": "^0.4.0" } + }, + "event-iterator": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", + "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==", + "optional": true } } }, @@ -1453,9 +1430,9 @@ } }, "@textile/threads-client-grpc": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@textile/threads-client-grpc/-/threads-client-grpc-1.1.2.tgz", - "integrity": "sha512-LPL6+skRww44VPuqJz8qXOHBkwPlL7+zUKfndjo2duOq+RZilDm40uLXwnM1/eVmAo1A7mb9XIJAo0u7qYtmCg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@textile/threads-client-grpc/-/threads-client-grpc-1.1.4.tgz", + "integrity": "sha512-Z/dpkVV6gOqYsI5k+DDzzkeFxTtMy5FqE2edyhfjyCVcQAD9tamTfGYDDu2AZO8Njgiunp7pecLPvrvUu7P0iA==", "optional": true, "requires": { "@improbable-eng/grpc-web": "^0.14.0", @@ -1523,6 +1500,14 @@ "@textile/users-grpc": "2.6.6", "event-iterator": "^2.0.0", "loglevel": "^1.7.0" + }, + "dependencies": { + "event-iterator": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", + "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==", + "optional": true + } } }, "@textile/users-grpc": { @@ -1537,9 +1522,9 @@ } }, "@truffle/abi-utils": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-0.2.7.tgz", - "integrity": "sha512-q3RTGAyCnNgf9oG70pvd747SxJcUcgxUcqdlwPREordd3NlWWIC7ijiI7RXOL8okXHihPlt1VqODIKaDciGgcw==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-0.2.9.tgz", + "integrity": "sha512-Nv4MGsA2vdI7G34nI0DfR/eSd5pbAUu+5EafYNqzgrS46y0LWhbIrSZ1NcM7cbhIrkpUn6OfNk49AjNM67TkSg==", "requires": { "change-case": "3.0.2", "faker": "^5.3.1", @@ -1547,20 +1532,20 @@ } }, "@truffle/code-utils": { - "version": "1.2.31", - "resolved": "https://registry.npmjs.org/@truffle/code-utils/-/code-utils-1.2.31.tgz", - "integrity": "sha512-yntIyUhm8ASba8+z3iLkyI5Xk9+VE8MjgIhz5SQNdSC8wuVHk+bj6ZXD2awVUHc5VtvdVEdgMz4DFoJ7T8+Iig==", + "version": "1.2.32", + "resolved": "https://registry.npmjs.org/@truffle/code-utils/-/code-utils-1.2.32.tgz", + "integrity": "sha512-OUP1zO8kkIGt+PhCfLZqai8K9Kel5eDYKvr/Z3ubt4RyTSb1rNwtnmJbiEszVhdsO7/Qi/w/vbW0ebS0clcjyg==", "requires": { "cbor": "^5.1.0" } }, "@truffle/codec": { - "version": "0.11.24", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.11.24.tgz", - "integrity": "sha512-r7wGVDIdF+r68EE7WHDRhiAh/OhQtXZRMUzwGyghjGM3Xt1Weyf9I8zN+EvnN/4ipnHJMyAc2XcHdnP24C82FA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.0.tgz", + "integrity": "sha512-DE/26w5jtBPPqVBseLX1cL0i3b3IUnHaHtKmQvqkEatd6T+uZfPIaiI15ru8cynR7KrYNhuSfeq9k8/N+OFN1Q==", "requires": { - "@truffle/abi-utils": "^0.2.7", - "@truffle/compile-common": "^0.7.25", + "@truffle/abi-utils": "^0.2.9", + "@truffle/compile-common": "^0.7.28", "big.js": "^5.2.2", "bn.js": "^5.1.3", "cbor": "^5.1.0", @@ -1590,43 +1575,41 @@ } }, "@truffle/compile-common": { - "version": "0.7.25", - "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.7.25.tgz", - "integrity": "sha512-larNO2GEAQhdoak8+Mby1JEEKVHLUbKvIfpT0g3V1C97RCXyuUv82ceSPvqhaqEp37cPeIBTAmiQtGLJ4tjaPg==", + "version": "0.7.28", + "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.7.28.tgz", + "integrity": "sha512-mZCEQ6fkOqbKYCJDT82q0vZCxOEsKRQ0zrPfKuSJEb0gF9DXIQcnMkyJpBSWzmyvien9/A7/jPiGQoC7PmNEUg==", "requires": { - "@truffle/error": "^0.0.15", + "@truffle/error": "^0.1.0", "colors": "1.4.0" } }, "@truffle/config": { - "version": "1.3.16", - "resolved": "https://registry.npmjs.org/@truffle/config/-/config-1.3.16.tgz", - "integrity": "sha512-CeK6Yku1HPX+xKjP9SZ21/Cd9UsS6J5bo0wwDSofYRElOkLV5iRUUFSoVjBLWS9rO11IISfE7hkwG8+IsBFXmw==", + "version": "1.3.20", + "resolved": "https://registry.npmjs.org/@truffle/config/-/config-1.3.20.tgz", + "integrity": "sha512-yZ2Qb15GHTDcRLgn2smYkXGh1beWrbfor2t9P14RxCGZ64VvaATZDXn615EImGrMbmVCG+R35zeo8wfNZOHAgg==", "optional": true, "requires": { - "@truffle/error": "^0.0.15", - "@truffle/events": "^0.0.18", - "@truffle/provider": "^0.2.44", + "@truffle/error": "^0.1.0", + "@truffle/events": "^0.1.1", + "@truffle/provider": "^0.2.47", "conf": "^10.0.2", "find-up": "^2.1.0", - "lodash.assignin": "^4.2.0", "lodash.merge": "^4.6.2", - "lodash.pick": "^4.4.0", "module": "^1.2.5", "original-require": "^1.0.1" } }, "@truffle/db": { - "version": "0.5.49", - "resolved": "https://registry.npmjs.org/@truffle/db/-/db-0.5.49.tgz", - "integrity": "sha512-+iD39divG4QlT48mripYZrpws3cw8LKy4mDpWYLy2zK0x3t4BDvyHk9MqBXFYRZl1r7Zv79tp+6ZcVJX9DPc0w==", + "version": "0.5.54", + "resolved": "https://registry.npmjs.org/@truffle/db/-/db-0.5.54.tgz", + "integrity": "sha512-+3ssdO34mwiu3Ha2a38+nm+5d/pMZiDVfVLUNZIjB8rZXgtVVTnrK/7+IYXNLJZFulAVgpDS/iALXfxo0+mDwg==", "optional": true, "requires": { "@graphql-tools/delegate": "^8.4.3", "@graphql-tools/schema": "^8.3.1", - "@truffle/abi-utils": "^0.2.7", - "@truffle/code-utils": "^1.2.31", - "@truffle/config": "^1.3.16", + "@truffle/abi-utils": "^0.2.9", + "@truffle/code-utils": "^1.2.32", + "@truffle/config": "^1.3.20", "apollo-server": "^2.18.2", "debug": "^4.3.1", "fs-extra": "^9.1.0", @@ -1662,21 +1645,21 @@ } }, "@truffle/db-loader": { - "version": "0.0.28", - "resolved": "https://registry.npmjs.org/@truffle/db-loader/-/db-loader-0.0.28.tgz", - "integrity": "sha512-bHMKGNfnMk4PAxysgXuECOF/J8vPLv3LoA+3PGNSUL5BAZkzxGHZ6/1w6HU/oRT67c6fCxcrH/zErud4b9mOhQ==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@truffle/db-loader/-/db-loader-0.1.4.tgz", + "integrity": "sha512-jRiRUftZB7XOtU3TRDZJ0ViPDBIsOrlu8WCt5rq27rvknsDoXES8f0g7UdBiusl44DT4T+G6uRYvUFZmBua9Lw==", "requires": { - "@truffle/db": "^0.5.49" + "@truffle/db": "^0.5.54" } }, "@truffle/debugger": { - "version": "9.2.13", - "resolved": "https://registry.npmjs.org/@truffle/debugger/-/debugger-9.2.13.tgz", - "integrity": "sha512-BJMQg/OLDBdZxiLcDdhUP/FIK+t55Tql0rKgnAUcxRRP9/DG3fNnXHOLhor8xXumWeYuYNUd79uHph1df6LYqA==", + "version": "9.2.18", + "resolved": "https://registry.npmjs.org/@truffle/debugger/-/debugger-9.2.18.tgz", + "integrity": "sha512-R3o4pGMKdi3ZbCdQdmrmWHFeLyHmf3L4IF+hv3K+g5/AeOP1E+6u4q+bPOwsuriRjAyTSTg4j5wfAsuF3Nbh/A==", "requires": { - "@truffle/abi-utils": "^0.2.7", - "@truffle/codec": "^0.11.24", - "@truffle/source-map-utils": "^1.3.68", + "@truffle/abi-utils": "^0.2.9", + "@truffle/codec": "^0.12.0", + "@truffle/source-map-utils": "^1.3.72", "bn.js": "^5.1.3", "debug": "^4.3.1", "json-pointer": "^0.6.1", @@ -1958,24 +1941,25 @@ } }, "@truffle/error": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.15.tgz", - "integrity": "sha512-keiYGlVAH7GLggqMpB+XorT7NkOlr3qeBc56thI2WP0eas3qstlyrc0WvckXJ2LXrOfcR2uH6f0Nk6FIxaKXSA==" + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.0.tgz", + "integrity": "sha512-RbUfp5VreNhsa2Q4YbBjz18rOQI909pG32bghl1hulO7IpvcqTS+C3Ge5cNbiWQ1WGzy1wIeKLW0tmQtHFB7qg==" }, "@truffle/events": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/@truffle/events/-/events-0.0.18.tgz", - "integrity": "sha512-U+8pKyBlEDOUPo43/A6zh5Yw4Q/ZFOA6b5d54EPhqN/C+39LDhUPSI8PI7KmdY4HfUy/ZhMEdh59F34rGRTUYg==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@truffle/events/-/events-0.1.1.tgz", + "integrity": "sha512-nO6ltXo9jS2c9/xgXj+gqZREWmIQ7ZCCL0/UzeAuyVn14qkbK7fcWO4hKiXk5Z2PZYdhehGo+viTVXDxwlzW4A==", "optional": true, "requires": { "emittery": "^0.4.1", - "ora": "^3.4.0" + "ora": "^3.4.0", + "web3-utils": "1.5.3" } }, "@truffle/interface-adapter": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.10.tgz", - "integrity": "sha512-Hb4vjv+hMCfzhUUKIy4hFzAmLoZMHBFF9I8AawEwUa3896kB5iRDNxyoPXXsb1di87ZYDUdtaX6ACWzNaiVdlg==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.11.tgz", + "integrity": "sha512-HXLm+r1KdT8nHzJht1iK6EnHBKIjSYHdDfebBMCqmRCsMoUXvUJ0KsIxvDG758MafB12pjx5gsNn4XzzfksSBQ==", "optional": true, "requires": { "bn.js": "^5.1.3", @@ -2259,36 +2243,36 @@ } }, "@truffle/preserve": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@truffle/preserve/-/preserve-0.2.5.tgz", - "integrity": "sha512-5wkXVWinN5/D0MGpEIae93nefQeTBcqJ/WjTASRQuL3oT03QJs8Izj3Sa/UORQFjMV+Qz7WpxPyNeVc2Se9SAQ==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@truffle/preserve/-/preserve-0.2.6.tgz", + "integrity": "sha512-ipyLNwbhAIIxdf48fUXrpNdgJ/kmmT9U/cvGfjw8GUTAl455K99Fbv+ZZloyQ4Tuuy3THOPQsQ+6ClI6QW8aiw==", "optional": true, "requires": { "spinnies": "^0.5.1" } }, "@truffle/preserve-fs": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@truffle/preserve-fs/-/preserve-fs-0.2.5.tgz", - "integrity": "sha512-Rx3Gi7y/RCS+0NzKScxVgK3MIJRdGxlkoi/xESRqvZQVB3KU3iwJ6NuHu17DgvplIme+eVQlbUBML/NE1AfnQw==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@truffle/preserve-fs/-/preserve-fs-0.2.6.tgz", + "integrity": "sha512-NEf92IYPRknv8BB13S2Y6UR6whYxNS0gxYyHayBTUttvAVGBz8TnWvtRxPMNiDx5Ui6pbNL3hGL7M46TG1GL1A==", "optional": true, "requires": { - "@truffle/preserve": "^0.2.5" + "@truffle/preserve": "^0.2.6" } }, "@truffle/preserve-to-buckets": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@truffle/preserve-to-buckets/-/preserve-to-buckets-0.2.5.tgz", - "integrity": "sha512-+1zTnQbUsKPQXtwDuS8Bak2T0xSbSAWrC3sbozo7BL+lsUCE51RZtcpmFw61t2G4WvVUVd6Xi67FCteCmHZQ8Q==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@truffle/preserve-to-buckets/-/preserve-to-buckets-0.2.7.tgz", + "integrity": "sha512-CBH3qRVRrzrAbmCCW8AkoI3FzLpmJ/cPCqHKn+Lk7AuA+i/QuwVbyUL6Jvgz2B0kU3bUqf9uxOMdhPbOBufISA==", "optional": true, "requires": { "@textile/hub": "^6.0.2", - "@truffle/preserve": "^0.2.5", + "@truffle/preserve": "^0.2.6", "cids": "^1.1.5", "ipfs-http-client": "^48.2.2", "isomorphic-ws": "^4.0.1", "iter-tools": "^7.0.2", - "ws": "^7.4.3" + "ws": "^7.2.0" }, "dependencies": { "cids": { @@ -2320,14 +2304,6 @@ "requires": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -2339,6 +2315,14 @@ "multibase": "^4.0.1", "uint8arrays": "^3.0.0", "varint": "^5.0.2" + }, + "dependencies": { + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true + } } }, "uint8arrays": { @@ -2350,21 +2334,27 @@ "multiformats": "^9.4.2" } }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true + }, "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "optional": true } } }, "@truffle/preserve-to-filecoin": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@truffle/preserve-to-filecoin/-/preserve-to-filecoin-0.2.6.tgz", - "integrity": "sha512-xzXwjTGGmd9gfuua8D7khiqB9wZM+G2nG65IqDjPQUnMsUlxRgUb0AkO12gxkzlXorQ7ZE9+BacMnIh7SrrbCA==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@truffle/preserve-to-filecoin/-/preserve-to-filecoin-0.2.7.tgz", + "integrity": "sha512-hQBCvcvgnSsKGKS3RZaFSHKFjP6553HATNaw3ee55Pgyp+Qzy2c+d6x34Mu23A+6qsfeVoGJ2BoPGwT4JSJkrA==", "optional": true, "requires": { - "@truffle/preserve": "^0.2.5", + "@truffle/preserve": "^0.2.6", "cids": "^1.1.5", "delay": "^5.0.0", "filecoin.js": "^0.0.5-alpha" @@ -2399,14 +2389,6 @@ "requires": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -2418,6 +2400,14 @@ "multibase": "^4.0.1", "uint8arrays": "^3.0.0", "varint": "^5.0.2" + }, + "dependencies": { + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true + } } }, "uint8arrays": { @@ -2428,28 +2418,34 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, "@truffle/preserve-to-ipfs": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@truffle/preserve-to-ipfs/-/preserve-to-ipfs-0.2.6.tgz", - "integrity": "sha512-rik1+0pqW0NjME29GrXRb32U30+5WBJy6aGOtdnHq80lNmFDHpxsU9cWr6r1SpbQO9UoLTT1q8TVtm83rpBpUg==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@truffle/preserve-to-ipfs/-/preserve-to-ipfs-0.2.7.tgz", + "integrity": "sha512-gAf73biK/OX3+MoA092tKrw7r398v05q7yTJ85P2sQdN2Mj9dmiIZ7iDOccu47LtrYFAbar9NWBllDx1kqK3zQ==", "optional": true, "requires": { - "@truffle/preserve": "^0.2.5", + "@truffle/preserve": "^0.2.6", "ipfs-http-client": "^48.2.2", "iter-tools": "^7.0.2" } }, "@truffle/provider": { - "version": "0.2.44", - "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.44.tgz", - "integrity": "sha512-hwQyu4u2a8J4nRLFlLrVA/m+Wa71F8ZXX4wlmzxVBc3svTEnsyg3cYLmM2NVIL/ZT5Hdz/bGkkyXLvWDsHbXlA==", + "version": "0.2.47", + "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.47.tgz", + "integrity": "sha512-Y9VRLsdMcfEicZjxxcwA0y9pqnwJx0JX/UDeHDHZmymx3KIJwI3VpxRPighfHAmvDRksic6Yj4iL0CmiEDR5kg==", "optional": true, "requires": { - "@truffle/error": "^0.0.15", - "@truffle/interface-adapter": "^0.5.10", + "@truffle/error": "^0.1.0", + "@truffle/interface-adapter": "^0.5.11", "web3": "1.5.3" }, "dependencies": { @@ -2719,12 +2715,12 @@ } }, "@truffle/source-map-utils": { - "version": "1.3.68", - "resolved": "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.68.tgz", - "integrity": "sha512-1fm73MIW5RfGwgtMUow/XuXGvd/deHlB8v33AcCWvfBhpk+2PyQusDTlsklAG0zFlh+Kh5ztbnn5MAB96RpgbA==", + "version": "1.3.72", + "resolved": "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.72.tgz", + "integrity": "sha512-YvvDkwQJY/3WWllsuHpeKsNeeIP26AUAKct1gDEqd6YVezB87z2d4l3Td8SLkT0QjdryOyXhLnp0rMW8mFHtEg==", "requires": { - "@truffle/code-utils": "^1.2.31", - "@truffle/codec": "^0.11.24", + "@truffle/code-utils": "^1.2.32", + "@truffle/codec": "^0.12.0", "debug": "^4.3.1", "json-pointer": "^0.6.1", "node-interval-tree": "^1.3.3", @@ -2991,8 +2987,8 @@ } }, "@zondax/filecoin-signing-tools": { - "version": "git+ssh://git@github.com/Digital-MOB-Filecoin/filecoin-signing-tools-js.git#8f8e92157cac2556d35cab866779e9a8ea8a4e25", - "from": "@zondax/filecoin-signing-tools@github:Digital-MOB-Filecoin/filecoin-signing-tools-js", + "version": "github:Digital-MOB-Filecoin/filecoin-signing-tools-js#8f8e92157cac2556d35cab866779e9a8ea8a4e25", + "from": "github:Digital-MOB-Filecoin/filecoin-signing-tools-js", "optional": true, "requires": { "axios": "^0.20.0", @@ -3045,6 +3041,15 @@ "event-target-shim": "^5.0.0" } }, + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "optional": true, + "requires": { + "xtend": "~4.0.0" + } + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -3114,9 +3119,9 @@ }, "dependencies": { "ajv": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz", - "integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", "optional": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -3288,6 +3293,14 @@ "sha.js": "^2.4.11", "subscriptions-transport-ws": "^0.9.19", "uuid": "^8.0.0" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "optional": true + } } }, "apollo-server-env": { @@ -3429,6 +3442,12 @@ "readable-stream": "^2.0.6" }, "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -3624,9 +3643,9 @@ } }, "azimuth-js": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/azimuth-js/-/azimuth-js-0.22.2.tgz", - "integrity": "sha512-Gx6OxfNnLs6+YiAi0OUp9Tfub8Vj1OnlFWoyLe76NJaOUNx+VRh8huA3beXz3mqNoFMOnKEoYrftiiSRjxRP8w==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/azimuth-js/-/azimuth-js-0.23.0.tgz", + "integrity": "sha512-XClTNrvZg684ghyUb4JpHiYvx6/0hlxb5jlARnwI1w9aNTyMF02cH1eF0O8FUN9qk3wb0ZL95SvYU2cZS9adtA==", "requires": { "azimuth-solidity": "^1.2.3", "ethereumjs-util": "^7.1.3", @@ -4730,12 +4749,6 @@ "typedarray": "~0.0.5" }, "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "optional": true - }, "readable-stream": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", @@ -4777,9 +4790,9 @@ }, "dependencies": { "ajv": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz", - "integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", "optional": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -4793,6 +4806,21 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "optional": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "optional": true + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "optional": true, + "requires": { + "mimic-fn": "^2.1.0" + } } } }, @@ -4870,9 +4898,9 @@ "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" }, "core-js-pure": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.3.tgz", - "integrity": "sha512-Q2H6tQ5MtPtcC7f3HxJ48i4Q7T9ybPKgvWyuH7JXIoNa2pm0KuBnycsET/qw1SLLZYfbsbrZQNMeIOClb+6WIA==", + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.21.1.tgz", + "integrity": "sha512-12VZfFIu+wyVbBebyHmRTuEE/tZrB4tJToWcwAMcsp3h4+sHR+fMJWbKpYiCRWlhFBq+KNyO8rIV9rTkeVmznQ==", "optional": true }, "core-util-is": { @@ -5074,6 +5102,14 @@ "optional": true, "requires": { "mimic-fn": "^3.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", + "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "optional": true + } } }, "debug": { @@ -5173,30 +5209,27 @@ "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" }, "deferred-leveldown": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.0.1.tgz", - "integrity": "sha512-BXohsvTedWOLkj2n/TY+yqVlrCWa2Zs8LSxh3uCAgFOru7/pjxKyZAexGa1j83BaKloER4PqUyQ9rGPJLt9bqA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", + "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", "optional": true, "requires": { - "abstract-leveldown": "~6.0.0", + "abstract-leveldown": "~6.2.1", "inherits": "^2.0.3" }, "dependencies": { "abstract-leveldown": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz", - "integrity": "sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", + "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", "optional": true, "requires": { + "buffer": "^5.5.0", + "immediate": "^3.2.3", "level-concat-iterator": "~2.0.0", + "level-supports": "~1.0.0", "xtend": "~4.0.0" } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "optional": true } } }, @@ -5332,12 +5365,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "optional": true - }, - "native-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-3.0.0.tgz", - "integrity": "sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw==", - "optional": true } } }, @@ -5427,6 +5454,12 @@ "stream-shift": "^1.0.0" }, "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -5590,21 +5623,6 @@ "level-supports": "~1.0.0", "xtend": "~4.0.0" } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "optional": true - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "optional": true, - "requires": { - "xtend": "^4.0.2" - } } } }, @@ -5987,12 +6005,6 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "optional": true - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", - "optional": true } } }, @@ -6013,9 +6025,9 @@ } }, "event-iterator": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", - "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-1.2.0.tgz", + "integrity": "sha512-Daq7YUl0Mv1i4QEgzGQlz0jrx7hUFNyLGbiF+Ap7NCMCjDLCCnolyj6s0TAc6HmrBziO5rNVHsPwGMp7KdRPvw==", "optional": true }, "event-target-shim": { @@ -6168,9 +6180,9 @@ "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==" }, "fast-check": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-2.21.0.tgz", - "integrity": "sha512-hkTRytqMceXfnSwPnryIqKkxKJjfcvtVqJrWRb8tgmfyUsGajIgQqDFxCJ+As+l9VLUCcmx6XIYoXeQe2Ih0UA==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-2.22.0.tgz", + "integrity": "sha512-Yrx1E8fZk6tfSqYaNkwnxj/lOk+vj2KTbbpHDtYoK9MrrL/D204N/rCtcaVSz5bE29g6gW4xj0byresjlFyybg==", "requires": { "pure-rand": "^5.0.0" } @@ -6239,7 +6251,7 @@ "@ledgerhq/hw-transport-webusb": "^5.22.0", "@nodefactory/filsnap-adapter": "^0.2.1", "@nodefactory/filsnap-types": "^0.2.1", - "@zondax/filecoin-signing-tools": "@zondax/filecoin-signing-tools@github:Digital-MOB-Filecoin/filecoin-signing-tools-js", + "@zondax/filecoin-signing-tools": "github:Digital-MOB-Filecoin/filecoin-signing-tools-js", "bignumber.js": "^9.0.0", "bitcore-lib": "^8.22.2", "bitcore-mnemonic": "^8.22.2", @@ -6262,9 +6274,9 @@ "optional": true }, "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "optional": true } } @@ -6370,6 +6382,13 @@ "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", "requires": { "is-buffer": "~2.0.3" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" + } } }, "follow-redirects": { @@ -6547,276 +6566,57 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "optional": true }, - "ganache": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ganache/-/ganache-7.0.1.tgz", - "integrity": "sha512-P3mw+O23fD7BuWTdhr0WweOrTJCBRBFX22nMpmQDZgb1vmcYEv7PzNiKIfsI6PGOLh7PO8GuoRiMYBF+SlFikg==", - "requires": { - "@trufflesuite/bigint-buffer": "1.1.9", - "bufferutil": "4.0.5", - "emittery": "0.10.0", - "keccak": "3.0.1", - "leveldown": "6.1.0", - "secp256k1": "4.0.2", - "utf-8-validate": "5.0.7" + "ganache-cli": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.2.tgz", + "integrity": "sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw==", + "dev": true, + "requires": { + "ethereumjs-util": "6.2.1", + "source-map-support": "0.5.12", + "yargs": "13.2.4" }, "dependencies": { - "@trufflesuite/bigint-buffer": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.9.tgz", - "integrity": "sha512-bdM5cEGCOhDSwminryHJbRmXc1x7dPKg6Pqns3qyTwFlxsqUgxE29lsERS3PlIW1HTjoIGMUqsk1zQQwST1Yxw==", + "@types/bn.js": { + "version": "4.11.6", + "bundled": true, + "dev": true, "requires": { - "node-gyp-build": "4.3.0" + "@types/node": "*" } }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "@types/node": { + "version": "14.11.2", + "bundled": true, + "dev": true }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "@types/pbkdf2": { + "version": "3.1.0", + "bundled": true, + "dev": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "@types/node": "*" } }, - "bufferutil": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz", - "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==", - "optional": true, + "@types/secp256k1": { + "version": "4.0.1", + "bundled": true, + "dev": true, "requires": { - "node-gyp-build": "^4.3.0" + "@types/node": "*" } }, - "catering": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.0.tgz", - "integrity": "sha512-M5imwzQn6y+ODBfgi+cfgZv2hIUI6oYU/0f35Mdb1ujGeqeoI5tOnl9Q13DTH7LW+7er+NYq8stNOKZD/Z3U/A==", + "ansi-regex": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "bundled": true, + "dev": true, "requires": { - "queue-tick": "^1.0.0" - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emittery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz", - "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==" - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" - }, - "keccak": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "leveldown": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz", - "integrity": "sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w==", - "requires": { - "abstract-leveldown": "^7.2.0", - "napi-macros": "~2.0.0", - "node-gyp-build": "^4.3.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", - "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", - "requires": { - "buffer": "^6.0.3", - "catering": "^2.0.0", - "is-buffer": "^2.0.5", - "level-concat-iterator": "^3.0.0", - "level-supports": "^2.0.1", - "queue-microtask": "^1.2.3" - } - }, - "level-concat-iterator": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", - "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", - "requires": { - "catering": "^2.1.0" - } - }, - "level-supports": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", - "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==" - } - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "napi-macros": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" - }, - "node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" - }, - "node-gyp-build": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz", - "integrity": "sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==" - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" - }, - "queue-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.0.tgz", - "integrity": "sha512-ULWhjjE8BmiICGn3G8+1L9wFpERNxkf8ysxkAer4+TFdRefDaXOCV5m92aMB9FtBVmn/8sETXLXY6BfW7hyaWQ==" - }, - "secp256k1": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", - "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "utf-8-validate": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz", - "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==", - "optional": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - } - } - }, - "ganache-cli": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.2.tgz", - "integrity": "sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw==", - "dev": true, - "requires": { - "ethereumjs-util": "6.2.1", - "source-map-support": "0.5.12", - "yargs": "13.2.4" - }, - "dependencies": { - "@types/bn.js": { - "version": "4.11.6", - "bundled": true, - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/node": { - "version": "14.11.2", - "bundled": true, - "dev": true - }, - "@types/pbkdf2": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/secp256k1": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "dev": true, - "requires": { - "color-convert": "^1.9.0" + "color-convert": "^1.9.0" } }, "base-x": { @@ -7796,6 +7596,12 @@ "integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==", "optional": true }, + "graphql-executor": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.18.tgz", + "integrity": "sha512-upUSl7tfZCZ5dWG1XkOvpG70Yk3duZKcCoi/uJso4WxJVT6KIrcK4nZ4+2X/hzx46pL8wAukgYHY6iNmocRN+g==", + "optional": true + }, "graphql-extensions": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.15.0.tgz", @@ -7870,45 +7676,11 @@ "vinyl": "1.X" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "optional": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "optional": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } } } }, @@ -8359,14 +8131,6 @@ "requires": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -8378,6 +8142,14 @@ "multibase": "^4.0.1", "uint8arrays": "^3.0.0", "varint": "^5.0.2" + }, + "dependencies": { + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true + } } }, "uint8arrays": { @@ -8388,6 +8160,12 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -8464,12 +8242,6 @@ "requires": { "multiformats": "^9.4.2" } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true } } }, @@ -8492,8 +8264,20 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true } } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -8560,14 +8344,6 @@ "requires": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -8579,6 +8355,14 @@ "multibase": "^4.0.1", "uint8arrays": "^3.0.0", "varint": "^5.0.2" + }, + "dependencies": { + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true + } } }, "uint8arrays": { @@ -8636,14 +8420,6 @@ "requires": { "uint8arrays": "1.1.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -8665,12 +8441,6 @@ "requires": { "multiformats": "^9.4.2" } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true } } }, @@ -8682,6 +8452,12 @@ "requires": { "globalthis": "^1.0.1" } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -8727,6 +8503,15 @@ "requires": { "globalthis": "^1.0.1" } + }, + "native-fetch": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-2.0.1.tgz", + "integrity": "sha512-gv4Bea+ga9QdXINurpkEqun3ap3vnB+WYoe4c8ddqUYEH7B2h6iD39RF8uVN7OwmSfMY3RDxkvBnoI4e2/vLXQ==", + "optional": true, + "requires": { + "globalthis": "^1.0.1" + } } } }, @@ -8768,14 +8553,6 @@ "requires": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -8787,9 +8564,17 @@ "multibase": "^4.0.1", "uint8arrays": "^3.0.0", "varint": "^5.0.2" - } - }, - "uint8arrays": { + }, + "dependencies": { + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true + } + } + }, + "uint8arrays": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", @@ -8797,6 +8582,12 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -8864,12 +8655,6 @@ "requires": { "multiformats": "^9.4.2" } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true } } }, @@ -8892,6 +8677,12 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true } } }, @@ -8903,6 +8694,12 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -8953,12 +8750,6 @@ "requires": { "multiformats": "^9.4.2" } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true } } }, @@ -8979,14 +8770,6 @@ "requires": { "uint8arrays": "1.1.0", "varint": "^6.0.0" - }, - "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true - } } }, "multihashes": { @@ -9008,8 +8791,20 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true } } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -9045,21 +8840,6 @@ "uint8arrays": "^3.0.0", "varint": "^6.0.0" } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true } } }, @@ -9082,11 +8862,25 @@ "varint": "^6.0.0" }, "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true + "multibase": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", + "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", + "optional": true, + "requires": { + "@multiformats/base-x": "^4.0.1", + "web-encoding": "^1.0.6" + } + }, + "uint8arrays": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-1.1.0.tgz", + "integrity": "sha512-cLdlZ6jnFczsKf5IH1gPHTtcHtPGho5r4CvctohmQjw8K7Q3gFdfIGHxSTdTaCKrL4w09SsPRJTqRS0drYeszA==", + "optional": true, + "requires": { + "multibase": "^3.0.0", + "web-encoding": "^1.0.2" + } } } }, @@ -9101,16 +8895,28 @@ "varint": "^5.0.2" }, "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true } } + }, + "uint8arrays": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", + "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "optional": true, + "requires": { + "multiformats": "^9.4.2" + } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -9154,9 +8960,10 @@ } }, "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "optional": true }, "is-callable": { "version": "1.2.4", @@ -9777,9 +9584,9 @@ } }, "iter-tools": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/iter-tools/-/iter-tools-7.2.0.tgz", - "integrity": "sha512-wU0BpT8CaJCvXuhBy3WvshLhDwrsrrxWv77B4cSECnqWRm0tv2ozQRQm7M5dCkzoaQCLyRmGO0P2jDVSw5Hjvw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/iter-tools/-/iter-tools-7.2.2.tgz", + "integrity": "sha512-4PFLfSmndJgzA5wmyAZTJmgrJiDlQK2cGFdfEu9QPzzAnjY59yTbSnzFM/6sclMRQ+Y1MbdhLcVl74djK8PCVQ==", "optional": true, "requires": { "@babel/runtime": "^7.12.1" @@ -9894,13 +9701,18 @@ "dev": true }, "json-pointer": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.1.tgz", - "integrity": "sha512-3OvjqKdCBvH41DLpV4iSt6v2XhZXV1bPB4OROuknvUXI7ZQNofieCPkmE26stEJ9zdQuvIxDHCuYhfgxFAAs+Q==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", "requires": { "foreach": "^2.0.4" } }, + "json-rpc-2.0": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/json-rpc-2.0/-/json-rpc-2.0-1.1.0.tgz", + "integrity": "sha512-A4v62rLgwC2U+G3hA1PKRgAXKS55ItTtjUJVbIq68yccD+AUJZSdjayxd0PLQD8i3ustyLvvaYKW6+DglScrjA==" + }, "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -10040,14 +9852,6 @@ "optional": true, "requires": { "is-buffer": "^1.1.5" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "optional": true - } } }, "lazy-debug-legacy": { @@ -10065,6 +9869,12 @@ "readable-stream": "^2.0.5" }, "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -10128,6 +9938,12 @@ "integrity": "sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q==", "optional": true }, + "level-concat-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", + "optional": true + }, "level-errors": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", @@ -10176,12 +9992,6 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", "optional": true - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "optional": true } } }, @@ -10195,44 +10005,6 @@ "levelup": "^4.3.2" }, "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "optional": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "optional": true - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "optional": true, - "requires": { - "xtend": "^4.0.2" - } - }, "levelup": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", @@ -10248,6 +10020,15 @@ } } }, + "level-supports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", + "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", + "optional": true, + "requires": { + "xtend": "^4.0.2" + } + }, "level-write-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz", @@ -10279,12 +10060,6 @@ "xtend": "~4.0.0" } }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "optional": true - }, "node-gyp-build": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.8.0.tgz", @@ -10303,6 +10078,28 @@ "level-errors": "~2.0.0", "level-iterator-stream": "~4.0.0", "xtend": "~4.0.0" + }, + "dependencies": { + "abstract-leveldown": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz", + "integrity": "sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q==", + "optional": true, + "requires": { + "level-concat-iterator": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "deferred-leveldown": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.0.1.tgz", + "integrity": "sha512-BXohsvTedWOLkj2n/TY+yqVlrCWa2Zs8LSxh3uCAgFOru7/pjxKyZAexGa1j83BaKloER4PqUyQ9rGPJLt9bqA==", + "optional": true, + "requires": { + "abstract-leveldown": "~6.0.0", + "inherits": "^2.0.3" + } + } } }, "levn": { @@ -10395,12 +10192,6 @@ "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", "optional": true }, - "lodash.assignin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", - "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=", - "optional": true - }, "lodash.assigninwith": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assigninwith/-/lodash.assigninwith-4.2.0.tgz", @@ -10460,12 +10251,6 @@ "resolved": "https://registry.npmjs.org/lodash.partition/-/lodash.partition-4.6.0.tgz", "integrity": "sha1-o45GtzRp4EILDaEhLmbUFL42S6Q=" }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", - "optional": true - }, "lodash.rest": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.5.tgz", @@ -10689,17 +10474,6 @@ "inherits": "~2.0.1", "ltgt": "~2.2.0", "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "optional": true, - "requires": { - "xtend": "~4.0.0" - } - } } }, "memorystream": { @@ -10739,6 +10513,12 @@ "readable-stream": "^2.0.1" }, "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -10843,9 +10623,9 @@ } }, "mimic-fn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", - "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "optional": true }, "mimic-response": { @@ -11538,9 +11318,9 @@ } }, "multiformats": { - "version": "9.6.2", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.6.2.tgz", - "integrity": "sha512-1dKng7RkBelbEZQQD2zvdzYKgUmtggpWl+GXQBYhnEGGkV6VIYfWgV3VSeyhcUFFEelI5q4D0etCJZ7fbuiamQ==", + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.6.4.tgz", + "integrity": "sha512-fCCB6XMrr6CqJiHNjfFNGT0v//dxOBMrOMqUIzpPc/mmITweLEyhvMpY9bF+jZ9z3vaMAau5E8B68DW77QMXkg==", "optional": true }, "multihashes": { @@ -11655,13 +11435,10 @@ "optional": true }, "native-fetch": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-2.0.1.tgz", - "integrity": "sha512-gv4Bea+ga9QdXINurpkEqun3ap3vnB+WYoe4c8ddqUYEH7B2h6iD39RF8uVN7OwmSfMY3RDxkvBnoI4e2/vLXQ==", - "optional": true, - "requires": { - "globalthis": "^1.0.1" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-3.0.0.tgz", + "integrity": "sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw==", + "optional": true }, "needle": { "version": "2.9.1", @@ -12325,20 +12102,12 @@ } }, "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "optional": true, "requires": { - "mimic-fn": "^2.1.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "optional": true - } + "mimic-fn": "^1.0.0" } }, "opencollective-postinstall": { @@ -12431,6 +12200,12 @@ "readable-stream": "^2.0.1" }, "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -12582,14 +12357,6 @@ "optional": true, "requires": { "event-iterator": "^1.0.0" - }, - "dependencies": { - "event-iterator": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-1.2.0.tgz", - "integrity": "sha512-Daq7YUl0Mv1i4QEgzGQlz0jrx7hUFNyLGbiF+Ap7NCMCjDLCCnolyj6s0TAc6HmrBziO5rNVHsPwGMp7KdRPvw==", - "optional": true - } } }, "parse-asn1": { @@ -12809,12 +12576,6 @@ "requires": { "multiformats": "^9.4.2" } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "optional": true } } }, @@ -12837,6 +12598,12 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "optional": true } } }, @@ -12848,6 +12615,12 @@ "requires": { "multiformats": "^9.4.2" } + }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "optional": true } } }, @@ -13070,96 +12843,47 @@ "string_decoder": "~0.10.x" } }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "optional": true + }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "optional": true }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "optional": true - } - } - }, - "pouchdb-abstract-mapreduce": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.0.0.tgz", - "integrity": "sha512-C1sb9AIJYTFOUPtuPaAYBCfd09DK82LmeYEtM4h1Z+wG76zj9U1NEg8T+CwxcpOF7eX3ZN5EmSfa3k/ZlyMUgQ==", - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "pouchdb-collate": "7.0.0", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-fetch": "7.0.0", - "pouchdb-mapreduce-utils": "7.0.0", - "pouchdb-md5": "7.0.0", - "pouchdb-utils": "7.0.0" - }, - "dependencies": { - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "optional": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "optional": true - }, - "pouchdb-binary-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz", - "integrity": "sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw==", - "optional": true, - "requires": { - "buffer-from": "1.1.0" - } - }, - "pouchdb-collections": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz", - "integrity": "sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q==", - "optional": true - }, - "pouchdb-errors": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz", - "integrity": "sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA==", - "optional": true, - "requires": { - "inherits": "2.0.3" - } - }, - "pouchdb-md5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz", - "integrity": "sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ==", - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "spark-md5": "3.0.0" - } - }, - "pouchdb-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz", - "integrity": "sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ==", + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", "optional": true, "requires": { - "argsarray": "0.0.1", - "clone-buffer": "1.0.0", - "immediate": "3.0.6", - "inherits": "2.0.3", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-md5": "7.0.0", - "uuid": "3.2.1" + "readable-stream": "2 || 3" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "optional": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "optional": true, + "requires": { + "safe-buffer": "~5.2.0" + } + } } }, "uuid": { @@ -13170,6 +12894,22 @@ } } }, + "pouchdb-abstract-mapreduce": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.2.2.tgz", + "integrity": "sha512-7HWN/2yV2JkwMnGnlp84lGvFtnm0Q55NiBUdbBcaT810+clCGKvhssBCrXnmwShD1SXTwT83aszsgiSfW+SnBA==", + "optional": true, + "requires": { + "pouchdb-binary-utils": "7.2.2", + "pouchdb-collate": "7.2.2", + "pouchdb-collections": "7.2.2", + "pouchdb-errors": "7.2.2", + "pouchdb-fetch": "7.2.2", + "pouchdb-mapreduce-utils": "7.2.2", + "pouchdb-md5": "7.2.2", + "pouchdb-utils": "7.2.2" + } + }, "pouchdb-adapter-leveldb-core": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/pouchdb-adapter-leveldb-core/-/pouchdb-adapter-leveldb-core-7.2.2.tgz", @@ -13192,50 +12932,12 @@ "through2": "3.0.2" }, "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "optional": true }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "optional": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "optional": true - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "optional": true, - "requires": { - "xtend": "^4.0.2" - } - }, "levelup": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", @@ -13499,9 +13201,9 @@ } }, "pouchdb-collate": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-7.0.0.tgz", - "integrity": "sha512-0O67rnNGVD9OUbDx+6DLPcE3zz7w6gieNCvrbvaI5ibIXuLpyMyLjD6OdRe/19LbstEfZaOp+SYUhQs+TP8Plg==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-7.2.2.tgz", + "integrity": "sha512-/SMY9GGasslknivWlCVwXMRMnQ8myKHs4WryQ5535nq1Wj/ehpqWloMwxEQGvZE1Sda3LOm7/5HwLTcB8Our+w==", "optional": true }, "pouchdb-collections": { @@ -13540,100 +13242,48 @@ } }, "pouchdb-fetch": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-7.0.0.tgz", - "integrity": "sha512-9XGEogHQcYZCJp2PvLE7oDgGzIsBy4Vh28EhDS26iJFwtDVpHYm7fIzJ//SDGcUNjnlR9WKTegFLg9p7jYIQWQ==", - "optional": true, - "requires": { - "fetch-cookie": "0.7.0", - "node-fetch": "^2.0.0" - } - }, - "pouchdb-find": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-7.0.0.tgz", - "integrity": "sha512-nqAdnbmmxcIrWF//k5LKDGXaDZScgvhqVoyGjXhiUan35ASI0KYn1R8Z0nGsl0PD/DRK1kveQjbC9+50QgdTRg==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-7.2.2.tgz", + "integrity": "sha512-lUHmaG6U3zjdMkh8Vob9GvEiRGwJfXKE02aZfjiVQgew+9SLkuOxNw3y2q4d1B6mBd273y1k2Lm0IAziRNxQnA==", "optional": true, "requires": { - "pouchdb-abstract-mapreduce": "7.0.0", - "pouchdb-collate": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-fetch": "7.0.0", - "pouchdb-md5": "7.0.0", - "pouchdb-selector-core": "7.0.0", - "pouchdb-utils": "7.0.0" + "abort-controller": "3.0.0", + "fetch-cookie": "0.10.1", + "node-fetch": "2.6.0" }, "dependencies": { - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "optional": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "optional": true - }, - "pouchdb-binary-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz", - "integrity": "sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw==", - "optional": true, - "requires": { - "buffer-from": "1.1.0" - } - }, - "pouchdb-collections": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz", - "integrity": "sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q==", - "optional": true - }, - "pouchdb-errors": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz", - "integrity": "sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA==", - "optional": true, - "requires": { - "inherits": "2.0.3" - } - }, - "pouchdb-md5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz", - "integrity": "sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ==", - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "spark-md5": "3.0.0" - } - }, - "pouchdb-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz", - "integrity": "sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ==", + "fetch-cookie": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.10.1.tgz", + "integrity": "sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g==", "optional": true, "requires": { - "argsarray": "0.0.1", - "clone-buffer": "1.0.0", - "immediate": "3.0.6", - "inherits": "2.0.3", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-md5": "7.0.0", - "uuid": "3.2.1" + "tough-cookie": "^2.3.3 || ^3.0.1 || ^4.0.0" } }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", "optional": true } } }, + "pouchdb-find": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-7.2.2.tgz", + "integrity": "sha512-BmFeFVQ0kHmDehvJxNZl9OmIztCjPlZlVSdpijuFbk/Fi1EFPU1BAv3kLC+6DhZuOqU/BCoaUBY9sn66pPY2ag==", + "optional": true, + "requires": { + "pouchdb-abstract-mapreduce": "7.2.2", + "pouchdb-collate": "7.2.2", + "pouchdb-errors": "7.2.2", + "pouchdb-fetch": "7.2.2", + "pouchdb-md5": "7.2.2", + "pouchdb-selector-core": "7.2.2", + "pouchdb-utils": "7.2.2" + } + }, "pouchdb-json": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/pouchdb-json/-/pouchdb-json-7.2.2.tgz", @@ -13644,85 +13294,15 @@ } }, "pouchdb-mapreduce-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.0.0.tgz", - "integrity": "sha512-kj74SpirbQAC7BSlBpPO42RBbUw8XmxbkLCnHyL7CVktyEn24VHbCoirutUI2mRPii7MAVHtleGKXRijR5QIpw==", - "optional": true, - "requires": { - "argsarray": "0.0.1", - "inherits": "2.0.3", - "pouchdb-collections": "7.0.0", - "pouchdb-utils": "7.0.0" - }, - "dependencies": { - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "optional": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "optional": true - }, - "pouchdb-binary-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz", - "integrity": "sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw==", - "optional": true, - "requires": { - "buffer-from": "1.1.0" - } - }, - "pouchdb-collections": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz", - "integrity": "sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q==", - "optional": true - }, - "pouchdb-errors": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz", - "integrity": "sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA==", - "optional": true, - "requires": { - "inherits": "2.0.3" - } - }, - "pouchdb-md5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz", - "integrity": "sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ==", - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "spark-md5": "3.0.0" - } - }, - "pouchdb-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz", - "integrity": "sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ==", - "optional": true, - "requires": { - "argsarray": "0.0.1", - "clone-buffer": "1.0.0", - "immediate": "3.0.6", - "inherits": "2.0.3", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-md5": "7.0.0", - "uuid": "3.2.1" - } - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "optional": true - } + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.2.2.tgz", + "integrity": "sha512-rAllb73hIkU8rU2LJNbzlcj91KuulpwQu804/F6xF3fhZKC/4JQMClahk+N/+VATkpmLxp1zWmvmgdlwVU4HtQ==", + "optional": true, + "requires": { + "argsarray": "0.0.1", + "inherits": "2.0.4", + "pouchdb-collections": "7.2.2", + "pouchdb-utils": "7.2.2" } }, "pouchdb-md5": { @@ -13750,83 +13330,13 @@ "optional": true }, "pouchdb-selector-core": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-7.0.0.tgz", - "integrity": "sha512-8Lpa8S7TCRGUEy3aEMd+Zy85IU4KwCVNf3TT+HJ8XAKICtmgArPrQGimIXFOHoyjRSpCXtByzEriP8CBCUjp7g==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-7.2.2.tgz", + "integrity": "sha512-XYKCNv9oiNmSXV5+CgR9pkEkTFqxQGWplnVhO3W9P154H08lU0ZoNH02+uf+NjZ2kjse7Q1fxV4r401LEcGMMg==", "optional": true, "requires": { - "pouchdb-collate": "7.0.0", - "pouchdb-utils": "7.0.0" - }, - "dependencies": { - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "optional": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "optional": true - }, - "pouchdb-binary-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz", - "integrity": "sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw==", - "optional": true, - "requires": { - "buffer-from": "1.1.0" - } - }, - "pouchdb-collections": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz", - "integrity": "sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q==", - "optional": true - }, - "pouchdb-errors": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz", - "integrity": "sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA==", - "optional": true, - "requires": { - "inherits": "2.0.3" - } - }, - "pouchdb-md5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz", - "integrity": "sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ==", - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "spark-md5": "3.0.0" - } - }, - "pouchdb-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz", - "integrity": "sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ==", - "optional": true, - "requires": { - "argsarray": "0.0.1", - "clone-buffer": "1.0.0", - "immediate": "3.0.6", - "inherits": "2.0.3", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-md5": "7.0.0", - "uuid": "3.2.1" - } - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "optional": true - } + "pouchdb-collate": "7.2.2", + "pouchdb-utils": "7.2.2" } }, "pouchdb-utils": { @@ -13886,9 +13396,9 @@ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "optional": true }, "process-on-spawn": { @@ -13934,9 +13444,9 @@ }, "dependencies": { "@types/node": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.13.tgz", - "integrity": "sha512-Y86MAxASe25hNzlDbsviXl8jQHb0RDvKt4c40ZJQ1Don0AAL0STLZSs4N+6gLEO55pedy7r2cLwS+ZDxPm/2Bw==", + "version": "17.0.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz", + "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==", "optional": true } } @@ -14411,23 +13921,6 @@ "requires": { "onetime": "^2.0.0", "signal-exit": "^3.0.2" - }, - "dependencies": { - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "optional": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "optional": true, - "requires": { - "mimic-fn": "^1.0.0" - } - } } }, "retimer": { @@ -14926,6 +14419,21 @@ "restore-cursor": "^3.1.0" } }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "optional": true + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "optional": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -15192,9 +14700,9 @@ "optional": true }, "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "optional": true } } @@ -15368,24 +14876,21 @@ } }, "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "optional": true, - "requires": { - "readable-stream": "2 || 3" - } - }, - "through2-filter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", - "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "optional": true, "requires": { - "through2": "~2.0.0", - "xtend": "~4.0.0" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" }, "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -15409,19 +14914,19 @@ "requires": { "safe-buffer": "~5.1.0" } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "optional": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } } } }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "optional": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, "tildify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", @@ -15560,17 +15065,17 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "truffle": { - "version": "5.4.31", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.4.31.tgz", - "integrity": "sha512-qUzLgo9jkI4d9O7fUEQHNXGWSjPjLsN03E2n50pwbAU0XBkOv4vSN+iQTX9QMfk/XBjOf6YN/BnAMubqznxOZg==", - "requires": { - "@truffle/db": "^0.5.49", - "@truffle/db-loader": "^0.0.28", - "@truffle/debugger": "^9.2.13", - "@truffle/preserve-fs": "^0.2.5", - "@truffle/preserve-to-buckets": "^0.2.5", - "@truffle/preserve-to-filecoin": "^0.2.6", - "@truffle/preserve-to-ipfs": "^0.2.6", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.5.2.tgz", + "integrity": "sha512-c+L7vhuKvwl+A1YRysMbGRuDvr2MyzYLWv0zHCiT4kGHqvmo8+i9hUUjfgyY5v/9yoMUD5HEiv8OGArfK/v37Q==", + "requires": { + "@truffle/db": "^0.5.54", + "@truffle/db-loader": "^0.1.4", + "@truffle/debugger": "^9.2.18", + "@truffle/preserve-fs": "^0.2.6", + "@truffle/preserve-to-buckets": "^0.2.7", + "@truffle/preserve-to-filecoin": "^0.2.7", + "@truffle/preserve-to-ipfs": "^0.2.7", "app-module-path": "^2.2.0", "ganache": "7.0.1", "mocha": "8.1.2", @@ -15582,6 +15087,14 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -15631,6 +15144,225 @@ "path-exists": "^4.0.0" } }, + "ganache": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ganache/-/ganache-7.0.1.tgz", + "integrity": "sha512-P3mw+O23fD7BuWTdhr0WweOrTJCBRBFX22nMpmQDZgb1vmcYEv7PzNiKIfsI6PGOLh7PO8GuoRiMYBF+SlFikg==", + "requires": { + "@trufflesuite/bigint-buffer": "1.1.9", + "bufferutil": "4.0.5", + "emittery": "0.10.0", + "keccak": "3.0.1", + "leveldown": "6.1.0", + "secp256k1": "4.0.2", + "utf-8-validate": "5.0.7" + }, + "dependencies": { + "@trufflesuite/bigint-buffer": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.9.tgz", + "integrity": "sha512-bdM5cEGCOhDSwminryHJbRmXc1x7dPKg6Pqns3qyTwFlxsqUgxE29lsERS3PlIW1HTjoIGMUqsk1zQQwST1Yxw==", + "requires": { + "node-gyp-build": "4.3.0" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "bufferutil": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz", + "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==", + "optional": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, + "catering": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.0.tgz", + "integrity": "sha512-M5imwzQn6y+ODBfgi+cfgZv2hIUI6oYU/0f35Mdb1ujGeqeoI5tOnl9Q13DTH7LW+7er+NYq8stNOKZD/Z3U/A==", + "requires": { + "queue-tick": "^1.0.0" + } + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "emittery": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz", + "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==" + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" + }, + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "leveldown": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz", + "integrity": "sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w==", + "requires": { + "abstract-leveldown": "^7.2.0", + "napi-macros": "~2.0.0", + "node-gyp-build": "^4.3.0" + }, + "dependencies": { + "abstract-leveldown": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", + "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", + "requires": { + "buffer": "^6.0.3", + "catering": "^2.0.0", + "is-buffer": "^2.0.5", + "level-concat-iterator": "^3.0.0", + "level-supports": "^2.0.1", + "queue-microtask": "^1.2.3" + } + }, + "level-concat-iterator": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", + "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", + "requires": { + "catering": "^2.1.0" + } + }, + "level-supports": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", + "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==" + } + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "napi-macros": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", + "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" + }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node-gyp-build": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz", + "integrity": "sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==" + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "queue-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.0.tgz", + "integrity": "sha512-ULWhjjE8BmiICGn3G8+1L9wFpERNxkf8ysxkAer4+TFdRefDaXOCV5m92aMB9FtBVmn/8sETXLXY6BfW7hyaWQ==" + }, + "secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "utf-8-validate": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz", + "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==", + "optional": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + } + } + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -15783,14 +15515,6 @@ "strip-ansi": "^5.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -16050,40 +15774,6 @@ "through2-filter": "^3.0.0" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "optional": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, "through2-filter": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", @@ -16353,9 +16043,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", "optional": true }, "vali-date": { @@ -16435,6 +16125,12 @@ "vinyl": "^1.0.0" }, "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -16458,16 +16154,6 @@ "requires": { "safe-buffer": "~5.1.0" } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "optional": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } } } }, diff --git a/package.json b/package.json index f15468b..f1d6f81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "azimuth-cli", - "version": "0.1.3", + "version": "1.0.0", "description": "Urbit Bridge for the command line", "main": "index.js", "bin": { @@ -41,10 +41,11 @@ }, "dependencies": { "axios": "^0.25.0", - "azimuth-js": "0.22.2", + "azimuth-js": "^0.23.0", "chalk": "^4.1.2", - "lodash": "^4.17.21", "hdkey": "2.0.1", + "json-rpc-2.0": "^1.1.0", + "lodash": "^4.17.21", "up8-ticket": "^0.2.0", "urbit-key-generation": "^0.20.1", "urbit-ob": "^5.0.1", diff --git a/test/test.js b/test/test.js index 6e768dd..7935973 100644 --- a/test/test.js +++ b/test/test.js @@ -87,7 +87,7 @@ fs.mkdirSync(testWorkDir, { recursive: true }); console.log('Test work directory is: '+testWorkDir); -const baseArgs = ['--eth-provider=ganache', `--work-dir=${testWorkDir}`]; +const baseArgs = ['--eth-provider=ganache', `--work-dir=${testWorkDir}`, '--use-azimuth']; // accounts const mnemonic = 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten'; @@ -176,11 +176,11 @@ it('prepare the environment', async function() { // planet1d = planet1d + galaxy; }); -describe('#list', async function() { +describe('#get', async function() { describe('children 0', async function() { it('should list all children of zod', async function() { - let children = await execCliAndGetLines('list', 'children', '0', ...baseArgs); + let children = await execCliAndGetLines('get', 'children', '0', ...baseArgs); children.shift();//starts with a header string expect(children).to.have.lengthOf(255); }); @@ -188,7 +188,7 @@ describe('#list', async function() { describe('children 0 --spawned', async function() { it('should list all spawned children of zod', async function() { - let children = await execCliAndGetLines('list', 'children', '0', '--spawned', ...baseArgs); + let children = await execCliAndGetLines('get', 'children', '0', '--spawned', ...baseArgs); children.shift();//starts with a header string expect(children).to.have.lengthOf(0); }); @@ -196,7 +196,7 @@ describe('#list', async function() { describe('children 0 --unspawned', async function() { it('should list all unspawned children of zod', async function() { - let children = await execCliAndGetLines('list', 'children', '0', '--unspawned', ...baseArgs); + let children = await execCliAndGetLines('get', 'children', '0', '--unspawned', ...baseArgs); children.shift();//starts with a header string expect(children).to.have.lengthOf(255); expect(children).to.have.lengthOf.at.most(255); @@ -205,7 +205,7 @@ describe('#list', async function() { describe('owner zodAddr', async function() { it('should list owner of two galaxies', async function() { - let children = await execCliAndGetLines('list', 'owner', ac0, ...baseArgs); + let children = await execCliAndGetLines('get', 'owner', ac0, ...baseArgs); children.shift();//starts with a header string expect(children).to.have.lengthOf(2); }); @@ -213,7 +213,7 @@ describe('#list', async function() { describe('details zod', async function() { it('should list details about zod', async function() { - let output = await execCliAndGetLines('list', 'details', galaxy, ...baseArgs); + let output = await execCliAndGetLines('get', 'details', galaxy, ...baseArgs); expect(output).to.have.lengthOf.at.least(10); }); }); @@ -258,23 +258,23 @@ describe('#generate', async function() { }); -describe('#modify', async function() { +describe('#modify-l1', async function() { this.timeout(10000); describe('network-key --points=zod', async function() { it('should set the network keys for zod', async function() { //this also allows us to use zod to spawn further points, only booted points can spawn - let lines = await execCliAndGetLines('modify', 'network-key', `--points=${galaxy}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc0); - assert.isTrue(files.fileExists(testWorkDir, 'zod-reciept-networkkey.json')); + let lines = await execCliAndGetLines('modify-l1', 'network-key', `--points=${galaxy}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc0); + assert.isTrue(files.fileExists(testWorkDir, 'zod-receipt-networkkey.json')); }); }); describe('spawn --points=marzod', async function() { it('should spawn the first star under zod', async function() { - let lines = await execCliAndGetLines('modify', 'spawn', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc0); - assert.isTrue(files.fileExists(testWorkDir, 'marzod-reciept-spawn.json')); + let lines = await execCliAndGetLines('modify-l1', 'spawn', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc0); + assert.isTrue(files.fileExists(testWorkDir, 'marzod-receipt-spawn.json')); - let children = await execCliAndGetLines('list', 'children', 'zod', '--spawned', ...baseArgs); + let children = await execCliAndGetLines('get', 'children', 'zod', '--spawned', ...baseArgs); children.shift();//starts with a header string expect(children).to.have.lengthOf.at.least(1); }); @@ -282,25 +282,25 @@ describe('#modify', async function() { describe('management-proxy --points=marzod', async function() { it('should set the management proxy of marzod', async function() { - let lines = await execCliAndGetLines('modify', 'management-proxy', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc1); - assert.isTrue(files.fileExists(testWorkDir, 'marzod-reciept-managementproxy.json')); + let lines = await execCliAndGetLines('modify-l1', 'management-proxy', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc1); + assert.isTrue(files.fileExists(testWorkDir, 'marzod-receipt-managementproxy.json')); }); }); describe('spawn-proxy --points=marzod', async function() { it('should set the spawn proxy of marzod', async function() { - let lines = await execCliAndGetLines('modify', 'spawn-proxy', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc1); - assert.isTrue(files.fileExists(testWorkDir, 'marzod-reciept-spawnproxy.json')); + let lines = await execCliAndGetLines('modify-l1', 'spawn-proxy', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc1); + assert.isTrue(files.fileExists(testWorkDir, 'marzod-receipt-spawnproxy.json')); }); }); describe('transfer --points=marzod', async function() { it('should transfer marzod to acc2', async function() { - let lines = await execCliAndGetLines('modify', 'transfer', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc2); - assert.isTrue(files.fileExists(testWorkDir, 'marzod-reciept-transfer.json')); + let lines = await execCliAndGetLines('modify-l1', 'transfer', `--points=${star1}`, ...baseArgs, ...modifyBaseArgsFromAc0ToAc2); + assert.isTrue(files.fileExists(testWorkDir, 'marzod-receipt-transfer.json')); //ac2 should have one child now - let children = await execCliAndGetLines('list', 'owner', ac2, ...baseArgs); + let children = await execCliAndGetLines('get', 'owner', ac2, ...baseArgs); children.shift();//starts with a header string expect(children).to.have.lengthOf(1); }); diff --git a/utils/azimuth.js b/utils/azimuth.js index 7ad61d0..595be4a 100644 --- a/utils/azimuth.js +++ b/utils/azimuth.js @@ -17,14 +17,31 @@ function getChildren(point) { async function isManagementProxy(contracts, point, address) { - if(!ajs.utils.isValidAddress(address)) throw 'address not valid'; + if(!ajs.utils.isValidAddress(address)) throw 'address not valid'; - managedPoints = await ajs.azimuth.getManagerFor(contracts, address); - return _.includes(managedPoints, point.toString()); + managedPoints = await ajs.azimuth.getManagerFor(contracts, address); + return _.includes(managedPoints, point.toString()); +} + +async function getDominion(contracts, point) +{ + //if the ownership or spawn proxy address is set to 0x111...111 on azimuth, then the point is on l2 + const l2address = '0x1111111111111111111111111111111111111111' + + var ownerAddress = await ajs.azimuth.getOwner(contracts, point); + if(ajs.utils.addressEquals(ownerAddress, l2address)) + return 'l2' + + var spawnProxyAddress = await ajs.azimuth.getSpawnProxy(contracts, point); + if(ajs.utils.addressEquals(spawnProxyAddress, l2address)) + return 'spawn' + + return 'l1' } module.exports = { getChildren, - isManagementProxy + isManagementProxy, + getDominion } diff --git a/utils/eth.js b/utils/eth.js index 72c09c5..f367a4a 100644 --- a/utils/eth.js +++ b/utils/eth.js @@ -158,10 +158,10 @@ async function setGasSignSendAndSaveTransaction(ctx, tx, privateKey, argv, workD process.exit(1); } let receipt = await waitForTransactionReceipt(ctx.web3, signedTx); - //save the reciept if the transacation was accepted + //save the receipt if the transacation was accepted // status will be false if the blockchain rejected the transaction if(receipt != null && receipt.status){ - let receiptFileName = patp.substring(1)+`-reciept-${actionName}.json`; + let receiptFileName = patp.substring(1)+`-receipt-${actionName}.json`; files.writeFile(workDir, receiptFileName, receipt); console.error("Transaction accepted by the blockchain.") } diff --git a/utils/find-points.js b/utils/find-points.js index f3f4fd7..7d3abe6 100644 --- a/utils/find-points.js +++ b/utils/find-points.js @@ -26,7 +26,7 @@ function getPoints(argv, workDir, wallets){ //wallets is an object with the keys being the p pointsRaw = Object.keys(wallets); } - console.log(pointsRaw) + //console.log(pointsRaw) let points = _(pointsRaw) .map(p => validate.point(p, false)) .reject(_.isNull) diff --git a/utils/index.js b/utils/index.js index 483beaa..a668025 100644 --- a/utils/index.js +++ b/utils/index.js @@ -3,11 +3,13 @@ const validate = require("./validate"); const eth = require("./eth"); const azimuth = require("./azimuth"); const findPoints = require("./find-points"); +const rollerApi = require("./roller-api"); module.exports = { files, validate, eth, azimuth, - findPoints + findPoints, + rollerApi } \ No newline at end of file diff --git a/utils/roller-api.js b/utils/roller-api.js new file mode 100644 index 0000000..1d4b9c1 --- /dev/null +++ b/utils/roller-api.js @@ -0,0 +1,375 @@ +const ob = require('urbit-ob') +const ajsUtils = require('azimuth-js').utils; +const axios = require('axios') +const {JSONRPCClient } = require('json-rpc-2.0') +const validate = require('./validate') + +const { hexToBytes } = require('web3-utils'); +const { ecdsaSign } = require('secp256k1'); + +const CRYPTO_SUITE_VERSION = 1; +let requestCounter = 0; + +async function selectDataSource(argv){ + if(argv.useRoller){ + try{ + await getRollerConfig(createClient(argv)); //will throw a connection refused error if not available + return 'roller'; + } + catch(error){ + throw 'Roller not available. You required the usage of the roller, please ensure it is running and can be reached.' + } + } + else if(argv.useAzimuth){ + return 'azimuth'; + } + else{ + //check if the roller client is available; + // if yes, use the roller, otherwise use azimuth + try{ + await getRollerConfig(createClient(argv)); //will throw a connection refused error if not available + return 'roller'; + } + catch(error){ + console.log('Roller not available, falling back to using azimuth, information might not be correct.'); + return 'azimuth'; + } + } + throw 'could not determine data source'; +} + +function nextId(){ + requestCounter++; + return requestCounter.toString(); //the roller rpc need a string ID, otherwise it does it does not work +} + +function createClient(argv){ + let rollerUrl = + argv.rollerProvider == 'local' + ? argv.rollerLocal + : argv.rollerProvider == 'urbit' + ? argv.rollerUrbit + : null; + //console.log(rollerUrl); + if(rollerUrl == null){ + rollerUrl = "http://localhost:8080/v1/roller"; + } + var client = new JSONRPCClient(async function (jsonRPCRequest) + { + //TODO: add try catch, check for 200 response (see https://www.npmjs.com/package/json-rpc-2.0), show error codes + + //console.log(JSON.stringify(jsonRPCRequest)); + var response = await axios.post(rollerUrl, JSON.stringify(jsonRPCRequest)); + const jsonRPCResponse = response.data; + //console.log(jsonRPCResponse) + client.receive(jsonRPCResponse) + }, nextId); + return client; +} + +function signTransactionHash(msg, pk) { + const pkBuffer = Buffer.from(pk, 'hex'); + if(!ajsUtils.isValidPrivate(pkBuffer)) + throw 'pk is not valid'; + + // msg is a keccak-256 hash + // + const hashed = Buffer.from(hexToBytes(msg)); + const { signature, recid } = ecdsaSign(hashed, pkBuffer); + // add key recovery parameter + const ethSignature = new Uint8Array(65); + ethSignature.set(signature); + ethSignature[64] = recid; + return `0x${Buffer.from(ethSignature).toString('hex')}`; +} + +function getNonce(client, params){ + const ship = params.from.ship; + const nonceParams = { + from: params.from + }; + return client.request("getNonce", nonceParams); +} + +//use this if signing via metamask or wallet connect +async function prepareForSigning(client, method, params){ + const nonce = await getNonce(client, params); + const hashParams = { + tx: method, + nonce: nonce, + from: params.from, + data: params.data + } + return await client.request("prepareForSigning", hashParams); +} + +//use this if singing directly with pk +async function getUnsignedTx(client, method, params){ + const nonce = await getNonce(client, params); + const hashParams = { + tx: method, + nonce: nonce, + from: params.from, + data: params.data + } + var res = await client.request("getUnsignedTx", hashParams); + //console.log("RESULT: "+res); + return res; +} + +async function addSignature(client, method, params, privateKey){ + const hash = await getUnsignedTx(client, method, params); + const sig = signTransactionHash(hash, privateKey); + params["sig"] = sig; + return params; +} + +function createTransactionReceipt(method, params, txHash){ + return { + sig: params.sig, + hash: txHash, + type: method + } +} + +//============================================ +// API +//============================================ +// Roller JSON-RPC API documentation: +// https://documenter.getpostman.com/view/16338962/Tzm3nx7x + +function getRollerConfig(client){ + return client.request("getRollerConfig", { }); +} + +function getAllPending(client){ + return client.request("getAllPending", { }); +} + +function getPendingByAddress(client, address){ + return client.request("getPendingByAddress", { address: address }); +} + +function whenNextBatch(client){ + return client.request("whenNextBatch", { }); +} + + +function getPoint(client, point){ + const patp = ob.patp(validate.point(point, true)); + return client.request("getPoint", { ship: patp }); +} + +function getShips(client, address){ + return client.request("getShips", { address: address }); +} + +function getSpawned(client, point){ + const patp = ob.patp(validate.point(point, true)); + return client.request("getSpawned", { ship: patp }); +} + +function getUnspawned(client, point){ + const patp = ob.patp(validate.point(point, true)); + return client.request("getUnspawned", { ship: patp }); +} + +async function spawn(client, parentPoint, spawnPoint, newOwnerAddress, signingAddress, privateKey){ + const parentPatp = ob.patp(validate.point(parentPoint, true)); + const spawnPatp = ob.patp(validate.point(spawnPoint, true)); + const newOwnerAddressValid = validate.address(newOwnerAddress, true); + const signingAddressValid = validate.address(signingAddress, true); + const proxy = await getSpawnProxyType(client, parentPatp, signingAddress); + //console.log("Proxy: "+proxy); + + let params = { + address: signingAddressValid, + from: { + ship: parentPatp, + proxy: proxy + }, + data: { + ship: spawnPatp, + address: newOwnerAddressValid, + } + }; + const method = "spawn"; + params = await addSignature(client, method, params, privateKey); + var tx = await client.request(method, params); + return createTransactionReceipt(method, params, tx); +} + +async function transferPoint(client, point, reset, newOwnerAddress, signingAddress, privateKey){ + const patp = ob.patp(validate.point(point, true)); + const newOwnerAddressValid = validate.address(newOwnerAddress, true); + const signingAddressValid = validate.address(signingAddress, true); + const proxy = await getTransferProxyType(client, patp, signingAddress); + + let params = { + address: signingAddressValid, + from: { + ship: patp, + proxy: proxy + }, + data: { + reset: reset, + address: newOwnerAddressValid, + } + }; + const method = "transferPoint"; + params = await addSignature(client, method, params, privateKey); + var tx = await client.request(method, params); + return createTransactionReceipt(method, params, tx); +} + +async function setManagementProxy(client, point, managementProxyAddress, signingAddress, privateKey){ + const patp = ob.patp(validate.point(point, true)); + const targetAddress = validate.address(managementProxyAddress, true); + const signingAddressValid = validate.address(signingAddress, true); + const proxy = "own"; //only the owner can set the management proxy + + let params = { + address: signingAddressValid, + from: { + ship: patp, + proxy: proxy + }, + data: { + address: targetAddress, + } + }; + const method = "setManagementProxy"; + params = await addSignature(client, method, params, privateKey); + var tx = await client.request(method, params); + return createTransactionReceipt(method, params, tx); +} + +async function setSpawnProxy(client, point, spawnProxyAddress, signingAddress, privateKey){ + const patp = ob.patp(validate.point(point, true)); + const targetAddress = validate.address(spawnProxyAddress, true); + const signingAddressValid = validate.address(signingAddress, true); + const proxy = "own"; //only the owner can set the spawn proxy + + let params = { + address: signingAddressValid, + from: { + ship: patp, + proxy: proxy + }, + data: { + address: targetAddress, + } + }; + const method = "setSpawnProxy"; + params = await addSignature(client, method, params, privateKey); + var tx = await client.request(method, params); + return createTransactionReceipt(method, params, tx); +} + +async function setTransferProxy(client, point, transferProxyAddress, signingAddress, privateKey){ + const patp = ob.patp(validate.point(point, true)); + const targetAddress = validate.address(transferProxyAddress, true); + const signingAddressValid = validate.address(signingAddress, true); + const proxy = "own"; //only the owner can set the transfer proxy + + let params = { + address: signingAddressValid, + from: { + ship: patp, + proxy: proxy + }, + data: { + address: targetAddress, + } + }; + const method = "setTransferProxy"; + params = await addSignature(client, method, params, privateKey); + var tx = await client.request(method, params); + return createTransactionReceipt(method, params, tx); +} + +async function configureKeys(client, point, encryptPublic, authPublic, breach, signingAddress, privateKey){ + const patp = ob.patp(validate.point(point, true)); + const signingAddressValid = validate.address(signingAddress, true); + const proxy = await getManagementProxyType(client, patp, signingAddress); //either the owner or the manage proxy can set the keys + + let params = { + address: signingAddressValid, + from: { + ship: patp, + proxy: proxy + }, + data: { + encrypt: encryptPublic, + auth: authPublic, + cryptoSuite: CRYPTO_SUITE_VERSION.toString(), + breach: breach + } + }; + const method = "configureKeys"; + params = await addSignature(client, method, params, privateKey); + var tx = await client.request(method, params); + return createTransactionReceipt(method, params, tx); +} + +async function getManagementProxyType(client, point, signingAddress){ + const pointInfo = await getPoint(client, point); + if(ajsUtils.addressEquals(pointInfo.ownership.owner.address, signingAddress)) + return 'own'; + else if(ajsUtils.addressEquals(pointInfo.ownership.managementProxy.address, signingAddress)) + return 'manage'; + return undefined; +} + +async function getSpawnProxyType(client, point, signingAddress){ + const pointInfo = await getPoint(client, point); + if(ajsUtils.addressEquals(pointInfo.ownership.owner.address, signingAddress)) + return 'own'; + else if(ajsUtils.addressEquals(pointInfo.ownership.spawnProxy.address, signingAddress)) + return 'spawn'; + return undefined; +} + +async function getTransferProxyType(client, point, signingAddress){ + const pointInfo = await getPoint(client, point); + if(ajsUtils.addressEquals(pointInfo.ownership.owner.address, signingAddress)) + return 'own'; + else if(ajsUtils.addressEquals(pointInfo.ownership.transferProxy.address, signingAddress)) + return 'transfer'; + return undefined; +} + +//TODO: add +// isOwner +// isManagementProxy +// isSpawnProxy +// isTransferProxy +// canConfigureKeys (either owner or management proxy) +// canTransfer (either owner or transfer proxy) +// [-> then replace checks in modify-l2 commands to use these functions] + +module.exports = { + selectDataSource, + createClient, + getRollerConfig, + getAllPending, + getPendingByAddress, + whenNextBatch, + + getPoint, + getShips, + getSpawned, + getUnspawned, + + spawn, + transferPoint, + setManagementProxy, + setTransferProxy, + setSpawnProxy, + configureKeys, + + getManagementProxyType, + getSpawnProxyType, + getTransferProxyType +} +