UNPKG

cosmic-interchain-cli

Version:

A command-line utility for Cosmic Wire's interchain messaging protocol

31 lines 1 kB
import { readHookConfig } from '../hook/read.js'; import { log, logGray } from '../logger.js'; import { addressCommandOption, chainCommandOption, outputFileCommandOption, } from './options.js'; /** * Parent command */ export const hookCommand = { command: 'hook', describe: 'Operations relating to Hooks', builder: (yargs) => yargs.command(read).version(false).demandCommand(), handler: () => log('Command required'), }; export const read = { command: 'read', describe: 'Reads onchain Hook configuration for a given address', builder: { chain: { ...chainCommandOption, demandOption: true, }, address: addressCommandOption('Address of the Hook to read.', true), out: outputFileCommandOption(), }, handler: async (args) => { logGray('Interchain Hook Read'); logGray('------------------'); await readHookConfig(args); process.exit(0); }, }; //# sourceMappingURL=hook.js.map