UNPKG

@bcpros/crypto-wallet-core

Version:

A multi-currency support library for address derivation, private key creation, and transaction creation

52 lines 1.82 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TransactionsProxy = void 0; var bch_1 = require("./bch"); var btc_1 = require("./btc"); var doge_1 = require("./doge"); var erc20_1 = require("./erc20"); var eth_1 = require("./eth"); var eth_multisig_1 = require("./eth-multisig"); var ltc_1 = require("./ltc"); var xec_1 = require("./xec"); var xpi_1 = require("./xpi"); var xrp_1 = require("./xrp"); var providers = { BTC: new btc_1.BTCTxProvider(), BCH: new bch_1.BCHTxProvider(), ETH: new eth_1.ETHTxProvider(), ERC20: new erc20_1.ERC20TxProvider(), ETHMULTISIG: new eth_multisig_1.ETHMULTISIGTxProvider(), XRP: new xrp_1.XRPTxProvider(), DOGE: new doge_1.DOGETxProvider(), XEC: new xec_1.XECTxProvider(), XPI: new xpi_1.XPITxProvider(), LTC: new ltc_1.LTCTxProvider() }; var TransactionsProxy = (function () { function TransactionsProxy() { } TransactionsProxy.prototype.get = function (_a) { var chain = _a.chain; return providers[chain]; }; TransactionsProxy.prototype.create = function (params) { return this.get(params).create(params); }; TransactionsProxy.prototype.sign = function (params) { return this.get(params).sign(params); }; TransactionsProxy.prototype.getSignature = function (params) { return this.get(params).getSignature(params); }; TransactionsProxy.prototype.applySignature = function (params) { return this.get(params).applySignature(params); }; TransactionsProxy.prototype.getHash = function (params) { return this.get(params).getHash(params); }; return TransactionsProxy; }()); exports.TransactionsProxy = TransactionsProxy; exports.default = new TransactionsProxy(); //# sourceMappingURL=index.js.map