@bcpros/crypto-wallet-core
Version:
A multi-currency support library for address derivation, private key creation, and transaction creation
48 lines • 1.49 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionsProxy = void 0;
const bch_1 = require("./bch");
const btc_1 = require("./btc");
const doge_1 = require("./doge");
const erc20_1 = require("./erc20");
const eth_1 = require("./eth");
const eth_multisig_1 = require("./eth-multisig");
const ltc_1 = require("./ltc");
const xec_1 = require("./xec");
const xpi_1 = require("./xpi");
const xrp_1 = require("./xrp");
const 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()
};
class TransactionsProxy {
get({ chain }) {
return providers[chain];
}
create(params) {
return this.get(params).create(params);
}
sign(params) {
return this.get(params).sign(params);
}
getSignature(params) {
return this.get(params).getSignature(params);
}
applySignature(params) {
return this.get(params).applySignature(params);
}
getHash(params) {
return this.get(params).getHash(params);
}
}
exports.TransactionsProxy = TransactionsProxy;
exports.default = new TransactionsProxy();
//# sourceMappingURL=index.js.map