UNPKG

@airgap/coinlib-core

Version:

The @airgap/coinlib-core is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

66 lines 2.81 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.CoinlibAssertionError = exports.CoinlibError = exports.Domain = void 0; var Domain; (function (Domain) { Domain["SERIALIZER"] = "SERIALIZER"; Domain["SUBPROTOCOLS"] = "SUBPROTOCOLS"; Domain["WALLET"] = "WALLET"; Domain["BITCOIN"] = "BITCOIN"; Domain["ETHEREUM"] = "ETHEREUM"; Domain["ERC20"] = "ERC20"; Domain["COSMOS"] = "COSMOS"; Domain["SUBSTRATE"] = "SUBSTRATE"; Domain["AETERNITY"] = "AETERNITY"; Domain["GROESTLCOIN"] = "GROESTLCOIN"; Domain["TEZOS"] = "TEZOS"; Domain["TEZOSFA"] = "TEZOSFA"; Domain["UTILS"] = "UTILS"; Domain["ACTIONS"] = "ACTIONS"; Domain["ICP"] = "ICP"; Domain["COREUM"] = "COREUM"; Domain["OPTIMISM"] = "OPTIMISM"; Domain["MINA"] = "MINA"; Domain["STELLAR"] = "STELLAR"; })(Domain = exports.Domain || (exports.Domain = {})); var CoinlibError = /** @class */ (function (_super) { __extends(CoinlibError, _super); function CoinlibError(domain, code, description) { var _this = _super.call(this, description ? "".concat(domain, "(").concat(code, "): ").concat(description) : "".concat(domain, "(").concat(code, ")")) || this; _this.domain = domain; _this.code = code; _this.description = description; return _this; } return CoinlibError; }(Error)); exports.CoinlibError = CoinlibError; var CoinlibAssertionError = /** @class */ (function (_super) { __extends(CoinlibAssertionError, _super); function CoinlibAssertionError(domain, code, expected, actual) { var _this = _super.call(this, "".concat(domain, "(").concat(code, "): expected ").concat(expected, " but got ").concat(actual, ".")) || this; _this.domain = domain; _this.code = code; _this.expected = expected; _this.actual = actual; return _this; } return CoinlibAssertionError; }(Error)); exports.CoinlibAssertionError = CoinlibAssertionError; //# sourceMappingURL=coinlib-error.js.map