"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateWrappedOnAptos = exports.updateWrappedOnNear = exports.updateWrappedOnAlgorand = exports.updateWrappedOnSolana = exports.updateWrappedOnXpla = exports.updateWrappedOnInjective = exports.updateWrappedOnTerra = exports.updateWrappedOnEth = void 0;
const _1 = require(".");
const ethers_contracts_1 = require("../ethers-contracts");
function updateWrappedOnEth(tokenBridgeAddress, signer, signedVAA, overrides = {}) {
    return __awaiter(this, void 0, void 0, function* () {
        const bridge = ethers_contracts_1.Bridge__factory.connect(tokenBridgeAddress, signer);
        const v = yield bridge.updateWrapped(signedVAA, overrides);
        const receipt = yield v.wait();
        return receipt;
    });
}
exports.updateWrappedOnEth = updateWrappedOnEth;
exports.updateWrappedOnTerra = _1.createWrappedOnTerra;
exports.updateWrappedOnInjective = _1.submitVAAOnInjective;
exports.updateWrappedOnXpla = _1.createWrappedOnXpla;
exports.updateWrappedOnSolana = _1.createWrappedOnSolana;
exports.updateWrappedOnAlgorand = _1.createWrappedOnAlgorand;
exports.updateWrappedOnNear = _1.createWrappedOnNear;
exports.updateWrappedOnAptos = _1.createWrappedOnAptos;
