code: function init(shard) {  // {{{2
  /**
   * Class constructor
   *
   * @param shard {Object} Shard to be changed
   *
   * @method constructor
   */
  
    if (! shard.space.spid) {
      throw O.log.error(shard, 'Can\'t create transaction in this shard, there is no spid assigned to this peer in the shard.space!');
    }
    /*
    if (! shard.maps.all) {
      throw O.log.error(shard, 'Can\'t create transaction in this shard, missing database!');
    }
    */
  
    this.shard = shard;
  
    this.data = {};
  
    this.id = shard.space.spid * 256 * 256 * 256 * 256 + ++this.shard.lastTid;
  }
docs: @caption Transaction class
  
  @readme
  Changes to shards are made via transactions.
  
  To add an entry to a shard, for example, create a new
  transaction, add the entry and commit the transaction.
  
  Example:
  
  var trans = shard.transaction();
  
  var light = trans.add('light', {
  alias: 'reading.light',
  parent: 'living.room'
  });
  
  trans.commit(O.log.bindError());
  
  @aliases transaction transactions
  @class ose.lib.shard.trans
  @type class
   Public {{{1