From 6c1e815f865ae1c98b04f41fd990dc49ad2e852b Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Tue, 31 Jan 2023 14:22:16 +0100 Subject: [PATCH] Remove cli as it is now in its own repository --- .github/dependabot.yml | 15 - .github/workflows/ci-lint.yml | 19 - .github/workflows/ci-test.yaml | 26 - .gitignore | 2 - cli/README.md | 71 - cli/cmd/accounts.go | 889 ----------- cli/cmd/addressbook.go | 127 -- cli/cmd/common/flags.go | 42 - cli/cmd/common/json.go | 100 -- cli/cmd/common/prompts.go | 65 - cli/cmd/common/selector.go | 96 -- cli/cmd/common/transaction.go | 425 ------ cli/cmd/common/wallet.go | 118 -- cli/cmd/contracts.go | 575 ------- cli/cmd/inspect/governance_proposal.go | 292 ---- cli/cmd/inspect/helpers.go | 97 -- cli/cmd/inspect/inspect.go | 35 - cli/cmd/inspect/native_token.go | 107 -- cli/cmd/inspect/node_status.go | 37 - cli/cmd/inspect/registry.go | 209 --- cli/cmd/inspect/runtime_stats.go | 554 ------- cli/cmd/network.go | 248 --- cli/cmd/paratime.go | 175 --- cli/cmd/root.go | 87 -- cli/cmd/wallet.go | 393 ----- cli/config/addressbook.go | 164 -- cli/config/config.go | 173 --- cli/config/default.go | 10 - cli/config/wallet.go | 306 ---- cli/go.mod | 131 -- cli/go.sum | 1907 ------------------------ cli/main.go | 7 - cli/metadata/metadata.go | 49 - cli/metadata/oasisscan.go | 80 - cli/table/table.go | 25 - cli/wallet/file/ed25519.go | 53 - cli/wallet/file/file.go | 576 ------- cli/wallet/file/secp256k1.go | 53 - cli/wallet/file/secp256k1_test.go | 60 - cli/wallet/ledger/common.go | 73 - cli/wallet/ledger/device.go | 189 --- cli/wallet/ledger/ledger.go | 224 --- cli/wallet/ledger/signer.go | 65 - cli/wallet/test/test.go | 64 - cli/wallet/wallet.go | 160 -- tests/check-core-versions.sh | 1 - 46 files changed, 9174 deletions(-) delete mode 100644 cli/README.md delete mode 100644 cli/cmd/accounts.go delete mode 100644 cli/cmd/addressbook.go delete mode 100644 cli/cmd/common/flags.go delete mode 100644 cli/cmd/common/json.go delete mode 100644 cli/cmd/common/prompts.go delete mode 100644 cli/cmd/common/selector.go delete mode 100644 cli/cmd/common/transaction.go delete mode 100644 cli/cmd/common/wallet.go delete mode 100644 cli/cmd/contracts.go delete mode 100644 cli/cmd/inspect/governance_proposal.go delete mode 100644 cli/cmd/inspect/helpers.go delete mode 100644 cli/cmd/inspect/inspect.go delete mode 100644 cli/cmd/inspect/native_token.go delete mode 100644 cli/cmd/inspect/node_status.go delete mode 100644 cli/cmd/inspect/registry.go delete mode 100644 cli/cmd/inspect/runtime_stats.go delete mode 100644 cli/cmd/network.go delete mode 100644 cli/cmd/paratime.go delete mode 100644 cli/cmd/root.go delete mode 100644 cli/cmd/wallet.go delete mode 100644 cli/config/addressbook.go delete mode 100644 cli/config/config.go delete mode 100644 cli/config/default.go delete mode 100644 cli/config/wallet.go delete mode 100644 cli/go.mod delete mode 100644 cli/go.sum delete mode 100644 cli/main.go delete mode 100644 cli/metadata/metadata.go delete mode 100644 cli/metadata/oasisscan.go delete mode 100644 cli/table/table.go delete mode 100644 cli/wallet/file/ed25519.go delete mode 100644 cli/wallet/file/file.go delete mode 100644 cli/wallet/file/secp256k1.go delete mode 100644 cli/wallet/file/secp256k1_test.go delete mode 100644 cli/wallet/ledger/common.go delete mode 100644 cli/wallet/ledger/device.go delete mode 100644 cli/wallet/ledger/ledger.go delete mode 100644 cli/wallet/ledger/signer.go delete mode 100644 cli/wallet/test/test.go delete mode 100644 cli/wallet/wallet.go diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4aa1c93e4f..d806b25fd6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -42,21 +42,6 @@ updates: # client-sdk is replaced with the local up-to-date version. - dependency-name: github.com/oasisprotocol/oasis-sdk/client-sdk/go - # Manage cli package versions. - - package-ecosystem: gomod - directory: cli - schedule: - interval: daily - commit-message: - prefix: "cli:" - labels: - - c:deps - ignore: - # oasis-core is manually kept up to date. - - dependency-name: github.com/oasisprotocol/oasis-core/go - # client-sdk is replaced with the local up-to-date version. - - dependency-name: github.com/oasisprotocol/oasis-sdk/client-sdk/go - # Manage Rust package versions. - package-ecosystem: cargo directory: / diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index c12344adee..b99a1bed70 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -129,25 +129,6 @@ jobs: version: v1.46 working-directory: client-sdk/ts-web/core/reflect-go - lint-go-cli: - name: lint-go-cli - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: '1.18.x' - - - name: Lint Go cli - uses: golangci/golangci-lint-action@v3.3.1 - with: - # NOTE: The version must be specified without the patch version. - version: v1.46 - working-directory: cli - lint-ts-web: name: lint-ts-web runs-on: ubuntu-latest diff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yaml index 26f6b5a92a..3b7ab35a04 100644 --- a/.github/workflows/ci-test.yaml +++ b/.github/workflows/ci-test.yaml @@ -114,32 +114,6 @@ jobs: with: directory: client-sdk/go - test-go-cli: - # NOTE: This name appears in GitHub's Checks API. - name: test-cli - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Go 1.18 - uses: actions/setup-go@v3 - with: - go-version: "1.18.x" - - - name: Test build - working-directory: cli - run: go build - - - name: Unit tests with coverage - working-directory: cli - run: go test -race -coverprofile=coverage.txt -covermode=atomic -v ./... - - - name: Upload to codecov.io - uses: codecov/codecov-action@v3.1.1 - with: - directory: cli - test-go-tools: # NOTE: This name appears in GitHub's Checks API. name: test-tools diff --git a/.gitignore b/.gitignore index 00fecbc5be..f9d5e66eb6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,8 +24,6 @@ coverage-e2e-*.txt examples/user-witness-flow/main tests/e2e/e2e tests/benchmark/benchmark -cli/cli -cli/oasis client-sdk/ts-web/core/reflect-go/reflect-go tools/gen_runtime_vectors/gen_runtime_vectors tools/orc/orc diff --git a/cli/README.md b/cli/README.md deleted file mode 100644 index 880c201c8f..0000000000 --- a/cli/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Oasis CLI - -This is the command-line interface for interacting with the Oasis Network, both -the consensus layer and paratimes based on the ParaTime SDK. - -## Building - -To build the CLI run the following in this directory: - -```bash -go build -o oasis -``` - -This will generate a binary called `oasis` which you are free to put somewhere -in your `$PATH` (the rest of the README assumes as much). - -## Running - -You can interact with the Oasis CLI by invoking it from the command line as -follows: - -```bash -oasis --help -``` - -Each (sub)command has a help section that shows what commands and arguments are -available. - -The Oasis CLI also comes with a default set of networks and paratimes -configured, you can see a list by running: - -```bash -oasis network list -oasis paratime list -``` - -Initial configuration currently defaults to `mainnet` and the `emerald` -paratime but this can easily be changed using the corresponding `set-default` -subcommand as follows: - -```bash -oasis network set-default testnet -oasis paratime set-default testnet emerald -``` - -To be able to sign transactions you will need to first create or import an -account into your wallet. File-based (storing keys in an encrypted file) and -Ledger-based (storing keys on a Ledger device) backends are supported. To create -a new file-backed account run: - -```bash -oasis wallet create myaccount -``` - -It will ask you to choose and confirm a passphrase to encrypt your account with. -You can see a list of all accounts by running: - -```bash -oasis wallet list -``` - -To show the account's balance on the default network/paratime, run: - -```bash -oasis accounts show -``` - -## Configuration - -All configuration is stored in the `$XDG_CONFIG_HOME/oasis` directory (defaults -to `$HOME/.config/oasis`). diff --git a/cli/cmd/accounts.go b/cli/cmd/accounts.go deleted file mode 100644 index b9f252212a..0000000000 --- a/cli/cmd/accounts.go +++ /dev/null @@ -1,889 +0,0 @@ -package cmd - -import ( - "context" - "fmt" - "math/big" - "os" - - "github.com/spf13/cobra" - flag "github.com/spf13/pflag" - - beacon "github.com/oasisprotocol/oasis-core/go/beacon/api" - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - "github.com/oasisprotocol/oasis-core/go/common/quantity" - consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" - roothash "github.com/oasisprotocol/oasis-core/go/roothash/api" - staking "github.com/oasisprotocol/oasis-core/go/staking/api" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/client" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/helpers" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/modules/accounts" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/modules/consensusaccounts" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -var ( - showDelegations bool - - commissionScheduleRates []string - commissionScheduleBounds []string - - accountsCmd = &cobra.Command{ - Use: "accounts", - Short: "Account operations", - } - - accountsShowCmd = &cobra.Command{ - Use: "show [address]", - Short: "Show account information", - Args: cobra.MaximumNArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - - // Determine which address to show. If an explicit argument was given, use that - // otherwise use the default account. - var targetAddress string - switch { - case len(args) >= 1: - // Explicit argument given. - targetAddress = args[0] - case npa.Account != nil: - // Default account is selected. - targetAddress = npa.Account.Address - default: - // No address given and no wallet configured. - cobra.CheckErr("no address given and no wallet configured") - } - - // Establish connection with the target network. - ctx := context.Background() - c, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - addr, err := common.ResolveLocalAccountOrAddress(npa.Network, targetAddress) - cobra.CheckErr(err) - - height, err := common.GetActualHeight( - ctx, - c.Consensus(), - ) - cobra.CheckErr(err) - - ownerQuery := &staking.OwnerQuery{ - Owner: addr.ConsensusAddress(), - Height: height, - } - - // Query consensus layer account. - // TODO: Nicer overall formatting. - - consensusAccount, err := c.Consensus().Staking().Account(ctx, ownerQuery) - cobra.CheckErr(err) - - fmt.Printf("Address: %s\n", addr) - fmt.Printf("Nonce: %d\n", consensusAccount.General.Nonce) - fmt.Println() - fmt.Printf("=== CONSENSUS LAYER (%s) ===\n", npa.NetworkName) - - var ( - outgoingDelegations map[staking.Address]*staking.DelegationInfo - outgoingDebondingDelegations map[staking.Address][]*staking.DebondingDelegationInfo - ) - if showDelegations { - outgoingDelegations, err = c.Consensus().Staking().DelegationInfosFor(ctx, ownerQuery) - cobra.CheckErr(err) - outgoingDebondingDelegations, err = c.Consensus().Staking().DebondingDelegationInfosFor(ctx, ownerQuery) - cobra.CheckErr(err) - } - - helpers.PrettyPrintAccountBalanceAndDelegationsFrom( - npa.Network, - addr, - consensusAccount.General, - outgoingDelegations, - outgoingDebondingDelegations, - " ", - os.Stdout, - ) - fmt.Println() - - if len(consensusAccount.General.Allowances) > 0 { - fmt.Println(" Allowances for this Account:") - helpers.PrettyPrintAllowances( - npa.Network, - addr, - consensusAccount.General.Allowances, - " ", - os.Stdout, - ) - fmt.Println() - } - - if showDelegations { - incomingDelegations, err := c.Consensus().Staking().DelegationsTo(ctx, ownerQuery) - cobra.CheckErr(err) - incomingDebondingDelegations, err := c.Consensus().Staking().DebondingDelegationsTo(ctx, ownerQuery) - cobra.CheckErr(err) - - if len(incomingDelegations) > 0 { - fmt.Println(" Active Delegations to this Account:") - helpers.PrettyPrintDelegationsTo( - npa.Network, - addr, - consensusAccount.Escrow.Active, - incomingDelegations, - " ", - os.Stdout, - ) - fmt.Println() - } - if len(incomingDebondingDelegations) > 0 { - fmt.Println(" Debonding Delegations to this Account:") - helpers.PrettyPrintDelegationsTo( - npa.Network, - addr, - consensusAccount.Escrow.Debonding, - incomingDebondingDelegations, - " ", - os.Stdout, - ) - fmt.Println() - } - } - - cs := consensusAccount.Escrow.CommissionSchedule - if len(cs.Rates) > 0 || len(cs.Bounds) > 0 { - fmt.Println(" Commission Schedule:") - cs.PrettyPrint(ctx, " ", os.Stdout) - fmt.Println() - } - - sa := consensusAccount.Escrow.StakeAccumulator - if len(sa.Claims) > 0 { - fmt.Println(" Stake Accumulator:") - sa.PrettyPrint(ctx, " ", os.Stdout) - fmt.Println() - } - - if npa.ParaTime != nil { - // Make an effort to support the height query. - // - // Note: Public gRPC endpoints do not allow this method. - round := client.RoundLatest - if h := common.GetHeight(); h != consensus.HeightLatest { - blk, err := c.Consensus().RootHash().GetLatestBlock( - ctx, - &roothash.RuntimeRequest{ - RuntimeID: npa.ParaTime.Namespace(), - Height: height, - }, - ) - cobra.CheckErr(err) - round = blk.Header.Round - } - - // Query runtime account when a paratime has been configured. - rtBalances, err := c.Runtime(npa.ParaTime).Accounts.Balances(ctx, round, *addr) - cobra.CheckErr(err) - - var hasNonZeroBalance bool - for _, balance := range rtBalances.Balances { - if hasNonZeroBalance = !balance.IsZero(); hasNonZeroBalance { - break - } - } - if hasNonZeroBalance { - fmt.Println() - fmt.Printf("=== %s PARATIME ===\n", npa.ParaTimeName) - - fmt.Printf("Balances for all denominations:\n") - for denom, balance := range rtBalances.Balances { - fmt.Printf(" %s\n", helpers.FormatParaTimeDenomination(npa.ParaTime, types.NewBaseUnits(balance, denom))) - } - } - } - }, - } - - accountsAllowCmd = &cobra.Command{ - Use: "allow ", - Short: "Configure beneficiary allowance for an account", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - beneficiary, amount := args[0], args[1] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Resolve beneficiary address. - benAddr, err := common.ResolveLocalAccountOrAddress(npa.Network, beneficiary) - cobra.CheckErr(err) - - // Parse amount. - var negative bool - if amount[0] == '-' { - negative = true - amount = amount[1:] - } - amountChange, err := helpers.ParseConsensusDenomination(npa.Network, amount) - cobra.CheckErr(err) - - // Prepare transaction. - tx := staking.NewAllowTx(0, nil, &staking.Allow{ - Beneficiary: benAddr.ConsensusAddress(), - Negative: negative, - AmountChange: *amountChange, - }) - - acc := common.LoadAccount(cfg, npa.AccountName) - sigTx, err := common.SignConsensusTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, nil, nil) - }, - } - - accountsDepositCmd = &cobra.Command{ - Use: "deposit [to]", - Short: "Deposit given amount of tokens into an account in the ParaTime", - Args: cobra.RangeArgs(1, 2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - amount := args[0] - var to string - if len(args) >= 2 { - to = args[1] - } - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes to deposit into") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Resolve destination address when specified. - var toAddr *types.Address - if to != "" { - var err error - toAddr, err = common.ResolveLocalAccountOrAddress(npa.Network, to) - cobra.CheckErr(err) - } - - // Parse amount. - // TODO: This should actually query the ParaTime (or config) to check what the consensus - // layer denomination is in the ParaTime. Assume NATIVE for now. - amountBaseUnits, err := helpers.ParseParaTimeDenomination(npa.ParaTime, amount, types.NativeDenomination) - cobra.CheckErr(err) - - // Prepare transaction. - tx := consensusaccounts.NewDepositTx(nil, &consensusaccounts.Deposit{ - To: toAddr, - Amount: *amountBaseUnits, - }) - - acc := common.LoadAccount(cfg, npa.AccountName) - sigTx, meta, err := common.SignParaTimeTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - if txCfg.Offline { - common.PrintSignedTransaction(sigTx) - return - } - - decoder := conn.Runtime(npa.ParaTime).ConsensusAccounts - waitCh := common.WaitForEvent(ctx, npa.ParaTime, conn, decoder, func(ev client.DecodedEvent) interface{} { - ce, ok := ev.(*consensusaccounts.Event) - if !ok || ce.Deposit == nil { - return nil - } - if !ce.Deposit.From.Equal(acc.Address()) || ce.Deposit.Nonce != tx.AuthInfo.SignerInfo[0].Nonce { - return nil - } - return ce.Deposit - }) - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, meta, nil) - - fmt.Printf("Waiting for deposit result...\n") - - ev := <-waitCh - if ev == nil { - cobra.CheckErr("Failed to wait for event.") - } - - // Check for result. - switch we := ev.(*consensusaccounts.DepositEvent); we.IsSuccess() { - case true: - fmt.Printf("Deposit succeeded.\n") - case false: - cobra.CheckErr(fmt.Errorf("deposit failed with error code %d from module %s", - we.Error.Code, - we.Error.Module, - )) - } - }, - } - - accountsWithdrawCmd = &cobra.Command{ - Use: "withdraw [to]", - Short: "Withdraw given amount of tokens into an account in the consensus layer", - Args: cobra.RangeArgs(1, 2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - amount := args[0] - var to string - if len(args) >= 2 { - to = args[1] - } - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes to withdraw from") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Resolve destination address when explicitly specified. - var toAddr *types.Address - var addrToCheck string - if to != "" { - var err error - toAddr, err = common.ResolveLocalAccountOrAddress(npa.Network, to) - cobra.CheckErr(err) - addrToCheck = toAddr.String() - } else { - // Destination address is implicit, but obtain it for safety check below nonetheless. - addr, err := helpers.ResolveAddress(npa.Network, npa.Account.Address) - cobra.CheckErr(err) - addrToCheck = addr.String() - } - - cobra.CheckErr(common.CheckLocalAccountIsConsensusCapable(cfg, addrToCheck)) - - // Parse amount. - // TODO: This should actually query the ParaTime (or config) to check what the consensus - // layer denomination is in the ParaTime. Assume NATIVE for now. - amountBaseUnits, err := helpers.ParseParaTimeDenomination(npa.ParaTime, amount, types.NativeDenomination) - cobra.CheckErr(err) - - // Prepare transaction. - tx := consensusaccounts.NewWithdrawTx(nil, &consensusaccounts.Withdraw{ - To: toAddr, - Amount: *amountBaseUnits, - }) - - acc := common.LoadAccount(cfg, npa.AccountName) - sigTx, meta, err := common.SignParaTimeTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - if txCfg.Offline { - common.PrintSignedTransaction(sigTx) - return - } - - decoder := conn.Runtime(npa.ParaTime).ConsensusAccounts - waitCh := common.WaitForEvent(ctx, npa.ParaTime, conn, decoder, func(ev client.DecodedEvent) interface{} { - ce, ok := ev.(*consensusaccounts.Event) - if !ok || ce.Withdraw == nil { - return nil - } - if !ce.Withdraw.From.Equal(acc.Address()) || ce.Withdraw.Nonce != tx.AuthInfo.SignerInfo[0].Nonce { - return nil - } - return ce.Withdraw - }) - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, meta, nil) - - fmt.Printf("Waiting for withdraw result...\n") - - ev := <-waitCh - if ev == nil { - cobra.CheckErr("Failed to wait for event.") - } - we := ev.(*consensusaccounts.WithdrawEvent) - - // Check for result. - switch we.IsSuccess() { - case true: - fmt.Printf("Withdraw succeeded.\n") - case false: - cobra.CheckErr(fmt.Errorf("withdraw failed with error code %d from module %s", - we.Error.Code, - we.Error.Module, - )) - } - }, - } - - accountsTransferCmd = &cobra.Command{ - Use: "transfer ", - Short: "Transfer given amount of tokens to a different account", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - amount, to := args[0], args[1] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Resolve destination address. - toAddr, err := common.ResolveLocalAccountOrAddress(npa.Network, to) - cobra.CheckErr(err) - - acc := common.LoadAccount(cfg, npa.AccountName) - - var sigTx, meta interface{} - switch npa.ParaTime { - case nil: - cobra.CheckErr(common.CheckLocalAccountIsConsensusCapable(cfg, toAddr.String())) - - // Consensus layer transfer. - amount, err := helpers.ParseConsensusDenomination(npa.Network, amount) - cobra.CheckErr(err) - - // Prepare transaction. - tx := staking.NewTransferTx(0, nil, &staking.Transfer{ - To: toAddr.ConsensusAddress(), - Amount: *amount, - }) - - sigTx, err = common.SignConsensusTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - default: - // ParaTime transfer. - // TODO: This should actually query the ParaTime (or config) to check what the consensus - // layer denomination is in the ParaTime. Assume NATIVE for now. - amountBaseUnits, err := helpers.ParseParaTimeDenomination(npa.ParaTime, amount, types.NativeDenomination) - cobra.CheckErr(err) - - // Prepare transaction. - tx := accounts.NewTransferTx(nil, &accounts.Transfer{ - To: *toAddr, - Amount: *amountBaseUnits, - }) - - sigTx, meta, err = common.SignParaTimeTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - } - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, meta, nil) - }, - } - - accountsBurnCmd = &cobra.Command{ - Use: "burn ", - Short: "Burn given amount of tokens", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - amountStr := args[0] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - acc := common.LoadAccount(cfg, npa.AccountName) - - if npa.ParaTime != nil { - cobra.CheckErr("burns within paratimes are not supported; use --no-paratime") - } - - // Consensus layer transfer. - amount, err := helpers.ParseConsensusDenomination(npa.Network, amountStr) - cobra.CheckErr(err) - - // Prepare transaction. - tx := staking.NewBurnTx(0, nil, &staking.Burn{ - Amount: *amount, - }) - - sigTx, err := common.SignConsensusTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, nil, nil) - }, - } - - accountsDelegateCmd = &cobra.Command{ - Use: "delegate ", - Short: "Delegate given amount of tokens to a specified account", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - amount, to := args[0], args[1] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Resolve destination address. - toAddr, err := common.ResolveLocalAccountOrAddress(npa.Network, to) - cobra.CheckErr(err) - - acc := common.LoadAccount(cfg, npa.AccountName) - - var sigTx interface{} - switch npa.ParaTime { - case nil: - // Consensus layer delegation. - amount, err := helpers.ParseConsensusDenomination(npa.Network, amount) - cobra.CheckErr(err) - - // Prepare transaction. - tx := staking.NewAddEscrowTx(0, nil, &staking.Escrow{ - Account: toAddr.ConsensusAddress(), - Amount: *amount, - }) - - sigTx, err = common.SignConsensusTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - default: - // ParaTime delegation. - cobra.CheckErr("delegations within paratimes are not supported; use --no-paratime") - } - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, nil, nil) - }, - } - - accountsUndelegateCmd = &cobra.Command{ - Use: "undelegate ", - Short: "Undelegate given amount of shares from a specified account", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - amount, from := args[0], args[1] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Resolve destination address. - fromAddr, err := common.ResolveLocalAccountOrAddress(npa.Network, from) - cobra.CheckErr(err) - - acc := common.LoadAccount(cfg, npa.AccountName) - - var sigTx interface{} - switch npa.ParaTime { - case nil: - // Consensus layer delegation. - var shares quantity.Quantity - err = shares.UnmarshalText([]byte(amount)) - cobra.CheckErr(err) - - // Prepare transaction. - tx := staking.NewReclaimEscrowTx(0, nil, &staking.ReclaimEscrow{ - Account: fromAddr.ConsensusAddress(), - Shares: shares, - }) - - sigTx, err = common.SignConsensusTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - default: - // ParaTime delegation. - cobra.CheckErr("delegations within paratimes are not supported; use --no-paratime") - } - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, nil, nil) - }, - } - - accountsAmendCommissionScheduleCmd = &cobra.Command{ - Use: "amend-commission-schedule", - Short: "Amend the account's commission schedule", - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - acc := common.LoadAccount(cfg, npa.AccountName) - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var ( - conn connection.Connection - - rules *staking.CommissionScheduleRules - schedule *staking.CommissionSchedule - now beacon.EpochTime - ) - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - // And also query the various dynamic values required - // to validate the amendment. - - var height int64 - height, err = common.GetActualHeight( - ctx, - conn.Consensus(), - ) - cobra.CheckErr(err) - - now, err = conn.Consensus().Beacon().GetEpoch(ctx, height) - cobra.CheckErr(err) - - addr, err := common.ResolveLocalAccountOrAddress(npa.Network, npa.Account.Address) - cobra.CheckErr(err) - - stakingConn := conn.Consensus().Staking() - - params, err := stakingConn.ConsensusParameters(ctx, height) - cobra.CheckErr(err) - - consensusAccount, err := stakingConn.Account( - ctx, - &staking.OwnerQuery{ - Owner: addr.ConsensusAddress(), - Height: height, - }, - ) - cobra.CheckErr(err) - - rules = ¶ms.CommissionScheduleRules - schedule = &consensusAccount.Escrow.CommissionSchedule - } - - var amendment staking.AmendCommissionSchedule - if rawRates := commissionScheduleRates; len(rawRates) > 0 { - amendment.Amendment.Rates = make([]staking.CommissionRateStep, len(rawRates)) - for i, rawRate := range rawRates { - if err := scanRateStep(&amendment.Amendment.Rates[i], rawRate); err != nil { - cobra.CheckErr(fmt.Errorf("failed to parse commission schedule rate step %d: %w", i, err)) - } - } - } - if rawBounds := commissionScheduleBounds; len(rawBounds) > 0 { - amendment.Amendment.Bounds = make([]staking.CommissionRateBoundStep, len(rawBounds)) - for i, rawBound := range rawBounds { - if err := scanBoundStep(&amendment.Amendment.Bounds[i], rawBound); err != nil { - cobra.CheckErr(fmt.Errorf("failed to parse commission schedule bound step %d: %w", i, err)) - } - } - } - - if rules != nil && schedule != nil { - // If we are in online mode, try to validate the amendment. - err := schedule.AmendAndPruneAndValidate( - &amendment.Amendment, - rules, - now, - ) - cobra.CheckErr(err) - } - - // Prepare transaction. - tx := staking.NewAmendCommissionScheduleTx(0, nil, &amendment) - - sigTx, err := common.SignConsensusTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, nil, nil) - }, - } - - accountsFromPublicKeyCmd = &cobra.Command{ - Use: "from-public-key ", - Short: "Convert from a public key to an account address", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - var pk signature.PublicKey - err := pk.UnmarshalText([]byte(args[0])) - cobra.CheckErr(err) - - fmt.Println(staking.NewAddress(pk)) - }, - } -) - -func scanRateStep( - dst *staking.CommissionRateStep, - raw string, -) error { - var rateBI big.Int - n, err := fmt.Sscanf(raw, "%d/%d", &dst.Start, &rateBI) - if err != nil { - return err - } - if n != 2 { - return fmt.Errorf("scanned %d values (need 2)", n) - } - if err = dst.Rate.FromBigInt(&rateBI); err != nil { - return fmt.Errorf("rate: %w", err) - } - return nil -} - -func scanBoundStep( - dst *staking.CommissionRateBoundStep, - raw string, -) error { - var ( - rateMinBI big.Int - rateMaxBI big.Int - ) - n, err := fmt.Sscanf(raw, "%d/%d/%d", &dst.Start, &rateMinBI, &rateMaxBI) - if err != nil { - return err - } - if n != 3 { - return fmt.Errorf("scanned %d values (need 3)", n) - } - if err = dst.RateMin.FromBigInt(&rateMinBI); err != nil { - return fmt.Errorf("rate min: %w", err) - } - - if err = dst.RateMax.FromBigInt(&rateMaxBI); err != nil { - return fmt.Errorf("rate max: %w", err) - } - return nil -} - -func init() { - f := flag.NewFlagSet("", flag.ContinueOnError) - f.BoolVar(&showDelegations, "show-delegations", false, "show incoming and outgoing delegations") - accountsShowCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsShowCmd.Flags().AddFlagSet(common.HeightFlag) - accountsShowCmd.Flags().AddFlagSet(f) - - accountsAllowCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsAllowCmd.Flags().AddFlagSet(common.TransactionFlags) - - accountsDepositCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsDepositCmd.Flags().AddFlagSet(common.TransactionFlags) - - accountsWithdrawCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsWithdrawCmd.Flags().AddFlagSet(common.TransactionFlags) - - accountsTransferCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsTransferCmd.Flags().AddFlagSet(common.TransactionFlags) - - accountsBurnCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsBurnCmd.Flags().AddFlagSet(common.TransactionFlags) - - accountsDelegateCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsDelegateCmd.Flags().AddFlagSet(common.TransactionFlags) - - accountsUndelegateCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsUndelegateCmd.Flags().AddFlagSet(common.TransactionFlags) - - f = flag.NewFlagSet("", flag.ContinueOnError) - f.StringSliceVar(&commissionScheduleRates, "rates", nil, fmt.Sprintf( - "commission rate step. Multiple of this flag is allowed. "+ - "Each step is in the format start_epoch/rate_numerator. "+ - "The rate is rate_numerator divided by %v", staking.CommissionRateDenominator, - )) - f.StringSliceVar(&commissionScheduleBounds, "bounds", nil, fmt.Sprintf( - "commission rate bound step. Multiple of this flag is allowed. "+ - "Each step is in the format start_epoch/rate_min_numerator/rate_max_numerator. "+ - "The minimum rate is rate_min_numerator divided by %v, and the maximum rate is "+ - "rate_max_numerator divided by %v", staking.CommissionRateDenominator, staking.CommissionRateDenominator, - )) - accountsAmendCommissionScheduleCmd.Flags().AddFlagSet(common.SelectorFlags) - accountsAmendCommissionScheduleCmd.Flags().AddFlagSet(common.TransactionFlags) - accountsAmendCommissionScheduleCmd.Flags().AddFlagSet(f) - - accountsCmd.AddCommand(accountsShowCmd) - accountsCmd.AddCommand(accountsAllowCmd) - accountsCmd.AddCommand(accountsDepositCmd) - accountsCmd.AddCommand(accountsWithdrawCmd) - accountsCmd.AddCommand(accountsTransferCmd) - accountsCmd.AddCommand(accountsBurnCmd) - accountsCmd.AddCommand(accountsDelegateCmd) - accountsCmd.AddCommand(accountsUndelegateCmd) - accountsCmd.AddCommand(accountsAmendCommissionScheduleCmd) - accountsCmd.AddCommand(accountsFromPublicKeyCmd) -} diff --git a/cli/cmd/addressbook.go b/cli/cmd/addressbook.go deleted file mode 100644 index da5198d3c5..0000000000 --- a/cli/cmd/addressbook.go +++ /dev/null @@ -1,127 +0,0 @@ -package cmd - -import ( - "fmt" - "sort" - - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/table" -) - -var ( - addressBookCmd = &cobra.Command{ - Use: "addressbook", - Short: "Manage addresses in the local address book", - } - - abListCmd = &cobra.Command{ - Use: "list", - Aliases: []string{"ls"}, - Short: "List addresses stored in address book", - Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - table := table.New() - table.SetHeader([]string{"Name", "Address"}) - - var output [][]string - for name, acc := range cfg.AddressBook.All { - addrStr := acc.Address - if ethAddr := acc.GetEthAddress(); ethAddr != nil { - addrStr = ethAddr.Hex() - } - output = append(output, []string{ - name, - addrStr, - }) - } - - // Sort output by name. - sort.Slice(output, func(i, j int) bool { - return output[i][0] < output[j][0] - }) - - table.AppendBulk(output) - table.Render() - }, - } - - abAddCmd = &cobra.Command{ - Use: "add
", - Short: "Add an address to address book", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - name := args[0] - address := args[1] - - err := cfg.AddressBook.Add(name, address) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - abShowCmd = &cobra.Command{ - Use: "show ", - Short: "Show address information", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - name := args[0] - abEntry, ok := config.Global().AddressBook.All[name] - if !ok { - cobra.CheckErr(fmt.Errorf("address named '%s' does not exist in the address book", name)) - } - - fmt.Printf("Name: %s\n", name) - if abEntry.GetEthAddress() != nil { - fmt.Printf("Ethereum address: %s\n", abEntry.GetEthAddress().Hex()) - } - fmt.Printf("Native address: %s\n", abEntry.GetAddress()) - }, - } - - abRmCmd = &cobra.Command{ - Use: "rm ", - Aliases: []string{"remove"}, - Short: "Remove an address from address book", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - name := args[0] - - err := cfg.AddressBook.Remove(name) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - abRenameCmd = &cobra.Command{ - Use: "rename ", - Short: "Rename address", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - oldName, newName := args[0], args[1] - - err := cfg.AddressBook.Rename(oldName, newName) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } -) - -func init() { - addressBookCmd.AddCommand(abAddCmd) - addressBookCmd.AddCommand(abListCmd) - addressBookCmd.AddCommand(abRenameCmd) - addressBookCmd.AddCommand(abRmCmd) - addressBookCmd.AddCommand(abShowCmd) -} diff --git a/cli/cmd/common/flags.go b/cli/cmd/common/flags.go deleted file mode 100644 index 798fc7f42f..0000000000 --- a/cli/cmd/common/flags.go +++ /dev/null @@ -1,42 +0,0 @@ -package common - -import ( - "context" - "fmt" - - flag "github.com/spf13/pflag" - - consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" -) - -var selectedHeight int64 - -// HeightFlag is the flag for specifying block height. -var HeightFlag *flag.FlagSet - -// GetHeight returns the user-selected block height. -func GetHeight() int64 { - return selectedHeight -} - -// GetActualHeight returns the user-selected block height if explicitly -// specified, or the current latest height. -func GetActualHeight( - ctx context.Context, - consensusConn consensus.ClientBackend, -) (int64, error) { - height := GetHeight() - if height != consensus.HeightLatest { - return height, nil - } - blk, err := consensusConn.GetBlock(ctx, height) - if err != nil { - return 0, fmt.Errorf("failed to query current height: %w", err) - } - return blk.Height, nil -} - -func init() { - HeightFlag = flag.NewFlagSet("", flag.ContinueOnError) - HeightFlag.Int64Var(&selectedHeight, "height", consensus.HeightLatest, "explicitly set block height to use") -} diff --git a/cli/cmd/common/json.go b/cli/cmd/common/json.go deleted file mode 100644 index afe25c0383..0000000000 --- a/cli/cmd/common/json.go +++ /dev/null @@ -1,100 +0,0 @@ -package common - -import ( - "encoding/json" - "fmt" - "strings" - "unicode/utf8" - - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-core/go/common/cbor" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/modules/contracts" -) - -// PrettyJSONMarshal returns pretty-printed JSON encoding of v. -func PrettyJSONMarshal(v interface{}) ([]byte, error) { - formatted, err := json.MarshalIndent(v, "", " ") - if err != nil { - return nil, fmt.Errorf("failed to marshal to pretty JSON: %w", err) - } - return formatted, nil -} - -// JSONMarshalKey encodes k as UTF-8 string if valid, or Base64 otherwise. -func JSONMarshalKey(k interface{}) (keyJSON []byte, err error) { - keyBytes, ok := k.([]byte) - if ok && utf8.Valid(keyBytes) { - // Marshal valid UTF-8 string. - keyJSON, err = json.Marshal(string(keyBytes)) - } else { - // Marshal string or Base64 otherwise. - keyJSON, err = json.Marshal(k) - } - return -} - -// JSONPrintKeyValueTuple traverses potentially large number of items and prints JSON representation -// of them. -// -// Marshalling is done externally without holding resulting JSON string in-memory. -// Cbor decoding of each value is tried first. If it fails, the binary content is preserved. -// Universal marshalling of map[interface{}]interface{} types is also supported. -// Each key is encoded as string if it contains valid UTF-8 value. Otherwise, Base64 is used. -func JSONPrintKeyValueTuple(items []contracts.InstanceStorageKeyValue) { - first := true - fmt.Printf("{") - for _, kv := range items { - if !first { - fmt.Printf(",") - } - first = false - var val interface{} - err := cbor.Unmarshal(kv.Value, &val) - if err != nil { - // Value is not CBOR, use raw value instead. - val = kv.Value - } - keyJSON, err := JSONMarshalKey(kv.Key) - cobra.CheckErr(err) - - valJSON := JSONMarshalUniversalValue(val) - fmt.Printf("%s:%s", keyJSON, valJSON) - } - fmt.Printf("}\n") -} - -// JSONMarshalUniversalValue is a wrapper for the built-in JSON encoder which adds support for -// marshalling map[interface{}]interface{}. -// -// Each key is encoded as string if it contains valid UTF-8 value. Otherwise, Base64 is used. -func JSONMarshalUniversalValue(v interface{}) []byte { - // Try array. - if valTest, ok := v.([]interface{}); ok { - e := make([]string, 0, len(valTest)) - for _, v := range valTest { - valJSON := JSONMarshalUniversalValue(v) - e = append(e, string(valJSON)) - } - return []byte(fmt.Sprintf("[%s]", strings.Join(e, ","))) - } - - // Try universal map. - if valTest, ok := v.(map[interface{}]interface{}); ok { - e := make([]string, 0, len(valTest)) - for k, v := range valTest { - keyJSON, err := JSONMarshalKey(k) - cobra.CheckErr(err) - - valJSON := JSONMarshalUniversalValue(v) - - e = append(e, fmt.Sprintf("%s:%s", keyJSON, valJSON)) - } - return []byte(fmt.Sprintf("{%s}", strings.Join(e, ","))) - } - - // Primitive type - use built-in JSON encoder. - vJSON, err := json.Marshal(v) - cobra.CheckErr(err) - return vJSON -} diff --git a/cli/cmd/common/prompts.go b/cli/cmd/common/prompts.go deleted file mode 100644 index eb2feb91a9..0000000000 --- a/cli/cmd/common/prompts.go +++ /dev/null @@ -1,65 +0,0 @@ -package common - -import ( - "fmt" - - "github.com/AlecAivazis/survey/v2" - "github.com/spf13/cobra" -) - -var ( - // PromptPassphrase is the standard passphrase prompt. - PromptPassphrase = &survey.Password{ - Message: "Passphrase:", - } - - // PromptCreatePassphrase is the standard create a new passphrase prompt. - PromptCreatePassphrase = &survey.Password{ - Message: "Choose a new passphrase:", - } - - // PromptRepeatPassphrase is the standard repeat a new passphrase prompt. - PromptRepeatPassphrase = &survey.Password{ - Message: "Repeat passphrase:", - } -) - -// Confirm asks the user for confirmation and aborts when rejected. -func Confirm(msg, abortMsg string) { - // TODO: Support flag for skipping confirmations. - - var proceed bool - err := survey.AskOne(&survey.Confirm{Message: msg}, &proceed) - cobra.CheckErr(err) - if !proceed { - cobra.CheckErr(abortMsg) - } -} - -// AskNewPassphrase asks the user to create a new passphrase. -func AskNewPassphrase() string { - var answers struct { - Passphrase string - Passphrase2 string - } - questions := []*survey.Question{ - { - Name: "passphrase", - Prompt: PromptCreatePassphrase, - }, - { - Name: "passphrase2", - Prompt: PromptRepeatPassphrase, - Validate: func(ans interface{}) error { - if ans.(string) != answers.Passphrase { - return fmt.Errorf("passphrases do not match") - } - return nil - }, - }, - } - err := survey.Ask(questions, &answers) - cobra.CheckErr(err) - - return answers.Passphrase -} diff --git a/cli/cmd/common/selector.go b/cli/cmd/common/selector.go deleted file mode 100644 index de5c61d35b..0000000000 --- a/cli/cmd/common/selector.go +++ /dev/null @@ -1,96 +0,0 @@ -package common - -import ( - "fmt" - - "github.com/spf13/cobra" - flag "github.com/spf13/pflag" - - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/helpers" -) - -var ( - selectedNetwork string - selectedParaTime string - selectedAccount string - - noParaTime bool -) - -// SelectorFlags contains the common selector flags for network/paratime/wallet. -var SelectorFlags *flag.FlagSet - -// NPASelection contains the network/paratime/account selection. -type NPASelection struct { - NetworkName string - Network *config.Network - - ParaTimeName string - ParaTime *config.ParaTime - - AccountName string - Account *cliConfig.Account -} - -// GetNPASelection returns the user-selected network/paratime/account combination. -func GetNPASelection(cfg *cliConfig.Config) *NPASelection { - var s NPASelection - s.NetworkName = cfg.Networks.Default - if selectedNetwork != "" { - s.NetworkName = selectedNetwork - } - if s.NetworkName == "" { - cobra.CheckErr(fmt.Errorf("no networks configured")) - } - s.Network = cfg.Networks.All[s.NetworkName] - if s.Network == nil { - cobra.CheckErr(fmt.Errorf("network '%s' does not exist", s.NetworkName)) - } - - if !noParaTime { - s.ParaTimeName = s.Network.ParaTimes.Default - if selectedParaTime != "" { - s.ParaTimeName = selectedParaTime - } - if s.ParaTimeName != "" { - s.ParaTime = s.Network.ParaTimes.All[s.ParaTimeName] - if s.ParaTime == nil { - cobra.CheckErr(fmt.Errorf("paratime '%s' does not exist", s.ParaTimeName)) - } - } - } - - s.AccountName = cfg.Wallet.Default - if selectedAccount != "" { - s.AccountName = selectedAccount - } - if s.AccountName != "" { - if testName := helpers.ParseTestAccountAddress(s.AccountName); testName != "" { - testAcc, err := LoadTestAccountConfig(testName) - cobra.CheckErr(err) - s.Account = testAcc - } else { - s.Account = cfg.Wallet.All[s.AccountName] - if s.Account == nil { - cobra.CheckErr(fmt.Errorf("account '%s' does not exist in the wallet", s.AccountName)) - } - } - } - - return &s -} - -func init() { - SelectorFlags = flag.NewFlagSet("", flag.ContinueOnError) - SelectorFlags.StringVar(&selectedNetwork, "network", "", "explicitly set network to use") - SelectorFlags.StringVar(&selectedParaTime, "paratime", "", "explicitly set paratime to use") - SelectorFlags.BoolVar(&noParaTime, "no-paratime", false, "explicitly set that no paratime should be used") - SelectorFlags.StringVar(&selectedAccount, "account", "", "explicitly set account to use") - - // Backward compatibility. - SelectorFlags.StringVar(&selectedAccount, "wallet", "", "explicitly set account to use. OBSOLETE, USE --account INSTEAD!") - err := SelectorFlags.MarkHidden("wallet") - cobra.CheckErr(err) -} diff --git a/cli/cmd/common/transaction.go b/cli/cmd/common/transaction.go deleted file mode 100644 index 5c789592c9..0000000000 --- a/cli/cmd/common/transaction.go +++ /dev/null @@ -1,425 +0,0 @@ -package common - -import ( - "context" - "encoding/json" - "fmt" - "math" - "os" - - "github.com/spf13/cobra" - flag "github.com/spf13/pflag" - - "github.com/oasisprotocol/oasis-core/go/common/cbor" - coreSignature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - consensusPretty "github.com/oasisprotocol/oasis-core/go/common/prettyprint" - "github.com/oasisprotocol/oasis-core/go/common/quantity" - consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" - consensusTx "github.com/oasisprotocol/oasis-core/go/consensus/api/transaction" - - "github.com/oasisprotocol/oasis-sdk/cli/wallet" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/callformat" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/client" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/helpers" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -var ( - txOffline bool - txNonce uint64 - txGasLimit uint64 - txGasPrice string - txEncrypted bool -) - -const ( - invalidNonce = math.MaxUint64 - invalidGasLimit = math.MaxUint64 -) - -// TransactionFlags contains the common transaction flags. -var TransactionFlags *flag.FlagSet - -// TransactionConfig contains the transaction-related configuration from flags. -type TransactionConfig struct { - // Offline is a flag indicating that no online queries are allowed. - Offline bool -} - -// GetTransactionConfig returns the transaction-related configuration from flags. -func GetTransactionConfig() *TransactionConfig { - return &TransactionConfig{ - Offline: txOffline, - } -} - -// SignConsensusTransaction signs a consensus transaction. -func SignConsensusTransaction( - ctx context.Context, - npa *NPASelection, - wallet wallet.Account, - conn connection.Connection, - tx *consensusTx.Transaction, -) (*consensusTx.SignedTransaction, error) { - // Require consensus signer. - signer := wallet.ConsensusSigner() - if signer == nil { - return nil, fmt.Errorf("account does not support signing consensus transactions") - } - - // Default to passed values and do online estimation when possible. - tx.Nonce = txNonce - if tx.Fee == nil { - tx.Fee = &consensusTx.Fee{} - } - tx.Fee.Gas = consensusTx.Gas(txGasLimit) - - gasPrice := quantity.NewQuantity() - if txGasPrice != "" { - var err error - gasPrice, err = helpers.ParseConsensusDenomination(npa.Network, txGasPrice) - if err != nil { - return nil, fmt.Errorf("bad gas price: %w", err) - } - } - - if !txOffline { // nolint: nestif - // Query nonce if not specified. - if tx.Nonce == invalidNonce { - nonce, err := conn.Consensus().GetSignerNonce(ctx, &consensus.GetSignerNonceRequest{ - AccountAddress: wallet.Address().ConsensusAddress(), - Height: consensus.HeightLatest, - }) - if err != nil { - return nil, fmt.Errorf("failed to query nonce: %w", err) - } - tx.Nonce = nonce - } - - // Gas estimation if not specified. - if tx.Fee.Gas == invalidGasLimit { - gas, err := conn.Consensus().EstimateGas(ctx, &consensus.EstimateGasRequest{ - Signer: signer.Public(), - Transaction: tx, - }) - if err != nil { - return nil, fmt.Errorf("failed to estimate gas: %w", err) - } - tx.Fee.Gas = gas - } - } - - // If we are using offline mode and either nonce or gas limit is not specified, abort. - if tx.Nonce == invalidNonce || tx.Fee.Gas == invalidGasLimit { - return nil, fmt.Errorf("nonce and/or gas limit must be specified in offline mode") - } - - // Compute fee amount based on gas price. - if err := gasPrice.Mul(quantity.NewFromUint64(uint64(tx.Fee.Gas))); err != nil { - return nil, err - } - tx.Fee.Amount = *gasPrice - - PrintTransactionBeforeSigning(npa, tx) - - // Sign the transaction. - // NOTE: We build our own domain separation context here as we need to support multiple chain - // contexts at the same time. Would be great if chainContextSeparator was exposed in core. - sigCtx := coreSignature.Context([]byte(fmt.Sprintf("%s for chain %s", consensusTx.SignatureContext, npa.Network.ChainContext))) - signed, err := coreSignature.SignSigned(signer, sigCtx, tx) - if err != nil { - return nil, err - } - - return &consensusTx.SignedTransaction{Signed: *signed}, nil -} - -// SignParaTimeTransaction signs a ParaTime transaction. -// -// Returns the signed transaction and call format-specific metadata for result decoding. -func SignParaTimeTransaction( - ctx context.Context, - npa *NPASelection, - wallet wallet.Account, - conn connection.Connection, - tx *types.Transaction, -) (*types.UnverifiedTransaction, interface{}, error) { - // Default to passed values and do online estimation when possible. - nonce := txNonce - tx.AuthInfo.Fee.Gas = txGasLimit - - gasPrice := &types.BaseUnits{} - if txGasPrice != "" { - // TODO: Support different denominations for gas fees. - var err error - gasPrice, err = helpers.ParseParaTimeDenomination(npa.ParaTime, txGasPrice, types.NativeDenomination) - if err != nil { - return nil, nil, fmt.Errorf("bad gas price: %w", err) - } - } - - if !txOffline { - // Query nonce if not specified. - if nonce == invalidNonce { - var err error - nonce, err = conn.Runtime(npa.ParaTime).Accounts.Nonce(ctx, client.RoundLatest, wallet.Address()) - if err != nil { - return nil, nil, fmt.Errorf("failed to query nonce: %w", err) - } - } - } - - // Prepare the transaction before (optional) gas estimation to ensure correct estimation. - tx.AppendAuthSignature(wallet.SignatureAddressSpec(), nonce) - - if !txOffline { // nolint: nestif - // Gas estimation if not specified. - if tx.AuthInfo.Fee.Gas == invalidGasLimit { - var err error - tx.AuthInfo.Fee.Gas, err = conn.Runtime(npa.ParaTime).Core.EstimateGas(ctx, client.RoundLatest, tx, false) - if err != nil { - return nil, nil, fmt.Errorf("failed to estimate gas: %w", err) - } - } - - // Gas price determination if not specified. - if txGasPrice == "" { - mgp, err := conn.Runtime(npa.ParaTime).Core.MinGasPrice(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to query minimum gas price: %w", err) - } - - // TODO: Support different denominations for gas fees. - denom := types.NativeDenomination - *gasPrice = types.NewBaseUnits(mgp[denom], denom) - } - } - - // If we are using offline mode and either nonce or gas limit is not specified, abort. - if nonce == invalidNonce || tx.AuthInfo.Fee.Gas == invalidGasLimit { - return nil, nil, fmt.Errorf("nonce and/or gas limit must be specified in offline mode") - } - - // Compute fee amount based on gas price. - if err := gasPrice.Amount.Mul(quantity.NewFromUint64(tx.AuthInfo.Fee.Gas)); err != nil { - return nil, nil, err - } - tx.AuthInfo.Fee.Amount.Amount = gasPrice.Amount - tx.AuthInfo.Fee.Amount.Denomination = gasPrice.Denomination - - // Handle confidential transactions. - var meta interface{} - if txEncrypted { - // Only online mode is supported for now. - if txOffline { - return nil, nil, fmt.Errorf("encrypted transactions are not available in offline mode") - } - - // Request public key from the runtime. - pk, err := conn.Runtime(npa.ParaTime).Core.CallDataPublicKey(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to get runtime's call data public key: %w", err) - } - - cfg := callformat.EncodeConfig{ - PublicKey: &pk.PublicKey, - } - var encCall *types.Call - encCall, meta, err = callformat.EncodeCall(&tx.Call, types.CallFormatEncryptedX25519DeoxysII, &cfg) - if err != nil { - return nil, nil, fmt.Errorf("failed to encrypt call: %w", err) - } - - tx.Call = *encCall - } - - PrintTransactionBeforeSigning(npa, tx) - - // Sign the transaction. - sigCtx := signature.DeriveChainContext(npa.ParaTime.Namespace(), npa.Network.ChainContext) - ts := tx.PrepareForSigning() - if err := ts.AppendSign(sigCtx, wallet.Signer()); err != nil { - return nil, nil, fmt.Errorf("failed to sign transaction: %w", err) - } - - return ts.UnverifiedTransaction(), meta, nil -} - -// PrintTransactionBeforeSigning prints the transaction and asks the user for confirmation. -func PrintTransactionBeforeSigning(npa *NPASelection, tx interface{}) { - fmt.Printf("You are about to sign the following transaction:\n") - - switch rtx := tx.(type) { - case *consensusTx.Transaction: - // Consensus transaction. - ctx := context.Background() - ctx = context.WithValue(ctx, consensusPretty.ContextKeyTokenSymbol, npa.Network.Denomination.Symbol) - ctx = context.WithValue(ctx, consensusPretty.ContextKeyTokenValueExponent, npa.Network.Denomination.Decimals) - rtx.PrettyPrint(ctx, "", os.Stdout) - default: - // TODO: Add pretty variant for paratime transactions. - formatted, err := json.MarshalIndent(tx, "", " ") - cobra.CheckErr(err) - fmt.Println(string(formatted)) - } - fmt.Println() - - fmt.Printf("Account: %s", npa.AccountName) - if len(npa.Account.Description) > 0 { - fmt.Printf(" (%s)", npa.Account.Description) - } - fmt.Println() - fmt.Printf("Network: %s", npa.NetworkName) - if len(npa.Network.Description) > 0 { - fmt.Printf(" (%s)", npa.Network.Description) - } - fmt.Println() - if _, isParaTimeTx := tx.(*types.Transaction); isParaTimeTx && npa.ParaTime != nil { - fmt.Printf("Paratime: %s", npa.ParaTimeName) - if len(npa.ParaTime.Description) > 0 { - fmt.Printf(" (%s)", npa.ParaTime.Description) - } - fmt.Println() - } else { - fmt.Println("Paratime: none (consensus layer)") - } - - // Ask the user to confirm signing this transaction. - Confirm("Sign this transaction?", "signing aborted") - - fmt.Println("(In case you are using a hardware-based signer you may need to confirm on device.)") -} - -// PrintSignedTransaction prints a signed transaction. -func PrintSignedTransaction(sigTx interface{}) { - // TODO: Add some options for controlling output. - formatted, err := json.MarshalIndent(sigTx, "", " ") - cobra.CheckErr(err) - fmt.Println(string(formatted)) -} - -// BroadcastTransaction broadcasts a transaction. -// -// When in offline mode, it outputs the transaction instead. -func BroadcastTransaction( - ctx context.Context, - pt *config.ParaTime, - conn connection.Connection, - tx interface{}, - meta interface{}, - result interface{}, -) { - if txOffline { - PrintSignedTransaction(tx) - return - } - - switch sigTx := tx.(type) { - case *consensusTx.SignedTransaction: - // Consensus transaction. - fmt.Printf("Broadcasting transaction...\n") - err := conn.Consensus().SubmitTx(ctx, sigTx) - cobra.CheckErr(err) - - fmt.Printf("Transaction executed successfully.\n") - fmt.Printf("Transaction hash: %s\n", sigTx.Hash()) - case *types.UnverifiedTransaction: - // ParaTime transaction. - fmt.Printf("Broadcasting transaction...\n") - rawMeta, err := conn.Runtime(pt).SubmitTxRawMeta(ctx, sigTx) - cobra.CheckErr(err) - - if rawMeta.CheckTxError != nil { - cobra.CheckErr(fmt.Sprintf("Transaction check failed with error: module: %s code: %d message: %s", - rawMeta.CheckTxError.Module, - rawMeta.CheckTxError.Code, - rawMeta.CheckTxError.Message, - )) - } - - fmt.Printf("Transaction included in block successfully.\n") - fmt.Printf("Round: %d\n", rawMeta.Round) - fmt.Printf("Transaction hash: %s\n", sigTx.Hash()) - - if rawMeta.Result.IsUnknown() { - fmt.Printf(" (Transaction result is encrypted.)\n") - } - - decResult, err := callformat.DecodeResult(&rawMeta.Result, meta) - cobra.CheckErr(err) - - switch { - case decResult.IsUnknown(): - // This should never happen as the inner result should not be unknown. - cobra.CheckErr(fmt.Sprintf("Execution result unknown: %X", decResult.Unknown)) - case decResult.IsSuccess(): - fmt.Printf("Execution successful.\n") - - if result != nil { - err = cbor.Unmarshal(decResult.Ok, result) - cobra.CheckErr(err) - } - default: - cobra.CheckErr(fmt.Sprintf("Execution failed with error: %s", decResult.Failed.Error())) - } - default: - panic(fmt.Errorf("unsupported transaction kind: %T", tx)) - } -} - -// WaitForEvent waits for a specific ParaTime event. -// -// If no mapFn is specified, the returned channel will contain DecodedEvents, otherwise it will -// contain whatever mapFn returns. -// -// If mapFn is specified it should return a non-nil value when encountering a matching event. -func WaitForEvent( - ctx context.Context, - pt *config.ParaTime, - conn connection.Connection, - decoder client.EventDecoder, - mapFn func(client.DecodedEvent) interface{}, -) <-chan interface{} { - ctx, cancel := context.WithCancel(ctx) - - // Start watching events. - ch, err := conn.Runtime(pt).WatchEvents(ctx, []client.EventDecoder{decoder}, false) - cobra.CheckErr(err) - - // Start processing events. - resultCh := make(chan interface{}) - go func() { - defer close(resultCh) - defer cancel() - - for { - select { - case <-ctx.Done(): - return - case bev := <-ch: - for _, ev := range bev.Events { - if result := mapFn(ev); result != nil { - resultCh <- result - return - } - } - - // TODO: Timeout. - } - } - }() - - return resultCh -} - -func init() { - TransactionFlags = flag.NewFlagSet("", flag.ContinueOnError) - TransactionFlags.BoolVar(&txOffline, "offline", false, "do not perform any operations requiring network access") - TransactionFlags.Uint64Var(&txNonce, "nonce", invalidNonce, "override nonce to use") - TransactionFlags.Uint64Var(&txGasLimit, "gas-limit", invalidGasLimit, "override gas limit to use (disable estimation)") - TransactionFlags.StringVar(&txGasPrice, "gas-price", "", "override gas price to use") - TransactionFlags.BoolVar(&txEncrypted, "encrypted", false, "encrypt transaction call data (requires online mode)") -} diff --git a/cli/cmd/common/wallet.go b/cli/cmd/common/wallet.go deleted file mode 100644 index 9f9746a587..0000000000 --- a/cli/cmd/common/wallet.go +++ /dev/null @@ -1,118 +0,0 @@ -package common - -import ( - "fmt" - - "github.com/AlecAivazis/survey/v2" - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/wallet" - "github.com/oasisprotocol/oasis-sdk/cli/wallet/test" - configSdk "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/helpers" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/testing" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -// LoadAccount loads the given named account. -func LoadAccount(cfg *config.Config, name string) wallet.Account { - // Check if the specified account is a test account. - if testName := helpers.ParseTestAccountAddress(name); testName != "" { - acc, err := LoadTestAccount(testName) - cobra.CheckErr(err) - return acc - } - - // Early check for whether the account exists so that we don't ask for passphrase first. - var ( - acfg *config.Account - exists bool - ) - if acfg, exists = cfg.Wallet.All[name]; !exists { - cobra.CheckErr(fmt.Errorf("account '%s' does not exist in the wallet", name)) - } - - af, err := acfg.LoadFactory() - cobra.CheckErr(err) - - var passphrase string - if af.RequiresPassphrase() { - // Ask for passphrase to decrypt the account. - fmt.Printf("Unlock your account.\n") - - err = survey.AskOne(PromptPassphrase, &passphrase) - cobra.CheckErr(err) - } - - acc, err := cfg.Wallet.Load(name, passphrase) - cobra.CheckErr(err) - - return acc -} - -// LoadTestAccount loads the given named test account. -func LoadTestAccount(name string) (wallet.Account, error) { - if testKey, ok := testing.TestAccounts[name]; ok { - return test.NewTestAccount(testKey) - } - return nil, fmt.Errorf("test account %s does not exist", name) -} - -// LoadTestAccountConfig loads config for the given named test account. -func LoadTestAccountConfig(name string) (*config.Account, error) { - testAcc, err := LoadTestAccount(name) - if err != nil { - return nil, err - } - - return &config.Account{ - Description: "", - Kind: test.Kind, - Address: testAcc.Address().String(), - Config: nil, - }, nil -} - -// ResolveLocalAccountOrAddress resolves a string address into the corresponding account address. -func ResolveLocalAccountOrAddress(net *configSdk.Network, address string) (*types.Address, error) { - // Check if address is the account name in the wallet. - if acc, ok := config.Global().Wallet.All[address]; ok { - addr := acc.GetAddress() - return &addr, nil - } - - // Check if address is the name of an address book entry. - if entry, ok := config.Global().AddressBook.All[address]; ok { - addr := entry.GetAddress() - return &addr, nil - } - - return helpers.ResolveAddress(net, address) -} - -// CheckLocalAccountIsConsensusCapable is a safety check for withdrawals or consensus layer -// transfers to potentially known native addresses which key pairs are not compatible with -// consensus or the address is a derivation of a known Ethereum address. -func CheckLocalAccountIsConsensusCapable(cfg *config.Config, address string) error { - for name, acc := range cfg.Wallet.All { - if acc.Address == address && !acc.HasConsensusSigner() { - return fmt.Errorf("destination account '%s' (%s) will not be able to sign transactions on consensus layer", name, acc.Address) - } - } - - for name := range testing.TestAccounts { - testAcc, _ := LoadTestAccount(name) - if testAcc.Address().String() == address && testAcc.ConsensusSigner() == nil { - return fmt.Errorf("test account '%s' (%s) will not be able to sign transactions on consensus layer", name, testAcc.Address().String()) - } - } - - for name, acc := range cfg.AddressBook.All { - if acc.Address == address && acc.GetEthAddress() != nil { - return fmt.Errorf("destination address named '%s' (%s) will not be able to sign transactions on consensus layer", name, acc.GetEthAddress().Hex()) - } - } - - return nil -} diff --git a/cli/cmd/contracts.go b/cli/cmd/contracts.go deleted file mode 100644 index f90a32e23c..0000000000 --- a/cli/cmd/contracts.go +++ /dev/null @@ -1,575 +0,0 @@ -package cmd - -import ( - "context" - "encoding/json" - "fmt" - "os" - "strconv" - "strings" - - "github.com/spf13/cobra" - flag "github.com/spf13/pflag" - "gopkg.in/yaml.v2" - - "github.com/oasisprotocol/oasis-core/go/common/cbor" - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/client" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/helpers" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/modules/contracts" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -var ( - contractsInstantiatePolicy string - contractsUpgradesPolicy string - contractsTokens []string - contractsStorageDumpKind string - contractsStorageDumpLimit uint64 - contractsStorageDumpOffset uint64 - - contractsCmd = &cobra.Command{ - Use: "contracts", - Short: "WebAssembly smart contracts operations", - } - - contractsShowCmd = &cobra.Command{ - Use: "show ", - Short: "Show information about instantiated contract", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - strInstanceID := args[0] - - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - instanceID, err := strconv.ParseUint(strInstanceID, 10, 64) - cobra.CheckErr(err) - - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - inst, err := conn.Runtime(npa.ParaTime).Contracts.Instance(ctx, client.RoundLatest, contracts.InstanceID(instanceID)) - cobra.CheckErr(err) - - fmt.Printf("ID: %d\n", inst.ID) - fmt.Printf("Code ID: %d\n", inst.CodeID) - fmt.Printf("Creator: %s\n", inst.Creator) - fmt.Printf("Upgrades policy: %s\n", formatPolicy(&inst.UpgradesPolicy)) - }, - } - - contractsShowCodeCmd = &cobra.Command{ - Use: "show-code ", - Short: "Show information about uploaded contract code", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - strCodeID := args[0] - - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - codeID, err := strconv.ParseUint(strCodeID, 10, 64) - cobra.CheckErr(err) - - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - code, err := conn.Runtime(npa.ParaTime).Contracts.Code(ctx, client.RoundLatest, contracts.CodeID(codeID)) - cobra.CheckErr(err) - - fmt.Printf("ID: %d\n", code.ID) - fmt.Printf("Hash: %s\n", code.Hash) - fmt.Printf("ABI: %s (sv: %d)\n", code.ABI, code.ABISubVersion) - fmt.Printf("Uploader: %s\n", code.Uploader) - fmt.Printf("Instantiate policy: %s\n", formatPolicy(&code.InstantiatePolicy)) - }, - } - - contractsStorageCmd = &cobra.Command{ - Use: "storage", - Short: "WebAssembly smart contracts storage operations", - } - - contractsStorageDumpCmd = &cobra.Command{ - Use: "dump ", - Short: "Dump contract store", - Long: `Dump public or confidential contract store in JSON. Valid UTF-8 keys in the result set will be -encoded as strings, or otherwise as Base64.`, - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - strInstanceID := args[0] - - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - instanceID, err := strconv.ParseUint(strInstanceID, 10, 64) - cobra.CheckErr(err) - - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - var storeKind contracts.StoreKind - cobra.CheckErr(storeKind.UnmarshalText([]byte(contractsStorageDumpKind))) - - res, err := conn.Runtime(npa.ParaTime).Contracts.InstanceRawStorage( - ctx, - client.RoundLatest, - contracts.InstanceID(instanceID), - storeKind, - contractsStorageDumpLimit, - contractsStorageDumpOffset, - ) - cobra.CheckErr(err) - - fmt.Printf( - "Showing %d %s record(s) of contract %d:\n", - len(res.Items), - contractsStorageDumpKind, - instanceID, - ) - common.JSONPrintKeyValueTuple(res.Items) - }, - } - - contractsStorageGetCmd = &cobra.Command{ - Use: "get ", - Short: "Print value for given key in public contract store", - Long: `Print value for the given key in the public contract store in JSON format. The given key can be -a string or Base64-encoded. Valid UTF-8 keys in the result set will be encoded as strings, or -otherwise as Base64.`, - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - strInstanceID := args[0] - strKey := args[1] - - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - instanceID, err := strconv.ParseUint(strInstanceID, 10, 64) - cobra.CheckErr(err) - - // Try parsing the query key as Base64-encoded value. This allows users to query binary - // keys. If decoding fails, fallback to original value. - var key []byte - if err = json.Unmarshal([]byte(fmt.Sprintf("\"%s\"", strKey)), &key); err != nil { - key = []byte(strKey) - } - - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - res, err := conn.Runtime(npa.ParaTime).Contracts.InstanceStorage( - ctx, - client.RoundLatest, - contracts.InstanceID(instanceID), - key, - ) - cobra.CheckErr(err) - - var storageCell interface{} - err = cbor.Unmarshal(res.Value, &storageCell) - if err != nil { - // Value is not CBOR, use raw value instead. - storageCell = res.Value - } - fmt.Printf("%s\n", common.JSONMarshalUniversalValue(storageCell)) - }, - } - - contractsDumpCodeCmd = &cobra.Command{ - Use: "dump-code ", - Short: "Dump WebAssembly smart contract code", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - strCodeID := args[0] - - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - codeID, err := strconv.ParseUint(strCodeID, 10, 64) - cobra.CheckErr(err) - - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - // Fetch WASM contract code, if supported. - codeStorage, err := conn.Runtime(npa.ParaTime).Contracts.CodeStorage( - ctx, - client.RoundLatest, - contracts.CodeID(codeID), - ) - cobra.CheckErr(err) - - os.Stdout.Write(codeStorage.Code) - }, - } - - contractsUploadCmd = &cobra.Command{ - Use: "upload [--instantiate-policy POLICY]", - Short: "Upload WebAssembly smart contract", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - wasmFilename := args[0] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - var err error - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Read WASM from file. - wasmData, err := os.ReadFile(wasmFilename) - cobra.CheckErr(err) - - // Parse instantiation policy. - instantiatePolicy := parsePolicy(npa.Network, npa.Account, contractsInstantiatePolicy) - - // Prepare transaction. - tx := contracts.NewUploadTx(nil, &contracts.Upload{ - ABI: contracts.ABIOasisV1, - InstantiatePolicy: *instantiatePolicy, - Code: contracts.CompressCode(wasmData), - }) - - acc := common.LoadAccount(cfg, npa.AccountName) - sigTx, meta, err := common.SignParaTimeTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - var result contracts.UploadResult - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, meta, &result) - - if txCfg.Offline { - return - } - - fmt.Printf("Code ID: %d\n", result.ID) - }, - } - - contractsInstantiateCmd = &cobra.Command{ - Use: "instantiate [--tokens TOKENS] [--upgrades-policy POLICY]", - Aliases: []string{"inst"}, - Short: "Instantiate WebAssembly smart contract", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - strCodeID := args[0] - strData := args[1] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - codeID, err := strconv.ParseUint(strCodeID, 10, 64) - cobra.CheckErr(err) - - // Parse instantiation arguments. - data := parseData(strData) - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Parse upgrades policy. - upgradesPolicy := parsePolicy(npa.Network, npa.Account, contractsUpgradesPolicy) - - // Parse tokens that should be sent to the contract. - tokens := parseTokens(npa.ParaTime, contractsTokens) - - // Prepare transaction. - tx := contracts.NewInstantiateTx(nil, &contracts.Instantiate{ - CodeID: contracts.CodeID(codeID), - UpgradesPolicy: *upgradesPolicy, - Data: cbor.Marshal(data), - Tokens: tokens, - }) - - acc := common.LoadAccount(cfg, npa.AccountName) - sigTx, meta, err := common.SignParaTimeTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - var result contracts.InstantiateResult - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, meta, &result) - - if txCfg.Offline { - return - } - - fmt.Printf("Instance ID: %d\n", result.ID) - }, - } - - contractsCallCmd = &cobra.Command{ - Use: "call [--tokens TOKENS]", - Short: "Call WebAssembly smart contract", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - strInstanceID := args[0] - strData := args[1] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - instanceID, err := strconv.ParseUint(strInstanceID, 10, 64) - cobra.CheckErr(err) - - // Parse call arguments. - data := parseData(strData) - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Parse tokens that should be sent to the contract. - tokens := parseTokens(npa.ParaTime, contractsTokens) - - // Prepare transaction. - tx := contracts.NewCallTx(nil, &contracts.Call{ - ID: contracts.InstanceID(instanceID), - Data: cbor.Marshal(data), - Tokens: tokens, - }) - - acc := common.LoadAccount(cfg, npa.AccountName) - sigTx, meta, err := common.SignParaTimeTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - var result contracts.CallResult - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, meta, &result) - - if txCfg.Offline { - return - } - - fmt.Printf("Call result:\n") - - var decResult interface{} - err = cbor.Unmarshal(result, &decResult) - if err != nil { - cobra.CheckErr(fmt.Errorf("failed to unmarshal call result: %w", err)) - } - - formatted, err := yaml.Marshal(decResult) - cobra.CheckErr(err) - fmt.Println(string(formatted)) - }, - } - - contractsChangeUpgradePolicyCmd = &cobra.Command{ - Use: "change-upgrade-policy ", - Short: "Change WebAssembly smart contract upgrade policy", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - txCfg := common.GetTransactionConfig() - strInstanceID := args[0] - strPolicy := args[1] - - if npa.Account == nil { - cobra.CheckErr("no accounts configured in your wallet") - } - if npa.ParaTime == nil { - cobra.CheckErr("no paratimes configured") - } - - instanceID, err := strconv.ParseUint(strInstanceID, 10, 64) - cobra.CheckErr(err) - - // When not in offline mode, connect to the given network endpoint. - ctx := context.Background() - var conn connection.Connection - if !txCfg.Offline { - conn, err = connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - } - - // Parse upgrades policy. - upgradesPolicy := parsePolicy(npa.Network, npa.Account, strPolicy) - - // Prepare transaction. - tx := contracts.NewChangeUpgradePolicyTx(nil, &contracts.ChangeUpgradePolicy{ - ID: contracts.InstanceID(instanceID), - UpgradesPolicy: *upgradesPolicy, - }) - - acc := common.LoadAccount(cfg, npa.AccountName) - sigTx, meta, err := common.SignParaTimeTransaction(ctx, npa, acc, conn, tx) - cobra.CheckErr(err) - - common.BroadcastTransaction(ctx, npa.ParaTime, conn, sigTx, meta, nil) - }, - } -) - -func formatPolicy(policy *contracts.Policy) string { - switch { - case policy.Nobody != nil: - return "nobody" - case policy.Address != nil: - return fmt.Sprintf("address:%s", policy.Address.String()) - case policy.Everyone != nil: - return "everyone" - default: - return "[unknown]" - } -} - -func parsePolicy(net *config.Network, wallet *cliConfig.Account, policy string) *contracts.Policy { - switch { - case policy == "nobody": - return &contracts.Policy{Nobody: &struct{}{}} - case policy == "everyone": - return &contracts.Policy{Everyone: &struct{}{}} - case policy == "owner": - address := wallet.GetAddress() - return &contracts.Policy{Address: &address} - case strings.HasPrefix(policy, "address:"): - policy = strings.TrimPrefix(policy, "address:") - address, err := common.ResolveLocalAccountOrAddress(net, policy) - if err != nil { - cobra.CheckErr(fmt.Errorf("malformed address in policy: %w", err)) - } - return &contracts.Policy{Address: address} - default: - cobra.CheckErr(fmt.Sprintf("invalid policy: %s", policy)) - } - return nil -} - -func parseData(data string) interface{} { - var result interface{} - if len(data) > 0 { - err := yaml.Unmarshal([]byte(data), &result) - cobra.CheckErr(err) - } - return result -} - -func parseTokens(pt *config.ParaTime, tokens []string) []types.BaseUnits { - result := []types.BaseUnits{} - for _, raw := range tokens { - // TODO: Support parsing denominations. - amount, err := helpers.ParseParaTimeDenomination(pt, raw, types.NativeDenomination) - if err != nil { - cobra.CheckErr(fmt.Errorf("malformed token amount: %w", err)) - } - result = append(result, *amount) - } - return result -} - -func init() { - contractsShowCmd.Flags().AddFlagSet(common.SelectorFlags) - contractsShowCodeCmd.Flags().AddFlagSet(common.SelectorFlags) - - contractsDumpCodeCmd.Flags().AddFlagSet(common.SelectorFlags) - - contractsUploadFlags := flag.NewFlagSet("", flag.ContinueOnError) - contractsUploadFlags.StringVar(&contractsInstantiatePolicy, "instantiate-policy", "everyone", "contract instantiation policy") - - contractsUploadCmd.Flags().AddFlagSet(common.SelectorFlags) - contractsUploadCmd.Flags().AddFlagSet(common.TransactionFlags) - contractsUploadCmd.Flags().AddFlagSet(contractsUploadFlags) - - contractsCallFlags := flag.NewFlagSet("", flag.ContinueOnError) - contractsCallFlags.StringSliceVar(&contractsTokens, "tokens", []string{}, "token amounts to send to a contract") - - contractsInstantiateFlags := flag.NewFlagSet("", flag.ContinueOnError) - contractsInstantiateFlags.StringVar(&contractsUpgradesPolicy, "upgrades-policy", "owner", "contract upgrades policy") - - contractsInstantiateCmd.Flags().AddFlagSet(common.SelectorFlags) - contractsInstantiateCmd.Flags().AddFlagSet(common.TransactionFlags) - contractsInstantiateCmd.Flags().AddFlagSet(contractsInstantiateFlags) - contractsInstantiateCmd.Flags().AddFlagSet(contractsCallFlags) - - contractsCallCmd.Flags().AddFlagSet(common.SelectorFlags) - contractsCallCmd.Flags().AddFlagSet(common.TransactionFlags) - contractsCallCmd.Flags().AddFlagSet(contractsCallFlags) - - contractsChangeUpgradePolicyCmd.Flags().AddFlagSet(common.SelectorFlags) - contractsChangeUpgradePolicyCmd.Flags().AddFlagSet(common.TransactionFlags) - - contractsStorageDumpCmdFlags := flag.NewFlagSet("", flag.ContinueOnError) - contractsStorageDumpCmdFlags.StringVar(&contractsStorageDumpKind, "kind", "public", - fmt.Sprintf("store kind [%s]", strings.Join([]string{ - contracts.StoreKindPublicName, - contracts.StoreKindConfidentialName, - }, ", ")), - ) - contractsStorageDumpCmdFlags.Uint64Var(&contractsStorageDumpLimit, "limit", 0, "result set limit") - contractsStorageDumpCmdFlags.Uint64Var(&contractsStorageDumpOffset, "offset", 0, "result set offset") - contractsStorageDumpCmd.Flags().AddFlagSet(common.SelectorFlags) - contractsStorageDumpCmd.Flags().AddFlagSet(contractsStorageDumpCmdFlags) - - contractsStorageGetCmd.Flags().AddFlagSet(common.SelectorFlags) - - contractsStorageCmd.AddCommand(contractsStorageDumpCmd) - contractsStorageCmd.AddCommand(contractsStorageGetCmd) - - contractsCmd.AddCommand(contractsShowCmd) - contractsCmd.AddCommand(contractsShowCodeCmd) - contractsCmd.AddCommand(contractsStorageCmd) - contractsCmd.AddCommand(contractsDumpCodeCmd) - contractsCmd.AddCommand(contractsUploadCmd) - contractsCmd.AddCommand(contractsInstantiateCmd) - contractsCmd.AddCommand(contractsCallCmd) - contractsCmd.AddCommand(contractsChangeUpgradePolicyCmd) -} diff --git a/cli/cmd/inspect/governance_proposal.go b/cli/cmd/inspect/governance_proposal.go deleted file mode 100644 index a17cb4df34..0000000000 --- a/cli/cmd/inspect/governance_proposal.go +++ /dev/null @@ -1,292 +0,0 @@ -package inspect - -import ( - "context" - "fmt" - "math/big" - "sort" - "strconv" - - "github.com/spf13/cobra" - - beacon "github.com/oasisprotocol/oasis-core/go/beacon/api" - "github.com/oasisprotocol/oasis-core/go/common/node" - "github.com/oasisprotocol/oasis-core/go/common/quantity" - governance "github.com/oasisprotocol/oasis-core/go/governance/api" - staking "github.com/oasisprotocol/oasis-core/go/staking/api" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/metadata" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -var governanceProposalCmd = &cobra.Command{ - Use: "governance-proposal ", - Short: "Show proposal status by id", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - - // Determine the proposal ID to query. - proposalID, err := strconv.ParseUint(args[0], 10, 64) - cobra.CheckErr(err) - - // Establish connection with the target network. - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - consensusConn := conn.Consensus() - governanceConn := consensusConn.Governance() - beaconConn := consensusConn.Beacon() - schedulerConn := consensusConn.Scheduler() - registryConn := consensusConn.Registry() - stakingConn := consensusConn.Staking() - - // Figure out the height to use if "latest". - height, err := common.GetActualHeight( - ctx, - consensusConn, - ) - cobra.CheckErr(err) - - // Retrieve the proposal. - proposalQuery := &governance.ProposalQuery{ - Height: height, - ProposalID: proposalID, - } - proposal, err := governanceConn.Proposal(ctx, proposalQuery) - cobra.CheckErr(err) - - if proposal.State != governance.StateActive { - // If the proposal is closed, adjust the query height to the - // epoch at which the proposal was closed. - height, err = beaconConn.GetEpochBlock( - ctx, - proposal.ClosesAt, - ) - cobra.CheckErr(err) - - proposalQuery.Height = height - - proposal, err = governanceConn.Proposal(ctx, proposalQuery) - cobra.CheckErr(err) - } - - // Retrieve the parameters and votes. - governanceParams, err := governanceConn.ConsensusParameters(ctx, height) - cobra.CheckErr(err) - votes, err := governanceConn.Votes(ctx, proposalQuery) - cobra.CheckErr(err) - - // Retrieve all the node descriptors. - nodeLookup, err := newNodeLookup( - ctx, - consensusConn, - registryConn, - height, - ) - cobra.CheckErr(err) - - // Figure out the per-validator and total voting power. - // - // Note: This also initializes the non-voter list to the entire - // validator set, and each validator that voted will be removed - // as the actual votes are examined. - - totalVotingStake := quantity.NewQuantity() - validatorEntitiesEscrow := make(map[staking.Address]*quantity.Quantity) - voters := make(map[staking.Address]quantity.Quantity) - nonVoters := make(map[staking.Address]quantity.Quantity) - - validators, err := schedulerConn.GetValidators(ctx, height) - cobra.CheckErr(err) - - for _, validator := range validators { - var node *node.Node - node, err = nodeLookup.ByID(ctx, validator.ID) - cobra.CheckErr(err) - - // If there are multiple nodes in the validator set belonging - // to the same entity, only count the entity escrow once. - entityAddr := staking.NewAddress(node.EntityID) - if validatorEntitiesEscrow[entityAddr] != nil { - continue - } - - var account *staking.Account - account, err = stakingConn.Account( - ctx, - &staking.OwnerQuery{ - Height: height, - Owner: entityAddr, - }, - ) - cobra.CheckErr(err) - - validatorEntitiesEscrow[entityAddr] = &account.Escrow.Active.Balance - err = totalVotingStake.Add(&account.Escrow.Active.Balance) - cobra.CheckErr(err) - nonVoters[entityAddr] = account.Escrow.Active.Balance - } - - // Tally the votes. - - derivedResults := make(map[governance.Vote]quantity.Quantity) - var invalidVotes uint64 - for _, vote := range votes { - escrow, ok := validatorEntitiesEscrow[vote.Voter] - if !ok { - // Voter not in current validator set - invalid vote. - invalidVotes++ - continue - } - - currentVotes := derivedResults[vote.Vote] - newVotes := escrow.Clone() - err = newVotes.Add(¤tVotes) - cobra.CheckErr(err) - derivedResults[vote.Vote] = *newVotes - - delete(nonVoters, vote.Voter) - voters[vote.Voter] = *escrow.Clone() - } - - // Display the high-level summary of the proposal status. - - switch proposal.State { - case governance.StateActive: - // Close the proposal to get simulated results. - proposal.Results = derivedResults - err = proposal.CloseProposal( - *totalVotingStake.Clone(), - governanceParams.StakeThreshold, - ) - cobra.CheckErr(err) - - var epoch beacon.EpochTime - epoch, err = beaconConn.GetEpoch( - ctx, - height, - ) - cobra.CheckErr(err) - - fmt.Println( - "Proposal active, vote outcome if ended now:", - proposal.State, - ) - fmt.Printf( - "Voting ends in %d epochs\n", - proposal.ClosesAt-epoch, - ) - case governance.StatePassed, governance.StateFailed, governance.StateRejected: - fmt.Printf("Proposal %s, results: %v\n", - proposal.State, - proposal.Results, - ) - default: - cobra.CheckErr(fmt.Errorf("unexpected proposal state: %v", proposal.State)) - } - - // Calculate voting percentages. - votedStake, err := proposal.VotedSum() - cobra.CheckErr(err) - - voteStakePercentage := new(big.Float).SetInt(votedStake.Clone().ToBigInt()) - voteStakePercentage = voteStakePercentage.Mul(voteStakePercentage, new(big.Float).SetInt64(100)) - voteStakePercentage = voteStakePercentage.Quo(voteStakePercentage, new(big.Float).SetInt(totalVotingStake.ToBigInt())) - fmt.Printf( - "\nVoted stake: %s (%.2f%%), total voting stake: %s\n", - votedStake, - voteStakePercentage, - totalVotingStake, - ) - - votedYes := proposal.Results[governance.VoteYes] - votedYesPercentage := new(big.Float).SetInt(votedYes.Clone().ToBigInt()) - votedYesPercentage = votedYesPercentage.Mul(votedYesPercentage, new(big.Float).SetInt64(100)) - if votedStake.Cmp(quantity.NewFromUint64(0)) > 0 { - votedYesPercentage = votedYesPercentage.Quo(votedYesPercentage, new(big.Float).SetInt(votedStake.ToBigInt())) - } - fmt.Printf( - "Voted yes stake: %s (%.2f%%), voted stake: %s, threshold: %d%%\n", - votedYes, - votedYesPercentage, - votedStake, - governanceParams.StakeThreshold, - ) - - // Try to figure out the human readable names for all the entities. - fromRegistry, err := metadata.EntitiesFromRegistry(ctx) - if err != nil { - fmt.Printf("\nWarning: failed to query metadata registry: %v\n", err) - } - fromOasisscan, err := metadata.EntitiesFromOasisscan(ctx) - if err != nil { - fmt.Printf("\nWarning: failed to query oasisscan: %v\n", err) - } - - getName := func(addr staking.Address) string { - for _, src := range []struct { - m map[types.Address]*metadata.Entity - suffix string - }{ - {fromRegistry, ""}, - {fromOasisscan, " (from oasisscan)"}, - } { - if src.m == nil { - continue - } - if entry := src.m[types.NewAddressFromConsensus(addr)]; entry != nil { - return entry.Name + src.suffix - } - } - return "" - } - - fmt.Println("\nValidators voted:") - votersList := entitiesByDescendingStake(voters) - for _, val := range votersList { - name := getName(val.Address) - stakePercentage := new(big.Float).SetInt(val.Stake.Clone().ToBigInt()) - stakePercentage = stakePercentage.Mul(stakePercentage, new(big.Float).SetInt64(100)) - stakePercentage = stakePercentage.Quo(stakePercentage, new(big.Float).SetInt(totalVotingStake.ToBigInt())) - fmt.Printf("%s,%s,%s (%.2f%%)\n", val.Address, name, val.Stake, stakePercentage) - } - fmt.Println("\nValidators not voted:") - nonVotersList := entitiesByDescendingStake(nonVoters) - for _, val := range nonVotersList { - name := getName(val.Address) - stakePercentage := new(big.Float).SetInt(val.Stake.Clone().ToBigInt()) - stakePercentage = stakePercentage.Mul(stakePercentage, new(big.Float).SetInt64(100)) - stakePercentage = stakePercentage.Quo(stakePercentage, new(big.Float).SetInt(totalVotingStake.ToBigInt())) - fmt.Printf("%s,%s,%s (%.2f%%)\n", val.Address, name, val.Stake, stakePercentage) - } - }, -} - -func entitiesByDescendingStake(m map[staking.Address]quantity.Quantity) entityStakes { - pl := make(entityStakes, 0, len(m)) - for k, v := range m { - pl = append(pl, &entityStake{ - Address: k, - Stake: v, - }) - } - sort.Sort(sort.Reverse(pl)) - return pl -} - -type entityStake struct { - Address staking.Address - Stake quantity.Quantity -} - -type entityStakes []*entityStake - -func (p entityStakes) Len() int { return len(p) } -func (p entityStakes) Less(i, j int) bool { return p[i].Stake.Cmp(&p[j].Stake) < 0 } -func (p entityStakes) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/cli/cmd/inspect/helpers.go b/cli/cmd/inspect/helpers.go deleted file mode 100644 index 1ea23689d1..0000000000 --- a/cli/cmd/inspect/helpers.go +++ /dev/null @@ -1,97 +0,0 @@ -package inspect - -import ( - "context" - - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - "github.com/oasisprotocol/oasis-core/go/common/node" - consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" - registry "github.com/oasisprotocol/oasis-core/go/registry/api" -) - -type nodeLookup struct { - consensus consensus.ClientBackend - registry registry.Backend - nodeMap map[signature.PublicKey]*node.Node - - height int64 - haveAll bool -} - -func (nl *nodeLookup) SetHeight( - ctx context.Context, - height int64, -) error { - var force bool - if height == consensus.HeightLatest { - blk, err := nl.consensus.GetBlock(ctx, height) - if err != nil { - return err - } - height = blk.Height - force = true - } - - if nl.height != height || force { - nl.nodeMap = make(map[signature.PublicKey]*node.Node) - nl.haveAll = false - - // Some but not all configurations allow the GetNodes query, - // try to get all of the nodes for the new height. - allNodes, err := nl.registry.GetNodes(ctx, height) - if err == nil { - nl.haveAll = true - for idx, node := range allNodes { - nl.nodeMap[node.ID] = allNodes[idx] - } - } - } - - nl.height = height - - return nil -} - -func (nl *nodeLookup) ByID( - ctx context.Context, - id signature.PublicKey, -) (*node.Node, error) { - node, ok := nl.nodeMap[id] - if ok { - return node, nil - } - if nl.haveAll { - return nil, registry.ErrNoSuchNode - } - - var err error - if node, err = nl.registry.GetNode( - ctx, - ®istry.IDQuery{ - Height: nl.height, - ID: id, - }, - ); err == nil { - nl.nodeMap[id] = node - } - - return node, err -} - -func newNodeLookup( - ctx context.Context, - consensus consensus.ClientBackend, - registry registry.Backend, - height int64, -) (*nodeLookup, error) { - nl := &nodeLookup{ - consensus: consensus, - registry: registry, - nodeMap: make(map[signature.PublicKey]*node.Node), - height: -1, - } - if err := nl.SetHeight(ctx, height); err != nil { - return nil, err - } - return nl, nil -} diff --git a/cli/cmd/inspect/inspect.go b/cli/cmd/inspect/inspect.go deleted file mode 100644 index 52b82da65e..0000000000 --- a/cli/cmd/inspect/inspect.go +++ /dev/null @@ -1,35 +0,0 @@ -package inspect - -import ( - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" -) - -// Cmd is the network inspection sub-command set root. -var Cmd = &cobra.Command{ - Use: "inspect", - Short: "Inspect the network", -} - -func init() { - governanceProposalCmd.Flags().AddFlagSet(common.SelectorFlags) - governanceProposalCmd.Flags().AddFlagSet(common.HeightFlag) - - runtimeStatsCmd.Flags().AddFlagSet(common.SelectorFlags) - runtimeStatsCmd.Flags().AddFlagSet(csvFlags) - - nativeTokenCmd.Flags().AddFlagSet(common.SelectorFlags) - nativeTokenCmd.Flags().AddFlagSet(common.HeightFlag) - - nodeStatusCmd.Flags().AddFlagSet(common.SelectorFlags) - - registryCmd.Flags().AddFlagSet(common.SelectorFlags) - registryCmd.Flags().AddFlagSet(common.HeightFlag) - - Cmd.AddCommand(governanceProposalCmd) - Cmd.AddCommand(runtimeStatsCmd) - Cmd.AddCommand(nativeTokenCmd) - Cmd.AddCommand(nodeStatusCmd) - Cmd.AddCommand(registryCmd) -} diff --git a/cli/cmd/inspect/native_token.go b/cli/cmd/inspect/native_token.go deleted file mode 100644 index c7eeb4c13a..0000000000 --- a/cli/cmd/inspect/native_token.go +++ /dev/null @@ -1,107 +0,0 @@ -package inspect - -import ( - "context" - "fmt" - "os" - - "github.com/spf13/cobra" - - consensusPretty "github.com/oasisprotocol/oasis-core/go/common/prettyprint" - staking "github.com/oasisprotocol/oasis-core/go/staking/api" - "github.com/oasisprotocol/oasis-core/go/staking/api/token" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" -) - -var nativeTokenCmd = &cobra.Command{ - Use: "native-token", - Short: "Show native token information", - Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - - // Establish connection with the target network. - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - consensusConn := conn.Consensus() - stakingConn := consensusConn.Staking() - - tokenSymbol, err := stakingConn.TokenSymbol(ctx) - cobra.CheckErr(err) - tokenValueExponent, err := stakingConn.TokenValueExponent(ctx) - cobra.CheckErr(err) - - ctx = context.WithValue( - ctx, - consensusPretty.ContextKeyTokenSymbol, - tokenSymbol, - ) - ctx = context.WithValue( - ctx, - consensusPretty.ContextKeyTokenValueExponent, - tokenValueExponent, - ) - - fmt.Printf("Token's ticker symbol: %s\n", tokenSymbol) - fmt.Printf("Token's value base-10 exponent: %d\n", tokenValueExponent) - - // Figure out the height to use if "latest". - height, err := common.GetActualHeight( - ctx, - consensusConn, - ) - cobra.CheckErr(err) - - totalSupply, err := stakingConn.TotalSupply(ctx, height) - cobra.CheckErr(err) - fmt.Print("Total supply: ") - token.PrettyPrintAmount(ctx, *totalSupply, os.Stdout) - fmt.Println() - - commonPool, err := stakingConn.CommonPool(ctx, height) - cobra.CheckErr(err) - fmt.Print("Common pool: ") - token.PrettyPrintAmount(ctx, *commonPool, os.Stdout) - fmt.Println() - - lastBlockFees, err := stakingConn.LastBlockFees(ctx, height) - cobra.CheckErr(err) - fmt.Print("Last block fees: ") - token.PrettyPrintAmount(ctx, *lastBlockFees, os.Stdout) - fmt.Println() - - governanceDeposits, err := stakingConn.GovernanceDeposits(ctx, height) - cobra.CheckErr(err) - fmt.Print("Governance deposits: ") - token.PrettyPrintAmount(ctx, *governanceDeposits, os.Stdout) - fmt.Println() - - thresholdsToQuery := []staking.ThresholdKind{ - staking.KindEntity, - staking.KindNodeValidator, - staking.KindNodeCompute, - staking.KindNodeKeyManager, - staking.KindRuntimeCompute, - staking.KindRuntimeKeyManager, - } - for _, kind := range thresholdsToQuery { - threshold, err := stakingConn.Threshold( - ctx, - &staking.ThresholdQuery{ - Kind: kind, - Height: height, - }, - ) - cobra.CheckErr(err) - fmt.Printf("Staking threshold (%s): ", kind) - token.PrettyPrintAmount(ctx, *threshold, os.Stdout) - fmt.Println() - } - }, -} diff --git a/cli/cmd/inspect/node_status.go b/cli/cmd/inspect/node_status.go deleted file mode 100644 index 8d7f3f1553..0000000000 --- a/cli/cmd/inspect/node_status.go +++ /dev/null @@ -1,37 +0,0 @@ -package inspect - -import ( - "context" - "fmt" - - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" -) - -var nodeStatusCmd = &cobra.Command{ - Use: "node-status", - Short: "Show node status", - Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - - // Establish connection with the target network. - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - ctrlConn := conn.Control() - - nodeStatus, err := ctrlConn.GetStatus(ctx) - cobra.CheckErr(err) - - nodeStr, err := common.PrettyJSONMarshal(nodeStatus) - cobra.CheckErr(err) - - fmt.Println(string(nodeStr)) - }, -} diff --git a/cli/cmd/inspect/registry.go b/cli/cmd/inspect/registry.go deleted file mode 100644 index 9653ca2a24..0000000000 --- a/cli/cmd/inspect/registry.go +++ /dev/null @@ -1,209 +0,0 @@ -package inspect - -import ( - "context" - "encoding/json" - "fmt" - "strings" - - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - registry "github.com/oasisprotocol/oasis-core/go/registry/api" - staking "github.com/oasisprotocol/oasis-core/go/staking/api" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/helpers" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -type registrySelector int - -const ( - selInvalid registrySelector = iota - selEntities - selNodes - selRuntimes - selValidators -) - -func selectorFromString(s string) registrySelector { - switch strings.ToLower(strings.TrimSpace(s)) { - case "entities": - return selEntities - case "nodes": - return selNodes - case "runtimes", "paratimes": - return selRuntimes - case "validators": - return selValidators - } - return selInvalid -} - -var registryCmd = &cobra.Command{ - Use: "registry ", - Short: "Show registry entry by id", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - - id, err := parseIdentifier(npa, args[0]) - cobra.CheckErr(err) - - // Establish connection with the target network. - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - consensusConn := conn.Consensus() - registryConn := consensusConn.Registry() - - // Figure out the height to use if "latest". - height, err := common.GetActualHeight( - ctx, - consensusConn, - ) - cobra.CheckErr(err) - - // This command just takes a brute-force "do-what-I-mean" approach - // and queries everything it can till it finds what the user is - // looking for. - - prettyPrint := func(b interface{}) error { - data, err := json.MarshalIndent(b, "", " ") - if err != nil { - return err - } - fmt.Printf("%s\n", data) - return nil - } - - switch v := id.(type) { - case signature.PublicKey: - idQuery := ®istry.IDQuery{ - Height: height, - ID: v, - } - - if entity, err := registryConn.GetEntity(ctx, idQuery); err == nil { - err = prettyPrint(entity) - cobra.CheckErr(err) - return - } - - if node, err := registryConn.GetNode(ctx, idQuery); err == nil { - err = prettyPrint(node) - cobra.CheckErr(err) - return - } - - nsQuery := ®istry.GetRuntimeQuery{ - Height: height, - } - copy(nsQuery.ID[:], v[:]) - - if runtime, err := registryConn.GetRuntime(ctx, nsQuery); err == nil { - err = prettyPrint(runtime) - cobra.CheckErr(err) - return - } - case *types.Address: - addr := staking.Address(*v) - - entities, err := registryConn.GetEntities(ctx, height) - cobra.CheckErr(err) // If this doesn't work the other large queries won't either. - for _, entity := range entities { - if staking.NewAddress(entity.ID).Equal(addr) { - err = prettyPrint(entity) - cobra.CheckErr(err) - return - } - } - - nodes, err := registryConn.GetNodes(ctx, height) - cobra.CheckErr(err) - for _, node := range nodes { - if staking.NewAddress(node.ID).Equal(addr) { - err = prettyPrint(node) - cobra.CheckErr(err) - return - } - } - - // Probably don't need to bother querying the runtimes by address. - case registrySelector: - switch v { - case selEntities: - entities, err := registryConn.GetEntities(ctx, height) - cobra.CheckErr(err) - for _, entity := range entities { - err = prettyPrint(entity) - cobra.CheckErr(err) - } - return - case selNodes: - nodes, err := registryConn.GetNodes(ctx, height) - cobra.CheckErr(err) - for _, node := range nodes { - err = prettyPrint(node) - cobra.CheckErr(err) - } - return - case selRuntimes: - runtimes, err := registryConn.GetRuntimes(ctx, ®istry.GetRuntimesQuery{ - Height: height, - IncludeSuspended: true, - }) - cobra.CheckErr(err) - for _, runtime := range runtimes { - err = prettyPrint(runtime) - cobra.CheckErr(err) - } - return - case selValidators: - // Yes, this is a scheduler query, not a registry query - // but this also is a reasonable place for this. - schedulerConn := consensusConn.Scheduler() - validators, err := schedulerConn.GetValidators(ctx, height) - cobra.CheckErr(err) - for _, validator := range validators { - err = prettyPrint(validator) - cobra.CheckErr(err) - } - return - default: - // Should never happen. - } - } - - cobra.CheckErr(fmt.Errorf("id '%s' not found", id)) - }, -} - -func parseIdentifier( - npa *common.NPASelection, - s string, -) (interface{}, error) { // TODO: Use `any` - if sel := selectorFromString(s); sel != selInvalid { - return sel, nil - } - - addr, err := helpers.ResolveAddress(npa.Network, s) - if err == nil { - return addr, nil - } - - var pk signature.PublicKey - if err = pk.UnmarshalText([]byte(s)); err == nil { - return pk, nil - } - if err = pk.UnmarshalHex(s); err == nil { - return pk, nil - } - - return nil, fmt.Errorf("unrecognized id: '%s'", s) -} diff --git a/cli/cmd/inspect/runtime_stats.go b/cli/cmd/inspect/runtime_stats.go deleted file mode 100644 index 2ad0f35a0b..0000000000 --- a/cli/cmd/inspect/runtime_stats.go +++ /dev/null @@ -1,554 +0,0 @@ -package inspect - -import ( - "context" - "encoding/csv" - "fmt" - "os" - "strconv" - - "github.com/olekukonko/tablewriter" - "github.com/spf13/cobra" - flag "github.com/spf13/pflag" - - "github.com/oasisprotocol/oasis-core/go/common/cbor" - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - "github.com/oasisprotocol/oasis-core/go/common/node" - consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" - "github.com/oasisprotocol/oasis-core/go/consensus/api/transaction" - roothash "github.com/oasisprotocol/oasis-core/go/roothash/api" - "github.com/oasisprotocol/oasis-core/go/roothash/api/block" - "github.com/oasisprotocol/oasis-core/go/roothash/api/commitment" - scheduler "github.com/oasisprotocol/oasis-core/go/scheduler/api" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/metadata" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -var ( - writeCSV bool - fileCSV string - - csvFlags *flag.FlagSet = func() *flag.FlagSet { - fs := flag.NewFlagSet("", flag.ContinueOnError) - fs.BoolVar(&writeCSV, "write-csv", false, "write stats to CSV") - fs.StringVar(&fileCSV, "csv-file", "", "custom CSV file path") - return fs - }() -) - -type runtimeStats struct { - // Rounds. - rounds uint64 - // Successful rounds. - successfulRounds uint64 - // Failed rounds. - failedRounds uint64 - // Rounds failed due to proposer timeouts. - proposerTimeoutedRounds uint64 - // Epoch transition rounds. - epochTransitionRounds uint64 - // Suspended rounds. - suspendedRounds uint64 - - // Discrepancies. - discrepancyDetected uint64 - discrepancyDetectedTimeout uint64 - - // Per-entity stats. - entities map[signature.PublicKey]*entityStats - - entitiesOutput [][]string - entitiesHeader []string -} - -type entityStats struct { - // Rounds entity node was elected. - roundsElected uint64 - // Rounds entity node was elected as primary executor worker. - roundsPrimary uint64 - // Rounds entity node was elected as primary executor worker and workers were invoked. - roundsPrimaryRequired uint64 - // Rounds entity node was elected as a backup executor worker. - roundsBackup uint64 - // Rounds entity node was elected as a backup executor worker - // and backup workers were invoked. - roundsBackupRequired uint64 - // Rounds entity node was a proposer. - roundsProposer uint64 - - // How many times entity node proposed a timeout. - proposedTimeout uint64 - - // How many good blocks committed while being primary worker. - committeedGoodBlocksPrimary uint64 - // How many bad blocs committed while being primary worker. - committeedBadBlocksPrimary uint64 - // How many good blocks committed while being backup worker. - committeedGoodBlocksBackup uint64 - // How many bad blocks committed while being backup worker. - committeedBadBlocksBackup uint64 - - // How many rounds missed committing a block while being a primary worker. - missedPrimary uint64 - // How many rounds missed committing a block while being a backup worker (and discrepancy detection was invoked). - missedBackup uint64 - // How many rounds proposer timeout was triggered while being the proposer. - missedProposer uint64 -} - -func (s *runtimeStats) prepareEntitiesOutput( - metadataLookup map[types.Address]*metadata.Entity, -) { - s.entitiesOutput = make([][]string, 0) - - s.entitiesHeader = []string{ - "Entity Addr", - "Entity Name", - "Elected", - "Primary", - "Backup", - "Proposer", - "Primary invoked", - "Primary Good commit", - "Prim Bad commmit", - "Bckp invoked", - "Bckp Good commit", - "Bckp Bad commit", - "Primary missed", - "Bckp missed", - "Proposer missed", - "Proposed timeout", - } - - addrToName := func(addr types.Address) string { - if metadataLookup != nil { - if entry, ok := metadataLookup[addr]; ok { - return entry.Name - } - } - return "" - } - - for entity, stats := range s.entities { - var line []string - - entityAddr := types.NewAddressFromConsensusPublicKey(entity) - - line = append(line, - entityAddr.String(), - addrToName(entityAddr), - strconv.FormatUint(stats.roundsElected, 10), - strconv.FormatUint(stats.roundsPrimary, 10), - strconv.FormatUint(stats.roundsBackup, 10), - strconv.FormatUint(stats.roundsProposer, 10), - strconv.FormatUint(stats.roundsPrimaryRequired, 10), - strconv.FormatUint(stats.committeedGoodBlocksPrimary, 10), - strconv.FormatUint(stats.committeedBadBlocksPrimary, 10), - strconv.FormatUint(stats.roundsBackupRequired, 10), - strconv.FormatUint(stats.committeedGoodBlocksBackup, 10), - strconv.FormatUint(stats.committeedBadBlocksBackup, 10), - strconv.FormatUint(stats.missedPrimary, 10), - strconv.FormatUint(stats.missedBackup, 10), - strconv.FormatUint(stats.missedProposer, 10), - strconv.FormatUint(stats.proposedTimeout, 10), - ) - s.entitiesOutput = append(s.entitiesOutput, line) - } -} - -func (s *runtimeStats) printStats() { - fmt.Printf("Runtime rounds: %d\n", s.rounds) - fmt.Printf("Successful rounds: %d\n", s.successfulRounds) - fmt.Printf("Epoch transition rounds: %d\n", s.epochTransitionRounds) - fmt.Printf("Proposer timeouted rounds: %d\n", s.proposerTimeoutedRounds) - fmt.Printf("Failed rounds: %d\n", s.failedRounds) - fmt.Printf("Discrepancies: %d\n", s.discrepancyDetected) - fmt.Printf("Discrepancies (timeout): %d\n", s.discrepancyDetectedTimeout) - fmt.Printf("Suspended: %d\n", s.suspendedRounds) - - fmt.Println("Entity stats") - table := tablewriter.NewWriter(os.Stdout) - table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) - table.SetCenterSeparator("|") - table.SetHeader(s.entitiesHeader) - table.AppendBulk(s.entitiesOutput) - table.Render() -} - -var runtimeStatsCmd = &cobra.Command{ - Use: "runtime-stats [ []]", - Short: "Show runtime statistics", - Args: cobra.MaximumNArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - npa := common.GetNPASelection(cfg) - runtimeID := npa.ParaTime.Namespace() - - // Parse command line arguments - var ( - startHeightArg int64 - endHeight uint64 - ) - if argLen := len(args); argLen > 0 { - var err error - - // Start height is present for 1 and 2 args. - startHeightArg, err = strconv.ParseInt(args[0], 10, 64) - cobra.CheckErr(err) - - if argLen == 2 { - endHeight, err = strconv.ParseUint(args[1], 10, 64) - cobra.CheckErr(err) - } - } - - // Establish connection with the target network. - ctx := context.Background() - conn, err := connection.Connect(ctx, npa.Network) - cobra.CheckErr(err) - - consensusConn := conn.Consensus() - - // Fixup the start/end heights if they were not specified (or are 0) - if endHeight == 0 { - var blk *consensus.Block - blk, err = consensusConn.GetBlock(ctx, consensus.HeightLatest) - cobra.CheckErr(err) - endHeight = uint64(blk.Height) - } - var startHeight uint64 - switch { - case startHeightArg < 0: - delta := uint64(-startHeightArg) - if endHeight <= delta { - cobra.CheckErr(fmt.Errorf("start-height %d will underflow end-height %d", startHeightArg, endHeight)) - } - startHeight = endHeight - delta - case startHeightArg == 0: - var status *consensus.Status - status, err = consensusConn.GetStatus(ctx) - cobra.CheckErr(err) - startHeight = uint64(status.LastRetainedHeight) - default: - startHeight = uint64(startHeightArg) - } - - chainCtx, err := consensusConn.GetChainContext(ctx) - cobra.CheckErr(err) - signature.SetChainContext(chainCtx) - - fmt.Printf( - "gathering statistics: runtime-id: %s, start-height: %d, end-height: %d\n", - runtimeID, - startHeight, - endHeight, - ) - - // Do the actual work - stats := &runtimeStats{ - entities: make(map[signature.PublicKey]*entityStats), - } - - var ( - currentRound uint64 - currentCommittee *scheduler.Committee - currentScheduler *scheduler.CommitteeNode - roundDiscrepancy bool - ) - - roothashConn := consensusConn.RootHash() - registryConn := consensusConn.Registry() - - nl, err := newNodeLookup(ctx, consensusConn, registryConn, int64(startHeight)) - cobra.CheckErr(err) - - nodeToEntityMap := make(map[signature.PublicKey]signature.PublicKey) - nodeToEntity := func(id signature.PublicKey) signature.PublicKey { - // Note: node.EntityID is immutable once registered, so the - // cache does not need to ever be updated. - entityID, ok := nodeToEntityMap[id] - if !ok { - var node *node.Node - node, err = nl.ByID(ctx, id) - cobra.CheckErr(err) - - entityID = node.EntityID - nodeToEntityMap[id] = entityID - } - - return entityID - } - - for height := int64(startHeight); height < int64(endHeight); height++ { - if height%1000 == 0 { - fmt.Printf("progressed: height: %d\n", height) - } - err = nl.SetHeight(ctx, height) - cobra.CheckErr(err) - - rtRequest := &roothash.RuntimeRequest{ - RuntimeID: runtimeID, - Height: height, - } - - // Query latest roothash block and events. - var blk *block.Block - blk, err = roothashConn.GetLatestBlock(ctx, rtRequest) - switch err { - case nil: - case roothash.ErrInvalidRuntime: - continue - default: - cobra.CheckErr(err) - } - var evs []*roothash.Event - evs, err = roothashConn.GetEvents(ctx, height) - cobra.CheckErr(err) - - var proposerTimeout bool - if currentRound != blk.Header.Round && currentCommittee != nil { - // If new round, check for proposer timeout. - // Need to look at submitted transactions if round failure was caused by a proposer timeout. - var rsp *consensus.TransactionsWithResults - rsp, err = consensusConn.GetTransactionsWithResults(ctx, height) - cobra.CheckErr(err) - for i := 0; i < len(rsp.Transactions); i++ { - // Ignore failed txs. - if !rsp.Results[i].IsSuccess() { - continue - } - var sigTx transaction.SignedTransaction - err = cbor.Unmarshal(rsp.Transactions[i], &sigTx) - cobra.CheckErr(err) - var tx transaction.Transaction - err = sigTx.Open(&tx) - cobra.CheckErr(err) - // Ignore non proposer timeout txs. - if tx.Method != roothash.MethodExecutorProposerTimeout { - continue - } - var xc roothash.ExecutorProposerTimeoutRequest - err = cbor.Unmarshal(tx.Body, &xc) - cobra.CheckErr(err) - // Ignore txs of other runtimes. - if xc.ID != runtimeID { - continue - } - // Proposer timeout triggered the round failure, update stats. - stats.entities[nodeToEntity(sigTx.Signature.PublicKey)].proposedTimeout++ - stats.entities[nodeToEntity(currentScheduler.PublicKey)].missedProposer++ - proposerTimeout = true - break - } - } - - // Go over events before updating potential new round committee info. - // Even if round transition happened at this height, all events emitted - // at this height belong to the previous round. - for _, ev := range evs { - // Skip events for initial height where we don't have round info yet. - if height == int64(startHeight) { - break - } - // Skip events for other runtimes. - if ev.RuntimeID != runtimeID { - continue - } - switch { - case ev.ExecutorCommitted != nil: - // Nothing to do here. We use Finalized event Good/Bad Compute node - // fields to process commitments. - case ev.ExecutionDiscrepancyDetected != nil: - if ev.ExecutionDiscrepancyDetected.Timeout { - stats.discrepancyDetectedTimeout++ - } else { - stats.discrepancyDetected++ - } - roundDiscrepancy = true - case ev.Finalized != nil: - var rtResults *roothash.RoundResults - rtResults, err = roothashConn.GetLastRoundResults(ctx, rtRequest) - cobra.CheckErr(err) - - // Skip the empty finalized event that is triggered on initial round. - if len(rtResults.GoodComputeEntities) == 0 && len(rtResults.BadComputeEntities) == 0 && currentCommittee == nil { - continue - } - // Skip if epoch transition or suspended blocks. - if blk.Header.HeaderType == block.EpochTransition || blk.Header.HeaderType == block.Suspended { - continue - } - // Skip if proposer timeout. - if proposerTimeout { - continue - } - - // Update stats. - OUTER: - for _, member := range currentCommittee.Members { - // entity := nodeToEntity[member.PublicKey] - entity := nodeToEntity(member.PublicKey) - // Primary workers are always required. - if member.Role == scheduler.RoleWorker { - stats.entities[entity].roundsPrimaryRequired++ - } - // In case of discrepancies backup workers were invoked as well. - if roundDiscrepancy && member.Role == scheduler.RoleBackupWorker { - stats.entities[entity].roundsBackupRequired++ - } - - // Go over good commitments. - for _, v := range rtResults.GoodComputeEntities { - if entity != v { - continue - } - switch member.Role { - case scheduler.RoleWorker: - stats.entities[entity].committeedGoodBlocksPrimary++ - continue OUTER - case scheduler.RoleBackupWorker: - if roundDiscrepancy { - stats.entities[entity].committeedGoodBlocksBackup++ - continue OUTER - } - case scheduler.RoleInvalid: - } - } - - // Go over bad commitments. - for _, v := range rtResults.BadComputeEntities { - if entity != v { - continue - } - switch member.Role { - case scheduler.RoleWorker: - stats.entities[entity].committeedBadBlocksPrimary++ - continue OUTER - case scheduler.RoleBackupWorker: - if roundDiscrepancy { - stats.entities[entity].committeedBadBlocksBackup++ - continue OUTER - } - case scheduler.RoleInvalid: - } - } - - // Neither good nor bad - missed commitment. - if member.Role == scheduler.RoleWorker { - stats.entities[entity].missedPrimary++ - } - if roundDiscrepancy && member.Role == scheduler.RoleBackupWorker { - stats.entities[entity].missedBackup++ - } - } - } - } - - // New round. - if currentRound != blk.Header.Round { - currentRound = blk.Header.Round - stats.rounds++ - - switch blk.Header.HeaderType { - case block.Normal: - stats.successfulRounds++ - case block.EpochTransition: - stats.epochTransitionRounds++ - case block.RoundFailed: - if proposerTimeout { - stats.proposerTimeoutedRounds++ - } else { - stats.failedRounds++ - } - case block.Suspended: - stats.suspendedRounds++ - currentCommittee = nil - currentScheduler = nil - continue - default: - cobra.CheckErr(fmt.Errorf( - "unexpected block header type: header_type: %v, height: %v", - blk.Header.HeaderType, - height, - )) - } - - // Query runtime state and setup committee info for the round. - var state *roothash.RuntimeState - state, err = roothashConn.GetRuntimeState(ctx, rtRequest) - cobra.CheckErr(err) - if state.ExecutorPool == nil { - // No committee - election failed(?) - fmt.Printf("\nWarning: unexpected or missing committee for runtime: height: %d\n", height) - currentCommittee = nil - currentScheduler = nil - continue - } - // Set committee info. - currentCommittee = state.ExecutorPool.Committee - currentScheduler, err = commitment.GetTransactionScheduler(currentCommittee, currentRound) - cobra.CheckErr(err) - roundDiscrepancy = false - - // Update election stats. - seen := make(map[signature.PublicKey]bool) - for _, member := range currentCommittee.Members { - entity := nodeToEntity(member.PublicKey) - if _, ok := stats.entities[entity]; !ok { - stats.entities[entity] = &entityStats{} - } - - // Multiple records for same node in case the node has - // multiple roles. Only count it as elected once. - if !seen[member.PublicKey] { - stats.entities[entity].roundsElected++ - } - seen[member.PublicKey] = true - - if member.Role == scheduler.RoleWorker { - stats.entities[entity].roundsPrimary++ - } - if member.Role == scheduler.RoleBackupWorker { - stats.entities[entity].roundsBackup++ - } - if member.PublicKey == currentScheduler.PublicKey { - stats.entities[entity].roundsProposer++ - } - } - } - } - - // Prepare and printout stats. - entityMetadataLookup, err := metadata.EntitiesFromRegistry(ctx) - if err != nil { - // Non-fatal, this is informative and gathering stats is time - // consuming. - fmt.Printf("\nWarning: failed to query metadata registry: %v\n", err) - } - - stats.prepareEntitiesOutput(entityMetadataLookup) - stats.printStats() - - if !writeCSV { - return - } - - // Also save entity stats in a csv. - if fileCSV == "" { - fileCSV = fmt.Sprintf("runtime-%s-%d-%d-stats.csv", runtimeID, startHeight, endHeight) - } - fout, err := os.Create(fileCSV) - cobra.CheckErr(err) - defer fout.Close() - - w := csv.NewWriter(fout) - err = w.Write(stats.entitiesHeader) - cobra.CheckErr(err) - err = w.WriteAll(stats.entitiesOutput) - cobra.CheckErr(err) - }, -} diff --git a/cli/cmd/network.go b/cli/cmd/network.go deleted file mode 100644 index d6d3787791..0000000000 --- a/cli/cmd/network.go +++ /dev/null @@ -1,248 +0,0 @@ -package cmd - -import ( - "context" - "fmt" - "sort" - - "github.com/AlecAivazis/survey/v2" - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/table" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/connection" -) - -var ( - networkCmd = &cobra.Command{ - Use: "network", - Short: "Manage network endpoints", - } - - networkListCmd = &cobra.Command{ - Use: "list", - Aliases: []string{"ls"}, - Short: "List configured networks", - Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - table := table.New() - table.SetHeader([]string{"Name", "Chain Context", "RPC"}) - - var output [][]string - for name, net := range cfg.Networks.All { - displayName := name - if cfg.Networks.Default == name { - displayName += defaultMarker - } - - output = append(output, []string{ - displayName, - net.ChainContext, - net.RPC, - }) - } - - // Sort output by name. - sort.Slice(output, func(i, j int) bool { - return output[i][0] < output[j][0] - }) - - table.AppendBulk(output) - table.Render() - }, - } - - networkAddCmd = &cobra.Command{ - Use: "add ", - Short: "Add a new network", - Args: cobra.ExactArgs(3), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - name, chainContext, rpc := args[0], args[1], args[2] - - net := config.Network{ - ChainContext: chainContext, - RPC: rpc, - } - // Validate initial network configuration early. - cobra.CheckErr(config.ValidateIdentifier(name)) - cobra.CheckErr(net.Validate()) - - // Ask user for some additional parameters. - networkDetailsFromSurvey(&net) - - err := cfg.Networks.Add(name, &net) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - networkAddLocalCmd = &cobra.Command{ - Use: "add-local ", - Short: "Add a new local network", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - name, rpc := args[0], args[1] - - net := config.Network{ - RPC: rpc, - } - // Validate initial network configuration early. - cobra.CheckErr(config.ValidateIdentifier(name)) - if !net.IsLocalRPC() { - cobra.CheckErr(fmt.Errorf("rpc-endpoint '%s' is not local", rpc)) - } - - // Connect to the network and query the chain context. - ctx := context.Background() - conn, err := connection.ConnectNoVerify(ctx, &net) - cobra.CheckErr(err) - - chainContext, err := conn.Consensus().GetChainContext(ctx) - cobra.CheckErr(err) - net.ChainContext = chainContext - cobra.CheckErr(net.Validate()) - - // With a very high probability, the user is going to be - // adding a local endpoint for an existing network, so try - // to clone config details from any of the hardcoded - // defaults. - var clonedDefault bool - for _, defaultNet := range config.DefaultNetworks.All { - if defaultNet.ChainContext != chainContext { - continue - } - - // Yep. - net.Denomination = defaultNet.Denomination - net.ParaTimes = defaultNet.ParaTimes - clonedDefault = true - break - } - - // If we failed to crib details from a hardcoded config, - // ask the user. - if !clonedDefault { - networkDetailsFromSurvey(&net) - } - - err = cfg.Networks.Add(name, &net) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - networkRmCmd = &cobra.Command{ - Use: "rm ", - Aliases: []string{"remove"}, - Short: "Remove an existing network", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - name := args[0] - - net, exists := cfg.Networks.All[name] - if !exists { - cobra.CheckErr(fmt.Errorf("network '%s' does not exist", name)) - } - - if len(net.ParaTimes.All) > 0 { - fmt.Printf("WARNING: Network '%s' contains %d paratimes.\n", name, len(net.ParaTimes.All)) - common.Confirm("Are you sure you want to remove the network?", "not removing network") - } - - err := cfg.Networks.Remove(name) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - networkSetDefaultCmd = &cobra.Command{ - Use: "set-default ", - Short: "Sets the given network as the default network", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - name := args[0] - - err := cfg.Networks.SetDefault(name) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - networkSetRPCCmd = &cobra.Command{ - Use: "set-rpc ", - Short: "Sets the RPC endpoint of the given network", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - name, rpc := args[0], args[1] - - net := cfg.Networks.All[name] - if net == nil { - cobra.CheckErr(fmt.Errorf("network '%s' does not exist", name)) - return // To make staticcheck happy as it doesn't know CheckErr exits. - } - - net.RPC = rpc - - err := cfg.Save() - cobra.CheckErr(err) - }, - } -) - -func networkDetailsFromSurvey(net *config.Network) { - // Ask user for some additional parameters. - questions := []*survey.Question{ - { - Name: "description", - Prompt: &survey.Input{Message: "Description:"}, - }, - { - Name: "symbol", - Prompt: &survey.Input{Message: "Denomination symbol:"}, - }, - { - Name: "decimals", - Prompt: &survey.Input{ - Message: "Denomination decimal places:", - Default: "9", - }, - Validate: survey.Required, - }, - } - answers := struct { - Description string - Symbol string - Decimals uint8 - }{} - err := survey.Ask(questions, &answers) - cobra.CheckErr(err) - - net.Description = answers.Description - net.Denomination.Symbol = answers.Symbol - net.Denomination.Decimals = answers.Decimals -} - -func init() { - networkCmd.AddCommand(networkListCmd) - networkCmd.AddCommand(networkAddCmd) - networkCmd.AddCommand(networkAddLocalCmd) - networkCmd.AddCommand(networkRmCmd) - networkCmd.AddCommand(networkSetDefaultCmd) - networkCmd.AddCommand(networkSetRPCCmd) -} diff --git a/cli/cmd/paratime.go b/cli/cmd/paratime.go deleted file mode 100644 index b1573cc2ca..0000000000 --- a/cli/cmd/paratime.go +++ /dev/null @@ -1,175 +0,0 @@ -package cmd - -import ( - "fmt" - "sort" - - "github.com/AlecAivazis/survey/v2" - "github.com/spf13/cobra" - - cliConfig "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/table" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" -) - -var ( - paratimeCmd = &cobra.Command{ - Use: "paratime", - Short: "Manage paratimes", - } - - paratimeListCmd = &cobra.Command{ - Use: "list", - Aliases: []string{"ls"}, - Short: "List configured paratimes", - Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - table := table.New() - table.SetHeader([]string{"Network", "Paratime", "ID"}) - - var output [][]string - for netName, net := range cfg.Networks.All { - for ptName, pt := range net.ParaTimes.All { - displayPtName := ptName - if net.ParaTimes.Default == ptName { - displayPtName += defaultMarker - } - - output = append(output, []string{ - netName, - displayPtName, - pt.ID, - }) - } - } - - // Sort output by network name and paratime name. - sort.Slice(output, func(i, j int) bool { - if output[i][0] != output[j][0] { - return output[i][0] < output[j][0] - } - return output[i][1] < output[j][1] - }) - - table.AppendBulk(output) - table.Render() - }, - } - - paratimeAddCmd = &cobra.Command{ - Use: "add ", - Short: "Add a new paratime", - Args: cobra.ExactArgs(3), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - network, name, id := args[0], args[1], args[2] - - net, exists := cfg.Networks.All[network] - if !exists { - cobra.CheckErr(fmt.Errorf("network '%s' does not exist", network)) - } - - pt := config.ParaTime{ - ID: id, - } - // Validate initial paratime configuration early. - cobra.CheckErr(config.ValidateIdentifier(name)) - cobra.CheckErr(pt.Validate()) - - // Ask user for some additional parameters. - questions := []*survey.Question{ - { - Name: "description", - Prompt: &survey.Input{Message: "Description:"}, - }, - { - Name: "symbol", - Prompt: &survey.Input{ - Message: "Denomination symbol:", - Default: net.Denomination.Symbol, - }, - }, - { - Name: "decimals", - Prompt: &survey.Input{ - Message: "Denomination decimal places:", - Default: fmt.Sprintf("%d", net.Denomination.Decimals), - }, - Validate: survey.Required, - }, - } - answers := struct { - Description string - Symbol string - Decimals uint8 - }{} - err := survey.Ask(questions, &answers) - cobra.CheckErr(err) - - pt.Description = answers.Description - pt.Denominations = map[string]*config.DenominationInfo{ - config.NativeDenominationKey: { - Symbol: answers.Symbol, - Decimals: answers.Decimals, - }, - } - - err = net.ParaTimes.Add(name, &pt) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - paratimeRmCmd = &cobra.Command{ - Use: "rm ", - Aliases: []string{"remove"}, - Short: "Remove an existing paratime", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - network, name := args[0], args[1] - - net, exists := cfg.Networks.All[network] - if !exists { - cobra.CheckErr(fmt.Errorf("network '%s' does not exist", network)) - } - - err := net.ParaTimes.Remove(name) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - paratimeSetDefaultCmd = &cobra.Command{ - Use: "set-default ", - Short: "Sets the given paratime as the default paratime for the given network", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := cliConfig.Global() - network, name := args[0], args[1] - - net, exists := cfg.Networks.All[network] - if !exists { - cobra.CheckErr(fmt.Errorf("network '%s' does not exist", network)) - } - - err := net.ParaTimes.SetDefault(name) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } -) - -func init() { - paratimeCmd.AddCommand(paratimeListCmd) - paratimeCmd.AddCommand(paratimeAddCmd) - paratimeCmd.AddCommand(paratimeRmCmd) - paratimeCmd.AddCommand(paratimeSetDefaultCmd) -} diff --git a/cli/cmd/root.go b/cli/cmd/root.go deleted file mode 100644 index 4db8b4138b..0000000000 --- a/cli/cmd/root.go +++ /dev/null @@ -1,87 +0,0 @@ -package cmd - -import ( - "errors" - "fmt" - "io/fs" - "os" - "path/filepath" - - "github.com/spf13/cobra" - "github.com/spf13/viper" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/inspect" - "github.com/oasisprotocol/oasis-sdk/cli/config" - _ "github.com/oasisprotocol/oasis-sdk/cli/wallet/file" // Register file wallet backend. - _ "github.com/oasisprotocol/oasis-sdk/cli/wallet/ledger" // Register ledger wallet backend. -) - -const ( - defaultMarker = " (*)" -) - -var ( - cfgFile string - - rootCmd = &cobra.Command{ - Use: "oasis", - Short: "CLI for interacting with the Oasis network", - Version: "0.1.0", - } -) - -// Execute executes the root command. -func Execute() error { - return rootCmd.Execute() -} - -func initConfig() { - v := viper.New() - - if cfgFile != "" { - // Use config file from the flag. - v.SetConfigFile(cfgFile) - } else { - const configFilename = "cli.toml" - configDir := config.Directory() - configPath := filepath.Join(configDir, configFilename) - - v.AddConfigPath(configDir) - v.SetConfigType("toml") - v.SetConfigName(configFilename) - - // Ensure the configuration file exists. - _ = os.MkdirAll(configDir, 0o700) - if _, err := os.Stat(configPath); errors.Is(err, fs.ErrNotExist) { - if _, err := os.Create(configPath); err != nil { - cobra.CheckErr(fmt.Errorf("failed to create configuration file: %w", err)) - } - - // Populate the initial configuration file with defaults. - config.ResetDefaults() - _ = config.Save(v) - } - } - - _ = v.ReadInConfig() - - // Load and validate global configuration. - err := config.Load(v) - cobra.CheckErr(err) - err = config.Global().Validate() - cobra.CheckErr(err) -} - -func init() { - cobra.OnInitialize(initConfig) - - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file to use") - - rootCmd.AddCommand(networkCmd) - rootCmd.AddCommand(paratimeCmd) - rootCmd.AddCommand(walletCmd) - rootCmd.AddCommand(accountsCmd) - rootCmd.AddCommand(addressBookCmd) - rootCmd.AddCommand(contractsCmd) - rootCmd.AddCommand(inspect.Cmd) -} diff --git a/cli/cmd/wallet.go b/cli/cmd/wallet.go deleted file mode 100644 index 823265a5df..0000000000 --- a/cli/cmd/wallet.go +++ /dev/null @@ -1,393 +0,0 @@ -package cmd - -import ( - "fmt" - "io" - "sort" - "strings" - - "github.com/AlecAivazis/survey/v2" - "github.com/spf13/cobra" - flag "github.com/spf13/pflag" - - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature/signers/remote" - "github.com/oasisprotocol/oasis-core/go/common/grpc" - "github.com/oasisprotocol/oasis-core/go/common/identity" - "github.com/oasisprotocol/oasis-core/go/common/logging" - cmdBackground "github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common/background" - - "github.com/oasisprotocol/oasis-sdk/cli/cmd/common" - "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/table" - "github.com/oasisprotocol/oasis-sdk/cli/wallet" - walletFile "github.com/oasisprotocol/oasis-sdk/cli/wallet/file" -) - -var ( - accKind string - - walletCmd = &cobra.Command{ - Use: "wallet", - Short: "Manage accounts in the local wallet", - } - - walletListCmd = &cobra.Command{ - Use: "list", - Aliases: []string{"ls"}, - Short: "List configured accounts", - Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - table := table.New() - table.SetHeader([]string{"Account", "Kind", "Address"}) - - var output [][]string - for name, acc := range cfg.Wallet.All { - if cfg.Wallet.Default == name { - name += defaultMarker - } - output = append(output, []string{ - name, - acc.PrettyKind(), - acc.Address, - }) - } - - // Sort output by name. - sort.Slice(output, func(i, j int) bool { - return output[i][0] < output[j][0] - }) - - table.AppendBulk(output) - table.Render() - }, - } - - walletCreateCmd = &cobra.Command{ - Use: "create ", - Short: "Create a new account", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - name := args[0] - - af, err := wallet.Load(accKind) - cobra.CheckErr(err) - - // Ask for passphrase to encrypt the wallet with. - var passphrase string - if af.RequiresPassphrase() { - passphrase = common.AskNewPassphrase() - } - - accCfg := &config.Account{ - Kind: accKind, - } - err = accCfg.SetConfigFromFlags() - cobra.CheckErr(err) - - if _, exists := cfg.AddressBook.All[name]; exists { - cobra.CheckErr(fmt.Errorf("address named '%s' already exists in address book", name)) - } - err = cfg.Wallet.Create(name, passphrase, accCfg) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - walletShowCmd = &cobra.Command{ - Use: "show ", - Short: "Show public account information", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - name := args[0] - - acc := common.LoadAccount(config.Global(), name) - showPublicWalletInfo(name, acc) - }, - } - - walletRmCmd = &cobra.Command{ - Use: "rm ", - Aliases: []string{"remove"}, - Short: "Remove an existing account", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - name := args[0] - - // Early check for whether the wallet exists so that we don't ask for confirmation first. - if _, exists := cfg.Wallet.All[name]; !exists { - cobra.CheckErr(fmt.Errorf("account '%s' does not exist", name)) - } - - fmt.Printf("WARNING: Removing the account will ERASE secret key material!\n") - fmt.Printf("WARNING: THIS ACTION IS IRREVERSIBLE!\n") - - var result string - confirmText := fmt.Sprintf("I really want to remove account %s", name) - prompt := &survey.Input{ - Message: fmt.Sprintf("Enter '%s' (without quotes) to confirm removal:", confirmText), - } - err := survey.AskOne(prompt, &result) - cobra.CheckErr(err) - - if result != confirmText { - cobra.CheckErr("Aborted.") - } - - err = cfg.Wallet.Remove(name) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - walletRenameCmd = &cobra.Command{ - Use: "rename ", - Short: "Rename an existing account", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - oldName, newName := args[0], args[1] - - err := cfg.Wallet.Rename(oldName, newName) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - walletSetDefaultCmd = &cobra.Command{ - Use: "set-default ", - Short: "Sets the given account as the default account", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - name := args[0] - - err := cfg.Wallet.SetDefault(name) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - walletImportCmd = &cobra.Command{ - Use: "import ", - Short: "Import an existing account", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - cfg := config.Global() - name := args[0] - - if _, exists := cfg.Wallet.All[name]; exists { - cobra.CheckErr(fmt.Errorf("account '%s' already exists in the wallet", name)) - } - if _, exists := cfg.AddressBook.All[name]; exists { - cobra.CheckErr(fmt.Errorf("address named '%s' already exists in the address book", name)) - } - - // NOTE: We only support importing into the file-based wallet for now. - af, err := wallet.Load(walletFile.Kind) - cobra.CheckErr(err) - - // Ask for import kind. - var supportedKinds []string - for _, kind := range af.SupportedImportKinds() { - supportedKinds = append(supportedKinds, string(kind)) - } - - var kindRaw string - err = survey.AskOne(&survey.Select{ - Message: "Kind:", - Options: supportedKinds, - }, &kindRaw) - cobra.CheckErr(err) - - var kind wallet.ImportKind - err = kind.UnmarshalText([]byte(kindRaw)) - cobra.CheckErr(err) - - // Ask for wallet configuration. - afCfg, err := af.GetConfigFromSurvey(&kind) - cobra.CheckErr(err) - - // Ask for import data. - var answers struct { - Data string - } - questions := []*survey.Question{ - { - Name: "data", - Prompt: af.DataPrompt(kind, afCfg), - Validate: af.DataValidator(kind, afCfg), - }, - } - err = survey.Ask(questions, &answers) - cobra.CheckErr(err) - - // Ask for passphrase. - passphrase := common.AskNewPassphrase() - - accCfg := &config.Account{ - Kind: af.Kind(), - Config: afCfg, - } - src := &wallet.ImportSource{ - Kind: kind, - Data: answers.Data, - } - - err = cfg.Wallet.Import(name, passphrase, accCfg, src) - cobra.CheckErr(err) - - err = cfg.Save() - cobra.CheckErr(err) - }, - } - - walletExportCmd = &cobra.Command{ - Use: "export ", - Short: "Export secret account information", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - name := args[0] - - fmt.Printf("WARNING: Exporting the account will expose secret key material!\n") - acc := common.LoadAccount(config.Global(), name) - - showPublicWalletInfo(name, acc) - - fmt.Printf("Export:\n") - fmt.Println(acc.UnsafeExport()) - }, - } - - walletRemoteSignerCmd = &cobra.Command{ - Use: "remote-signer ", - Short: "Act as a oasis-node remote entity signer over AF_LOCAL", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - name, socketPath := args[0], args[1] - - acc := common.LoadAccount(config.Global(), name) - - sf := &accountEntitySignerFactory{ - signer: acc.ConsensusSigner(), - } - if sf.signer == nil { - cobra.CheckErr("account not compatible with consensus layer usage") - } - - // The domain separation is entirely handled on the client side. - signature.UnsafeAllowUnregisteredContexts() - - // Suppress oasis-core logging. - err := logging.Initialize( - nil, - logging.FmtLogfmt, - logging.LevelInfo, - nil, - ) - cobra.CheckErr(err) - - // Setup the gRPC service. - srvCfg := &grpc.ServerConfig{ - Name: "remote-signer", - Path: socketPath, // XXX: Maybe fix this up to be nice. - Identity: &identity.Identity{}, - } - srv, err := grpc.NewServer(srvCfg) - cobra.CheckErr(err) - remote.RegisterService(srv.Server(), sf) - - // Start the service and wait for graceful termination. - err = srv.Start() - cobra.CheckErr(err) - - fmt.Printf("Address: %s\n", acc.Address()) - fmt.Printf("Node Args:\n --signer.backend=remote \\\n --signer.remote.address=unix:%s\n", socketPath) - fmt.Printf("\n*** REMOTE SIGNER READY ***\n") - - sm := cmdBackground.NewServiceManager(logging.GetLogger("remote-signer")) - sm.Register(srv) - defer sm.Cleanup() - sm.Wait() - }, - } -) - -type accountEntitySignerFactory struct { - signer signature.Signer -} - -func (sf *accountEntitySignerFactory) EnsureRole( - role signature.SignerRole, -) error { - if role != signature.SignerEntity { - return signature.ErrInvalidRole - } - return nil -} - -func (sf *accountEntitySignerFactory) Generate( - role signature.SignerRole, - rng io.Reader, -) (signature.Signer, error) { - // The remote signer should never require this. - return nil, fmt.Errorf("refusing to generate new signing keys") -} - -func (sf *accountEntitySignerFactory) Load( - role signature.SignerRole, -) (signature.Signer, error) { - if err := sf.EnsureRole(role); err != nil { - return nil, err - } - return sf.signer, nil -} - -func showPublicWalletInfo(name string, wallet wallet.Account) { - fmt.Printf("Name: %s\n", name) - if signer := wallet.Signer(); signer != nil { - fmt.Printf("Public Key: %s\n", signer.Public()) - } - if ethAddr := wallet.EthAddress(); ethAddr != nil { - fmt.Printf("Ethereum address: %s\n", ethAddr.Hex()) - } - fmt.Printf("Native address: %s\n", wallet.Address()) -} - -func init() { - walletCmd.AddCommand(walletListCmd) - - walletFlags := flag.NewFlagSet("", flag.ContinueOnError) - kinds := make([]string, 0, len(wallet.AvailableKinds())) - for _, w := range wallet.AvailableKinds() { - kinds = append(kinds, w.Kind()) - } - walletFlags.StringVar(&accKind, "kind", "file", fmt.Sprintf("Account kind [%s]", strings.Join(kinds, ", "))) - - // TODO: Group flags in usage by tweaking the usage template/function. - for _, af := range wallet.AvailableKinds() { - walletFlags.AddFlagSet(af.Flags()) - } - - walletCreateCmd.Flags().AddFlagSet(walletFlags) - - walletCmd.AddCommand(walletCreateCmd) - walletCmd.AddCommand(walletShowCmd) - walletCmd.AddCommand(walletRmCmd) - walletCmd.AddCommand(walletRenameCmd) - walletCmd.AddCommand(walletSetDefaultCmd) - walletCmd.AddCommand(walletImportCmd) - walletCmd.AddCommand(walletExportCmd) - walletCmd.AddCommand(walletRemoteSignerCmd) -} diff --git a/cli/config/addressbook.go b/cli/config/addressbook.go deleted file mode 100644 index d7f2892b8d..0000000000 --- a/cli/config/addressbook.go +++ /dev/null @@ -1,164 +0,0 @@ -package config - -import ( - "fmt" - - ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/spf13/cobra" - - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/helpers" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -// AddressBook contains the configuration of the address book. -type AddressBook struct { - // All is a map of all configured address entries in the address book. - All map[string]*AddressBookEntry `mapstructure:",remain"` -} - -// Validate performs config validation. -func (ab *AddressBook) Validate() error { - // Make sure all entries are valid. - for name, a := range ab.All { - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed address name '%s': %w", name, err) - } - - if err := a.Validate(); err != nil { - return fmt.Errorf("address '%s': %w", name, err) - } - } - - return nil -} - -// Remove removes the given address book entry. -func (ab *AddressBook) Remove(name string) error { - if _, exists := ab.All[name]; !exists { - return fmt.Errorf("address named '%s' does not exist in the address book", name) - } - - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed address name '%s': %w", name, err) - } - - delete(ab.All, name) - - return nil -} - -// Rename renames an existing address book entry. -func (ab *AddressBook) Rename(old, new string) error { - cfg, exists := ab.All[old] - if !exists { - return fmt.Errorf("address named '%s' does not exist", old) - } - - if _, exists = ab.All[new]; exists { - return fmt.Errorf("address named '%s' already exists", new) - } - - if err := config.ValidateIdentifier(old); err != nil { - return fmt.Errorf("malformed old address name '%s': %w", old, err) - } - if err := config.ValidateIdentifier(new); err != nil { - return fmt.Errorf("malformed new address name '%s': %w", new, err) - } - - ab.All[new] = cfg - delete(ab.All, old) - - return nil -} - -// Add adds new address book entry. -func (ab *AddressBook) Add(name string, address string) error { - if _, exists := ab.All[name]; exists { - return fmt.Errorf("address named '%s' already exists in the address book", name) - } - - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed address name '%s': %w", name, err) - } - - nativeAddr, ethAddr, err := helpers.ResolveEthOrOasisAddress(address) - if err != nil { - return err - } - if nativeAddr == nil { - return fmt.Errorf("cannot determine address format") - } - - nativeAddrStr, err := nativeAddr.MarshalText() - if err != nil { - return fmt.Errorf("failed to marshal address: %w", err) - } - - abEntry := AddressBookEntry{ - Address: string(nativeAddrStr), - } - - if ethAddr != nil { - abEntry.EthAddress = ethAddr.Hex() - } - - if ab.All == nil { - ab.All = make(map[string]*AddressBookEntry) - } - ab.All[name] = &abEntry - - return nil -} - -// AddressBookEntry is a configuration object for a single entry in the address book. -type AddressBookEntry struct { - Description string `mapstructure:"description"` - Address string `mapstructure:"address"` - EthAddress string `mapstructure:"eth_address,omitempty"` -} - -// Validate performs config validation. -func (a *AddressBookEntry) Validate() error { - // Check that address is valid. - _, _, err := helpers.ResolveEthOrOasisAddress(a.Address) - if err != nil { - return fmt.Errorf("malformed address '%s': %w", a.Address, err) - } - - if a.EthAddress != "" { - nativeAddr, _, err := helpers.ResolveEthOrOasisAddress(a.EthAddress) - if err != nil { - return fmt.Errorf("malformed address '%s': %w", a.EthAddress, err) - } - if nativeAddr == nil { - return fmt.Errorf("eth address '%s' was not recognized as valid eth address", a.EthAddress) - } - if nativeAddr.String() != a.Address { - return fmt.Errorf("eth address '%s' (converted to '%s') mismatches stored address '%s'", a.EthAddress, nativeAddr.String(), a.Address) - } - } - - return nil -} - -// GetAddress returns the native address object. -func (a *AddressBookEntry) GetAddress() types.Address { - var address types.Address - if err := address.UnmarshalText([]byte(a.Address)); err != nil { - panic(err) - } - return address -} - -// GetEthAddress returns the Ethereum address object, if set. -func (a *AddressBookEntry) GetEthAddress() *ethCommon.Address { - if a.EthAddress != "" { - _, ethAddr, err := helpers.ResolveEthOrOasisAddress(a.EthAddress) - cobra.CheckErr(err) - - return ethAddr - } - - return nil -} diff --git a/cli/config/config.go b/cli/config/config.go deleted file mode 100644 index 590d7a64f0..0000000000 --- a/cli/config/config.go +++ /dev/null @@ -1,173 +0,0 @@ -package config - -import ( - "bytes" - "fmt" - "path/filepath" - "reflect" - "strings" - - "github.com/adrg/xdg" - "github.com/spf13/viper" - - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" -) - -var global Config - -// Directory returns the path to the configuration directory. -func Directory() string { - return filepath.Join(xdg.ConfigHome, "oasis") -} - -// Global returns the global configuration structure. -func Global() *Config { - return &global -} - -// Load loads the global configuration structure from viper. -func Load(v *viper.Viper) error { - return global.Load(v) -} - -// Save saves the global configuration structure to viper. -func Save(v *viper.Viper) error { - global.viper = v - return global.Save() -} - -// ResetDefaults resets the global configuration to defaults. -func ResetDefaults() { - global = Default -} - -// Config contains the CLI configuration. -type Config struct { - viper *viper.Viper - - Networks config.Networks `mapstructure:"networks"` - Wallet Wallet `mapstructure:"wallets"` - AddressBook AddressBook `mapstructure:"address_book"` -} - -// Load loads the configuration structure from viper. -func (cfg *Config) Load(v *viper.Viper) error { - cfg.viper = v - return v.Unmarshal(cfg) -} - -// encode is needed because mapstructure cannot encode structs into maps recursively. -func encode(in interface{}) (interface{}, error) { - const tagName = "mapstructure" - - v := reflect.ValueOf(in) - if v.Kind() == reflect.Ptr { - v = v.Elem() - } - - switch v.Kind() { - case reflect.Struct: - // Convert structures to map[string]interface{}. - result := make(map[string]interface{}) - t := v.Type() - for i := 0; i < v.NumField(); i++ { - field := t.Field(i) - if field.PkgPath != "" { - // Skip unexported fields. - continue - } - - attributes := make(map[string]bool) - tagValue := field.Tag.Get(tagName) - key := field.Name - if tagValue != "" { - attrs := strings.Split(tagValue, ",") - key = attrs[0] - for _, attr := range attrs[1:] { - attributes[strings.TrimSpace(attr)] = true - } - } - - // Encode value. - value, err := encode(v.Field(i).Interface()) - if err != nil { - return nil, fmt.Errorf("failed to encode field '%s': %w", field.Name, err) - } - - switch { - case attributes["remain"]: - // When remain attribute is set, merge the map. - remaining, ok := value.(map[string]interface{}) - if !ok { - return nil, fmt.Errorf("field '%s' with remain attribute must convert to map[string]interface{}", field.Name) - } - - for k, val := range remaining { - if _, exists := result[k]; exists { - return nil, fmt.Errorf("duplicate key '%s' when processing field '%s' with remain attribute", k, field.Name) - } - result[k] = val - } - default: - result[key] = value - } - } - return result, nil - case reflect.Map: - // Convert maps to map[string]interface{}. - result := make(map[string]interface{}) - iter := v.MapRange() - for iter.Next() { - k := iter.Key() - val := iter.Value() - - if k.Kind() != reflect.String { - return nil, fmt.Errorf("can only convert maps with string keys") - } - - value, err := encode(val.Interface()) - if err != nil { - return nil, err - } - result[k.Interface().(string)] = value - } - return result, nil - default: - // Pass everything else unchanged. - return v.Interface(), nil - } -} - -// Save saves the configuration structure to viper. -func (cfg *Config) Save() error { - if err := cfg.Validate(); err != nil { - return err - } - - encCfg, err := encode(cfg) - if err != nil { - return err - } - rawCfg := encCfg.(map[string]interface{}) - - // There is no other way to reset the config, so we use ReadConfig with an empty buffer. - var buf bytes.Buffer - _ = cfg.viper.ReadConfig(&buf) - // Rewrite config to use the new map. - if err = cfg.viper.MergeConfigMap(rawCfg); err != nil { - return err - } - - return cfg.viper.WriteConfig() -} - -// Validate performs config validation. -func (cfg *Config) Validate() error { - if err := cfg.Networks.Validate(); err != nil { - return fmt.Errorf("failed to validate network configuration: %w", err) - } - if err := cfg.Wallet.Validate(); err != nil { - return fmt.Errorf("failed to validate wallet configuration: %w", err) - } - return nil -} diff --git a/cli/config/default.go b/cli/config/default.go deleted file mode 100644 index f9d7a14813..0000000000 --- a/cli/config/default.go +++ /dev/null @@ -1,10 +0,0 @@ -package config - -import ( - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" -) - -// Default is the default config that should be used in case no configuration file exists. -var Default = Config{ - Networks: config.DefaultNetworks, -} diff --git a/cli/config/wallet.go b/cli/config/wallet.go deleted file mode 100644 index 0a96763402..0000000000 --- a/cli/config/wallet.go +++ /dev/null @@ -1,306 +0,0 @@ -package config - -import ( - "fmt" - - "github.com/oasisprotocol/oasis-sdk/cli/wallet" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/config" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -// Wallet contains the configuration of the wallet. -type Wallet struct { - // Default is the name of the default account. - Default string `mapstructure:"default"` - - // All is a map of all configured accounts in the wallet. - All map[string]*Account `mapstructure:",remain"` -} - -// Validate performs config validation. -func (w *Wallet) Validate() error { - // Make sure the default account actually exists. - if _, exists := w.All[w.Default]; w.Default != "" && !exists { - return fmt.Errorf("default account '%s' does not exist in the wallet", w.Default) - } - - // Make sure all accounts are valid. - for name, acc := range w.All { - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed account name '%s': %w", name, err) - } - - if err := acc.Validate(); err != nil { - return fmt.Errorf("account '%s': %w", name, err) - } - } - - return nil -} - -// Create creates a new account. -func (w *Wallet) Create(name string, passphrase string, nw *Account) error { - if _, exists := w.All[name]; exists { - return fmt.Errorf("account '%s' already exists", name) - } - - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed account name '%s': %w", name, err) - } - - af, err := wallet.Load(nw.Kind) - if err != nil { - return err - } - acc, err := af.Create(name, passphrase, nw.Config) - if err != nil { - return err - } - - // Store address so we don't need to load the account to see the address. - address, err := acc.Address().MarshalText() - if err != nil { - return fmt.Errorf("failed to marshal account address: %w", err) - } - nw.Address = string(address) - - if w.All == nil { - w.All = make(map[string]*Account) - } - w.All[name] = nw - - // Set default if not set. - if w.Default == "" { - w.Default = name - } - - return nil -} - -// Load loads the given account. -func (w *Wallet) Load(name string, passphrase string) (wallet.Account, error) { - cfg, exists := w.All[name] - if !exists { - return nil, fmt.Errorf("account '%s' does not exist in the wallet", name) - } - - if err := config.ValidateIdentifier(name); err != nil { - return nil, fmt.Errorf("malformed account name '%s': %w", name, err) - } - - af, err := wallet.Load(cfg.Kind) - if err != nil { - return nil, err - } - - acc, err := af.Load(name, passphrase, cfg.Config) - if err != nil { - return nil, err - } - - // Make sure the address matches what we have in the config. - if expected, actual := cfg.GetAddress(), acc.Address(); !actual.Equal(expected) { - return nil, fmt.Errorf("address mismatch after loading account (expected: %s got: %s)", - expected, - actual, - ) - } - - return acc, nil -} - -// Remove removes the given account. -func (w *Wallet) Remove(name string) error { - cfg, exists := w.All[name] - if !exists { - return fmt.Errorf("account '%s' does not exist in the wallet", name) - } - - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed account name '%s': %w", name, err) - } - - af, err := wallet.Load(cfg.Kind) - if err != nil { - return err - } - - if err := af.Remove(name, cfg.Config); err != nil { - return err - } - - delete(w.All, name) - - // Clear default if set to this wallet. - if w.Default == name { - w.Default = "" - } - - return nil -} - -// Rename renames an existing account. -func (w *Wallet) Rename(old, new string) error { - cfg, exists := w.All[old] - if !exists { - return fmt.Errorf("account '%s' does not exist", old) - } - - if _, exists = w.All[new]; exists { - return fmt.Errorf("account '%s' already exists", new) - } - - if err := config.ValidateIdentifier(old); err != nil { - return fmt.Errorf("malformed old account name '%s': %w", old, err) - } - if err := config.ValidateIdentifier(new); err != nil { - return fmt.Errorf("malformed new account name '%s': %w", new, err) - } - - af, err := wallet.Load(cfg.Kind) - if err != nil { - return err - } - - if err := af.Rename(old, new, cfg.Config); err != nil { - return err - } - - w.All[new] = cfg - delete(w.All, old) - - // Update default if set to this wallet. - if w.Default == old { - w.Default = new - } - - return nil -} - -// Import imports an existing account. -func (w *Wallet) Import(name string, passphrase string, nw *Account, src *wallet.ImportSource) error { - if _, exists := w.All[name]; exists { - return fmt.Errorf("account '%s' already exists in the wallet", name) - } - - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed account name '%s': %w", name, err) - } - - af, err := wallet.Load(nw.Kind) - if err != nil { - return err - } - acc, err := af.Import(name, passphrase, nw.Config, src) - if err != nil { - return err - } - - // Store address so we don't need to load the wallet to see the address. - address, err := acc.Address().MarshalText() - if err != nil { - return fmt.Errorf("failed to marshal account address: %w", err) - } - nw.Address = string(address) - - if w.All == nil { - w.All = make(map[string]*Account) - } - w.All[name] = nw - - // Set default if not set. - if w.Default == "" { - w.Default = name - } - - return nil -} - -// SetDefault marks the given account as default. -func (w *Wallet) SetDefault(name string) error { - if _, exists := w.All[name]; !exists { - return fmt.Errorf("account '%s' does not exist in the wallet", name) - } - - if err := config.ValidateIdentifier(name); err != nil { - return fmt.Errorf("malformed account name '%s': %w", name, err) - } - - w.Default = name - - return nil -} - -// Account is an account configuration object. -type Account struct { - Description string `mapstructure:"description"` - Kind string `mapstructure:"kind"` - Address string `mapstructure:"address"` - - // Config contains kind-specific configuration for this wallet. - Config map[string]interface{} `mapstructure:",remain"` -} - -// Validate performs config validation. -func (a *Account) Validate() error { - // Check if given account kind is supported. - if _, err := wallet.Load(a.Kind); err != nil { - return fmt.Errorf("kind '%s' is not supported", a.Kind) - } - - // Check that address is valid. - var address types.Address - if err := address.UnmarshalText([]byte(a.Address)); err != nil { - return fmt.Errorf("malformed address '%s': %w", a.Address, err) - } - - return nil -} - -// GetAddress returns the parsed account address. -func (a *Account) GetAddress() types.Address { - var address types.Address - if err := address.UnmarshalText([]byte(a.Address)); err != nil { - panic(err) - } - return address -} - -// SetConfigFromFlags populates the kind-specific configuration from CLI flags. -func (a *Account) SetConfigFromFlags() error { - af, err := wallet.Load(a.Kind) - if err != nil { - return fmt.Errorf("kind '%s' is not supported", a.Kind) - } - - cfg, err := af.GetConfigFromFlags() - if err != nil { - return err - } - - a.Config = cfg - return nil -} - -// LoadFactory loads the account factory corresponding to this account's kind. -func (a *Account) LoadFactory() (wallet.Factory, error) { - return wallet.Load(a.Kind) -} - -// PrettyKind returns a human-friendly account kind. -func (a *Account) PrettyKind() string { - af, err := wallet.Load(a.Kind) - if err != nil { - return "" - } - return af.PrettyKind(a.Config) -} - -// HasConsensusSigner returns true, iff there is a consensus layer signer associated with this account. -func (a *Account) HasConsensusSigner() bool { - af, err := wallet.Load(a.Kind) - if err != nil { - return false - } - return af.HasConsensusSigner(a.Config) -} diff --git a/cli/go.mod b/cli/go.mod deleted file mode 100644 index 0cefe5346a..0000000000 --- a/cli/go.mod +++ /dev/null @@ -1,131 +0,0 @@ -module github.com/oasisprotocol/oasis-sdk/cli - -go 1.18 - -replace ( - github.com/oasisprotocol/oasis-sdk/client-sdk/go => ../client-sdk/go - - // v1.5.0 has broken uint parsing, use a commit with the fix until the - // the maintainers merge the PR: https://github.com/spf13/cast/pull/144 - github.com/spf13/cast => github.com/oasisprotocol/cast v0.0.0-20220606122631-eba453e69641 -) - -require ( - github.com/AlecAivazis/survey/v2 v2.3.5 - github.com/adrg/xdg v0.4.0 - github.com/ethereum/go-ethereum v1.10.19 - github.com/miguelmota/go-ethereum-hdwallet v0.1.1 - github.com/mitchellh/mapstructure v1.5.0 - github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae - github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 - github.com/oasisprotocol/metadata-registry-tools v0.0.0-20220406100644-7e9a2b991920 - github.com/oasisprotocol/oasis-core/go v0.2202.5 - github.com/oasisprotocol/oasis-sdk/client-sdk/go v0.1.0 - github.com/olekukonko/tablewriter v0.0.5 - github.com/spf13/cobra v1.5.0 - github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.13.0 - github.com/stretchr/testify v1.8.0 - github.com/tyler-smith/go-bip39 v1.1.0 - github.com/zondax/ledger-go v0.12.2 - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa - gopkg.in/yaml.v2 v2.4.0 -) - -require ( - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20220404123522-616f957b79ad // indirect - github.com/acomagu/bufpipe v1.0.3 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcd v0.22.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect - github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect - github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect - github.com/eapache/channels v1.1.0 // indirect - github.com/eapache/queue v1.1.0 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/fxamacker/cbor/v2 v2.4.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.3.1 // indirect - github.com/go-git/go-git/v5 v5.4.2 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/hashicorp/go-hclog v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.4.5 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/ipfs/go-cid v0.3.2 // indirect - github.com/ipfs/go-log/v2 v2.5.1 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/cpuid/v2 v2.1.1 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/libp2p/go-libp2p v0.23.2 // indirect - github.com/libp2p/go-openssl v0.1.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-pointer v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/minio/sha256-simd v1.0.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-testing-interface v1.0.0 // indirect - github.com/mr-tron/base58 v1.2.0 // indirect - github.com/multiformats/go-base32 v0.1.0 // indirect - github.com/multiformats/go-base36 v0.1.0 // indirect - github.com/multiformats/go-multiaddr v0.7.0 // indirect - github.com/multiformats/go-multibase v0.1.1 // indirect - github.com/multiformats/go-multicodec v0.6.0 // indirect - github.com/multiformats/go-multihash v0.2.1 // indirect - github.com/multiformats/go-varint v0.0.6 // indirect - github.com/oklog/run v1.0.0 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.13.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/sergi/go-diff v1.2.0 // indirect - github.com/shopspring/decimal v1.3.1 // indirect - github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/tendermint/tendermint v0.35.2 // indirect - github.com/x448/float16 v0.8.4 // indirect - github.com/xanzy/ssh-agent v0.3.1 // indirect - github.com/zondax/hid v0.9.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.23.0 // indirect - golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5 // indirect - golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.4.0 // indirect - google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect - google.golang.org/grpc v1.49.0 // indirect - google.golang.org/grpc/security/advancedtls v0.0.0-20221004221323-12db695f1648 // indirect - google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/blake3 v1.1.7 // indirect -) diff --git a/cli/go.sum b/cli/go.sum deleted file mode 100644 index 68a2d5c13c..0000000000 --- a/cli/go.sum +++ /dev/null @@ -1,1907 +0,0 @@ -4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= -bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= -bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.63.0/go.mod h1:GmezbQc7T2snqkEXWfZ0sy0VfkB/ivI2DdtJL2DEmlg= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= -cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AlecAivazis/survey/v2 v2.3.5 h1:A8cYupsAZkjaUmhtTYv3sSqc7LO5mp1XDfqe5E/9wRQ= -github.com/AlecAivazis/survey/v2 v2.3.5/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI= -github.com/Antonboom/errname v0.1.5/go.mod h1:DugbBstvPFQbv/5uLcRRzfrNqKE9tVdVCqWCLp6Cifo= -github.com/Antonboom/nilnil v0.1.0/go.mod h1:PhHLvRPSghY5Y7mX4TW+BHZQYo1A8flE5H20D3IPZBo= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/ProtonMail/go-crypto v0.0.0-20220404123522-616f957b79ad h1:K3cVQxnwoVf5R2XLZknct3+tJWocEuJUmF7ZGwB2FK8= -github.com/ProtonMail/go-crypto v0.0.0-20220404123522-616f957b79ad/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= -github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/adlio/schema v1.2.3/go.mod h1:nD7ZWmMMbwU12Pqwg+qL0rTvHBrBXfNz+5UQxTfy38M= -github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= -github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v1.1.0/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= -github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/blizzy78/varnamelen v0.6.0/go.mod h1:zy2Eic4qWqjrxa60jG34cfL0VXcSwzUrIx68eJPb4Q8= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -github.com/breml/bidichk v0.2.2/go.mod h1:zbfeitpevDUGI7V91Uzzuwrn4Vls8MoBMrwtt78jmso= -github.com/breml/errchkjson v0.2.3/go.mod h1:jZEATw/jF69cL1iy7//Yih8yp/mXp2CBoBr9GJwCAsY= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= -github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= -github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI= -github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/daixiang0/gci v0.3.1-0.20220208004058-76d765e3ab48/go.mod h1:jaASoJmv/ykO9dAAPy31iJnreV19248qKDdVWf3QgC4= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= -github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8= -github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= -github.com/dgraph-io/badger/v3 v3.2103.2 h1:dpyM5eCJAtQCBcMCZcT4UBZchuTJgCywerHHgmxfxM8= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k= -github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= -github.com/ethereum/go-ethereum v1.10.19 h1:EOR5JbL4MD5yeOqv8W2iC1s4NximrTjqFccUz8lyBRA= -github.com/ethereum/go-ethereum v1.10.19/go.mod h1:IJBNMtzKcNHPtllYihy6BL2IgK1u+32JriaTbdt4v+w= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= -github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fzipp/gocyclo v0.4.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-critic/go-critic v0.6.2/go.mod h1:td1s27kfmLpe5G/DPjlnFI7o1UCzePptwU7Az0V5iCM= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.44.2/go.mod h1:KjBgkLvsTWDkhfu12iCrv0gwL1kON5KNhbyjQ6qN7Jo= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= -github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= -github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= -github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.3.1 h1:vDwF1DFNZhntP4DAjuTpOw3uEgMUpXh1pB5fW9DqHpo= -github.com/hashicorp/go-hclog v1.3.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= -github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= -github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= -github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= -github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= -github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= -github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.6.1 h1:4/2yi5LyDPP7nN+Hiird1SAJ6YoxUm13/oxHGRnbPd8= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= -github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.1.1 h1:t0wUqjowdm8ezddV5k0tLWVklVuvLJpoHeb4WBdydm0= -github.com/klauspost/cpuid/v2 v2.1.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.5.1/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= -github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/libp2p/go-libp2p v0.23.2 h1:yqyTeKQJyofWXxEv/eEVUvOrGdt/9x+0PIQ4N1kaxmE= -github.com/libp2p/go-libp2p v0.23.2/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= -github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo= -github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= -github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.1.4/go.mod h1:ZZq2bmyssGh8MSPz3VVziqRNIMYTJXzP8MUKG90vZ9A= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miguelmota/go-ethereum-hdwallet v0.1.1 h1:zdXGlHao7idpCBjEGTXThVAtMKs+IxAgivZ75xqkWK0= -github.com/miguelmota/go-ethereum-hdwallet v0.1.1/go.mod h1:f9m9uXokAHA6WNoYOPjj4AqjJS5pquQRiYYj/XSyPYc= -github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= -github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= -github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= -github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= -github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mroth/weightedrand v0.4.1/go.mod h1:3p2SIcC8al1YMzGhAIoXD+r9olo/g/cdJgAD905gyNE= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= -github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= -github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= -github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= -github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= -github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= -github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI= -github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8= -github.com/multiformats/go-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE= -github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= -github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= -github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= -github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= -github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= -github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= -github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= -github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= -github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oasisprotocol/cast v0.0.0-20220606122631-eba453e69641 h1:8vZBx878kg60Z2+Amkw8vIpRcbfaAgGn59faqNZtzYw= -github.com/oasisprotocol/cast v0.0.0-20220606122631-eba453e69641/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b/go.mod h1:TLJifjWF6eotcfzDjKZsDqWJ+73Uvj/N85MvVyrvynM= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae h1:FatpGJD2jmJfhZiFDElaC0QhZUDQnxUeAwTGkfAHN3I= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 h1:1102pQc2SEPp5+xrS26wEaeb26sZy6k9/ZXlZN+eXE4= -github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7/go.mod h1:UqoUn6cHESlliMhOnKLWr+CBH+e3bazUPvFj1XZwAjs= -github.com/oasisprotocol/metadata-registry-tools v0.0.0-20220406100644-7e9a2b991920 h1:rugJRYKamNl6WGBaU+b0wLQFkYcsnBr0ycX5QmB+AYU= -github.com/oasisprotocol/metadata-registry-tools v0.0.0-20220406100644-7e9a2b991920/go.mod h1:MKr/giwakLyCCjSWh0W9Pbaf7rDD1K96Wr57OhNoUK0= -github.com/oasisprotocol/oasis-core/go v0.2202.5 h1:SwT3XIKz4W5gYZd9I2fe+4qGPYaVvqG0kF8jsancd4E= -github.com/oasisprotocol/oasis-core/go v0.2202.5/go.mod h1:hKUgtuPPq371HokUQL5ashT5MZLZxK/VkWNKRLb9m+w= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v0.0.0-20211125173453-6d6d39c5bb8b/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.15/go.mod h1:NhuWhnlVEM1gT1A4VJHYfy9MuYSxxwHgxWoPsn9llB4= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.12-0.20220101150716-969a394a9451/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.12/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.17/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/gogrep v0.0.0-20220103110004-ffaa07af02e3/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= -github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= -github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= -github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/securego/gosec/v2 v2.9.6/go.mod h1:EESY9Ywxo/Zc5NyF/qIj6Cop+4PSWM0F0OfGD7FdIXc= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.22.1/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sivchari/containedctx v1.0.1/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= -github.com/sivchari/tenv v1.4.7/go.mod h1:5nF+bITvkebQVanjU6IuMbvIot/7ReNsUV7I5NbprB0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= -github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= -github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= -github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/tendermint v0.35.2 h1:AhPjef5hptLQP5i8vs+8zMCu9mczX5fvBd2F575QXVk= -github.com/tendermint/tendermint v0.35.2/go.mod h1:0sVA1nOm5KKaxHar3aIzmMGKH9F/nBMn7T5ruQGZuHg= -github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= -github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.4.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= -github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= -github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= -github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vektra/mockery/v2 v2.10.0/go.mod h1:m/WO2UzWzqgVX3nvqpRQq70I4Z7jbSCRhdmkgtp+Ab4= -github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo= -github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= -github.com/yeya24/promlinter v0.1.1-0.20210918184747-d757024714a1/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.12.2 h1:HnuUEKylJ6GqNrLMwghCTHRRAsnr8NlriawMVaFZ7w0= -github.com/zondax/ledger-go v0.12.2/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo= -gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5 h1:KafLifaRFIuSJ5C+7CyFJOF9haxKNC1CEIDk8GX6X0k= -golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200806022845-90696ccdc692/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM= -google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/grpc/examples v0.0.0-20201112215255-90f1b3ee835b h1:NuxyvVZoDfHZwYW9LD4GJiF5/nhiSyP4/InTrvw9Ibk= -google.golang.org/grpc/examples v0.0.0-20201112215255-90f1b3ee835b/go.mod h1:IBqQ7wSUJ2Ep09a8rMWFsg4fmI2r38zwsq8a0GgxXpM= -google.golang.org/grpc/security/advancedtls v0.0.0-20221004221323-12db695f1648 h1:6QzP+WLZE/9OvbE6nfd8MVjgjyypxtXMVE00LjsJHqQ= -google.golang.org/grpc/security/advancedtls v0.0.0-20221004221323-12db695f1648/go.mod h1:PoKncN6QA5h/eFRzlCWpHSZnXF2pCtnBzAfeanB8OGQ= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -honnef.co/go/tools v0.2.2/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= -lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= -mvdan.cc/gofumpt v0.2.1/go.mod h1:a/rvZPhsNaedOJBzqRD9omnwVwHZsBdJirXHa9Gh9Ig= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= -pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/cli/main.go b/cli/main.go deleted file mode 100644 index a579e59377..0000000000 --- a/cli/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "github.com/oasisprotocol/oasis-sdk/cli/cmd" - -func main() { - _ = cmd.Execute() -} diff --git a/cli/metadata/metadata.go b/cli/metadata/metadata.go deleted file mode 100644 index ffe2aa076a..0000000000 --- a/cli/metadata/metadata.go +++ /dev/null @@ -1,49 +0,0 @@ -// Package metadata provides helpers for querying the metadata registry. -package metadata - -import ( - "context" - - metadata "github.com/oasisprotocol/metadata-registry-tools" - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -// Entity is a metadata registry entity for a Entity. -type Entity struct { - // ID is the entity's public key. - ID signature.PublicKey - // Name is the entity's human readable name. - Name string -} - -// Address is the entity's staking address. -func (e *Entity) Address() types.Address { - return types.NewAddressFromConsensusPublicKey(e.ID) -} - -// EntitiesFromRegistry queries the metadata registry for all known -// entities. -func EntitiesFromRegistry(ctx context.Context) (map[types.Address]*Entity, error) { - gp, err := metadata.NewGitProvider(metadata.NewGitConfig()) - if err != nil { - return nil, err - } - - entities, err := gp.GetEntities(ctx) - if err != nil { - return nil, err - } - - meta := make(map[types.Address]*Entity, len(entities)) - for id, ent := range entities { - em := &Entity{ - ID: id, - Name: ent.Name, - } - meta[em.Address()] = em - } - - return meta, nil -} diff --git a/cli/metadata/oasisscan.go b/cli/metadata/oasisscan.go deleted file mode 100644 index 6764caceb3..0000000000 --- a/cli/metadata/oasisscan.go +++ /dev/null @@ -1,80 +0,0 @@ -package metadata - -import ( - "context" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "time" - - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - staking "github.com/oasisprotocol/oasis-core/go/staking/api" - - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -type oScanResponse struct { - Data *oScanData `json:"data"` -} - -type oScanData struct { - List []*oScanVal `json:"list"` -} - -type oScanVal struct { - Rank uint64 `json:"rank"` - EntityID string `json:"entityId"` - EntityAddress staking.Address `json:"entityAddress"` - NodeID string `json:"nodeId"` - Name string `json:"name"` -} - -// EntitiesFromOasisscan queries oasisscan for all known entities. -func EntitiesFromOasisscan(ctx context.Context) (map[types.Address]*Entity, error) { - reqCtx, cancel := context.WithTimeout(ctx, time.Second*5) - defer cancel() - - req, err := http.NewRequestWithContext(reqCtx, "GET", "https://www.oasisscan.com/mainnet/validator/list", nil) - if err != nil { - return nil, err - } - client := &http.Client{} - resp, err := client.Do(req) - if err != nil { - return nil, err - } - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("invalid response status: %d", resp.StatusCode) - } - if resp == nil { - return nil, fmt.Errorf("no response") - } - if resp != nil { - defer resp.Body.Close() - } - vals, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("failed to read response body: %w", err) - } - var oResp oScanResponse - if err = json.Unmarshal(vals, &oResp); err != nil { - return nil, err - } - - entities := make(map[types.Address]*Entity, len(oResp.Data.List)) - for _, dl := range oResp.Data.List { - var pk signature.PublicKey - if err = pk.UnmarshalText([]byte(dl.EntityID)); err != nil { - fmt.Println("oasisscan invalid entity ID: ", pk) - continue - } - em := &Entity{ - ID: pk, - Name: dl.Name, - } - entities[em.Address()] = em - } - - return entities, nil -} diff --git a/cli/table/table.go b/cli/table/table.go deleted file mode 100644 index c02020ca7e..0000000000 --- a/cli/table/table.go +++ /dev/null @@ -1,25 +0,0 @@ -package table - -import ( - "os" - - "github.com/olekukonko/tablewriter" -) - -// New creates a new tablewriter.Table instance with suitable defaults. -func New() *tablewriter.Table { - table := tablewriter.NewWriter(os.Stdout) - table.SetAutoWrapText(false) - table.SetAutoFormatHeaders(true) - table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) - table.SetAlignment(tablewriter.ALIGN_LEFT) - table.SetCenterSeparator("") - table.SetColumnSeparator("") - table.SetRowSeparator("") - table.SetHeaderLine(false) - table.SetBorder(false) - table.SetTablePadding("\t") - table.SetNoWhiteSpace(true) - - return table -} diff --git a/cli/wallet/file/ed25519.go b/cli/wallet/file/ed25519.go deleted file mode 100644 index dfb4b010bb..0000000000 --- a/cli/wallet/file/ed25519.go +++ /dev/null @@ -1,53 +0,0 @@ -package file - -import ( - "encoding/base64" - - "github.com/oasisprotocol/curve25519-voi/primitives/ed25519" - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" -) - -// ed25519rawSigner is an in-memory signer that allows deserialization of raw ed25519 keys for use -// in imported accounts that don't use ADR 0008. -type ed25519rawSigner struct { - privateKey ed25519.PrivateKey -} - -func (s *ed25519rawSigner) Public() signature.PublicKey { - var pk signature.PublicKey - _ = pk.UnmarshalBinary(s.privateKey.Public().(ed25519.PublicKey)) - return pk -} - -func (s *ed25519rawSigner) ContextSign(context signature.Context, message []byte) ([]byte, error) { - data, err := signature.PrepareSignerMessage(context, message) - if err != nil { - return nil, err - } - - return ed25519.Sign(s.privateKey, data), nil -} - -func (s *ed25519rawSigner) String() string { - return "[redacted private key]" -} - -func (s *ed25519rawSigner) Reset() { - for idx := range s.privateKey { - s.privateKey[idx] = 0 - } -} - -func (s *ed25519rawSigner) unmarshalBase64(text string) error { - data, err := base64.StdEncoding.DecodeString(text) - if err != nil { - return err - } - - if len(data) != ed25519.PrivateKeySize { - return signature.ErrMalformedPrivateKey - } - - s.privateKey = ed25519.PrivateKey(data) - return nil -} diff --git a/cli/wallet/file/file.go b/cli/wallet/file/file.go deleted file mode 100644 index 6e406a7bd4..0000000000 --- a/cli/wallet/file/file.go +++ /dev/null @@ -1,576 +0,0 @@ -package file - -import ( - "crypto/rand" - "encoding/base64" - "encoding/hex" - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path/filepath" - - "github.com/AlecAivazis/survey/v2" - ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/mitchellh/mapstructure" - flag "github.com/spf13/pflag" - bip39 "github.com/tyler-smith/go-bip39" - "golang.org/x/crypto/argon2" - "golang.org/x/crypto/sha3" - - "github.com/oasisprotocol/deoxysii" - "github.com/oasisprotocol/oasis-core/go/common/crypto/sakg" - coreSignature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - - "github.com/oasisprotocol/oasis-sdk/cli/config" - "github.com/oasisprotocol/oasis-sdk/cli/wallet" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature/ed25519" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature/secp256k1" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -const ( - // Kind is the account kind for the file-backed accounts. - Kind = "file" - - cfgAlgorithm = "file.algorithm" - cfgNumber = "file.number" - - stateKeySize = 32 - stateNonceSize = 32 - kdfSaltSize = 32 -) - -// SupportedAlgorithmsForImport returns the algorithms supported by the given import kind. -func SupportedAlgorithmsForImport(kind *wallet.ImportKind) []string { - if kind == nil { - return []string{wallet.AlgorithmEd25519Adr8, wallet.AlgorithmEd25519Raw, wallet.AlgorithmSecp256k1Bip44, wallet.AlgorithmSecp256k1Raw} - } - - switch *kind { - case wallet.ImportKindMnemonic: - return []string{wallet.AlgorithmEd25519Adr8, wallet.AlgorithmSecp256k1Bip44} - case wallet.ImportKindPrivateKey: - return []string{wallet.AlgorithmEd25519Raw, wallet.AlgorithmSecp256k1Raw} - default: - return []string{} - } -} - -type accountConfig struct { - Algorithm string `mapstructure:"algorithm"` - Number uint32 `mapstructure:"number,omitempty"` -} - -type secretState struct { - // Algorithm is the cryptographic algorithm used by the account. - Algorithm string `json:"algorithm"` - - // Data is the secret data used to derive the private key. - Data string `json:"data"` -} - -func (s *secretState) Seal(passphrase string) (*secretStateEnvelope, error) { - var nonce [stateNonceSize]byte - _, err := rand.Read(nonce[:]) - if err != nil { - return nil, err - } - - var salt [kdfSaltSize]byte - _, err = rand.Read(salt[:]) - if err != nil { - return nil, err - } - - envelope := &secretStateEnvelope{ - KDF: secretStateKDF{ - Argon2: &kdfArgon2{ - Salt: salt[:], - Time: 1, - Memory: 64 * 1024, - Threads: 4, - }, - }, - Nonce: nonce[:], - } - key, err := envelope.deriveKey(passphrase) - if err != nil { - return nil, err - } - - data, err := json.Marshal(s) - if err != nil { - return nil, err - } - - // Initialize a Deoxys-II instance with the provided key and encrypt. - aead, err := deoxysii.New(key) - if err != nil { - return nil, err - } - envelope.Data = aead.Seal(nil, envelope.Nonce[:aead.NonceSize()], data, nil) - - return envelope, nil -} - -type secretStateEnvelope struct { - KDF secretStateKDF `json:"kdf"` - Nonce []byte `json:"nonce"` - Data []byte `json:"data"` -} - -type secretStateKDF struct { - Argon2 *kdfArgon2 `json:"argon2,omitempty"` -} - -type kdfArgon2 struct { - Salt []byte `json:"salt"` - Time uint32 `json:"time"` - Memory uint32 `json:"memory"` - Threads uint8 `json:"threads"` -} - -func (k *kdfArgon2) deriveKey(passphrase string) ([]byte, error) { - return argon2.IDKey([]byte(passphrase), k.Salt, k.Time, k.Memory, k.Threads, stateKeySize), nil -} - -func (e *secretStateEnvelope) deriveKey(passphrase string) ([]byte, error) { - switch { - case e.KDF.Argon2 != nil: - return e.KDF.Argon2.deriveKey(passphrase) - default: - return nil, fmt.Errorf("unsupported key derivation algorithm") - } -} - -func (e *secretStateEnvelope) Open(passphrase string) (*secretState, error) { - // Derive key. - key, err := e.deriveKey(passphrase) - if err != nil { - return nil, err - } - - // Initialize a Deoxys-II instance with the provided key and decrypt. - aead, err := deoxysii.New(key) - if err != nil { - return nil, err - } - pt, err := aead.Open(nil, e.Nonce[:aead.NonceSize()], e.Data, nil) - if err != nil { - return nil, err - } - - // Deserialize the inner state. - var state secretState - if err := json.Unmarshal(pt, &state); err != nil { - return nil, err - } - - return &state, nil -} - -func getAccountFilename(name string) string { - return filepath.Join(config.Directory(), fmt.Sprintf("%s.wallet", name)) -} - -type fileAccountFactory struct { - flags *flag.FlagSet -} - -func (af *fileAccountFactory) Kind() string { - return Kind -} - -func (af *fileAccountFactory) PrettyKind(rawCfg map[string]interface{}) string { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return "" - } - - // In case of ADR8 or BIP44 show the keypair number. - var number string - switch cfg.Algorithm { - case wallet.AlgorithmEd25519Adr8, wallet.AlgorithmSecp256k1Bip44: - number = fmt.Sprintf(":%d", cfg.Number) - } - return fmt.Sprintf("%s (%s%s)", Kind, cfg.Algorithm, number) -} - -func (af *fileAccountFactory) Flags() *flag.FlagSet { - return af.flags -} - -func (af *fileAccountFactory) GetConfigFromFlags() (map[string]interface{}, error) { - cfg := make(map[string]interface{}) - cfg["algorithm"], _ = af.flags.GetString(cfgAlgorithm) - cfg["number"], _ = af.flags.GetUint32(cfgNumber) - return cfg, nil -} - -func (af *fileAccountFactory) GetConfigFromSurvey(kind *wallet.ImportKind) (map[string]interface{}, error) { - // Ask for import details. - var answers struct { - Algorithm string - Number uint32 - } - questions := []*survey.Question{ - { - Name: "algorithm", - Prompt: &survey.Select{ - Message: "Algorithm:", - Options: SupportedAlgorithmsForImport(kind), - }, - }, - } - if kind != nil && *kind == wallet.ImportKindMnemonic { - questions = append(questions, &survey.Question{ - Name: "number", - Prompt: &survey.Input{ - Message: "Key number:", - Default: "0", - }, - }) - } - err := survey.Ask(questions, &answers) - if err != nil { - return nil, err - } - - return map[string]interface{}{ - "algorithm": answers.Algorithm, - "number": answers.Number, - }, nil -} - -func (af *fileAccountFactory) DataPrompt(kind wallet.ImportKind, rawCfg map[string]interface{}) survey.Prompt { - switch kind { - case wallet.ImportKindMnemonic: - return &survey.Multiline{Message: "Mnemonic:"} - case wallet.ImportKindPrivateKey: - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return nil - } - switch cfg.Algorithm { - case wallet.AlgorithmEd25519Raw: - return &survey.Multiline{Message: "Private key (base64-encoded):"} - case wallet.AlgorithmSecp256k1Raw: - return &survey.Multiline{Message: "Private key (hex-encoded):"} - default: - return nil - } - default: - return nil - } -} - -func (af *fileAccountFactory) DataValidator(kind wallet.ImportKind, rawCfg map[string]interface{}) survey.Validator { - return func(ans interface{}) error { - switch kind { - case wallet.ImportKindMnemonic: - case wallet.ImportKindPrivateKey: - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return nil - } - switch cfg.Algorithm { - case wallet.AlgorithmEd25519Raw: - // Ensure the private key is base64 encoded. - _, err := base64.StdEncoding.DecodeString(ans.(string)) - if err != nil { - return fmt.Errorf("private key must be base64-encoded: %w", err) - } - case wallet.AlgorithmSecp256k1Raw: - // Ensure the private key is hex encoded. - _, err := hex.DecodeString(ans.(string)) - if err != nil { - return fmt.Errorf("private key must be hex-encoded (without leading 0x): %w", err) - } - default: - return fmt.Errorf("unsupported algorithm for %s: %s", wallet.ImportKindPrivateKey, cfg.Algorithm) - } - default: - return fmt.Errorf("unsupported import kind: %s", kind) - } - return nil - } -} - -func (af *fileAccountFactory) RequiresPassphrase() bool { - // A file-backed account always requires a passphrase. - return true -} - -func (af *fileAccountFactory) SupportedImportKinds() []wallet.ImportKind { - return []wallet.ImportKind{ - wallet.ImportKindMnemonic, - wallet.ImportKindPrivateKey, - } -} - -func (af *fileAccountFactory) HasConsensusSigner(rawCfg map[string]interface{}) bool { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return false - } - - switch cfg.Algorithm { - case wallet.AlgorithmEd25519Raw, wallet.AlgorithmEd25519Adr8: - return true - } - return false -} - -func (af *fileAccountFactory) unmarshalConfig(raw map[string]interface{}) (*accountConfig, error) { - if raw == nil { - return nil, fmt.Errorf("missing configuration") - } - - var cfg accountConfig - if err := mapstructure.Decode(raw, &cfg); err != nil { - return nil, err - } - return &cfg, nil -} - -func (af *fileAccountFactory) Create(name string, passphrase string, rawCfg map[string]interface{}) (wallet.Account, error) { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return nil, err - } - - // Generate entropy. - entropy, err := bip39.NewEntropy(256) - if err != nil { - return nil, err - } - mnemonic, err := bip39.NewMnemonic(entropy) - if err != nil { - return nil, err - } - state := &secretState{ - Algorithm: cfg.Algorithm, - Data: mnemonic, - } - - // Seal state. - envelope, err := state.Seal(passphrase) - if err != nil { - return nil, fmt.Errorf("failed to seal state: %w", err) - } - - raw, err := json.Marshal(envelope) - if err != nil { - return nil, fmt.Errorf("failed to marshal envelope: %w", err) - } - if err := ioutil.WriteFile(getAccountFilename(name), raw, 0o600); err != nil { - return nil, fmt.Errorf("failed to save state: %w", err) - } - - // Create a proper account based on the chosen algorithm. - return newAccount(state, cfg) -} - -func (af *fileAccountFactory) Load(name string, passphrase string, rawCfg map[string]interface{}) (wallet.Account, error) { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return nil, err - } - - // Load state from encrypted file. - raw, err := ioutil.ReadFile(getAccountFilename(name)) - if err != nil { - return nil, fmt.Errorf("failed to load account state: %w", err) - } - - var envelope secretStateEnvelope - if err = json.Unmarshal(raw, &envelope); err != nil { - return nil, fmt.Errorf("failed to load account state: %w", err) - } - - var state *secretState - if state, err = envelope.Open(passphrase); err != nil { - return nil, fmt.Errorf("failed to open account state (maybe incorrect passphrase?)") - } - - return newAccount(state, cfg) -} - -func (af *fileAccountFactory) Remove(name string, rawCfg map[string]interface{}) error { - return os.Remove(getAccountFilename(name)) -} - -func (af *fileAccountFactory) Rename(old, new string, rawCfg map[string]interface{}) error { - return os.Rename(getAccountFilename(old), getAccountFilename(new)) -} - -func (af *fileAccountFactory) Import(name string, passphrase string, rawCfg map[string]interface{}, src *wallet.ImportSource) (wallet.Account, error) { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return nil, err - } - - // Validate compatibility of algorithm and import source. - switch src.Kind { - case wallet.ImportKindMnemonic: - switch cfg.Algorithm { - case wallet.AlgorithmEd25519Adr8, wallet.AlgorithmSecp256k1Bip44: - default: - return nil, fmt.Errorf("algorithm '%s' does not support import from mnemonic", cfg.Algorithm) - } - case wallet.ImportKindPrivateKey: - switch cfg.Algorithm { - case wallet.AlgorithmEd25519Raw, wallet.AlgorithmSecp256k1Raw: - default: - return nil, fmt.Errorf("algorithm '%s' does not support import from private key", cfg.Algorithm) - } - default: - return nil, fmt.Errorf("unsupported import kind: %s", src.Kind) - } - - state := secretState{ - Algorithm: cfg.Algorithm, - Data: src.Data, - } - - // Create a proper account based on the chosen algorithm. - acc, err := newAccount(&state, cfg) - if err != nil { - return nil, err - } - - // Seal state. - envelope, err := state.Seal(passphrase) - if err != nil { - return nil, fmt.Errorf("failed to seal state: %w", err) - } - - raw, err := json.Marshal(envelope) - if err != nil { - return nil, fmt.Errorf("failed to marshal envelope: %w", err) - } - if err := ioutil.WriteFile(getAccountFilename(name), raw, 0o600); err != nil { - return nil, fmt.Errorf("failed to save state: %w", err) - } - return acc, nil -} - -type fileAccount struct { - cfg *accountConfig - state *secretState - signer signature.Signer -} - -func newAccount(state *secretState, cfg *accountConfig) (wallet.Account, error) { - switch state.Algorithm { - case wallet.AlgorithmEd25519Adr8: - // For Ed25519 use the ADR 0008 derivation scheme. - signer, _, err := sakg.GetAccountSigner(state.Data, "", cfg.Number) - if err != nil { - return nil, fmt.Errorf("failed to derive signer: %w", err) - } - - return &fileAccount{ - cfg: cfg, - state: state, - signer: ed25519.WrapSigner(signer), - }, nil - case wallet.AlgorithmEd25519Raw: - // For Ed25519-Raw use the raw private key. - var signer ed25519rawSigner - if err := signer.unmarshalBase64(state.Data); err != nil { - return nil, fmt.Errorf("failed to initialize signer: %w", err) - } - - return &fileAccount{ - cfg: cfg, - state: state, - signer: ed25519.WrapSigner(&signer), - }, nil - case wallet.AlgorithmSecp256k1Bip44: - // For Secp256k1-BIP-44 use the BIP-44 derivation scheme. - signer, err := Secp256k1FromMnemonic(state.Data, cfg.Number) - if err != nil { - return nil, fmt.Errorf("failed to initialize signer: %w", err) - } - return &fileAccount{ - cfg: cfg, - state: state, - signer: signer, - }, nil - case wallet.AlgorithmSecp256k1Raw: - // For Secp256k1-Raw use the raw private key. - signer, err := Secp256k1FromHex(state.Data) - if err != nil { - return nil, fmt.Errorf("failed to initialize signer: %w", err) - } - - return &fileAccount{ - cfg: cfg, - state: state, - signer: signer, - }, nil - default: - return nil, fmt.Errorf("algorithm '%s' not supported", state.Algorithm) - } -} - -func (a *fileAccount) ConsensusSigner() coreSignature.Signer { - type wrappedSigner interface { - Unwrap() coreSignature.Signer - } - - if ws, ok := a.signer.(wrappedSigner); ok { - return ws.Unwrap() - } - return nil -} - -func (a *fileAccount) Signer() signature.Signer { - return a.signer -} - -func (a *fileAccount) Address() types.Address { - return types.NewAddress(a.SignatureAddressSpec()) -} - -func (a *fileAccount) EthAddress() *ethCommon.Address { - switch a.cfg.Algorithm { - case wallet.AlgorithmSecp256k1Bip44, wallet.AlgorithmSecp256k1Raw: - h := sha3.NewLegacyKeccak256() - untaggedPk, _ := a.Signer().Public().(secp256k1.PublicKey).MarshalBinaryUncompressedUntagged() - h.Write(untaggedPk) - hash := h.Sum(nil) - addr := ethCommon.BytesToAddress(hash[32-20:]) - return &addr - } - - return nil -} - -func (a *fileAccount) SignatureAddressSpec() types.SignatureAddressSpec { - switch a.cfg.Algorithm { - case wallet.AlgorithmEd25519Adr8, wallet.AlgorithmEd25519Raw: - return types.NewSignatureAddressSpecEd25519(a.Signer().Public().(ed25519.PublicKey)) - case wallet.AlgorithmSecp256k1Bip44, wallet.AlgorithmSecp256k1Raw: - return types.NewSignatureAddressSpecSecp256k1Eth(a.Signer().Public().(secp256k1.PublicKey)) - default: - return types.SignatureAddressSpec{} - } -} - -func (a *fileAccount) UnsafeExport() string { - return a.state.Data -} - -func init() { - flags := flag.NewFlagSet("", flag.ContinueOnError) - flags.String(cfgAlgorithm, wallet.AlgorithmEd25519Adr8, fmt.Sprintf("Cryptographic algorithm to use for this account [%s, %s]", wallet.AlgorithmEd25519Adr8, wallet.AlgorithmSecp256k1Bip44)) - flags.Uint32(cfgNumber, 0, "Key number to use in the key derivation scheme") - - wallet.Register(&fileAccountFactory{ - flags: flags, - }) -} diff --git a/cli/wallet/file/secp256k1.go b/cli/wallet/file/secp256k1.go deleted file mode 100644 index d6865fd639..0000000000 --- a/cli/wallet/file/secp256k1.go +++ /dev/null @@ -1,53 +0,0 @@ -package file - -import ( - "encoding/hex" - "fmt" - "strings" - - hdwallet "github.com/miguelmota/go-ethereum-hdwallet" - "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - sdkSignature "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature/secp256k1" -) - -const ( - // privateKeySize is the length of Secp256k1 private key (32 bytes). - privateKeySize = 32 - - // Bip44DerivationPath is the derivation path defined by BIP-44. - Bip44DerivationPath = "m/44'/60'/0'/0/%d" -) - -// Secp256k1FromMnemonic derives a signer using BIP-44 from given mnemonic. -func Secp256k1FromMnemonic(mnemonic string, number uint32) (sdkSignature.Signer, error) { - wallet, err := hdwallet.NewFromMnemonic(mnemonic) - if err != nil { - return nil, fmt.Errorf("failed to parse mnemonic: %w", err) - } - path := hdwallet.MustParseDerivationPath(fmt.Sprintf(Bip44DerivationPath, number)) - account, err := wallet.Derive(path, false) - if err != nil { - return nil, fmt.Errorf("failed to derive key from mnemonic: %w", err) - } - pk, err := wallet.PrivateKeyBytes(account) - if err != nil { - return nil, fmt.Errorf("failed to obtain generated private key: %w", err) - } - return secp256k1.NewSigner(pk), nil -} - -// Secp256k1FromHex creates a signer from given hex-encoded private key. -func Secp256k1FromHex(text string) (sdkSignature.Signer, error) { - text = strings.TrimPrefix(text, "0x") - data, err := hex.DecodeString(text) - if err != nil { - return nil, err - } - - if len(data) != privateKeySize { - return nil, signature.ErrMalformedPrivateKey - } - - return secp256k1.NewSigner(data), nil -} diff --git a/cli/wallet/file/secp256k1_test.go b/cli/wallet/file/secp256k1_test.go deleted file mode 100644 index 7d48d5b481..0000000000 --- a/cli/wallet/file/secp256k1_test.go +++ /dev/null @@ -1,60 +0,0 @@ -package file - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -var privateKeys = []struct { - key string - pubkey string - valid bool -}{ - {key: "0x1f1455c61485737accdd610f5ea9ac1e4272c29b4c6c3189a349acc5bb598e7d", pubkey: "AyZKkxNFeyqLI5HGTYqEmCcYxKGo/kueOzSHzdnrSePO", valid: true}, - {key: "1f1455c61485737accdd610f5ea9ac1e4272c29b4c6c3189a349acc5bb598e7d", pubkey: "AyZKkxNFeyqLI5HGTYqEmCcYxKGo/kueOzSHzdnrSePO", valid: true}, - {key: "0x1f1455c61485737accdd610f5ea9ac1e4272c29b4c6c3189a349acc5bb598e7", valid: false}, - {key: "0x1f1455c61485737accdd610f5ea9ac1e4272c29b4c6c3189a349acc5", valid: false}, - {key: "0x1f1455c61485737accdd610f5ea9ac1e4272c29b4c6c3189a349acc5bb598e7d1", valid: false}, - {key: "0x1f1455c61485737accdd610f5ea9ac1e4272c29b4c6c3189a349acc5bb598e7d1111111111", valid: false}, - {key: "", pubkey: "", valid: false}, -} - -var mnemonics = []struct { - mnemonic string - num uint32 - pubkey string - valid bool -}{ - {mnemonic: "tornado awake gauge toilet tide book slim ranch initial custom purse quantum raccoon floor caught three color twelve until marriage snake split strategy caught", num: 0, pubkey: "A8JDpTiCnrq+zFUsAHrHY/xuFVsyt48sC1Srkp62r7Yx", valid: true}, - {mnemonic: "tornado awake gauge toilet tide book slim ranch initial custom purse quantum raccoon floor caught three color twelve until marriage snake split strategy caught", num: 1, pubkey: "A91r/4dh1zR5Sbbq3vWJm5H8nHVXh06MKARDz9A5yvak", valid: true}, - {mnemonic: "actor want explain gravity body drill bike update mask wool tell seven", pubkey: "AgxuioniPZ+jfk7zRt7b9Ks87ZPn7caPnOLHOgpKPosM", valid: true}, - {mnemonic: "actorr want explain gravity body drill bike update mask wool tell seven", pubkey: "", valid: false}, - {mnemonic: "actor want explain gravity body drill bike update mask wool tell", pubkey: "", valid: false}, - {mnemonic: "", pubkey: "", valid: false}, -} - -func TestSecp256k1FromMnemonic(t *testing.T) { - for _, m := range mnemonics { - if m.valid { - signer, err := Secp256k1FromMnemonic(m.mnemonic, m.num) - require.NoError(t, err) - require.Equal(t, m.pubkey, signer.Public().String()) - } else { - _, err := Secp256k1FromMnemonic(m.mnemonic, 0) - require.Error(t, err) - } - } -} - -func TestSecp256k1FromHex(t *testing.T) { - for _, pk := range privateKeys { - signer, err := Secp256k1FromHex(pk.key) - if pk.valid { - require.NoError(t, err) - require.Equal(t, pk.pubkey, signer.Public().String()) - } else { - require.Error(t, err) - } - } -} diff --git a/cli/wallet/ledger/common.go b/cli/wallet/ledger/common.go deleted file mode 100644 index 2cdce8dd91..0000000000 --- a/cli/wallet/ledger/common.go +++ /dev/null @@ -1,73 +0,0 @@ -package ledger - -import ( - "bytes" - "encoding/binary" - "fmt" - "io" -) - -func getAdr0008Path(number uint32) []uint32 { - return []uint32{44, 474, number} -} - -func getLegacyPath(number uint32) []uint32 { - return []uint32{44, 474, 0, 0, number} -} - -func getBip44bytes(bip44Path []uint32) ([]byte, error) { - message := make([]byte, 4*len(bip44Path)) - switch len(bip44Path) { - case 5: - // Legacy derivation path. - case 3: - // ADR-0008 derivation path. - default: - return nil, fmt.Errorf("path should contain either 5 or 3 elements") - } - - for index, element := range bip44Path { - pos := index * 4 - value := element | 0x80000000 // Harden all components. - binary.LittleEndian.PutUint32(message[pos:], value) - } - return message, nil -} - -func prepareChunks(bip44PathBytes, context, message []byte, chunkSize int) ([][]byte, error) { - if len(context) > 255 { - return nil, fmt.Errorf("maximum supported context size is 255 bytes") - } - - body := append([]byte{byte(len(context))}, context...) - body = append(body, message...) - - packetCount := 1 + len(body)/chunkSize - if len(body)%chunkSize > 0 { - packetCount++ - } - - chunks := make([][]byte, 0, packetCount) - chunks = append(chunks, bip44PathBytes) // First chunk is path. - - r := bytes.NewReader(body) -readLoop: - for { - toAppend := make([]byte, chunkSize) - n, err := r.Read(toAppend) - if n > 0 { - // Note: n == 0 only when EOF. - chunks = append(chunks, toAppend[:n]) - } - switch err { - case nil: - case io.EOF: - break readLoop - default: - // This can never happen, but handle it. - return nil, err - } - } - - return chunks, nil -} diff --git a/cli/wallet/ledger/device.go b/cli/wallet/ledger/device.go deleted file mode 100644 index 75974a3942..0000000000 --- a/cli/wallet/ledger/device.go +++ /dev/null @@ -1,189 +0,0 @@ -package ledger - -import ( - "fmt" - "time" - - coreSignature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - staking "github.com/oasisprotocol/oasis-core/go/staking/api" - ledger_go "github.com/zondax/ledger-go" -) - -// NOTE: Some of this is lifted from https://github.com/oasisprotocol/oasis-core-ledger but updated -// to conform to the ADR 0008 derivation scheme. - -const ( - userMessageChunkSize = 250 - - claConsumer = 0x05 - - insGetVersion = 0 - insGetAddrEd25519 = 1 - insSignEd25519 = 2 - - payloadChunkInit = 0 - payloadChunkAdd = 1 - payloadChunkLast = 2 - - errMsgInvalidParameters = "[APDU_CODE_BAD_KEY_HANDLE] The parameters in the data field are incorrect" - errMsgInvalidated = "[APDU_CODE_DATA_INVALID] Referenced data reversibly blocked (invalidated)" - errMsgRejected = "[APDU_CODE_COMMAND_NOT_ALLOWED] Sign request rejected" -) - -type VersionInfo struct { - Major uint8 - Minor uint8 - Patch uint8 -} - -type ledgerDevice struct { - raw ledger_go.LedgerDevice -} - -func (ld *ledgerDevice) Close() error { - return ld.raw.Close() -} - -// GetVersion returns the current version of the Oasis user app. -func (ld *ledgerDevice) GetVersion() (*VersionInfo, error) { - message := []byte{claConsumer, insGetVersion, 0, 0, 0} - response, err := ld.raw.Exchange(message) - if err != nil { - return nil, fmt.Errorf("ledger: failed GetVersion request: %w", err) - } - - if len(response) < 4 { - return nil, fmt.Errorf("ledger: truncated GetVersion response") - } - - return &VersionInfo{ - Major: response[1], - Minor: response[2], - Patch: response[3], - }, nil -} - -// GetPublicKeyEd25519 returns the Ed25519 public key associated with the given derivation path. -// If the requireConfirmation flag is set, this will require confirmation from the user. -func (ld *ledgerDevice) GetPublicKeyEd25519(bip44Path []uint32, requireConfirmation bool) ([]byte, error) { - pathBytes, err := getBip44bytes(bip44Path) - if err != nil { - return nil, fmt.Errorf("ledger: failed to get BIP44 bytes: %w", err) - } - - p1 := byte(0) - if requireConfirmation { - p1 = byte(1) - } - - // Prepare message - header := []byte{claConsumer, insGetAddrEd25519, p1, 0, 0} - message := append([]byte{}, header...) - message = append(message, pathBytes...) - message[4] = byte(len(message) - len(header)) // update length - - response, err := ld.raw.Exchange(message) - if err != nil { - return nil, fmt.Errorf("ledger: failed to request public key: %w", err) - } - if len(response) < 39 { - return nil, fmt.Errorf("ledger: truncated GetAddrEd25519 response") - } - - rawPubkey := response[0:32] - rawAddr := string(response[32:]) - - var pubkey coreSignature.PublicKey - if err = pubkey.UnmarshalBinary(rawPubkey); err != nil { - return nil, fmt.Errorf("ledger: device returned malformed public key: %w", err) - } - - var addrFromDevice staking.Address - if err = addrFromDevice.UnmarshalText([]byte(rawAddr)); err != nil { - return nil, fmt.Errorf("ledger: device returned malformed account address: %w", err) - } - addrFromPubkey := staking.NewAddress(pubkey) - if !addrFromDevice.Equal(addrFromPubkey) { - return nil, fmt.Errorf( - "ledger: account address computed on device (%s) doesn't match internally computed account address (%s)", - addrFromDevice, - addrFromPubkey, - ) - } - - return rawPubkey, nil -} - -// SignEd25519 asks the device to sign the given domain-separated message with the key derived from -// the given derivation path. -func (ld *ledgerDevice) SignEd25519(bip44Path []uint32, context, message []byte) ([]byte, error) { - pathBytes, err := getBip44bytes(bip44Path) - if err != nil { - return nil, fmt.Errorf("ledger: failed to get BIP44 bytes: %w", err) - } - - chunks, err := prepareChunks(pathBytes, context, message, userMessageChunkSize) - if err != nil { - return nil, fmt.Errorf("ledger: failed to prepare chunks: %w", err) - } - - var finalResponse []byte - for idx, chunk := range chunks { - payloadLen := byte(len(chunk)) - - var payloadDesc byte - switch idx { - case 0: - payloadDesc = payloadChunkInit - case len(chunks) - 1: - payloadDesc = payloadChunkLast - default: - payloadDesc = payloadChunkAdd - } - - message := []byte{claConsumer, insSignEd25519, payloadDesc, 0, payloadLen} - message = append(message, chunk...) - - response, err := ld.raw.Exchange(message) - if err != nil { - switch err.Error() { - case errMsgInvalidParameters, errMsgInvalidated: - return nil, fmt.Errorf("ledger: failed to sign: %s", string(response)) - case errMsgRejected: - return nil, fmt.Errorf("ledger: signing request rejected by user") - } - return nil, fmt.Errorf("ledger: failed to sign: %w", err) - } - - finalResponse = response - } - - // XXX: Work-around for Oasis App issue of currently not being capable of - // signing two transactions immediately one after another: - // https://github.com/Zondax/ledger-oasis/issues/68. - time.Sleep(100 * time.Millisecond) - - return finalResponse, nil -} - -// connectToDevice connects to the first connected Ledger device. -func connectToDevice() (*ledgerDevice, error) { - ledgerAdmin := ledger_go.NewLedgerAdmin() - - // TODO: Support multiple devices. - numDevices := ledgerAdmin.CountDevices() - switch { - case numDevices == 0: - return nil, fmt.Errorf("ledger: no devices connected") - case numDevices > 1: - return nil, fmt.Errorf("ledger: multiple devices not supported") - default: - } - - raw, err := ledgerAdmin.Connect(0) - if err != nil { - return nil, fmt.Errorf("ledger: failed to connect to device: %w", err) - } - - return &ledgerDevice{raw}, nil -} diff --git a/cli/wallet/ledger/ledger.go b/cli/wallet/ledger/ledger.go deleted file mode 100644 index 8d38694775..0000000000 --- a/cli/wallet/ledger/ledger.go +++ /dev/null @@ -1,224 +0,0 @@ -package ledger - -import ( - "fmt" - - "github.com/AlecAivazis/survey/v2" - ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/mitchellh/mapstructure" - flag "github.com/spf13/pflag" - - coreSignature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - - "github.com/oasisprotocol/oasis-sdk/cli/wallet" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature/ed25519" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -const ( - // Kind is the account kind for the ledger-backed accounts. - Kind = "ledger" - - derivationAdr8 = "adr8" - derivationLegacy = "legacy" - - cfgDerivation = "ledger.derivation" - cfgNumber = "ledger.number" -) - -type accountConfig struct { - Derivation string `mapstructure:"derivation,omitempty"` - Number uint32 `mapstructure:"number,omitempty"` -} - -type ledgerAccountFactory struct { - flags *flag.FlagSet -} - -func (af *ledgerAccountFactory) Kind() string { - return Kind -} - -func (af *ledgerAccountFactory) PrettyKind(rawCfg map[string]interface{}) string { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return "" - } - - // Show adr8, if derivation not set. - derivation := cfg.Derivation - if derivation == "" { - derivation = derivationAdr8 - } - return fmt.Sprintf("%s (%s:%d)", af.Kind(), derivation, cfg.Number) -} - -func (af *ledgerAccountFactory) Flags() *flag.FlagSet { - return af.flags -} - -func (af *ledgerAccountFactory) GetConfigFromFlags() (map[string]interface{}, error) { - cfg := make(map[string]interface{}) - cfg["derivation"], _ = af.flags.GetString(cfgDerivation) - cfg["number"], _ = af.flags.GetUint32(cfgNumber) - return cfg, nil -} - -func (af *ledgerAccountFactory) GetConfigFromSurvey(kind *wallet.ImportKind) (map[string]interface{}, error) { - return nil, fmt.Errorf("ledger: import not supported") -} - -func (af *ledgerAccountFactory) DataPrompt(kind wallet.ImportKind, rawCfg map[string]interface{}) survey.Prompt { - return nil -} - -func (af *ledgerAccountFactory) DataValidator(kind wallet.ImportKind, rawCfg map[string]interface{}) survey.Validator { - return nil -} - -func (af *ledgerAccountFactory) RequiresPassphrase() bool { - return false -} - -func (af *ledgerAccountFactory) SupportedImportKinds() []wallet.ImportKind { - return []wallet.ImportKind{} -} - -func (af *ledgerAccountFactory) HasConsensusSigner(rawCfg map[string]interface{}) bool { - return true -} - -func (af *ledgerAccountFactory) unmarshalConfig(raw map[string]interface{}) (*accountConfig, error) { - if raw == nil { - return nil, fmt.Errorf("missing configuration") - } - - var cfg accountConfig - if err := mapstructure.Decode(raw, &cfg); err != nil { - return nil, err - } - return &cfg, nil -} - -func (af *ledgerAccountFactory) Create(name string, passphrase string, rawCfg map[string]interface{}) (wallet.Account, error) { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return nil, err - } - - return newAccount(cfg) -} - -func (af *ledgerAccountFactory) Load(name string, passphrase string, rawCfg map[string]interface{}) (wallet.Account, error) { - cfg, err := af.unmarshalConfig(rawCfg) - if err != nil { - return nil, err - } - - return newAccount(cfg) -} - -func (af *ledgerAccountFactory) Remove(name string, rawCfg map[string]interface{}) error { - return nil -} - -func (af *ledgerAccountFactory) Rename(old, new string, rawCfg map[string]interface{}) error { - return nil -} - -func (af *ledgerAccountFactory) Import(name string, passphrase string, rawCfg map[string]interface{}, src *wallet.ImportSource) (wallet.Account, error) { - return nil, fmt.Errorf("ledger: import not supported") -} - -type ledgerAccount struct { - cfg *accountConfig - signer *ledgerSigner - coreSigner *ledgerCoreSigner -} - -func newAccount(cfg *accountConfig) (wallet.Account, error) { - // Connect to device. - dev, err := connectToDevice() - if err != nil { - return nil, err - } - - var path []uint32 - switch cfg.Derivation { - case derivationAdr8, "": - path = getAdr0008Path(cfg.Number) - case derivationLegacy: - path = getLegacyPath(cfg.Number) - default: - return nil, fmt.Errorf("ledger: unsupported derivation scheme '%s'", cfg.Derivation) - } - - // Retrieve public key. - rawPk, err := dev.GetPublicKeyEd25519(path, false) - if err != nil { - _ = dev.Close() - return nil, err - } - - // Create consensus layer signer. - coreSigner := &ledgerCoreSigner{ - path: path, - dev: dev, - } - if err = coreSigner.pk.UnmarshalBinary(rawPk); err != nil { - _ = dev.Close() - return nil, fmt.Errorf("ledger: got malformed public key: %w", err) - } - - // Create paratime layer signer. - // NOTE: Ledger currently doesn't support signing paratime transactions. - signer := &ledgerSigner{ - dev: dev, - } - if err = signer.pk.UnmarshalBinary(rawPk); err != nil { - _ = dev.Close() - return nil, fmt.Errorf("ledger: got malformed public key: %w", err) - } - - return &ledgerAccount{ - cfg: cfg, - signer: signer, - coreSigner: coreSigner, - }, nil -} - -func (a *ledgerAccount) ConsensusSigner() coreSignature.Signer { - return a.coreSigner -} - -func (a *ledgerAccount) Signer() signature.Signer { - return a.signer -} - -func (a *ledgerAccount) Address() types.Address { - return types.NewAddress(a.SignatureAddressSpec()) -} - -func (a *ledgerAccount) EthAddress() *ethCommon.Address { - // secp256k1 accounts are not supported by Ledger yet. - return nil -} - -func (a *ledgerAccount) SignatureAddressSpec() types.SignatureAddressSpec { - return types.NewSignatureAddressSpecEd25519(a.signer.Public().(ed25519.PublicKey)) -} - -func (a *ledgerAccount) UnsafeExport() string { - return "" -} - -func init() { - flags := flag.NewFlagSet("", flag.ContinueOnError) - flags.String(cfgDerivation, derivationLegacy, "Derivation scheme to use [adr8, legacy]") - flags.Uint32(cfgNumber, 0, "Key number to use in the derivation scheme") - - wallet.Register(&ledgerAccountFactory{ - flags: flags, - }) -} diff --git a/cli/wallet/ledger/signer.go b/cli/wallet/ledger/signer.go deleted file mode 100644 index bc31b3907c..0000000000 --- a/cli/wallet/ledger/signer.go +++ /dev/null @@ -1,65 +0,0 @@ -package ledger - -import ( - "fmt" - - coreSignature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature/ed25519" -) - -type ledgerCoreSigner struct { - path []uint32 - pk coreSignature.PublicKey - dev *ledgerDevice -} - -func (ls *ledgerCoreSigner) Public() coreSignature.PublicKey { - return ls.pk -} - -func (ls *ledgerCoreSigner) ContextSign(context coreSignature.Context, message []byte) ([]byte, error) { - preparedContext, err := coreSignature.PrepareSignerContext(context) - if err != nil { - return nil, fmt.Errorf("ledger: failed to prepare signing context: %w", err) - } - - signature, err := ls.dev.SignEd25519(ls.path, preparedContext, message) - if err != nil { - return nil, fmt.Errorf("ledger: failed to sign message: %w", err) - } - return signature, nil -} - -func (ls *ledgerCoreSigner) String() string { - return fmt.Sprintf("[ledger signer: %s]", ls.pk) -} - -func (ls *ledgerCoreSigner) Reset() { - _ = ls.dev.Close() -} - -type ledgerSigner struct { - pk ed25519.PublicKey - dev *ledgerDevice -} - -func (ls *ledgerSigner) Public() signature.PublicKey { - return ls.pk -} - -func (ls *ledgerSigner) ContextSign(context, message []byte) ([]byte, error) { - return nil, fmt.Errorf("ledger: signing paratime transactions not supported") -} - -func (ls *ledgerSigner) Sign(message []byte) ([]byte, error) { - return nil, fmt.Errorf("ledger: signing paratime transactions not supported") -} - -func (ls *ledgerSigner) String() string { - return fmt.Sprintf("[ledger signer: %s]", ls.pk) -} - -func (ls *ledgerSigner) Reset() { - _ = ls.dev.Close() -} diff --git a/cli/wallet/test/test.go b/cli/wallet/test/test.go deleted file mode 100644 index 9091efc574..0000000000 --- a/cli/wallet/test/test.go +++ /dev/null @@ -1,64 +0,0 @@ -package test - -import ( - "encoding/base64" - "encoding/hex" - - ethCommon "github.com/ethereum/go-ethereum/common" - coreSignature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - - "github.com/oasisprotocol/oasis-sdk/cli/wallet" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/testing" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -const ( - // Kind is the account kind for the test accounts. - Kind = "test" -) - -type testAccount struct { - testKey testing.TestKey -} - -func NewTestAccount(testKey testing.TestKey) (wallet.Account, error) { - return &testAccount{testKey: testKey}, nil -} - -func (a *testAccount) ConsensusSigner() coreSignature.Signer { - type wrappedSigner interface { - Unwrap() coreSignature.Signer - } - - if ws, ok := a.testKey.Signer.(wrappedSigner); ok { - return ws.Unwrap() - } - return nil -} - -func (a *testAccount) Signer() signature.Signer { - return a.testKey.Signer -} - -func (a *testAccount) Address() types.Address { - return a.testKey.Address -} - -func (a *testAccount) EthAddress() *ethCommon.Address { - if a.testKey.SigSpec.Secp256k1Eth != nil { - return &a.testKey.EthAddress - } - return nil -} - -func (a *testAccount) SignatureAddressSpec() types.SignatureAddressSpec { - return a.testKey.SigSpec -} - -func (a *testAccount) UnsafeExport() string { - if a.testKey.SigSpec.Secp256k1Eth != nil { - return hex.EncodeToString(a.testKey.SecretKey) - } - return base64.StdEncoding.EncodeToString(a.testKey.SecretKey) -} diff --git a/cli/wallet/wallet.go b/cli/wallet/wallet.go deleted file mode 100644 index e2a9d33a44..0000000000 --- a/cli/wallet/wallet.go +++ /dev/null @@ -1,160 +0,0 @@ -package wallet - -import ( - "fmt" - "sync" - - "github.com/AlecAivazis/survey/v2" - ethCommon "github.com/ethereum/go-ethereum/common" - flag "github.com/spf13/pflag" - - coreSignature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/crypto/signature" - "github.com/oasisprotocol/oasis-sdk/client-sdk/go/types" -) - -var registeredFactories sync.Map - -const ( - // AlgorithmEd25519Adr8 is the Ed25519 algorithm using the ADR-0008 derivation. - AlgorithmEd25519Adr8 = "ed25519-adr8" - // AlgorithmEd25519Raw is the Ed25519 algorithm using raw private keys. - AlgorithmEd25519Raw = "ed25519-raw" - // AlgorithmSecp256k1Bip44 is the Secp256k1 algorithm using BIP-44 derivation. - AlgorithmSecp256k1Bip44 = "secp256k1-bip44" - // AlgorithmSecp256k1Raw is the Secp256k1 algorithm using raw private keys. - AlgorithmSecp256k1Raw = "secp256k1-raw" -) - -// Factory is a factory that supports accounts of a specific kind. -type Factory interface { - // Kind returns the kind of accounts this factory will produce. - Kind() string - - // PrettyKind returns human-friendly kind of accounts this factory will produce. - PrettyKind(cfg map[string]interface{}) string - - // Flags returns the CLI flags that can be used for configuring this account factory. - Flags() *flag.FlagSet - - // GetConfigFromFlags generates account configuration from flags. - GetConfigFromFlags() (map[string]interface{}, error) - - // GetConfigFromSurvey generates account configuration from survey answers. - GetConfigFromSurvey(kind *ImportKind) (map[string]interface{}, error) - - // DataPrompt returns a survey prompt for entering data when importing the account. - DataPrompt(kind ImportKind, cfg map[string]interface{}) survey.Prompt - - // DataValidator returns a survey data input validator used when importing the account. - DataValidator(kind ImportKind, cfg map[string]interface{}) survey.Validator - - // RequiresPassphrase returns true if the account requires a passphrase. - RequiresPassphrase() bool - - // SupportedImportKinds returns the import kinds supported by this account. - SupportedImportKinds() []ImportKind - - // HasConsensusSigner returns true, iff there is a consensus layer signer associated with this account. - HasConsensusSigner(cfg map[string]interface{}) bool - - // Create creates a new account. - Create(name string, passphrase string, cfg map[string]interface{}) (Account, error) - - // Load loads an existing account. - Load(name string, passphrase string, cfg map[string]interface{}) (Account, error) - - // Remove removes an existing account. - Remove(name string, cfg map[string]interface{}) error - - // Rename renames an existing account. - Rename(old, new string, cfg map[string]interface{}) error - - // Import creates a new account from imported key material. - Import(name string, passphrase string, cfg map[string]interface{}, src *ImportSource) (Account, error) -} - -// ImportKind is an account import kind. -type ImportKind string - -// Supported import kinds. -const ( - ImportKindMnemonic ImportKind = "mnemonic" - ImportKindPrivateKey ImportKind = "private key" -) - -// UnmarshalText decodes a text marshalled import kind. -func (k *ImportKind) UnmarshalText(text []byte) error { - switch string(text) { - case string(ImportKindMnemonic): - *k = ImportKindMnemonic - case string(ImportKindPrivateKey): - *k = ImportKindPrivateKey - default: - return fmt.Errorf("unknown import kind: %s", string(text)) - } - return nil -} - -// ImportSource is a source of imported account key material. -type ImportSource struct { - Kind ImportKind - Data string -} - -// Account is an interface of a single account in the wallet. -type Account interface { - // ConsensusSigner returns the consensus layer signer associated with the account. - // - // It may return nil in case this account cannot be used with the consensus layer. - ConsensusSigner() coreSignature.Signer - - // Signer returns the signer associated with the account. - Signer() signature.Signer - - // Address returns the address associated with the account. - Address() types.Address - - // EthAddress returns the Ethereum address associated with the account, if any. - EthAddress() *ethCommon.Address - - // SignatureAddressSpec returns the signature address specification associated with the account. - SignatureAddressSpec() types.SignatureAddressSpec - - // UnsafeExport exports the account's secret state. - UnsafeExport() string -} - -// Register registers a new account type. -func Register(af Factory) { - if _, loaded := registeredFactories.LoadOrStore(af.Kind(), af); loaded { - panic(fmt.Sprintf("wallet: kind '%s' is already registered", af.Kind())) - } -} - -// Load loads a previously registered account factory. -func Load(kind string) (Factory, error) { - af, loaded := registeredFactories.Load(kind) - if !loaded { - return nil, fmt.Errorf("wallet: kind '%s' not available", kind) - } - return af.(Factory), nil -} - -// AvailableKinds returns all of the available account factories. -func AvailableKinds() []Factory { - var kinds []Factory - registeredFactories.Range(func(key, value interface{}) bool { - kinds = append(kinds, value.(Factory)) - return true - }) - return kinds -} - -// ImportKinds returns all of the available account import kinds. -func ImportKinds() []string { - return []string{ - string(ImportKindMnemonic), - string(ImportKindPrivateKey), - } -} diff --git a/tests/check-core-versions.sh b/tests/check-core-versions.sh index 86dadb75de..999ac6c08c 100755 --- a/tests/check-core-versions.sh +++ b/tests/check-core-versions.sh @@ -25,7 +25,6 @@ for m in \ client-sdk/ts-web/core/reflect-go/go.mod \ tests/benchmark/go.mod \ tests/e2e/go.mod \ - cli/go.mod \ tools/orc/go.mod \ tools/gen_runtime_vectors/go.mod \ examples/client-sdk/go/minimal-runtime-client/go.mod \