@ocap/proto 1.18.142 → 1.18.143

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -185,6 +185,14 @@ input RequestListStakesInput {
185
185
  assetFilter: AssetFilterInput
186
186
  }
187
187
 
188
+ input RequestListTokenFlowsInput {
189
+ paging: PageInput
190
+ accountAddress: String
191
+ tokenAddress: String
192
+ depth: Uint32
193
+ direction: TokenFlowDirection
194
+ }
195
+
188
196
  input RequestListTokensInput {
189
197
  paging: PageInput
190
198
  issuerAddress: String
@@ -225,6 +233,11 @@ input RequestSendTxInput {
225
233
  commit: Boolean
226
234
  }
227
235
 
236
+ input RequestVerifyAccountRiskInput {
237
+ accountAddress: String
238
+ tokenAddress: String
239
+ }
240
+
228
241
  input RollupFilterInput {
229
242
  rollups: [String!]
230
243
  }
@@ -935,6 +948,13 @@ type IndexedStakeState {
935
948
  data: Any
936
949
  }
937
950
 
951
+ type IndexedTokenFlow {
952
+ value: String
953
+ hash: String
954
+ from: String
955
+ to: String
956
+ }
957
+
938
958
  type IndexedTokenInput {
939
959
  address: String
940
960
  value: String
@@ -1397,6 +1417,12 @@ type ResponseListStakes {
1397
1417
  stakes: [IndexedStakeState!]
1398
1418
  }
1399
1419
 
1420
+ type ResponseListTokenFlows {
1421
+ code: StatusCode
1422
+ page: PageInfo
1423
+ data: [IndexedTokenFlow!]
1424
+ }
1425
+
1400
1426
  type ResponseListTokens {
1401
1427
  code: StatusCode
1402
1428
  page: PageInfo
@@ -1426,6 +1452,12 @@ type ResponseSendTx {
1426
1452
  hash: String
1427
1453
  }
1428
1454
 
1455
+ type ResponseVerifyAccountRisk {
1456
+ code: StatusCode
1457
+ page: PageInfo
1458
+ data: VerifyAccountRiskResult
1459
+ }
1460
+
1429
1461
  type ResumeRollupTx {
1430
1462
  rollup: String
1431
1463
  data: Any
@@ -1796,6 +1828,21 @@ type VaultConfig {
1796
1828
  txGas: [String!]
1797
1829
  }
1798
1830
 
1831
+ type VerifyAccountRiskResult {
1832
+ risky: Boolean
1833
+ reason: String
1834
+ data: VerifyAccountRiskResult_BalanceRisky
1835
+ }
1836
+
1837
+ type VerifyAccountRiskResult_BalanceRisky {
1838
+ address: String
1839
+ balance: String
1840
+ transferIn: String
1841
+ transferOut: String
1842
+ accountCount: Uint32
1843
+ txCount: Uint32
1844
+ }
1845
+
1799
1846
  type WalletType {
1800
1847
  pk: KeyType
1801
1848
  hash: HashType
@@ -1970,6 +2017,11 @@ enum StatusCode {
1970
2017
  TIMEOUT
1971
2018
  }
1972
2019
 
2020
+ enum TokenFlowDirection {
2021
+ IN
2022
+ OUT
2023
+ }
2024
+
1973
2025
  enum UpgradeAction {
1974
2026
  VERIFY
1975
2027
  BACKUP
@@ -2053,6 +2105,8 @@ type Mutation {
2053
2105
  queryListDelegations(in: RequestListDelegationsInput): ResponseListDelegations
2054
2106
  querySearch(in: RequestSearchInput): ResponseSearch
2055
2107
  queryEstimateGas(in: RequestEstimateGasInput): ResponseEstimateGas
2108
+ queryListTokenFlows(in: RequestListTokenFlowsInput): ResponseListTokenFlows
2109
+ queryVerifyAccountRisk(in: RequestVerifyAccountRiskInput): ResponseVerifyAccountRisk
2056
2110
  mutationSendTx(in: RequestSendTxInput): ResponseSendTx
2057
2111
  }
2058
2112
 
package/lib/gen/spec.json CHANGED
@@ -1,4 +1,7 @@
1
1
  {
2
+ "options": {
3
+ "syntax": "proto3"
4
+ },
2
5
  "nested": {
3
6
  "ocap": {
4
7
  "nested": {
@@ -1135,6 +1138,71 @@
1135
1138
  }
1136
1139
  }
1137
1140
  },
1141
+ "RequestListTokenFlows": {
1142
+ "fields": {
1143
+ "paging": {
1144
+ "type": "Page",
1145
+ "id": 1
1146
+ },
1147
+ "accountAddress": {
1148
+ "type": "string",
1149
+ "id": 2
1150
+ },
1151
+ "tokenAddress": {
1152
+ "type": "string",
1153
+ "id": 3
1154
+ },
1155
+ "depth": {
1156
+ "type": "uint32",
1157
+ "id": 4
1158
+ },
1159
+ "direction": {
1160
+ "type": "TokenFlowDirection",
1161
+ "id": 5
1162
+ }
1163
+ }
1164
+ },
1165
+ "ResponseListTokenFlows": {
1166
+ "fields": {
1167
+ "code": {
1168
+ "type": "StatusCode",
1169
+ "id": 1
1170
+ },
1171
+ "page": {
1172
+ "type": "PageInfo",
1173
+ "id": 2
1174
+ },
1175
+ "data": {
1176
+ "rule": "repeated",
1177
+ "type": "IndexedTokenFlow",
1178
+ "id": 3
1179
+ }
1180
+ }
1181
+ },
1182
+ "RequestVerifyAccountRisk": {
1183
+ "fields": {
1184
+ "accountAddress": {
1185
+ "type": "string",
1186
+ "id": 1
1187
+ },
1188
+ "tokenAddress": {
1189
+ "type": "string",
1190
+ "id": 2
1191
+ }
1192
+ }
1193
+ },
1194
+ "ResponseVerifyAccountRisk": {
1195
+ "fields": {
1196
+ "code": {
1197
+ "type": "StatusCode",
1198
+ "id": 1
1199
+ },
1200
+ "data": {
1201
+ "type": "VerifyAccountRiskResult",
1202
+ "id": 2
1203
+ }
1204
+ }
1205
+ },
1138
1206
  "BigUint": {
1139
1207
  "fields": {
1140
1208
  "value": {
@@ -5672,6 +5740,78 @@
5672
5740
  }
5673
5741
  }
5674
5742
  },
5743
+ "TokenFlowDirection": {
5744
+ "values": {
5745
+ "IN": 0,
5746
+ "OUT": 1
5747
+ }
5748
+ },
5749
+ "IndexedTokenFlow": {
5750
+ "fields": {
5751
+ "value": {
5752
+ "type": "string",
5753
+ "id": 1
5754
+ },
5755
+ "hash": {
5756
+ "type": "string",
5757
+ "id": 2
5758
+ },
5759
+ "from": {
5760
+ "type": "string",
5761
+ "id": 3
5762
+ },
5763
+ "to": {
5764
+ "type": "string",
5765
+ "id": 4
5766
+ }
5767
+ }
5768
+ },
5769
+ "VerifyAccountRiskResult": {
5770
+ "fields": {
5771
+ "isRisky": {
5772
+ "type": "bool",
5773
+ "id": 1
5774
+ },
5775
+ "reason": {
5776
+ "type": "string",
5777
+ "id": 2
5778
+ },
5779
+ "data": {
5780
+ "type": "BalanceRisky",
5781
+ "id": 3
5782
+ }
5783
+ },
5784
+ "nested": {
5785
+ "BalanceRisky": {
5786
+ "fields": {
5787
+ "address": {
5788
+ "type": "string",
5789
+ "id": 1
5790
+ },
5791
+ "balance": {
5792
+ "type": "string",
5793
+ "id": 2
5794
+ },
5795
+ "transferIn": {
5796
+ "type": "string",
5797
+ "id": 3
5798
+ },
5799
+ "transferOut": {
5800
+ "type": "string",
5801
+ "id": 4
5802
+ },
5803
+ "accountCount": {
5804
+ "type": "uint32",
5805
+ "id": 5
5806
+ },
5807
+ "txCount": {
5808
+ "type": "uint32",
5809
+ "id": 6
5810
+ }
5811
+ }
5812
+ }
5813
+ }
5814
+ },
5675
5815
  "Query": {
5676
5816
  "methods": {
5677
5817
  "getTx": {
@@ -5841,6 +5981,14 @@
5841
5981
  "estimateGas": {
5842
5982
  "requestType": "RequestEstimateGas",
5843
5983
  "responseType": "ResponseEstimateGas"
5984
+ },
5985
+ "listTokenFlows": {
5986
+ "requestType": "RequestListTokenFlows",
5987
+ "responseType": "ResponseListTokenFlows"
5988
+ },
5989
+ "verifyAccountRisk": {
5990
+ "requestType": "RequestVerifyAccountRisk",
5991
+ "responseType": "ResponseVerifyAccountRisk"
5844
5992
  }
5845
5993
  }
5846
5994
  },
@@ -49,6 +49,7 @@ goog.exportSymbol('proto.ocap.IndexedRollupBlock', null, root);
49
49
  goog.exportSymbol('proto.ocap.IndexedRollupState', null, root);
50
50
  goog.exportSymbol('proto.ocap.IndexedRollupValidator', null, root);
51
51
  goog.exportSymbol('proto.ocap.IndexedStakeState', null, root);
52
+ goog.exportSymbol('proto.ocap.IndexedTokenFlow', null, root);
52
53
  goog.exportSymbol('proto.ocap.IndexedTokenState', null, root);
53
54
  goog.exportSymbol('proto.ocap.IndexedTransaction', null, root);
54
55
  goog.exportSymbol('proto.ocap.Page', null, root);
@@ -60,12 +61,15 @@ goog.exportSymbol('proto.ocap.SearchResult', null, root);
60
61
  goog.exportSymbol('proto.ocap.StakeFilter', null, root);
61
62
  goog.exportSymbol('proto.ocap.TimeFilter', null, root);
62
63
  goog.exportSymbol('proto.ocap.TokenFilter', null, root);
64
+ goog.exportSymbol('proto.ocap.TokenFlowDirection', null, root);
63
65
  goog.exportSymbol('proto.ocap.TokenInfo', null, root);
64
66
  goog.exportSymbol('proto.ocap.TxFilter', null, root);
65
67
  goog.exportSymbol('proto.ocap.TypeFilter', null, root);
66
68
  goog.exportSymbol('proto.ocap.ValidatorFilter', null, root);
67
69
  goog.exportSymbol('proto.ocap.Validity', null, root);
68
70
  goog.exportSymbol('proto.ocap.ValidityFilter', null, root);
71
+ goog.exportSymbol('proto.ocap.VerifyAccountRiskResult', null, root);
72
+ goog.exportSymbol('proto.ocap.VerifyAccountRiskResult.BalanceRisky', null, root);
69
73
  /**
70
74
  * Generated by JsPbCodeGenerator.
71
75
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -759,6 +763,69 @@ if (goog.DEBUG && !COMPILED) {
759
763
  */
760
764
  proto.ocap.IndexedDelegationState.displayName = 'proto.ocap.IndexedDelegationState';
761
765
  }
766
+ /**
767
+ * Generated by JsPbCodeGenerator.
768
+ * @param {Array=} opt_data Optional initial data array, typically from a
769
+ * server response, or constructed directly in Javascript. The array is used
770
+ * in place and becomes part of the constructed object. It is not cloned.
771
+ * If no data is provided, the constructed object will be empty, but still
772
+ * valid.
773
+ * @extends {jspb.Message}
774
+ * @constructor
775
+ */
776
+ proto.ocap.IndexedTokenFlow = function(opt_data) {
777
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
778
+ };
779
+ goog.inherits(proto.ocap.IndexedTokenFlow, jspb.Message);
780
+ if (goog.DEBUG && !COMPILED) {
781
+ /**
782
+ * @public
783
+ * @override
784
+ */
785
+ proto.ocap.IndexedTokenFlow.displayName = 'proto.ocap.IndexedTokenFlow';
786
+ }
787
+ /**
788
+ * Generated by JsPbCodeGenerator.
789
+ * @param {Array=} opt_data Optional initial data array, typically from a
790
+ * server response, or constructed directly in Javascript. The array is used
791
+ * in place and becomes part of the constructed object. It is not cloned.
792
+ * If no data is provided, the constructed object will be empty, but still
793
+ * valid.
794
+ * @extends {jspb.Message}
795
+ * @constructor
796
+ */
797
+ proto.ocap.VerifyAccountRiskResult = function(opt_data) {
798
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
799
+ };
800
+ goog.inherits(proto.ocap.VerifyAccountRiskResult, jspb.Message);
801
+ if (goog.DEBUG && !COMPILED) {
802
+ /**
803
+ * @public
804
+ * @override
805
+ */
806
+ proto.ocap.VerifyAccountRiskResult.displayName = 'proto.ocap.VerifyAccountRiskResult';
807
+ }
808
+ /**
809
+ * Generated by JsPbCodeGenerator.
810
+ * @param {Array=} opt_data Optional initial data array, typically from a
811
+ * server response, or constructed directly in Javascript. The array is used
812
+ * in place and becomes part of the constructed object. It is not cloned.
813
+ * If no data is provided, the constructed object will be empty, but still
814
+ * valid.
815
+ * @extends {jspb.Message}
816
+ * @constructor
817
+ */
818
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky = function(opt_data) {
819
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
820
+ };
821
+ goog.inherits(proto.ocap.VerifyAccountRiskResult.BalanceRisky, jspb.Message);
822
+ if (goog.DEBUG && !COMPILED) {
823
+ /**
824
+ * @public
825
+ * @override
826
+ */
827
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.displayName = 'proto.ocap.VerifyAccountRiskResult.BalanceRisky';
828
+ }
762
829
 
763
830
 
764
831
 
@@ -11723,22 +11790,741 @@ proto.ocap.IndexedDelegationState.prototype.hasData = function() {
11723
11790
  };
11724
11791
 
11725
11792
 
11793
+
11794
+
11795
+
11796
+ if (jspb.Message.GENERATE_TO_OBJECT) {
11726
11797
  /**
11727
- * @enum {number}
11798
+ * Creates an object representation of this proto.
11799
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
11800
+ * Optional fields that are not set will be set to undefined.
11801
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
11802
+ * For the list of reserved names please see:
11803
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
11804
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
11805
+ * JSPB instance for transitional soy proto support:
11806
+ * http://goto/soy-param-migration
11807
+ * @return {!Object}
11728
11808
  */
11729
- proto.ocap.Direction = {
11730
- MUTUAL: 0,
11731
- ONE_WAY: 1,
11732
- UNION: 2
11809
+ proto.ocap.IndexedTokenFlow.prototype.toObject = function(opt_includeInstance) {
11810
+ return proto.ocap.IndexedTokenFlow.toObject(opt_includeInstance, this);
11733
11811
  };
11734
11812
 
11813
+
11735
11814
  /**
11736
- * @enum {number}
11815
+ * Static version of the {@see toObject} method.
11816
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
11817
+ * the JSPB instance for transitional soy proto support:
11818
+ * http://goto/soy-param-migration
11819
+ * @param {!proto.ocap.IndexedTokenFlow} msg The msg instance to transform.
11820
+ * @return {!Object}
11821
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11737
11822
  */
11738
- proto.ocap.Validity = {
11739
- BOTH: 0,
11740
- VALID: 1,
11741
- INVALID: 2
11823
+ proto.ocap.IndexedTokenFlow.toObject = function(includeInstance, msg) {
11824
+ var f, obj = {
11825
+ value: jspb.Message.getFieldWithDefault(msg, 1, ""),
11826
+ hash: jspb.Message.getFieldWithDefault(msg, 2, ""),
11827
+ from: jspb.Message.getFieldWithDefault(msg, 3, ""),
11828
+ to: jspb.Message.getFieldWithDefault(msg, 4, "")
11829
+ };
11830
+
11831
+ if (includeInstance) {
11832
+ obj.$jspbMessageInstance = msg;
11833
+ }
11834
+ return obj;
11835
+ };
11836
+ }
11837
+
11838
+
11839
+ /**
11840
+ * Deserializes binary data (in protobuf wire format).
11841
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
11842
+ * @return {!proto.ocap.IndexedTokenFlow}
11843
+ */
11844
+ proto.ocap.IndexedTokenFlow.deserializeBinary = function(bytes) {
11845
+ var reader = new jspb.BinaryReader(bytes);
11846
+ var msg = new proto.ocap.IndexedTokenFlow;
11847
+ return proto.ocap.IndexedTokenFlow.deserializeBinaryFromReader(msg, reader);
11848
+ };
11849
+
11850
+
11851
+ /**
11852
+ * Deserializes binary data (in protobuf wire format) from the
11853
+ * given reader into the given message object.
11854
+ * @param {!proto.ocap.IndexedTokenFlow} msg The message object to deserialize into.
11855
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
11856
+ * @return {!proto.ocap.IndexedTokenFlow}
11857
+ */
11858
+ proto.ocap.IndexedTokenFlow.deserializeBinaryFromReader = function(msg, reader) {
11859
+ while (reader.nextField()) {
11860
+ if (reader.isEndGroup()) {
11861
+ break;
11862
+ }
11863
+ var field = reader.getFieldNumber();
11864
+ switch (field) {
11865
+ case 1:
11866
+ var value = /** @type {string} */ (reader.readString());
11867
+ msg.setValue(value);
11868
+ break;
11869
+ case 2:
11870
+ var value = /** @type {string} */ (reader.readString());
11871
+ msg.setHash(value);
11872
+ break;
11873
+ case 3:
11874
+ var value = /** @type {string} */ (reader.readString());
11875
+ msg.setFrom(value);
11876
+ break;
11877
+ case 4:
11878
+ var value = /** @type {string} */ (reader.readString());
11879
+ msg.setTo(value);
11880
+ break;
11881
+ default:
11882
+ reader.skipField();
11883
+ break;
11884
+ }
11885
+ }
11886
+ return msg;
11887
+ };
11888
+
11889
+
11890
+ /**
11891
+ * Serializes the message to binary data (in protobuf wire format).
11892
+ * @return {!Uint8Array}
11893
+ */
11894
+ proto.ocap.IndexedTokenFlow.prototype.serializeBinary = function() {
11895
+ var writer = new jspb.BinaryWriter();
11896
+ proto.ocap.IndexedTokenFlow.serializeBinaryToWriter(this, writer);
11897
+ return writer.getResultBuffer();
11898
+ };
11899
+
11900
+
11901
+ /**
11902
+ * Serializes the given message to binary data (in protobuf wire
11903
+ * format), writing to the given BinaryWriter.
11904
+ * @param {!proto.ocap.IndexedTokenFlow} message
11905
+ * @param {!jspb.BinaryWriter} writer
11906
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11907
+ */
11908
+ proto.ocap.IndexedTokenFlow.serializeBinaryToWriter = function(message, writer) {
11909
+ var f = undefined;
11910
+ f = message.getValue();
11911
+ if (f.length > 0) {
11912
+ writer.writeString(
11913
+ 1,
11914
+ f
11915
+ );
11916
+ }
11917
+ f = message.getHash();
11918
+ if (f.length > 0) {
11919
+ writer.writeString(
11920
+ 2,
11921
+ f
11922
+ );
11923
+ }
11924
+ f = message.getFrom();
11925
+ if (f.length > 0) {
11926
+ writer.writeString(
11927
+ 3,
11928
+ f
11929
+ );
11930
+ }
11931
+ f = message.getTo();
11932
+ if (f.length > 0) {
11933
+ writer.writeString(
11934
+ 4,
11935
+ f
11936
+ );
11937
+ }
11938
+ };
11939
+
11940
+
11941
+ /**
11942
+ * optional string value = 1;
11943
+ * @return {string}
11944
+ */
11945
+ proto.ocap.IndexedTokenFlow.prototype.getValue = function() {
11946
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
11947
+ };
11948
+
11949
+
11950
+ /**
11951
+ * @param {string} value
11952
+ * @return {!proto.ocap.IndexedTokenFlow} returns this
11953
+ */
11954
+ proto.ocap.IndexedTokenFlow.prototype.setValue = function(value) {
11955
+ return jspb.Message.setProto3StringField(this, 1, value);
11956
+ };
11957
+
11958
+
11959
+ /**
11960
+ * optional string hash = 2;
11961
+ * @return {string}
11962
+ */
11963
+ proto.ocap.IndexedTokenFlow.prototype.getHash = function() {
11964
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
11965
+ };
11966
+
11967
+
11968
+ /**
11969
+ * @param {string} value
11970
+ * @return {!proto.ocap.IndexedTokenFlow} returns this
11971
+ */
11972
+ proto.ocap.IndexedTokenFlow.prototype.setHash = function(value) {
11973
+ return jspb.Message.setProto3StringField(this, 2, value);
11974
+ };
11975
+
11976
+
11977
+ /**
11978
+ * optional string from = 3;
11979
+ * @return {string}
11980
+ */
11981
+ proto.ocap.IndexedTokenFlow.prototype.getFrom = function() {
11982
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
11983
+ };
11984
+
11985
+
11986
+ /**
11987
+ * @param {string} value
11988
+ * @return {!proto.ocap.IndexedTokenFlow} returns this
11989
+ */
11990
+ proto.ocap.IndexedTokenFlow.prototype.setFrom = function(value) {
11991
+ return jspb.Message.setProto3StringField(this, 3, value);
11992
+ };
11993
+
11994
+
11995
+ /**
11996
+ * optional string to = 4;
11997
+ * @return {string}
11998
+ */
11999
+ proto.ocap.IndexedTokenFlow.prototype.getTo = function() {
12000
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
12001
+ };
12002
+
12003
+
12004
+ /**
12005
+ * @param {string} value
12006
+ * @return {!proto.ocap.IndexedTokenFlow} returns this
12007
+ */
12008
+ proto.ocap.IndexedTokenFlow.prototype.setTo = function(value) {
12009
+ return jspb.Message.setProto3StringField(this, 4, value);
12010
+ };
12011
+
12012
+
12013
+
12014
+
12015
+
12016
+ if (jspb.Message.GENERATE_TO_OBJECT) {
12017
+ /**
12018
+ * Creates an object representation of this proto.
12019
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
12020
+ * Optional fields that are not set will be set to undefined.
12021
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
12022
+ * For the list of reserved names please see:
12023
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
12024
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
12025
+ * JSPB instance for transitional soy proto support:
12026
+ * http://goto/soy-param-migration
12027
+ * @return {!Object}
12028
+ */
12029
+ proto.ocap.VerifyAccountRiskResult.prototype.toObject = function(opt_includeInstance) {
12030
+ return proto.ocap.VerifyAccountRiskResult.toObject(opt_includeInstance, this);
12031
+ };
12032
+
12033
+
12034
+ /**
12035
+ * Static version of the {@see toObject} method.
12036
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
12037
+ * the JSPB instance for transitional soy proto support:
12038
+ * http://goto/soy-param-migration
12039
+ * @param {!proto.ocap.VerifyAccountRiskResult} msg The msg instance to transform.
12040
+ * @return {!Object}
12041
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12042
+ */
12043
+ proto.ocap.VerifyAccountRiskResult.toObject = function(includeInstance, msg) {
12044
+ var f, obj = {
12045
+ isRisky: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
12046
+ reason: jspb.Message.getFieldWithDefault(msg, 2, ""),
12047
+ data: (f = msg.getData()) && proto.ocap.VerifyAccountRiskResult.BalanceRisky.toObject(includeInstance, f)
12048
+ };
12049
+
12050
+ if (includeInstance) {
12051
+ obj.$jspbMessageInstance = msg;
12052
+ }
12053
+ return obj;
12054
+ };
12055
+ }
12056
+
12057
+
12058
+ /**
12059
+ * Deserializes binary data (in protobuf wire format).
12060
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
12061
+ * @return {!proto.ocap.VerifyAccountRiskResult}
12062
+ */
12063
+ proto.ocap.VerifyAccountRiskResult.deserializeBinary = function(bytes) {
12064
+ var reader = new jspb.BinaryReader(bytes);
12065
+ var msg = new proto.ocap.VerifyAccountRiskResult;
12066
+ return proto.ocap.VerifyAccountRiskResult.deserializeBinaryFromReader(msg, reader);
12067
+ };
12068
+
12069
+
12070
+ /**
12071
+ * Deserializes binary data (in protobuf wire format) from the
12072
+ * given reader into the given message object.
12073
+ * @param {!proto.ocap.VerifyAccountRiskResult} msg The message object to deserialize into.
12074
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
12075
+ * @return {!proto.ocap.VerifyAccountRiskResult}
12076
+ */
12077
+ proto.ocap.VerifyAccountRiskResult.deserializeBinaryFromReader = function(msg, reader) {
12078
+ while (reader.nextField()) {
12079
+ if (reader.isEndGroup()) {
12080
+ break;
12081
+ }
12082
+ var field = reader.getFieldNumber();
12083
+ switch (field) {
12084
+ case 1:
12085
+ var value = /** @type {boolean} */ (reader.readBool());
12086
+ msg.setIsRisky(value);
12087
+ break;
12088
+ case 2:
12089
+ var value = /** @type {string} */ (reader.readString());
12090
+ msg.setReason(value);
12091
+ break;
12092
+ case 3:
12093
+ var value = new proto.ocap.VerifyAccountRiskResult.BalanceRisky;
12094
+ reader.readMessage(value,proto.ocap.VerifyAccountRiskResult.BalanceRisky.deserializeBinaryFromReader);
12095
+ msg.setData(value);
12096
+ break;
12097
+ default:
12098
+ reader.skipField();
12099
+ break;
12100
+ }
12101
+ }
12102
+ return msg;
12103
+ };
12104
+
12105
+
12106
+ /**
12107
+ * Serializes the message to binary data (in protobuf wire format).
12108
+ * @return {!Uint8Array}
12109
+ */
12110
+ proto.ocap.VerifyAccountRiskResult.prototype.serializeBinary = function() {
12111
+ var writer = new jspb.BinaryWriter();
12112
+ proto.ocap.VerifyAccountRiskResult.serializeBinaryToWriter(this, writer);
12113
+ return writer.getResultBuffer();
12114
+ };
12115
+
12116
+
12117
+ /**
12118
+ * Serializes the given message to binary data (in protobuf wire
12119
+ * format), writing to the given BinaryWriter.
12120
+ * @param {!proto.ocap.VerifyAccountRiskResult} message
12121
+ * @param {!jspb.BinaryWriter} writer
12122
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12123
+ */
12124
+ proto.ocap.VerifyAccountRiskResult.serializeBinaryToWriter = function(message, writer) {
12125
+ var f = undefined;
12126
+ f = message.getIsRisky();
12127
+ if (f) {
12128
+ writer.writeBool(
12129
+ 1,
12130
+ f
12131
+ );
12132
+ }
12133
+ f = message.getReason();
12134
+ if (f.length > 0) {
12135
+ writer.writeString(
12136
+ 2,
12137
+ f
12138
+ );
12139
+ }
12140
+ f = message.getData();
12141
+ if (f != null) {
12142
+ writer.writeMessage(
12143
+ 3,
12144
+ f,
12145
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.serializeBinaryToWriter
12146
+ );
12147
+ }
12148
+ };
12149
+
12150
+
12151
+
12152
+
12153
+
12154
+ if (jspb.Message.GENERATE_TO_OBJECT) {
12155
+ /**
12156
+ * Creates an object representation of this proto.
12157
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
12158
+ * Optional fields that are not set will be set to undefined.
12159
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
12160
+ * For the list of reserved names please see:
12161
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
12162
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
12163
+ * JSPB instance for transitional soy proto support:
12164
+ * http://goto/soy-param-migration
12165
+ * @return {!Object}
12166
+ */
12167
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.toObject = function(opt_includeInstance) {
12168
+ return proto.ocap.VerifyAccountRiskResult.BalanceRisky.toObject(opt_includeInstance, this);
12169
+ };
12170
+
12171
+
12172
+ /**
12173
+ * Static version of the {@see toObject} method.
12174
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
12175
+ * the JSPB instance for transitional soy proto support:
12176
+ * http://goto/soy-param-migration
12177
+ * @param {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} msg The msg instance to transform.
12178
+ * @return {!Object}
12179
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12180
+ */
12181
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.toObject = function(includeInstance, msg) {
12182
+ var f, obj = {
12183
+ address: jspb.Message.getFieldWithDefault(msg, 1, ""),
12184
+ balance: jspb.Message.getFieldWithDefault(msg, 2, ""),
12185
+ transferIn: jspb.Message.getFieldWithDefault(msg, 3, ""),
12186
+ transferOut: jspb.Message.getFieldWithDefault(msg, 4, ""),
12187
+ accountCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
12188
+ txCount: jspb.Message.getFieldWithDefault(msg, 6, 0)
12189
+ };
12190
+
12191
+ if (includeInstance) {
12192
+ obj.$jspbMessageInstance = msg;
12193
+ }
12194
+ return obj;
12195
+ };
12196
+ }
12197
+
12198
+
12199
+ /**
12200
+ * Deserializes binary data (in protobuf wire format).
12201
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
12202
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky}
12203
+ */
12204
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.deserializeBinary = function(bytes) {
12205
+ var reader = new jspb.BinaryReader(bytes);
12206
+ var msg = new proto.ocap.VerifyAccountRiskResult.BalanceRisky;
12207
+ return proto.ocap.VerifyAccountRiskResult.BalanceRisky.deserializeBinaryFromReader(msg, reader);
12208
+ };
12209
+
12210
+
12211
+ /**
12212
+ * Deserializes binary data (in protobuf wire format) from the
12213
+ * given reader into the given message object.
12214
+ * @param {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} msg The message object to deserialize into.
12215
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
12216
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky}
12217
+ */
12218
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.deserializeBinaryFromReader = function(msg, reader) {
12219
+ while (reader.nextField()) {
12220
+ if (reader.isEndGroup()) {
12221
+ break;
12222
+ }
12223
+ var field = reader.getFieldNumber();
12224
+ switch (field) {
12225
+ case 1:
12226
+ var value = /** @type {string} */ (reader.readString());
12227
+ msg.setAddress(value);
12228
+ break;
12229
+ case 2:
12230
+ var value = /** @type {string} */ (reader.readString());
12231
+ msg.setBalance(value);
12232
+ break;
12233
+ case 3:
12234
+ var value = /** @type {string} */ (reader.readString());
12235
+ msg.setTransferIn(value);
12236
+ break;
12237
+ case 4:
12238
+ var value = /** @type {string} */ (reader.readString());
12239
+ msg.setTransferOut(value);
12240
+ break;
12241
+ case 5:
12242
+ var value = /** @type {number} */ (reader.readUint32());
12243
+ msg.setAccountCount(value);
12244
+ break;
12245
+ case 6:
12246
+ var value = /** @type {number} */ (reader.readUint32());
12247
+ msg.setTxCount(value);
12248
+ break;
12249
+ default:
12250
+ reader.skipField();
12251
+ break;
12252
+ }
12253
+ }
12254
+ return msg;
12255
+ };
12256
+
12257
+
12258
+ /**
12259
+ * Serializes the message to binary data (in protobuf wire format).
12260
+ * @return {!Uint8Array}
12261
+ */
12262
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.serializeBinary = function() {
12263
+ var writer = new jspb.BinaryWriter();
12264
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.serializeBinaryToWriter(this, writer);
12265
+ return writer.getResultBuffer();
12266
+ };
12267
+
12268
+
12269
+ /**
12270
+ * Serializes the given message to binary data (in protobuf wire
12271
+ * format), writing to the given BinaryWriter.
12272
+ * @param {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} message
12273
+ * @param {!jspb.BinaryWriter} writer
12274
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12275
+ */
12276
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.serializeBinaryToWriter = function(message, writer) {
12277
+ var f = undefined;
12278
+ f = message.getAddress();
12279
+ if (f.length > 0) {
12280
+ writer.writeString(
12281
+ 1,
12282
+ f
12283
+ );
12284
+ }
12285
+ f = message.getBalance();
12286
+ if (f.length > 0) {
12287
+ writer.writeString(
12288
+ 2,
12289
+ f
12290
+ );
12291
+ }
12292
+ f = message.getTransferIn();
12293
+ if (f.length > 0) {
12294
+ writer.writeString(
12295
+ 3,
12296
+ f
12297
+ );
12298
+ }
12299
+ f = message.getTransferOut();
12300
+ if (f.length > 0) {
12301
+ writer.writeString(
12302
+ 4,
12303
+ f
12304
+ );
12305
+ }
12306
+ f = message.getAccountCount();
12307
+ if (f !== 0) {
12308
+ writer.writeUint32(
12309
+ 5,
12310
+ f
12311
+ );
12312
+ }
12313
+ f = message.getTxCount();
12314
+ if (f !== 0) {
12315
+ writer.writeUint32(
12316
+ 6,
12317
+ f
12318
+ );
12319
+ }
12320
+ };
12321
+
12322
+
12323
+ /**
12324
+ * optional string address = 1;
12325
+ * @return {string}
12326
+ */
12327
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.getAddress = function() {
12328
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
12329
+ };
12330
+
12331
+
12332
+ /**
12333
+ * @param {string} value
12334
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} returns this
12335
+ */
12336
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.setAddress = function(value) {
12337
+ return jspb.Message.setProto3StringField(this, 1, value);
12338
+ };
12339
+
12340
+
12341
+ /**
12342
+ * optional string balance = 2;
12343
+ * @return {string}
12344
+ */
12345
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.getBalance = function() {
12346
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
12347
+ };
12348
+
12349
+
12350
+ /**
12351
+ * @param {string} value
12352
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} returns this
12353
+ */
12354
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.setBalance = function(value) {
12355
+ return jspb.Message.setProto3StringField(this, 2, value);
12356
+ };
12357
+
12358
+
12359
+ /**
12360
+ * optional string transfer_in = 3;
12361
+ * @return {string}
12362
+ */
12363
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.getTransferIn = function() {
12364
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
12365
+ };
12366
+
12367
+
12368
+ /**
12369
+ * @param {string} value
12370
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} returns this
12371
+ */
12372
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.setTransferIn = function(value) {
12373
+ return jspb.Message.setProto3StringField(this, 3, value);
12374
+ };
12375
+
12376
+
12377
+ /**
12378
+ * optional string transfer_out = 4;
12379
+ * @return {string}
12380
+ */
12381
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.getTransferOut = function() {
12382
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
12383
+ };
12384
+
12385
+
12386
+ /**
12387
+ * @param {string} value
12388
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} returns this
12389
+ */
12390
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.setTransferOut = function(value) {
12391
+ return jspb.Message.setProto3StringField(this, 4, value);
12392
+ };
12393
+
12394
+
12395
+ /**
12396
+ * optional uint32 account_count = 5;
12397
+ * @return {number}
12398
+ */
12399
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.getAccountCount = function() {
12400
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
12401
+ };
12402
+
12403
+
12404
+ /**
12405
+ * @param {number} value
12406
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} returns this
12407
+ */
12408
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.setAccountCount = function(value) {
12409
+ return jspb.Message.setProto3IntField(this, 5, value);
12410
+ };
12411
+
12412
+
12413
+ /**
12414
+ * optional uint32 tx_count = 6;
12415
+ * @return {number}
12416
+ */
12417
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.getTxCount = function() {
12418
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
12419
+ };
12420
+
12421
+
12422
+ /**
12423
+ * @param {number} value
12424
+ * @return {!proto.ocap.VerifyAccountRiskResult.BalanceRisky} returns this
12425
+ */
12426
+ proto.ocap.VerifyAccountRiskResult.BalanceRisky.prototype.setTxCount = function(value) {
12427
+ return jspb.Message.setProto3IntField(this, 6, value);
12428
+ };
12429
+
12430
+
12431
+ /**
12432
+ * optional bool is_risky = 1;
12433
+ * @return {boolean}
12434
+ */
12435
+ proto.ocap.VerifyAccountRiskResult.prototype.getIsRisky = function() {
12436
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
12437
+ };
12438
+
12439
+
12440
+ /**
12441
+ * @param {boolean} value
12442
+ * @return {!proto.ocap.VerifyAccountRiskResult} returns this
12443
+ */
12444
+ proto.ocap.VerifyAccountRiskResult.prototype.setIsRisky = function(value) {
12445
+ return jspb.Message.setProto3BooleanField(this, 1, value);
12446
+ };
12447
+
12448
+
12449
+ /**
12450
+ * optional string reason = 2;
12451
+ * @return {string}
12452
+ */
12453
+ proto.ocap.VerifyAccountRiskResult.prototype.getReason = function() {
12454
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
12455
+ };
12456
+
12457
+
12458
+ /**
12459
+ * @param {string} value
12460
+ * @return {!proto.ocap.VerifyAccountRiskResult} returns this
12461
+ */
12462
+ proto.ocap.VerifyAccountRiskResult.prototype.setReason = function(value) {
12463
+ return jspb.Message.setProto3StringField(this, 2, value);
12464
+ };
12465
+
12466
+
12467
+ /**
12468
+ * optional BalanceRisky data = 3;
12469
+ * @return {?proto.ocap.VerifyAccountRiskResult.BalanceRisky}
12470
+ */
12471
+ proto.ocap.VerifyAccountRiskResult.prototype.getData = function() {
12472
+ return /** @type{?proto.ocap.VerifyAccountRiskResult.BalanceRisky} */ (
12473
+ jspb.Message.getWrapperField(this, proto.ocap.VerifyAccountRiskResult.BalanceRisky, 3));
12474
+ };
12475
+
12476
+
12477
+ /**
12478
+ * @param {?proto.ocap.VerifyAccountRiskResult.BalanceRisky|undefined} value
12479
+ * @return {!proto.ocap.VerifyAccountRiskResult} returns this
12480
+ */
12481
+ proto.ocap.VerifyAccountRiskResult.prototype.setData = function(value) {
12482
+ return jspb.Message.setWrapperField(this, 3, value);
12483
+ };
12484
+
12485
+
12486
+ /**
12487
+ * Clears the message field making it undefined.
12488
+ * @return {!proto.ocap.VerifyAccountRiskResult} returns this
12489
+ */
12490
+ proto.ocap.VerifyAccountRiskResult.prototype.clearData = function() {
12491
+ return this.setData(undefined);
12492
+ };
12493
+
12494
+
12495
+ /**
12496
+ * Returns whether this field is set.
12497
+ * @return {boolean}
12498
+ */
12499
+ proto.ocap.VerifyAccountRiskResult.prototype.hasData = function() {
12500
+ return jspb.Message.getField(this, 3) != null;
12501
+ };
12502
+
12503
+
12504
+ /**
12505
+ * @enum {number}
12506
+ */
12507
+ proto.ocap.Direction = {
12508
+ MUTUAL: 0,
12509
+ ONE_WAY: 1,
12510
+ UNION: 2
12511
+ };
12512
+
12513
+ /**
12514
+ * @enum {number}
12515
+ */
12516
+ proto.ocap.Validity = {
12517
+ BOTH: 0,
12518
+ VALID: 1,
12519
+ INVALID: 2
12520
+ };
12521
+
12522
+ /**
12523
+ * @enum {number}
12524
+ */
12525
+ proto.ocap.TokenFlowDirection = {
12526
+ IN: 0,
12527
+ OUT: 1
11742
12528
  };
11743
12529
 
11744
12530
  goog.object.extend(exports, proto.ocap);
package/lib/index.d.ts CHANGED
@@ -189,6 +189,11 @@ declare namespace Enums {
189
189
  INVALID = 2,
190
190
  }
191
191
 
192
+ export enum TokenFlowDirection {
193
+ IN = 0,
194
+ OUT = 1,
195
+ }
196
+
192
197
  export enum SupportedTxs {
193
198
  0 = AccountMigrateTx,
194
199
  1 = AcquireAssetV2Tx,
@@ -242,6 +247,7 @@ declare namespace Enums {
242
247
  ProtocolStatus: typeof Enums.ProtocolStatus;
243
248
  Direction: typeof Enums.Direction;
244
249
  Validity: typeof Enums.Validity;
250
+ TokenFlowDirection: typeof Enums.TokenFlowDirection;
245
251
  SupportedTxs: typeof Enums.SupportedTxs;
246
252
  SupportedStakes: typeof Enums.SupportedStakes;
247
253
  }
@@ -432,6 +438,11 @@ declare namespace Messages {
432
438
  2 = INVALID,
433
439
  }
434
440
 
441
+ export enum TokenFlowDirection {
442
+ 0 = IN,
443
+ 1 = OUT,
444
+ }
445
+
435
446
  export interface main {
436
447
  StatusCode: typeof Messages.StatusCode;
437
448
  KeyType: typeof Messages.KeyType;
@@ -445,5 +456,6 @@ declare namespace Messages {
445
456
  ProtocolStatus: typeof Messages.ProtocolStatus;
446
457
  Direction: typeof Messages.Direction;
447
458
  Validity: typeof Messages.Validity;
459
+ TokenFlowDirection: typeof Messages.TokenFlowDirection;
448
460
  }
449
461
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/proto",
3
3
  "description": "Static modules generated from forge-sdk protobuf files",
4
- "version": "1.18.142",
4
+ "version": "1.18.143",
5
5
  "author": {
6
6
  "name": "wangshijun",
7
7
  "email": "shijun@arcblock.io",
@@ -48,5 +48,5 @@
48
48
  "debug": "^4.3.6",
49
49
  "lodash": "^4.17.21"
50
50
  },
51
- "gitHead": "fa18a9eddbb0cad69398c69c7930018593f4fb31"
51
+ "gitHead": "d60db9ab9a62de1d99cf1fba59866592860bed22"
52
52
  }