// Generated by IcedCoffeeScript 1.8.0-d
(function() {
  var Announcement, Auth, Cryptocurrency, Device, Eldest, PGPUpdate, Revoke, Sibkey, Subkey, Track, Untrack, UpdatePassphraseHash, alloc, base, get_klass, lookup_tab, web_service, _ref;

  web_service = require('./web_service');

  base = require('./base');

  _ref = require('./track'), Untrack = _ref.Untrack, Track = _ref.Track;

  Auth = require('./auth').Auth;

  Revoke = require('./revoke').Revoke;

  Cryptocurrency = require('./cryptocurrency').Cryptocurrency;

  Announcement = require('./announcement').Announcement;

  Subkey = require('./subkey').Subkey;

  Sibkey = require('./sibkey').Sibkey;

  Device = require('./device').Device;

  Eldest = require('./eldest').Eldest;

  PGPUpdate = require('./pgp_update').PGPUpdate;

  UpdatePassphraseHash = require('./update_passphrase_hash').UpdatePassphraseHash;

  lookup_tab = {
    "web_service_binding.twitter": web_service.TwitterBinding,
    "web_service_binding.github": web_service.GithubBinding,
    "web_service_binding.reddit": web_service.RedditBinding,
    "web_service_binding.keybase": web_service.KeybaseBinding,
    "web_service_binding.generic": web_service.GenericWebSiteBinding,
    "web_service_binding.dns": web_service.DnsBinding,
    "web_service_binding.coinbase": web_service.CoinbaseBinding,
    "web_service_binding.hackernews": web_service.HackerNewsBinding,
    "web_service_binding.bitbucket": web_service.BitbucketBinding,
    "generic_binding": base.GenericBinding,
    "track": Track,
    "untrack": Untrack,
    "auth": Auth,
    "revoke": Revoke,
    "cryptocurrency": Cryptocurrency,
    "announcement": Announcement,
    "subkey": Subkey,
    "sibkey": Sibkey,
    "device": Device,
    "eldest": Eldest,
    "pgp_update": PGPUpdate,
    "update_passphrase_hash": UpdatePassphraseHash
  };

  get_klass = function(type, extra_lookup_tab) {
    var err, klass;
    err = klass = null;
    if (!(((klass = extra_lookup_tab != null ? extra_lookup_tab[type] : void 0) != null) || ((klass = lookup_tab[type]) != null))) {
      err = new Error("Unknown proof class: " + type);
    }
    return [err, klass];
  };

  alloc = function(type, args, extra_lookup_tab) {
    var err, klass, ret, _ref1;
    ret = null;
    _ref1 = get_klass(type, extra_lookup_tab), err = _ref1[0], klass = _ref1[1];
    if (klass != null) {
      ret = new klass(args);
    }
    return ret;
  };

  exports.get_klass = get_klass;

  exports.alloc = alloc;

}).call(this);
