diff --git a/cmd/wardenkms/wardenkms.go b/cmd/wardenkms/wardenkms.go index becc3e860..0b7c8fda7 100644 --- a/cmd/wardenkms/wardenkms.go +++ b/cmd/wardenkms/wardenkms.go @@ -20,12 +20,11 @@ import ( ) type Config struct { - ChainID string `env:"CHAIN_ID, default=warden_1337-1"` - GRPCURL string `env:"GRPC_URL, default=localhost:9090"` - GRPCInsecure bool `env:"GRPC_INSECURE, default=true"` - DerivationPath string `env:"DERIVATION_PATH, default=m/44'/60'/0'/0/0"` - Mnemonic string `env:"MNEMONIC, default=exclude try nephew main caught favorite tone degree lottery device tissue tent ugly mouse pelican gasp lava flush pen river noise remind balcony emerge"` - KeychainId uint64 `env:"KEYCHAIN_ID, default=1"` + ChainID string `env:"CHAIN_ID, default=warden_1337-1"` + GRPCURL string `env:"GRPC_URL, default=localhost:9090"` + GRPCInsecure bool `env:"GRPC_INSECURE, default=true"` + Mnemonic string `env:"MNEMONIC, default=exclude try nephew main caught favorite tone degree lottery device tissue tent ugly mouse pelican gasp lava flush pen river noise remind balcony emerge"` + KeychainId uint64 `env:"KEYCHAIN_ID, default=1"` KeyringMnemonic string `env:"KEYRING_MNEMONIC, required"` KeyringPassword string `env:"KEYRING_PASSWORD, required"` @@ -58,18 +57,17 @@ func main() { } app := keychain.NewApp(keychain.Config{ - Logger: logger, - ChainID: cfg.ChainID, - GRPCURL: cfg.GRPCURL, - GRPCInsecure: cfg.GRPCInsecure, - DerivationPath: cfg.DerivationPath, - Mnemonic: cfg.Mnemonic, - KeychainID: cfg.KeychainId, - GasLimit: cfg.GasLimit, - BatchInterval: cfg.BatchInterval, - BatchSize: cfg.BatchSize, - TxTimeout: cfg.TxTimeout, - TxFees: sdk.NewCoins(sdk.NewCoin("award", math.NewInt(cfg.TxFee))), + Logger: logger, + ChainID: cfg.ChainID, + GRPCURL: cfg.GRPCURL, + GRPCInsecure: cfg.GRPCInsecure, + Mnemonic: cfg.Mnemonic, + KeychainID: cfg.KeychainId, + GasLimit: cfg.GasLimit, + BatchInterval: cfg.BatchInterval, + BatchSize: cfg.BatchSize, + TxTimeout: cfg.TxTimeout, + TxFees: sdk.NewCoins(sdk.NewCoin("award", math.NewInt(cfg.TxFee))), }) app.SetKeyRequestHandler(func(w keychain.KeyResponseWriter, req *keychain.KeyRequest) { diff --git a/keychain-sdk/config.go b/keychain-sdk/config.go index 9e34b93ff..72d45bce3 100644 --- a/keychain-sdk/config.go +++ b/keychain-sdk/config.go @@ -28,11 +28,6 @@ type Config struct { // for. KeychainID uint64 - // DerivationPath is the derivation path to use in combination with the - // [Mnemonic] to derive this Keychain's writer private key. - // e.g. "m/44'/60'/0'/0/0" - DerivationPath string - // Mnemonic is the mnemonic to use to derive this Keychain's writer private // key. Mnemonic string diff --git a/keychain-sdk/example_keychain_test.go b/keychain-sdk/example_keychain_test.go index 0f781581b..501bf7368 100644 --- a/keychain-sdk/example_keychain_test.go +++ b/keychain-sdk/example_keychain_test.go @@ -26,9 +26,8 @@ func Main() { GRPCInsecure: true, // setup the account used to write txs - KeychainID: 1, - Mnemonic: "virus boat radio apple pilot ask vault exhaust again state doll stereo slide exhibit scissors miss attack boat budget egg bird mask more trick", - DerivationPath: "m/44'/60'/0'/0/0", + KeychainID: 1, + Mnemonic: "virus boat radio apple pilot ask vault exhaust again state doll stereo slide exhibit scissors miss attack boat budget egg bird mask more trick", // setup throughput for batching responses GasLimit: 400000, diff --git a/keychain-sdk/keychain.go b/keychain-sdk/keychain.go index 975b245ce..071368d1f 100644 --- a/keychain-sdk/keychain.go +++ b/keychain-sdk/keychain.go @@ -114,7 +114,7 @@ func (a *App) initConnections() error { conn := query.Conn() - identity, err := client.NewIdentityFromSeed(a.config.DerivationPath, a.config.Mnemonic) + identity, err := client.NewIdentityFromSeed(a.config.Mnemonic) if err != nil { return fmt.Errorf("failed to create identity: %w", err) }