Skip to content

Commit

Permalink
feat: add handler flag auth_token
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed Jan 4, 2024
1 parent c6563ce commit 35e49f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const (
flagLight = "rollkit.light"
flagTrustedHash = "rollkit.trusted_hash"
flagLazyAggregator = "rollkit.lazy_aggregator"
flagAuthToken = "rollkit.auth_token"
)

// NodeConfig stores Rollkit node configuration.
Expand Down Expand Up @@ -88,6 +89,7 @@ func (nc *NodeConfig) GetViperConfig(v *viper.Viper) error {
nc.LazyAggregator = v.GetBool(flagLazyAggregator)
nc.Light = v.GetBool(flagLight)
nc.TrustedHash = v.GetString(flagTrustedHash)
nc.AuthToken = v.GetString(flagAuthToken)
return nil
}

Expand All @@ -104,4 +106,5 @@ func AddFlags(cmd *cobra.Command) {
cmd.Flags().Uint64(flagDAStartHeight, def.DAStartHeight, "starting DA block height (for syncing)")
cmd.Flags().Bool(flagLight, def.Light, "run light client")
cmd.Flags().String(flagTrustedHash, def.TrustedHash, "initial trusted hash to start the header exchange service")
cmd.Flags().String(flagAuthToken, def.AuthToken, "auth token")
}

0 comments on commit 35e49f7

Please sign in to comment.