@ledgerhq/coin-tezos
Version:
19 lines • 743 B
JavaScript
;
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTezosToolkit = getTezosToolkit;
const taquito_1 = require("@taquito/taquito");
// Tezos client instance is cached to avoid costly rebuild at every request
// Watch out: cache key is the URL, coin module can be instantiated several times with different URLs
const servers = new Map();
function getTezosToolkit(config) {
const url = config.node.url;
let server = servers.get(url);
if (server === undefined) {
server = new taquito_1.TezosToolkit(url);
servers.set(url, server);
}
return server;
}
//# sourceMappingURL=tezosToolkit.js.map