// Copyright 2018 Chia Network Inc

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

//    http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef JS_BINDINGS_WRAPPERS_AGGREGATIONINFOWRAPPER_H_
#define JS_BINDINGS_WRAPPERS_AGGREGATIONINFOWRAPPER_H_

#include "../helpers.h"
#include "PublicKeyWrapper.h"

namespace js_wrappers {

class AggregationInfoWrapper : public JSWrapper<AggregationInfo> {
 public:
    explicit AggregationInfoWrapper(const AggregationInfo &info);

    static AggregationInfoWrapper
    FromMsgHash(const PublicKeyWrapper &pkw, val messageHashBuffer);

    static AggregationInfoWrapper
    FromMsg(const PublicKeyWrapper &pkw, val messageBuffer);

    static AggregationInfoWrapper
    FromBuffers(val pubKeys, val messageHashes, val exponentBns);

    static AggregationInfo
    FromBuffersUnwrapped(val pubKeyWrappers, val messageHashes,
                         val exponentBns);

    val GetPubKeys() const;

    val GetMessageHashes() const;

    val GetExponents() const;
};

}  // namespace js_wrappers

#endif  // JS_BINDINGS_WRAPPERS_AGGREGATIONINFOWRAPPER_H_
