Can i serve derive API endpoint in Online mode?

Hi, i removed /construction/derive endpoint because our blockchain system has decoupled account key concept (that key pair can be update with same account address).

But i realized for easier usage and testing, support /construction/derive API with little bit adjustment for matching our blockchain concept might be good.
So we decided to support /construction/derive API but there is an issue.

The issue is that we need to communicate with blockchain node for getting account information to validate correctness of the user input.
Can we serve derive API in online mode?

We can no longer serve the derive API in offline mode as described here.
Is there any problem with this?
If there is no issue with supporting derive API in online mode, then i might add below logic to ConstructionDerive function.

// ConstructionDerive implements the /construction/derive endpoint.
func (s *ConstructionAPIService) ConstructionDerive(...) (*types.ConstructionDeriveResponse, *types.Error) {
	if s.config.Mode != configuration.Online {
		return nil, ErrUnavailableOffline

Thanks again ! :slight_smile:

1 Like