UNPKG

airgap-coin-lib

Version:

The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

26 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var MichelsonTypeMeta_1 = require("../types/michelson/MichelsonTypeMeta"); var utils_1 = require("../types/utils"); var TezosContractEntrypoint = /** @class */ (function () { function TezosContractEntrypoint(name, type) { this.name = name; this.type = type; } TezosContractEntrypoint.fromJSON = function (entrypoints) { return Object.entries(entrypoints) .filter(function (_a) { var _ = _a[0], node = _a[1]; return utils_1.isMichelinePrimitiveApplication(node); }) .map(function (_a) { var name = _a[0], node = _a[1]; var type = MichelsonTypeMeta_1.MichelsonTypeMeta.fromMichelineNode(node); return type ? new TezosContractEntrypoint(name, type) : undefined; }) .filter(function (entrypoint) { return entrypoint !== undefined; }); }; return TezosContractEntrypoint; }()); exports.TezosContractEntrypoint = TezosContractEntrypoint; //# sourceMappingURL=TezosContractEntrypoint.js.map