bifcore-sdk-nodejs-bop
Version:
bifcore sdk nodejs
1,656 lines (1,408 loc) • 366 kB
JavaScript
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var common_pb = require('./common_pb.js');
goog.exportSymbol('proto.protocol.Account', null, global);
goog.exportSymbol('proto.protocol.AccountPrivilege', null, global);
goog.exportSymbol('proto.protocol.AccountThreshold', null, global);
goog.exportSymbol('proto.protocol.Asset', null, global);
goog.exportSymbol('proto.protocol.AssetKey', null, global);
goog.exportSymbol('proto.protocol.AssetStore', null, global);
goog.exportSymbol('proto.protocol.BenchSegmentRange', null, global);
goog.exportSymbol('proto.protocol.ConsensusValue', null, global);
goog.exportSymbol('proto.protocol.ConsensusValueBody', null, global);
goog.exportSymbol('proto.protocol.ConsensusValueHeader', null, global);
goog.exportSymbol('proto.protocol.ConsensusValueValidation', null, global);
goog.exportSymbol('proto.protocol.Contract', null, global);
goog.exportSymbol('proto.protocol.Contract.ContractType', null, global);
goog.exportSymbol('proto.protocol.ControlledArea', null, global);
goog.exportSymbol('proto.protocol.ControlledArea.STATUS_FALG', null, global);
goog.exportSymbol('proto.protocol.ControlledArea.TRUST_FLAG', null, global);
goog.exportSymbol('proto.protocol.DAG', null, global);
goog.exportSymbol('proto.protocol.DomainAccountHash', null, global);
goog.exportSymbol('proto.protocol.DomainConfig', null, global);
goog.exportSymbol('proto.protocol.DomainTxCount', null, global);
goog.exportSymbol('proto.protocol.DomainTxs', null, global);
goog.exportSymbol('proto.protocol.DomainTxsIndex', null, global);
goog.exportSymbol('proto.protocol.Ledger', null, global);
goog.exportSymbol('proto.protocol.LedgerHeader', null, global);
goog.exportSymbol('proto.protocol.Limit', null, global);
goog.exportSymbol('proto.protocol.Neighbor', null, global);
goog.exportSymbol('proto.protocol.Operation', null, global);
goog.exportSymbol('proto.protocol.Operation.Type', null, global);
goog.exportSymbol('proto.protocol.OperationAuthorizeTransfer', null, global);
goog.exportSymbol('proto.protocol.OperationCreateAccount', null, global);
goog.exportSymbol('proto.protocol.OperationLog', null, global);
goog.exportSymbol('proto.protocol.OperationPayCoin', null, global);
goog.exportSymbol('proto.protocol.OperationSetControlledArea', null, global);
goog.exportSymbol('proto.protocol.OperationSetMetadata', null, global);
goog.exportSymbol('proto.protocol.OperationSetPrivilege', null, global);
goog.exportSymbol('proto.protocol.OperationSetSignerWeight', null, global);
goog.exportSymbol('proto.protocol.OperationSetThreshold', null, global);
goog.exportSymbol('proto.protocol.OperationTypeThreshold', null, global);
goog.exportSymbol('proto.protocol.OperationUpgradeContract', null, global);
goog.exportSymbol('proto.protocol.Signer', null, global);
goog.exportSymbol('proto.protocol.Signer.Limit', null, global);
goog.exportSymbol('proto.protocol.Transaction', null, global);
goog.exportSymbol('proto.protocol.Transaction.Limit', null, global);
goog.exportSymbol('proto.protocol.Transaction.NonceType', null, global);
goog.exportSymbol('proto.protocol.TransactionEnv', null, global);
goog.exportSymbol('proto.protocol.TransactionEnvSet', null, global);
goog.exportSymbol('proto.protocol.TransactionEnvStore', null, global);
goog.exportSymbol('proto.protocol.Trigger', null, global);
goog.exportSymbol('proto.protocol.Trigger.OperationTrigger', null, global);
goog.exportSymbol('proto.protocol.Trigger.TransactionType', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.Account = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.Account, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.Account.displayName = 'proto.protocol.Account';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.Account.prototype.toObject = function(opt_includeInstance) {
return proto.protocol.Account.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.Account} msg The msg instance to transform.
* @return {!Object}
*/
proto.protocol.Account.toObject = function(includeInstance, msg) {
var f, obj = {
address: msg.getAddress(),
nonce: msg.getNonce(),
priv: (f = msg.getPriv()) && proto.protocol.AccountPrivilege.toObject(includeInstance, f),
metadatasHash: msg.getMetadatasHash_asB64(),
assetsHash: msg.getAssetsHash_asB64(),
contract: (f = msg.getContract()) && proto.protocol.Contract.toObject(includeInstance, f),
balance: msg.getBalance(),
controlledArea: (f = msg.getControlledArea()) && proto.protocol.ControlledArea.toObject(includeInstance, f),
publicKey: msg.getPublicKey(),
authTransfer: msg.getAuthTransfer()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.Account}
*/
proto.protocol.Account.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.Account;
return proto.protocol.Account.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.Account} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.Account}
*/
proto.protocol.Account.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setAddress(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setNonce(value);
break;
case 3:
var value = new proto.protocol.AccountPrivilege;
reader.readMessage(value,proto.protocol.AccountPrivilege.deserializeBinaryFromReader);
msg.setPriv(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setMetadatasHash(value);
break;
case 5:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setAssetsHash(value);
break;
case 6:
var value = new proto.protocol.Contract;
reader.readMessage(value,proto.protocol.Contract.deserializeBinaryFromReader);
msg.setContract(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setBalance(value);
break;
case 8:
var value = new proto.protocol.ControlledArea;
reader.readMessage(value,proto.protocol.ControlledArea.deserializeBinaryFromReader);
msg.setControlledArea(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setPublicKey(value);
break;
case 10:
var value = /** @type {boolean} */ (reader.readBool());
msg.setAuthTransfer(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.protocol.Account} message
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.Account.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.Account.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.Account.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getAddress();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getNonce();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
f = this.getPriv();
if (f != null) {
writer.writeMessage(
3,
f,
proto.protocol.AccountPrivilege.serializeBinaryToWriter
);
}
f = this.getMetadatasHash_asU8();
if (f.length > 0) {
writer.writeBytes(
4,
f
);
}
f = this.getAssetsHash_asU8();
if (f.length > 0) {
writer.writeBytes(
5,
f
);
}
f = this.getContract();
if (f != null) {
writer.writeMessage(
6,
f,
proto.protocol.Contract.serializeBinaryToWriter
);
}
f = this.getBalance();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
f = this.getControlledArea();
if (f != null) {
writer.writeMessage(
8,
f,
proto.protocol.ControlledArea.serializeBinaryToWriter
);
}
f = this.getPublicKey();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = this.getAuthTransfer();
if (f) {
writer.writeBool(
10,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.protocol.Account} The clone.
*/
proto.protocol.Account.prototype.cloneMessage = function() {
return /** @type {!proto.protocol.Account} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string address = 1;
* @return {string}
*/
proto.protocol.Account.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.protocol.Account.prototype.setAddress = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional int64 nonce = 2;
* @return {number}
*/
proto.protocol.Account.prototype.getNonce = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {number} value */
proto.protocol.Account.prototype.setNonce = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional AccountPrivilege priv = 3;
* @return {proto.protocol.AccountPrivilege}
*/
proto.protocol.Account.prototype.getPriv = function() {
return /** @type{proto.protocol.AccountPrivilege} */ (
jspb.Message.getWrapperField(this, proto.protocol.AccountPrivilege, 3));
};
/** @param {proto.protocol.AccountPrivilege|undefined} value */
proto.protocol.Account.prototype.setPriv = function(value) {
jspb.Message.setWrapperField(this, 3, value);
};
proto.protocol.Account.prototype.clearPriv = function() {
this.setPriv(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.protocol.Account.prototype.hasPriv = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional bytes metadatas_hash = 4;
* @return {!(string|Uint8Array)}
*/
proto.protocol.Account.prototype.getMetadatasHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};
/**
* optional bytes metadatas_hash = 4;
* This is a type-conversion wrapper around `getMetadatasHash()`
* @return {string}
*/
proto.protocol.Account.prototype.getMetadatasHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getMetadatasHash()));
};
/**
* optional bytes metadatas_hash = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getMetadatasHash()`
* @return {!Uint8Array}
*/
proto.protocol.Account.prototype.getMetadatasHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getMetadatasHash()));
};
/** @param {!(string|Uint8Array)} value */
proto.protocol.Account.prototype.setMetadatasHash = function(value) {
jspb.Message.setField(this, 4, value);
};
/**
* optional bytes assets_hash = 5;
* @return {!(string|Uint8Array)}
*/
proto.protocol.Account.prototype.getAssetsHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 5, ""));
};
/**
* optional bytes assets_hash = 5;
* This is a type-conversion wrapper around `getAssetsHash()`
* @return {string}
*/
proto.protocol.Account.prototype.getAssetsHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getAssetsHash()));
};
/**
* optional bytes assets_hash = 5;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getAssetsHash()`
* @return {!Uint8Array}
*/
proto.protocol.Account.prototype.getAssetsHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getAssetsHash()));
};
/** @param {!(string|Uint8Array)} value */
proto.protocol.Account.prototype.setAssetsHash = function(value) {
jspb.Message.setField(this, 5, value);
};
/**
* optional Contract contract = 6;
* @return {proto.protocol.Contract}
*/
proto.protocol.Account.prototype.getContract = function() {
return /** @type{proto.protocol.Contract} */ (
jspb.Message.getWrapperField(this, proto.protocol.Contract, 6));
};
/** @param {proto.protocol.Contract|undefined} value */
proto.protocol.Account.prototype.setContract = function(value) {
jspb.Message.setWrapperField(this, 6, value);
};
proto.protocol.Account.prototype.clearContract = function() {
this.setContract(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.protocol.Account.prototype.hasContract = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional int64 balance = 7;
* @return {number}
*/
proto.protocol.Account.prototype.getBalance = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0));
};
/** @param {number} value */
proto.protocol.Account.prototype.setBalance = function(value) {
jspb.Message.setField(this, 7, value);
};
/**
* optional ControlledArea controlled_area = 8;
* @return {proto.protocol.ControlledArea}
*/
proto.protocol.Account.prototype.getControlledArea = function() {
return /** @type{proto.protocol.ControlledArea} */ (
jspb.Message.getWrapperField(this, proto.protocol.ControlledArea, 8));
};
/** @param {proto.protocol.ControlledArea|undefined} value */
proto.protocol.Account.prototype.setControlledArea = function(value) {
jspb.Message.setWrapperField(this, 8, value);
};
proto.protocol.Account.prototype.clearControlledArea = function() {
this.setControlledArea(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.protocol.Account.prototype.hasControlledArea = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional string public_key = 9;
* @return {string}
*/
proto.protocol.Account.prototype.getPublicKey = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 9, ""));
};
/** @param {string} value */
proto.protocol.Account.prototype.setPublicKey = function(value) {
jspb.Message.setField(this, 9, value);
};
/**
* optional bool auth_transfer = 10;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.protocol.Account.prototype.getAuthTransfer = function() {
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 10, false));
};
/** @param {boolean} value */
proto.protocol.Account.prototype.setAuthTransfer = function(value) {
jspb.Message.setField(this, 10, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.ControlledArea = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.ControlledArea.repeatedFields_, null);
};
goog.inherits(proto.protocol.ControlledArea, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.ControlledArea.displayName = 'proto.protocol.ControlledArea';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.protocol.ControlledArea.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.ControlledArea.prototype.toObject = function(opt_includeInstance) {
return proto.protocol.ControlledArea.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.ControlledArea} msg The msg instance to transform.
* @return {!Object}
*/
proto.protocol.ControlledArea.toObject = function(includeInstance, msg) {
var f, obj = {
trusted: msg.getTrusted(),
status: msg.getStatus(),
attributesList: jspb.Message.toObjectList(msg.getAttributesList(),
common_pb.KeyPair.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.ControlledArea}
*/
proto.protocol.ControlledArea.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.ControlledArea;
return proto.protocol.ControlledArea.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.ControlledArea} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.ControlledArea}
*/
proto.protocol.ControlledArea.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.ControlledArea.TRUST_FLAG} */ (reader.readEnum());
msg.setTrusted(value);
break;
case 2:
var value = /** @type {!proto.protocol.ControlledArea.STATUS_FALG} */ (reader.readEnum());
msg.setStatus(value);
break;
case 3:
var value = new common_pb.KeyPair;
reader.readMessage(value,common_pb.KeyPair.deserializeBinaryFromReader);
msg.getAttributesList().push(value);
msg.setAttributesList(msg.getAttributesList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.protocol.ControlledArea} message
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.ControlledArea.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.ControlledArea.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.ControlledArea.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getTrusted();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = this.getStatus();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = this.getAttributesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
common_pb.KeyPair.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.protocol.ControlledArea} The clone.
*/
proto.protocol.ControlledArea.prototype.cloneMessage = function() {
return /** @type {!proto.protocol.ControlledArea} */ (jspb.Message.cloneMessage(this));
};
/**
* optional TRUST_FLAG trusted = 1;
* @return {!proto.protocol.ControlledArea.TRUST_FLAG}
*/
proto.protocol.ControlledArea.prototype.getTrusted = function() {
return /** @type {!proto.protocol.ControlledArea.TRUST_FLAG} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {!proto.protocol.ControlledArea.TRUST_FLAG} value */
proto.protocol.ControlledArea.prototype.setTrusted = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional STATUS_FALG status = 2;
* @return {!proto.protocol.ControlledArea.STATUS_FALG}
*/
proto.protocol.ControlledArea.prototype.getStatus = function() {
return /** @type {!proto.protocol.ControlledArea.STATUS_FALG} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {!proto.protocol.ControlledArea.STATUS_FALG} value */
proto.protocol.ControlledArea.prototype.setStatus = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* repeated KeyPair attributes = 3;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.protocol.KeyPair>}
*/
proto.protocol.ControlledArea.prototype.getAttributesList = function() {
return /** @type{!Array.<!proto.protocol.KeyPair>} */ (
jspb.Message.getRepeatedWrapperField(this, common_pb.KeyPair, 3));
};
/** @param {Array.<!proto.protocol.KeyPair>} value */
proto.protocol.ControlledArea.prototype.setAttributesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
proto.protocol.ControlledArea.prototype.clearAttributesList = function() {
this.setAttributesList([]);
};
/**
* @enum {number}
*/
proto.protocol.ControlledArea.TRUST_FLAG = {
UNCERT: 0,
TRUSTED: 1,
UNTRUSTED: 2
};
/**
* @enum {number}
*/
proto.protocol.ControlledArea.STATUS_FALG = {
ENABLED: 0,
DISABLED: 1
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.AssetKey = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.AssetKey, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.AssetKey.displayName = 'proto.protocol.AssetKey';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.AssetKey.prototype.toObject = function(opt_includeInstance) {
return proto.protocol.AssetKey.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.AssetKey} msg The msg instance to transform.
* @return {!Object}
*/
proto.protocol.AssetKey.toObject = function(includeInstance, msg) {
var f, obj = {
issuer: msg.getIssuer(),
code: msg.getCode(),
type: msg.getType()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.AssetKey}
*/
proto.protocol.AssetKey.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.AssetKey;
return proto.protocol.AssetKey.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.AssetKey} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.AssetKey}
*/
proto.protocol.AssetKey.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setIssuer(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setCode(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setType(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.protocol.AssetKey} message
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.AssetKey.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.AssetKey.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.AssetKey.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getIssuer();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getCode();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getType();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.protocol.AssetKey} The clone.
*/
proto.protocol.AssetKey.prototype.cloneMessage = function() {
return /** @type {!proto.protocol.AssetKey} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string issuer = 1;
* @return {string}
*/
proto.protocol.AssetKey.prototype.getIssuer = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.protocol.AssetKey.prototype.setIssuer = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional string code = 2;
* @return {string}
*/
proto.protocol.AssetKey.prototype.getCode = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.protocol.AssetKey.prototype.setCode = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional int32 type = 3;
* @return {number}
*/
proto.protocol.AssetKey.prototype.getType = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {number} value */
proto.protocol.AssetKey.prototype.setType = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.Asset = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.Asset, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.Asset.displayName = 'proto.protocol.Asset';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.Asset.prototype.toObject = function(opt_includeInstance) {
return proto.protocol.Asset.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.Asset} msg The msg instance to transform.
* @return {!Object}
*/
proto.protocol.Asset.toObject = function(includeInstance, msg) {
var f, obj = {
key: (f = msg.getKey()) && proto.protocol.AssetKey.toObject(includeInstance, f),
amount: msg.getAmount()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.Asset}
*/
proto.protocol.Asset.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.Asset;
return proto.protocol.Asset.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.Asset} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.Asset}
*/
proto.protocol.Asset.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.protocol.AssetKey;
reader.readMessage(value,proto.protocol.AssetKey.deserializeBinaryFromReader);
msg.setKey(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmount(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.protocol.Asset} message
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.Asset.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.Asset.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.Asset.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getKey();
if (f != null) {
writer.writeMessage(
1,
f,
proto.protocol.AssetKey.serializeBinaryToWriter
);
}
f = this.getAmount();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.protocol.Asset} The clone.
*/
proto.protocol.Asset.prototype.cloneMessage = function() {
return /** @type {!proto.protocol.Asset} */ (jspb.Message.cloneMessage(this));
};
/**
* optional AssetKey key = 1;
* @return {proto.protocol.AssetKey}
*/
proto.protocol.Asset.prototype.getKey = function() {
return /** @type{proto.protocol.AssetKey} */ (
jspb.Message.getWrapperField(this, proto.protocol.AssetKey, 1));
};
/** @param {proto.protocol.AssetKey|undefined} value */
proto.protocol.Asset.prototype.setKey = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.protocol.Asset.prototype.clearKey = function() {
this.setKey(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.protocol.Asset.prototype.hasKey = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional int64 amount = 2;
* @return {number}
*/
proto.protocol.Asset.prototype.getAmount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {number} value */
proto.protocol.Asset.prototype.setAmount = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.AssetStore = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.AssetStore, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.AssetStore.displayName = 'proto.protocol.AssetStore';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.AssetStore.prototype.toObject = function(opt_includeInstance) {
return proto.protocol.AssetStore.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.AssetStore} msg The msg instance to transform.
* @return {!Object}
*/
proto.protocol.AssetStore.toObject = function(includeInstance, msg) {
var f, obj = {
key: (f = msg.getKey()) && proto.protocol.AssetKey.toObject(includeInstance, f),
amount: msg.getAmount()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.AssetStore}
*/
proto.protocol.AssetStore.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.AssetStore;
return proto.protocol.AssetStore.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.AssetStore} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.AssetStore}
*/
proto.protocol.AssetStore.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.protocol.AssetKey;
reader.readMessage(value,proto.protocol.AssetKey.deserializeBinaryFromReader);
msg.setKey(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setAmount(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.protocol.AssetStore} message
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.AssetStore.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.AssetStore.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.AssetStore.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getKey();
if (f != null) {
writer.writeMessage(
1,
f,
proto.protocol.AssetKey.serializeBinaryToWriter
);
}
f = this.getAmount();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.protocol.AssetStore} The clone.
*/
proto.protocol.AssetStore.prototype.cloneMessage = function() {
return /** @type {!proto.protocol.AssetStore} */ (jspb.Message.cloneMessage(this));
};
/**
* optional AssetKey key = 1;
* @return {proto.protocol.AssetKey}
*/
proto.protocol.AssetStore.prototype.getKey = function() {
return /** @type{proto.protocol.AssetKey} */ (
jspb.Message.getWrapperField(this, proto.protocol.AssetKey, 1));
};
/** @param {proto.protocol.AssetKey|undefined} value */
proto.protocol.AssetStore.prototype.setKey = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.protocol.AssetStore.prototype.clearKey = function() {
this.setKey(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.protocol.AssetStore.prototype.hasKey = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional int64 amount = 2;
* @return {number}
*/
proto.protocol.AssetStore.prototype.getAmount = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
};
/** @param {number} value */
proto.protocol.AssetStore.prototype.setAmount = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.DomainAccountHash = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.DomainAccountHash, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.DomainAccountHash.displayName = 'proto.protocol.DomainAccountHash';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.DomainAccountHash.prototype.toObject = function(opt_includeInstance) {
return proto.protocol.DomainAccountHash.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.DomainAccountHash} msg The msg instance to transform.
* @return {!Object}
*/
proto.protocol.DomainAccountHash.toObject = function(includeInstance, msg) {
var f, obj = {
domainId: msg.getDomainId(),
accountTreeHash: msg.getAccountTreeHash_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.DomainAccountHash}
*/
proto.protocol.DomainAccountHash.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.DomainAccountHash;
return proto.protocol.DomainAccountHash.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.DomainAccountHash} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.DomainAccountHash}
*/
proto.protocol.DomainAccountHash.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setDomainId(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setAccountTreeHash(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.protocol.DomainAccountHash} message
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.DomainAccountHash.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.DomainAccountHash.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.protocol.DomainAccountHash.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getDomainId();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
f = this.getAccountTreeHash_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.protocol.DomainAccountHash} The clone.
*/
proto.protocol.DomainAccountHash.prototype.cloneMessage = function() {
return /** @type {!proto.protocol.DomainAccountHash} */ (jspb.Message.cloneMessage(this));
};
/**
* optional int32 domain_id = 1;
* @return {number}
*/
proto.protocol.DomainAccountHash.prototype.getDomainId = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
/** @param {number} value */
proto.protocol.DomainAccountHash.prototype.setDomainId = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* optional bytes account_tree_hash = 2;
* @return {!(string|Uint8Array)}
*/
proto.protocol.DomainAccountHash.prototype.getAccountTreeHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/**
* optional bytes account_tree_hash = 2;
* This is a type-conversion wrapper around `getAccountTreeHash()`
* @return {string}
*/
proto.protocol.DomainAccountHash.prototype.getAccountTreeHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getAccountTreeHash()));
};
/**
* optional bytes account_tree_hash = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getAccountTreeHash()`
* @return {!Uint8Array}
*/
proto.protocol.DomainAccountHash.prototype.getAccountTreeHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getAccountTreeHash()));
};
/** @param {!(string|Uint8Array)} value */
proto.protocol.DomainAccountHash.prototype.setAccountTreeHash = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.LedgerHeader = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0,