UNPKG

keybase-proofs

Version:

Publicly-verifiable proofs of identity

82 lines (67 loc) 2.85 kB
// Generated by IcedCoffeeScript 108.0.11 (function() { var Base, Revoke, constants, iced, __iced_k, __iced_k_noop, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; iced = require('iced-runtime'); __iced_k = __iced_k_noop = function() {}; Base = require('./base').Base; constants = require('./constants').constants; exports.Revoke = Revoke = (function(_super) { __extends(Revoke, _super); function Revoke(obj) { this.device = obj.device; Revoke.__super__.constructor.call(this, obj); } Revoke.prototype._type = function() { return constants.sig_types.revoke; }; Revoke.prototype._type_v2 = function() { return constants.sig_types_v2.revoke; }; Revoke.prototype._required_sections = function() { return Revoke.__super__._required_sections.call(this).concat(["revoke"]); }; Revoke.prototype._optional_sections = function() { return Revoke.__super__._optional_sections.call(this).concat(["device"]); }; Revoke.prototype._v_check = function(_arg, cb) { var err, json, r, ___iced_passed_deferral, __iced_deferrals, __iced_k; __iced_k = __iced_k_noop; ___iced_passed_deferral = iced.findDeferral(arguments); json = _arg.json; (function(_this) { return (function(__iced_k) { __iced_deferrals = new iced.Deferrals(__iced_k, { parent: ___iced_passed_deferral, filename: "/Users/max/src/keybase/proofs/src/revoke.iced", funcname: "Revoke._v_check" }); Revoke.__super__._v_check.call(_this, { json: json }, __iced_deferrals.defer({ assign_fn: (function() { return function() { return err = arguments[0]; }; })(), lineno: 19 })); __iced_deferrals._fulfill(); }); })(this)((function(_this) { return function() { var _ref; err = err != null ? err : (r = (_ref = json.body) != null ? _ref.revoke : void 0) == null ? new Error("Need a 'revoke' section of the signature block") : !(r.sig_id != null) && !(r.sig_ids != null) && !(r.kid != null) && !(r.kids != null) ? new Error("Need one of sig_id/sig_ids/kid/kids in signature revoke block") : void 0; return cb(err); }; })(this)); }; Revoke.prototype._v_customize_json = function(ret) { if (this.device != null) { return ret.body.device = this.device; } }; return Revoke; })(Base); }).call(this);