@arcblock/forge-proto
Advanced tools
Comparing version 0.8.0 to 0.8.3
@@ -57,2 +57,6 @@ /** | ||
INVALID_FORGE_STATE: 38, | ||
EXPIRED_ASSET: 39, | ||
UNTRANSFERRABLE_ASSET: 40, | ||
READONLY_ASSET: 41, | ||
ACTIVATED_ASSET: 42, | ||
FORBIDDEN: 403, | ||
@@ -79,2 +83,3 @@ INTERNAL: 500, | ||
APPLICATION: 24, | ||
ACTIVATE_ASSET: 25, | ||
ACCOUNT_STATE: 129, | ||
@@ -81,0 +86,0 @@ ASSET_STATE: 130, |
@@ -73,2 +73,13 @@ // GENERATED CODE -- DO NOT EDIT! | ||
function serialize_forge_abi_RequestGetAssets(arg) { | ||
if (!(arg instanceof rpc_pb.RequestGetAssets)) { | ||
throw new Error('Expected argument of type forge_abi.RequestGetAssets'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_forge_abi_RequestGetAssets(buffer_arg) { | ||
return rpc_pb.RequestGetAssets.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_forge_abi_RequestGetBlock(arg) { | ||
@@ -162,2 +173,24 @@ if (!(arg instanceof rpc_pb.RequestGetBlock)) { | ||
function serialize_forge_abi_RequestGetStakes(arg) { | ||
if (!(arg instanceof rpc_pb.RequestGetStakes)) { | ||
throw new Error('Expected argument of type forge_abi.RequestGetStakes'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_forge_abi_RequestGetStakes(buffer_arg) { | ||
return rpc_pb.RequestGetStakes.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_forge_abi_RequestGetTopAccounts(arg) { | ||
if (!(arg instanceof rpc_pb.RequestGetTopAccounts)) { | ||
throw new Error('Expected argument of type forge_abi.RequestGetTopAccounts'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_forge_abi_RequestGetTopAccounts(buffer_arg) { | ||
return rpc_pb.RequestGetTopAccounts.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_forge_abi_RequestGetTx(arg) { | ||
@@ -416,2 +449,13 @@ if (!(arg instanceof rpc_pb.RequestGetTx)) { | ||
function serialize_forge_abi_ResponseGetAssets(arg) { | ||
if (!(arg instanceof rpc_pb.ResponseGetAssets)) { | ||
throw new Error('Expected argument of type forge_abi.ResponseGetAssets'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_forge_abi_ResponseGetAssets(buffer_arg) { | ||
return rpc_pb.ResponseGetAssets.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_forge_abi_ResponseGetBlock(arg) { | ||
@@ -505,2 +549,24 @@ if (!(arg instanceof rpc_pb.ResponseGetBlock)) { | ||
function serialize_forge_abi_ResponseGetStakes(arg) { | ||
if (!(arg instanceof rpc_pb.ResponseGetStakes)) { | ||
throw new Error('Expected argument of type forge_abi.ResponseGetStakes'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_forge_abi_ResponseGetStakes(buffer_arg) { | ||
return rpc_pb.ResponseGetStakes.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_forge_abi_ResponseGetTopAccounts(arg) { | ||
if (!(arg instanceof rpc_pb.ResponseGetTopAccounts)) { | ||
throw new Error('Expected argument of type forge_abi.ResponseGetTopAccounts'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_forge_abi_ResponseGetTopAccounts(buffer_arg) { | ||
return rpc_pb.ResponseGetTopAccounts.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_forge_abi_ResponseGetTx(arg) { | ||
@@ -1067,4 +1133,37 @@ if (!(arg instanceof rpc_pb.ResponseGetTx)) { | ||
}, | ||
get_assets: { | ||
path: '/forge_abi.StatisticRpc/get_assets', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: rpc_pb.RequestGetAssets, | ||
responseType: rpc_pb.ResponseGetAssets, | ||
requestSerialize: serialize_forge_abi_RequestGetAssets, | ||
requestDeserialize: deserialize_forge_abi_RequestGetAssets, | ||
responseSerialize: serialize_forge_abi_ResponseGetAssets, | ||
responseDeserialize: deserialize_forge_abi_ResponseGetAssets, | ||
}, | ||
get_stakes: { | ||
path: '/forge_abi.StatisticRpc/get_stakes', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: rpc_pb.RequestGetStakes, | ||
responseType: rpc_pb.ResponseGetStakes, | ||
requestSerialize: serialize_forge_abi_RequestGetStakes, | ||
requestDeserialize: deserialize_forge_abi_RequestGetStakes, | ||
responseSerialize: serialize_forge_abi_ResponseGetStakes, | ||
responseDeserialize: deserialize_forge_abi_ResponseGetStakes, | ||
}, | ||
get_top_accounts: { | ||
path: '/forge_abi.StatisticRpc/get_top_accounts', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: rpc_pb.RequestGetTopAccounts, | ||
responseType: rpc_pb.ResponseGetTopAccounts, | ||
requestSerialize: serialize_forge_abi_RequestGetTopAccounts, | ||
requestDeserialize: deserialize_forge_abi_RequestGetTopAccounts, | ||
responseSerialize: serialize_forge_abi_ResponseGetTopAccounts, | ||
responseDeserialize: deserialize_forge_abi_ResponseGetTopAccounts, | ||
}, | ||
}); | ||
exports.StatisticRpcClient = grpc.makeGenericClientConstructor(StatisticRpcService); |
@@ -15,2 +15,3 @@ /** | ||
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); | ||
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); | ||
var type_pb = require('./type_pb.js'); | ||
@@ -648,2 +649,6 @@ goog.exportSymbol('proto.forge_abi.AccountState', null, global); | ||
readonly: jspb.Message.getFieldWithDefault(msg, 4, false), | ||
activated: jspb.Message.getFieldWithDefault(msg, 5, false), | ||
expiredAt: | ||
(f = msg.getExpiredAt()) && | ||
google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), | ||
stake: (f = msg.getStake()) && type_pb.StakeContext.toObject(includeInstance, f), | ||
@@ -702,2 +707,14 @@ context: (f = msg.getContext()) && type_pb.StateContext.toObject(includeInstance, f), | ||
break; | ||
case 5: | ||
var value = /** @type {boolean} */ (reader.readBool()); | ||
msg.setActivated(value); | ||
break; | ||
case 6: | ||
var value = new google_protobuf_timestamp_pb.Timestamp(); | ||
reader.readMessage( | ||
value, | ||
google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader | ||
); | ||
msg.setExpiredAt(value); | ||
break; | ||
case 13: | ||
@@ -761,2 +778,10 @@ var value = new type_pb.StakeContext(); | ||
} | ||
f = message.getActivated(); | ||
if (f) { | ||
writer.writeBool(5, f); | ||
} | ||
f = message.getExpiredAt(); | ||
if (f != null) { | ||
writer.writeMessage(6, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter); | ||
} | ||
f = message.getStake(); | ||
@@ -831,2 +856,46 @@ if (f != null) { | ||
/** | ||
* optional bool activated = 5; | ||
* 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.forge_abi.AssetState.prototype.getActivated = function() { | ||
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); | ||
}; | ||
/** @param {boolean} value */ | ||
proto.forge_abi.AssetState.prototype.setActivated = function(value) { | ||
jspb.Message.setField(this, 5, value); | ||
}; | ||
/** | ||
* optional google.protobuf.Timestamp expired_at = 6; | ||
* @return {?proto.google.protobuf.Timestamp} | ||
*/ | ||
proto.forge_abi.AssetState.prototype.getExpiredAt = function() { | ||
return /** @type{?proto.google.protobuf.Timestamp} */ (jspb.Message.getWrapperField( | ||
this, | ||
google_protobuf_timestamp_pb.Timestamp, | ||
6 | ||
)); | ||
}; | ||
/** @param {?proto.google.protobuf.Timestamp|undefined} value */ | ||
proto.forge_abi.AssetState.prototype.setExpiredAt = function(value) { | ||
jspb.Message.setWrapperField(this, 6, value); | ||
}; | ||
proto.forge_abi.AssetState.prototype.clearExpiredAt = function() { | ||
this.setExpiredAt(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.AssetState.prototype.hasExpiredAt = function() { | ||
return jspb.Message.getField(this, 6) != null; | ||
}; | ||
/** | ||
* optional StakeContext stake = 13; | ||
@@ -974,2 +1043,3 @@ * @return {?proto.forge_abi.StakeContext} | ||
forgeAppHash: msg.getForgeAppHash(), | ||
rootHashes: (f = msg.getRootHashes()) && type_pb.StateRoot.toObject(includeInstance, f), | ||
data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), | ||
@@ -1055,2 +1125,7 @@ }; | ||
break; | ||
case 8: | ||
var value = new type_pb.StateRoot(); | ||
reader.readMessage(value, type_pb.StateRoot.deserializeBinaryFromReader); | ||
msg.setRootHashes(value); | ||
break; | ||
case 15: | ||
@@ -1128,2 +1203,6 @@ var value = new google_protobuf_any_pb.Any(); | ||
} | ||
f = message.getRootHashes(); | ||
if (f != null) { | ||
writer.writeMessage(8, f, type_pb.StateRoot.serializeBinaryToWriter); | ||
} | ||
f = message.getData(); | ||
@@ -1275,2 +1354,31 @@ if (f != null) { | ||
/** | ||
* optional StateRoot root_hashes = 8; | ||
* @return {?proto.forge_abi.StateRoot} | ||
*/ | ||
proto.forge_abi.ForgeState.prototype.getRootHashes = function() { | ||
return /** @type{?proto.forge_abi.StateRoot} */ (jspb.Message.getWrapperField( | ||
this, | ||
type_pb.StateRoot, | ||
8 | ||
)); | ||
}; | ||
/** @param {?proto.forge_abi.StateRoot|undefined} value */ | ||
proto.forge_abi.ForgeState.prototype.setRootHashes = function(value) { | ||
jspb.Message.setWrapperField(this, 8, value); | ||
}; | ||
proto.forge_abi.ForgeState.prototype.clearRootHashes = function() { | ||
this.setRootHashes(undefined); | ||
}; | ||
/** | ||
* Returns whether this field is set. | ||
* @return {!boolean} | ||
*/ | ||
proto.forge_abi.ForgeState.prototype.hasRootHashes = function() { | ||
return jspb.Message.getField(this, 8) != null; | ||
}; | ||
/** | ||
* optional google.protobuf.Any data = 15; | ||
@@ -1277,0 +1385,0 @@ * @return {?proto.google.protobuf.Any} |
{ | ||
"name": "@arcblock/forge-proto", | ||
"description": "Static modules generated from forge-sdk protobuf files", | ||
"version": "0.8.0", | ||
"version": "0.8.3", | ||
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)", | ||
@@ -58,3 +58,3 @@ "engines": { | ||
}, | ||
"gitHead": "e7f8f7a9b02fa0e69c95d93b09d19533ea27a631" | ||
"gitHead": "46d42dbfdca9e097492d9ed1659ecc7ce1cab5fe" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1475347
17
42110
9