UNPKG

flashbots-cli

Version:
27 lines (26 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); // lib const error_1 = require("../lib/error"); const flashbots_1 = require("../lib/flashbots"); class GetUserStats extends core_1.Command { async catch(e) { (0, error_1.handleGenericError)(e, this); } async run() { const { args } = await this.parse(GetUserStats); const flashbotsProvider = await (0, flashbots_1.getFlashbotsProvider)(args.signer_key); const res = await flashbotsProvider.getUserStats(); this.log(JSON.stringify(res)); } } exports.default = GetUserStats; GetUserStats.description = `Get Flashbots reputation data for your account. You may optionally specify a private key, otherwise the environment variable FB_AUTH_SIGNER will be used. Note: your private key is not sent over the web. It is only used to sign a message which proves you own the account.`; GetUserStats.examples = [ `# Get user stats about hardhat account 0 <%= config.bin %> <%= command.id %> 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80`, ]; GetUserStats.args = [{ name: 'signer_key', description: "Private key used to sign bundles", required: false }];