"use strict";
// Copyright 2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.migrateStrongholdSnapshotV2ToV3 = exports.listenMqtt = exports.getSecretManager = exports.getClient = exports.destroyClient = exports.destroyWallet = exports.listenWallet = exports.callWalletMethod = exports.callUtilsMethod = exports.callSecretManagerMethod = exports.callClientMethod = exports.createSecretManager = exports.createWallet = exports.createClient = exports.initLogger = void 0;
// Import needs to be in a single line, otherwise it breaks
// prettier-ignore
// @ts-ignore: path is set to match runtime transpiled js path when bundled.
const iota_sdk_wasm_1 = require("../wasm/iota_sdk_wasm");
Object.defineProperty(exports, "initLogger", { enumerable: true, get: function () { return iota_sdk_wasm_1.initLogger; } });
Object.defineProperty(exports, "getClient", { enumerable: true, get: function () { return iota_sdk_wasm_1.getClient; } });
Object.defineProperty(exports, "createClient", { enumerable: true, get: function () { return iota_sdk_wasm_1.createClient; } });
Object.defineProperty(exports, "destroyClient", { enumerable: true, get: function () { return iota_sdk_wasm_1.destroyClient; } });
Object.defineProperty(exports, "createSecretManager", { enumerable: true, get: function () { return iota_sdk_wasm_1.createSecretManager; } });
Object.defineProperty(exports, "createWallet", { enumerable: true, get: function () { return iota_sdk_wasm_1.createWallet; } });
Object.defineProperty(exports, "callClientMethod", { enumerable: true, get: function () { return iota_sdk_wasm_1.callClientMethod; } });
Object.defineProperty(exports, "callSecretManagerMethod", { enumerable: true, get: function () { return iota_sdk_wasm_1.callSecretManagerMethod; } });
Object.defineProperty(exports, "callWalletMethod", { enumerable: true, get: function () { return iota_sdk_wasm_1.callWalletMethod; } });
Object.defineProperty(exports, "destroyWallet", { enumerable: true, get: function () { return iota_sdk_wasm_1.destroyWallet; } });
Object.defineProperty(exports, "listenWallet", { enumerable: true, get: function () { return iota_sdk_wasm_1.listenWallet; } });
Object.defineProperty(exports, "getSecretManager", { enumerable: true, get: function () { return iota_sdk_wasm_1.getSecretManager; } });
Object.defineProperty(exports, "listenMqtt", { enumerable: true, get: function () { return iota_sdk_wasm_1.listenMqtt; } });
Object.defineProperty(exports, "migrateStrongholdSnapshotV2ToV3", { enumerable: true, get: function () { return iota_sdk_wasm_1.migrateStrongholdSnapshotV2ToV3; } });
const callUtilsMethod = (method) => {
    const response = JSON.parse((0, iota_sdk_wasm_1.callUtilsMethodRust)(JSON.stringify(method)));
    if (response.type == 'error' || response.type == 'panic') {
        throw response;
    }
    else {
        return response.payload;
    }
};
exports.callUtilsMethod = callUtilsMethod;
//# sourceMappingURL=bindings.js.map