code: func ComposeAPI(settings Settings, createProvider ...CreateProviderFunc) (*API, error) {
  	if settings == nil {
  		return nil, ErrSettingsNil
  	}
  	var provider Provider
  	var err error
  	if len(createProvider) > 0 && createProvider[0] != nil {
  		provider, err = createProvider[0](settings)
  	} else {
  		provider, err = NewHTTPClient(settings)
  	}
  	if err != nil {
  		return nil, err
  	}
  
  	api := &API{provider: provider}
  	if settings.ProofOfWorkFunc() != nil {
  		api.localProofOfWorkFunc = settings.ProofOfWorkFunc()
  	}
  
  	return api, nil
  }
docs: // ComposeAPI composes a new API from the given settings and provider.
  // If no provider function is supplied, then the default http provider is used.
  // Settings must not be nil.