protobuf-platform 1.2.717 → 1.2.718

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.717",
3
+ "version": "1.2.718",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -72,6 +72,8 @@ service Payment {
72
72
  rpc getUserCashbackPaymentOperands(GetUserCashbackPaymentOperandsRequest) returns (GetUserCashbackPaymentOperandsResponse);
73
73
  rpc getUserFinancialSummary(GetUserFinancialSummaryRequest) returns (GetUserFinancialSummaryResponse);
74
74
  rpc resolveGameWalletContext(ResolveGameWalletContextRequest) returns (ResolveGameWalletContextResponse);
75
+ // Capability boundary: old servers cannot silently ignore wallet-selection safety flags.
76
+ rpc selectWalletContext(ResolveGameWalletContextRequest) returns (ResolveGameWalletContextResponse);
75
77
  // Opt-in, commit-confirmed cross-currency gameplay. Legacy RPCs are unchanged.
76
78
  rpc registerGameplayPrecisionSession(RegisterGameplayPrecisionSessionRequest) returns (GameplayPrecisionResult);
77
79
  rpc executeGameplayPrecisionCommand(ExecuteGameplayPrecisionCommandRequest) returns (GameplayPrecisionResult);
@@ -1141,6 +1143,10 @@ message ResolveGameWalletContextRequest {
1141
1143
  optional bool include_bonus_balance = 3;
1142
1144
  // Explicit setup opt-in; never implies automatic enrollment of existing callers.
1143
1145
  optional bool prepare_financial_admission = 4;
1146
+ // Explicit preference is distinct from an immutable requested financial currency.
1147
+ optional string preferred_wallet_currency = 5;
1148
+ // Validate an actual wallet without creating one (including empty wallets).
1149
+ optional bool existing_wallet_only = 6;
1144
1150
  }
1145
1151
  message ResolveGameWalletContextResponse {
1146
1152
  int32 user_id = 1;
@@ -1151,6 +1157,15 @@ message ResolveGameWalletContextResponse {
1151
1157
  // Exact minor units in wallet_currency. Absent means unavailable; "0" is confirmed zero.
1152
1158
  optional string bonus_balance_minor = 6;
1153
1159
  optional FinancialAdmissionWalletContext financial_admission = 7;
1160
+ // Cash ledger less active monetary reservations; absent on older servers.
1161
+ optional string available_real_minor = 8;
1162
+ repeated WalletCashBalanceItem wallets = 9;
1163
+ }
1164
+ message WalletCashBalanceItem {
1165
+ string currency = 1;
1166
+ int32 currency_scale = 2;
1167
+ string balance_minor = 3;
1168
+ string available_real_minor = 4;
1154
1169
  }
1155
1170
  message FinancialAdmissionWalletContext {
1156
1171
  uint32 protocol_version = 1;
@@ -1920,6 +1920,18 @@ deleteSavedDepositCard: {
1920
1920
  responseSerialize: serialize_payment_ResolveGameWalletContextResponse,
1921
1921
  responseDeserialize: deserialize_payment_ResolveGameWalletContextResponse,
1922
1922
  },
1923
+ // Capability boundary: old servers cannot silently ignore wallet-selection safety flags.
1924
+ selectWalletContext: {
1925
+ path: '/payment.Payment/selectWalletContext',
1926
+ requestStream: false,
1927
+ responseStream: false,
1928
+ requestType: payment_pb.ResolveGameWalletContextRequest,
1929
+ responseType: payment_pb.ResolveGameWalletContextResponse,
1930
+ requestSerialize: serialize_payment_ResolveGameWalletContextRequest,
1931
+ requestDeserialize: deserialize_payment_ResolveGameWalletContextRequest,
1932
+ responseSerialize: serialize_payment_ResolveGameWalletContextResponse,
1933
+ responseDeserialize: deserialize_payment_ResolveGameWalletContextResponse,
1934
+ },
1923
1935
  // Opt-in, commit-confirmed cross-currency gameplay. Legacy RPCs are unchanged.
1924
1936
  registerGameplayPrecisionSession: {
1925
1937
  path: '/payment.Payment/registerGameplayPrecisionSession',
@@ -173,6 +173,7 @@ goog.exportSymbol('proto.payment.UserWalletOperationHistoryItemsResponse', null,
173
173
  goog.exportSymbol('proto.payment.UserWalletOperationHistoryReward', null, global);
174
174
  goog.exportSymbol('proto.payment.UserWithdrawalItem', null, global);
175
175
  goog.exportSymbol('proto.payment.UserWithdrawalItemsResponse', null, global);
176
+ goog.exportSymbol('proto.payment.WalletCashBalanceItem', null, global);
176
177
  goog.exportSymbol('proto.payment.WithdrawalItem', null, global);
177
178
  goog.exportSymbol('proto.payment.WithdrawalItemsResponse', null, global);
178
179
  goog.exportSymbol('proto.payment.WithdrawalResponse', null, global);
@@ -2353,7 +2354,7 @@ if (goog.DEBUG && !COMPILED) {
2353
2354
  * @constructor
2354
2355
  */
2355
2356
  proto.payment.ResolveGameWalletContextResponse = function(opt_data) {
2356
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
2357
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.payment.ResolveGameWalletContextResponse.repeatedFields_, null);
2357
2358
  };
2358
2359
  goog.inherits(proto.payment.ResolveGameWalletContextResponse, jspb.Message);
2359
2360
  if (goog.DEBUG && !COMPILED) {
@@ -2363,6 +2364,27 @@ if (goog.DEBUG && !COMPILED) {
2363
2364
  */
2364
2365
  proto.payment.ResolveGameWalletContextResponse.displayName = 'proto.payment.ResolveGameWalletContextResponse';
2365
2366
  }
2367
+ /**
2368
+ * Generated by JsPbCodeGenerator.
2369
+ * @param {Array=} opt_data Optional initial data array, typically from a
2370
+ * server response, or constructed directly in Javascript. The array is used
2371
+ * in place and becomes part of the constructed object. It is not cloned.
2372
+ * If no data is provided, the constructed object will be empty, but still
2373
+ * valid.
2374
+ * @extends {jspb.Message}
2375
+ * @constructor
2376
+ */
2377
+ proto.payment.WalletCashBalanceItem = function(opt_data) {
2378
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
2379
+ };
2380
+ goog.inherits(proto.payment.WalletCashBalanceItem, jspb.Message);
2381
+ if (goog.DEBUG && !COMPILED) {
2382
+ /**
2383
+ * @public
2384
+ * @override
2385
+ */
2386
+ proto.payment.WalletCashBalanceItem.displayName = 'proto.payment.WalletCashBalanceItem';
2387
+ }
2366
2388
  /**
2367
2389
  * Generated by JsPbCodeGenerator.
2368
2390
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -47256,7 +47278,9 @@ proto.payment.ResolveGameWalletContextRequest.toObject = function(includeInstanc
47256
47278
  userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
47257
47279
  walletCurrency: jspb.Message.getFieldWithDefault(msg, 2, ""),
47258
47280
  includeBonusBalance: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
47259
- prepareFinancialAdmission: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
47281
+ prepareFinancialAdmission: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
47282
+ preferredWalletCurrency: jspb.Message.getFieldWithDefault(msg, 5, ""),
47283
+ existingWalletOnly: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
47260
47284
  };
47261
47285
 
47262
47286
  if (includeInstance) {
@@ -47309,6 +47333,14 @@ proto.payment.ResolveGameWalletContextRequest.deserializeBinaryFromReader = func
47309
47333
  var value = /** @type {boolean} */ (reader.readBool());
47310
47334
  msg.setPrepareFinancialAdmission(value);
47311
47335
  break;
47336
+ case 5:
47337
+ var value = /** @type {string} */ (reader.readString());
47338
+ msg.setPreferredWalletCurrency(value);
47339
+ break;
47340
+ case 6:
47341
+ var value = /** @type {boolean} */ (reader.readBool());
47342
+ msg.setExistingWalletOnly(value);
47343
+ break;
47312
47344
  default:
47313
47345
  reader.skipField();
47314
47346
  break;
@@ -47366,6 +47398,20 @@ proto.payment.ResolveGameWalletContextRequest.serializeBinaryToWriter = function
47366
47398
  f
47367
47399
  );
47368
47400
  }
47401
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
47402
+ if (f != null) {
47403
+ writer.writeString(
47404
+ 5,
47405
+ f
47406
+ );
47407
+ }
47408
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 6));
47409
+ if (f != null) {
47410
+ writer.writeBool(
47411
+ 6,
47412
+ f
47413
+ );
47414
+ }
47369
47415
  };
47370
47416
 
47371
47417
 
@@ -47495,6 +47541,85 @@ proto.payment.ResolveGameWalletContextRequest.prototype.hasPrepareFinancialAdmis
47495
47541
  };
47496
47542
 
47497
47543
 
47544
+ /**
47545
+ * optional string preferred_wallet_currency = 5;
47546
+ * @return {string}
47547
+ */
47548
+ proto.payment.ResolveGameWalletContextRequest.prototype.getPreferredWalletCurrency = function() {
47549
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
47550
+ };
47551
+
47552
+
47553
+ /**
47554
+ * @param {string} value
47555
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
47556
+ */
47557
+ proto.payment.ResolveGameWalletContextRequest.prototype.setPreferredWalletCurrency = function(value) {
47558
+ return jspb.Message.setField(this, 5, value);
47559
+ };
47560
+
47561
+
47562
+ /**
47563
+ * Clears the field making it undefined.
47564
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
47565
+ */
47566
+ proto.payment.ResolveGameWalletContextRequest.prototype.clearPreferredWalletCurrency = function() {
47567
+ return jspb.Message.setField(this, 5, undefined);
47568
+ };
47569
+
47570
+
47571
+ /**
47572
+ * Returns whether this field is set.
47573
+ * @return {boolean}
47574
+ */
47575
+ proto.payment.ResolveGameWalletContextRequest.prototype.hasPreferredWalletCurrency = function() {
47576
+ return jspb.Message.getField(this, 5) != null;
47577
+ };
47578
+
47579
+
47580
+ /**
47581
+ * optional bool existing_wallet_only = 6;
47582
+ * @return {boolean}
47583
+ */
47584
+ proto.payment.ResolveGameWalletContextRequest.prototype.getExistingWalletOnly = function() {
47585
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
47586
+ };
47587
+
47588
+
47589
+ /**
47590
+ * @param {boolean} value
47591
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
47592
+ */
47593
+ proto.payment.ResolveGameWalletContextRequest.prototype.setExistingWalletOnly = function(value) {
47594
+ return jspb.Message.setField(this, 6, value);
47595
+ };
47596
+
47597
+
47598
+ /**
47599
+ * Clears the field making it undefined.
47600
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
47601
+ */
47602
+ proto.payment.ResolveGameWalletContextRequest.prototype.clearExistingWalletOnly = function() {
47603
+ return jspb.Message.setField(this, 6, undefined);
47604
+ };
47605
+
47606
+
47607
+ /**
47608
+ * Returns whether this field is set.
47609
+ * @return {boolean}
47610
+ */
47611
+ proto.payment.ResolveGameWalletContextRequest.prototype.hasExistingWalletOnly = function() {
47612
+ return jspb.Message.getField(this, 6) != null;
47613
+ };
47614
+
47615
+
47616
+
47617
+ /**
47618
+ * List of repeated fields within this message type.
47619
+ * @private {!Array<number>}
47620
+ * @const
47621
+ */
47622
+ proto.payment.ResolveGameWalletContextResponse.repeatedFields_ = [9];
47498
47623
 
47499
47624
 
47500
47625
 
@@ -47533,7 +47658,10 @@ proto.payment.ResolveGameWalletContextResponse.toObject = function(includeInstan
47533
47658
  balanceMinor: jspb.Message.getFieldWithDefault(msg, 4, "0"),
47534
47659
  balanceMajor: jspb.Message.getFieldWithDefault(msg, 5, ""),
47535
47660
  bonusBalanceMinor: jspb.Message.getFieldWithDefault(msg, 6, ""),
47536
- financialAdmission: (f = msg.getFinancialAdmission()) && proto.payment.FinancialAdmissionWalletContext.toObject(includeInstance, f)
47661
+ financialAdmission: (f = msg.getFinancialAdmission()) && proto.payment.FinancialAdmissionWalletContext.toObject(includeInstance, f),
47662
+ availableRealMinor: jspb.Message.getFieldWithDefault(msg, 8, ""),
47663
+ walletsList: jspb.Message.toObjectList(msg.getWalletsList(),
47664
+ proto.payment.WalletCashBalanceItem.toObject, includeInstance)
47537
47665
  };
47538
47666
 
47539
47667
  if (includeInstance) {
@@ -47599,6 +47727,15 @@ proto.payment.ResolveGameWalletContextResponse.deserializeBinaryFromReader = fun
47599
47727
  reader.readMessage(value,proto.payment.FinancialAdmissionWalletContext.deserializeBinaryFromReader);
47600
47728
  msg.setFinancialAdmission(value);
47601
47729
  break;
47730
+ case 8:
47731
+ var value = /** @type {string} */ (reader.readString());
47732
+ msg.setAvailableRealMinor(value);
47733
+ break;
47734
+ case 9:
47735
+ var value = new proto.payment.WalletCashBalanceItem;
47736
+ reader.readMessage(value,proto.payment.WalletCashBalanceItem.deserializeBinaryFromReader);
47737
+ msg.addWallets(value);
47738
+ break;
47602
47739
  default:
47603
47740
  reader.skipField();
47604
47741
  break;
@@ -47678,6 +47815,21 @@ proto.payment.ResolveGameWalletContextResponse.serializeBinaryToWriter = functio
47678
47815
  proto.payment.FinancialAdmissionWalletContext.serializeBinaryToWriter
47679
47816
  );
47680
47817
  }
47818
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
47819
+ if (f != null) {
47820
+ writer.writeString(
47821
+ 8,
47822
+ f
47823
+ );
47824
+ }
47825
+ f = message.getWalletsList();
47826
+ if (f.length > 0) {
47827
+ writer.writeRepeatedMessage(
47828
+ 9,
47829
+ f,
47830
+ proto.payment.WalletCashBalanceItem.serializeBinaryToWriter
47831
+ );
47832
+ }
47681
47833
  };
47682
47834
 
47683
47835
 
@@ -47844,6 +47996,300 @@ proto.payment.ResolveGameWalletContextResponse.prototype.hasFinancialAdmission =
47844
47996
  };
47845
47997
 
47846
47998
 
47999
+ /**
48000
+ * optional string available_real_minor = 8;
48001
+ * @return {string}
48002
+ */
48003
+ proto.payment.ResolveGameWalletContextResponse.prototype.getAvailableRealMinor = function() {
48004
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
48005
+ };
48006
+
48007
+
48008
+ /**
48009
+ * @param {string} value
48010
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
48011
+ */
48012
+ proto.payment.ResolveGameWalletContextResponse.prototype.setAvailableRealMinor = function(value) {
48013
+ return jspb.Message.setField(this, 8, value);
48014
+ };
48015
+
48016
+
48017
+ /**
48018
+ * Clears the field making it undefined.
48019
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
48020
+ */
48021
+ proto.payment.ResolveGameWalletContextResponse.prototype.clearAvailableRealMinor = function() {
48022
+ return jspb.Message.setField(this, 8, undefined);
48023
+ };
48024
+
48025
+
48026
+ /**
48027
+ * Returns whether this field is set.
48028
+ * @return {boolean}
48029
+ */
48030
+ proto.payment.ResolveGameWalletContextResponse.prototype.hasAvailableRealMinor = function() {
48031
+ return jspb.Message.getField(this, 8) != null;
48032
+ };
48033
+
48034
+
48035
+ /**
48036
+ * repeated WalletCashBalanceItem wallets = 9;
48037
+ * @return {!Array<!proto.payment.WalletCashBalanceItem>}
48038
+ */
48039
+ proto.payment.ResolveGameWalletContextResponse.prototype.getWalletsList = function() {
48040
+ return /** @type{!Array<!proto.payment.WalletCashBalanceItem>} */ (
48041
+ jspb.Message.getRepeatedWrapperField(this, proto.payment.WalletCashBalanceItem, 9));
48042
+ };
48043
+
48044
+
48045
+ /**
48046
+ * @param {!Array<!proto.payment.WalletCashBalanceItem>} value
48047
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
48048
+ */
48049
+ proto.payment.ResolveGameWalletContextResponse.prototype.setWalletsList = function(value) {
48050
+ return jspb.Message.setRepeatedWrapperField(this, 9, value);
48051
+ };
48052
+
48053
+
48054
+ /**
48055
+ * @param {!proto.payment.WalletCashBalanceItem=} opt_value
48056
+ * @param {number=} opt_index
48057
+ * @return {!proto.payment.WalletCashBalanceItem}
48058
+ */
48059
+ proto.payment.ResolveGameWalletContextResponse.prototype.addWallets = function(opt_value, opt_index) {
48060
+ return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.payment.WalletCashBalanceItem, opt_index);
48061
+ };
48062
+
48063
+
48064
+ /**
48065
+ * Clears the list making it empty but non-null.
48066
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
48067
+ */
48068
+ proto.payment.ResolveGameWalletContextResponse.prototype.clearWalletsList = function() {
48069
+ return this.setWalletsList([]);
48070
+ };
48071
+
48072
+
48073
+
48074
+
48075
+
48076
+ if (jspb.Message.GENERATE_TO_OBJECT) {
48077
+ /**
48078
+ * Creates an object representation of this proto.
48079
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
48080
+ * Optional fields that are not set will be set to undefined.
48081
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
48082
+ * For the list of reserved names please see:
48083
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
48084
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
48085
+ * JSPB instance for transitional soy proto support:
48086
+ * http://goto/soy-param-migration
48087
+ * @return {!Object}
48088
+ */
48089
+ proto.payment.WalletCashBalanceItem.prototype.toObject = function(opt_includeInstance) {
48090
+ return proto.payment.WalletCashBalanceItem.toObject(opt_includeInstance, this);
48091
+ };
48092
+
48093
+
48094
+ /**
48095
+ * Static version of the {@see toObject} method.
48096
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
48097
+ * the JSPB instance for transitional soy proto support:
48098
+ * http://goto/soy-param-migration
48099
+ * @param {!proto.payment.WalletCashBalanceItem} msg The msg instance to transform.
48100
+ * @return {!Object}
48101
+ * @suppress {unusedLocalVariables} f is only used for nested messages
48102
+ */
48103
+ proto.payment.WalletCashBalanceItem.toObject = function(includeInstance, msg) {
48104
+ var f, obj = {
48105
+ currency: jspb.Message.getFieldWithDefault(msg, 1, ""),
48106
+ currencyScale: jspb.Message.getFieldWithDefault(msg, 2, 0),
48107
+ balanceMinor: jspb.Message.getFieldWithDefault(msg, 3, ""),
48108
+ availableRealMinor: jspb.Message.getFieldWithDefault(msg, 4, "")
48109
+ };
48110
+
48111
+ if (includeInstance) {
48112
+ obj.$jspbMessageInstance = msg;
48113
+ }
48114
+ return obj;
48115
+ };
48116
+ }
48117
+
48118
+
48119
+ /**
48120
+ * Deserializes binary data (in protobuf wire format).
48121
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
48122
+ * @return {!proto.payment.WalletCashBalanceItem}
48123
+ */
48124
+ proto.payment.WalletCashBalanceItem.deserializeBinary = function(bytes) {
48125
+ var reader = new jspb.BinaryReader(bytes);
48126
+ var msg = new proto.payment.WalletCashBalanceItem;
48127
+ return proto.payment.WalletCashBalanceItem.deserializeBinaryFromReader(msg, reader);
48128
+ };
48129
+
48130
+
48131
+ /**
48132
+ * Deserializes binary data (in protobuf wire format) from the
48133
+ * given reader into the given message object.
48134
+ * @param {!proto.payment.WalletCashBalanceItem} msg The message object to deserialize into.
48135
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
48136
+ * @return {!proto.payment.WalletCashBalanceItem}
48137
+ */
48138
+ proto.payment.WalletCashBalanceItem.deserializeBinaryFromReader = function(msg, reader) {
48139
+ while (reader.nextField()) {
48140
+ if (reader.isEndGroup()) {
48141
+ break;
48142
+ }
48143
+ var field = reader.getFieldNumber();
48144
+ switch (field) {
48145
+ case 1:
48146
+ var value = /** @type {string} */ (reader.readString());
48147
+ msg.setCurrency(value);
48148
+ break;
48149
+ case 2:
48150
+ var value = /** @type {number} */ (reader.readInt32());
48151
+ msg.setCurrencyScale(value);
48152
+ break;
48153
+ case 3:
48154
+ var value = /** @type {string} */ (reader.readString());
48155
+ msg.setBalanceMinor(value);
48156
+ break;
48157
+ case 4:
48158
+ var value = /** @type {string} */ (reader.readString());
48159
+ msg.setAvailableRealMinor(value);
48160
+ break;
48161
+ default:
48162
+ reader.skipField();
48163
+ break;
48164
+ }
48165
+ }
48166
+ return msg;
48167
+ };
48168
+
48169
+
48170
+ /**
48171
+ * Serializes the message to binary data (in protobuf wire format).
48172
+ * @return {!Uint8Array}
48173
+ */
48174
+ proto.payment.WalletCashBalanceItem.prototype.serializeBinary = function() {
48175
+ var writer = new jspb.BinaryWriter();
48176
+ proto.payment.WalletCashBalanceItem.serializeBinaryToWriter(this, writer);
48177
+ return writer.getResultBuffer();
48178
+ };
48179
+
48180
+
48181
+ /**
48182
+ * Serializes the given message to binary data (in protobuf wire
48183
+ * format), writing to the given BinaryWriter.
48184
+ * @param {!proto.payment.WalletCashBalanceItem} message
48185
+ * @param {!jspb.BinaryWriter} writer
48186
+ * @suppress {unusedLocalVariables} f is only used for nested messages
48187
+ */
48188
+ proto.payment.WalletCashBalanceItem.serializeBinaryToWriter = function(message, writer) {
48189
+ var f = undefined;
48190
+ f = message.getCurrency();
48191
+ if (f.length > 0) {
48192
+ writer.writeString(
48193
+ 1,
48194
+ f
48195
+ );
48196
+ }
48197
+ f = message.getCurrencyScale();
48198
+ if (f !== 0) {
48199
+ writer.writeInt32(
48200
+ 2,
48201
+ f
48202
+ );
48203
+ }
48204
+ f = message.getBalanceMinor();
48205
+ if (f.length > 0) {
48206
+ writer.writeString(
48207
+ 3,
48208
+ f
48209
+ );
48210
+ }
48211
+ f = message.getAvailableRealMinor();
48212
+ if (f.length > 0) {
48213
+ writer.writeString(
48214
+ 4,
48215
+ f
48216
+ );
48217
+ }
48218
+ };
48219
+
48220
+
48221
+ /**
48222
+ * optional string currency = 1;
48223
+ * @return {string}
48224
+ */
48225
+ proto.payment.WalletCashBalanceItem.prototype.getCurrency = function() {
48226
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
48227
+ };
48228
+
48229
+
48230
+ /**
48231
+ * @param {string} value
48232
+ * @return {!proto.payment.WalletCashBalanceItem} returns this
48233
+ */
48234
+ proto.payment.WalletCashBalanceItem.prototype.setCurrency = function(value) {
48235
+ return jspb.Message.setProto3StringField(this, 1, value);
48236
+ };
48237
+
48238
+
48239
+ /**
48240
+ * optional int32 currency_scale = 2;
48241
+ * @return {number}
48242
+ */
48243
+ proto.payment.WalletCashBalanceItem.prototype.getCurrencyScale = function() {
48244
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
48245
+ };
48246
+
48247
+
48248
+ /**
48249
+ * @param {number} value
48250
+ * @return {!proto.payment.WalletCashBalanceItem} returns this
48251
+ */
48252
+ proto.payment.WalletCashBalanceItem.prototype.setCurrencyScale = function(value) {
48253
+ return jspb.Message.setProto3IntField(this, 2, value);
48254
+ };
48255
+
48256
+
48257
+ /**
48258
+ * optional string balance_minor = 3;
48259
+ * @return {string}
48260
+ */
48261
+ proto.payment.WalletCashBalanceItem.prototype.getBalanceMinor = function() {
48262
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
48263
+ };
48264
+
48265
+
48266
+ /**
48267
+ * @param {string} value
48268
+ * @return {!proto.payment.WalletCashBalanceItem} returns this
48269
+ */
48270
+ proto.payment.WalletCashBalanceItem.prototype.setBalanceMinor = function(value) {
48271
+ return jspb.Message.setProto3StringField(this, 3, value);
48272
+ };
48273
+
48274
+
48275
+ /**
48276
+ * optional string available_real_minor = 4;
48277
+ * @return {string}
48278
+ */
48279
+ proto.payment.WalletCashBalanceItem.prototype.getAvailableRealMinor = function() {
48280
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
48281
+ };
48282
+
48283
+
48284
+ /**
48285
+ * @param {string} value
48286
+ * @return {!proto.payment.WalletCashBalanceItem} returns this
48287
+ */
48288
+ proto.payment.WalletCashBalanceItem.prototype.setAvailableRealMinor = function(value) {
48289
+ return jspb.Message.setProto3StringField(this, 4, value);
48290
+ };
48291
+
48292
+
47847
48293
 
47848
48294
 
47849
48295
 
@@ -0,0 +1,20 @@
1
+ const assert = require('node:assert/strict');
2
+ const P = require('..');
3
+ for (const name of ['LoggedInResponse', 'UserDataResponse', 'UserWalletBalancesResponse', 'WalletPreferenceResponse']) {
4
+ const C=P.user.messages[name], x=new C();
5
+ assert.equal(x.hasPreferredWalletCurrency(),false);
6
+ x.setPreferredWalletCurrency('USDT');
7
+ assert.equal(C.deserializeBinary(x.serializeBinary()).getPreferredWalletCurrency(),'USDT');
8
+ }
9
+ const request=new P.payment.messages.ResolveGameWalletContextRequest();
10
+ request.setUserId(42); request.setPreferredWalletCurrency('LTC'); request.setExistingWalletOnly(true);
11
+ const decoded=P.payment.messages.ResolveGameWalletContextRequest.deserializeBinary(request.serializeBinary());
12
+ assert.equal(decoded.getPreferredWalletCurrency(),'LTC'); assert.equal(decoded.getExistingWalletOnly(),true);
13
+ const response=new P.payment.messages.ResolveGameWalletContextResponse();
14
+ assert.equal(response.hasAvailableRealMinor(),false); response.setAvailableRealMinor('0');
15
+ const item=new P.payment.messages.WalletCashBalanceItem(); item.setCurrency('USDT'); item.setCurrencyScale(6); item.setBalanceMinor('9007199254740993123'); item.setAvailableRealMinor('0'); response.addWallets(item);
16
+ const round=P.payment.messages.ResolveGameWalletContextResponse.deserializeBinary(response.serializeBinary());
17
+ assert.equal(round.getAvailableRealMinor(),'0'); assert.equal(round.getWalletsList()[0].getBalanceMinor(),'9007199254740993123');
18
+ assert.equal(typeof P.payment.service.PaymentClient.prototype.selectWalletContext,'function');
19
+ assert.equal(typeof P.user.service.UserClient.prototype.setPreferredWalletCurrency,'function');
20
+ console.log('wallet additive contract roundtrip: PASS');
package/user/user.proto CHANGED
@@ -28,6 +28,7 @@ service User {
28
28
  rpc updateUserBalance(UserBalanceRequest) returns (UserDataResponse);
29
29
  rpc checkWithdrawalEligibility(CheckWithdrawalEligibilityRequest) returns (CheckWithdrawalEligibilityResponse);
30
30
  rpc getUserWalletBalances(GetUserWalletBalancesRequest) returns (UserWalletBalancesResponse);
31
+ rpc setPreferredWalletCurrency(SetPreferredWalletCurrencyRequest) returns (WalletPreferenceResponse);
31
32
  rpc getUserCachedData(UserDataRequest) returns (UserDataResponse);
32
33
  rpc getUserDepositProfile(UserDataRequest) returns (UserDepositProfileResponse);
33
34
  rpc getPumpKingsMyTokenWidgetLaunchData(GetPumpKingsMyTokenWidgetLaunchDataRequest) returns (GetPumpKingsMyTokenWidgetLaunchDataResponse);
@@ -321,6 +322,7 @@ message LoggedInResponse {
321
322
  optional string two_fa_qr_data_url = 15;
322
323
  optional int32 preset_id = 16;
323
324
  optional int32 role_id = 17;
325
+ optional string preferred_wallet_currency = 18;
324
326
  }
325
327
  message LoginRequest {
326
328
  optional string email = 1;
@@ -640,6 +642,13 @@ message CheckWithdrawalEligibilityResponse {
640
642
  optional string currency = 4;
641
643
  optional int32 currency_scale = 5;
642
644
  }
645
+ message SetPreferredWalletCurrencyRequest {
646
+ int32 user_id = 1;
647
+ string currency = 2;
648
+ }
649
+ message WalletPreferenceResponse {
650
+ optional string preferred_wallet_currency = 1;
651
+ }
643
652
  message GetUserWalletBalancesRequest {
644
653
  int32 user_id = 1;
645
654
  }
@@ -652,6 +661,7 @@ message UserWalletBalanceItem {
652
661
  }
653
662
  message UserWalletBalancesResponse {
654
663
  repeated UserWalletBalanceItem items = 1;
664
+ optional string preferred_wallet_currency = 2;
655
665
  }
656
666
  message UserPasswordRequest {
657
667
  int32 id = 1;
@@ -753,6 +763,7 @@ message UserDataResponse {
753
763
  optional string email_unsubscribed_at = 58;
754
764
  optional bool is_self_exclusion_active = 59;
755
765
  optional bool is_test = 60;
766
+ optional string preferred_wallet_currency = 61;
756
767
  }
757
768
  message UserDepositProfileResponse {
758
769
  int32 id = 1;
@@ -1841,6 +1841,17 @@ function deserialize_user_SetNewPasswordFromSmsResetRequest(buffer_arg) {
1841
1841
  return user_pb.SetNewPasswordFromSmsResetRequest.deserializeBinary(new Uint8Array(buffer_arg));
1842
1842
  }
1843
1843
 
1844
+ function serialize_user_SetPreferredWalletCurrencyRequest(arg) {
1845
+ if (!(arg instanceof user_pb.SetPreferredWalletCurrencyRequest)) {
1846
+ throw new Error('Expected argument of type user.SetPreferredWalletCurrencyRequest');
1847
+ }
1848
+ return Buffer.from(arg.serializeBinary());
1849
+ }
1850
+
1851
+ function deserialize_user_SetPreferredWalletCurrencyRequest(buffer_arg) {
1852
+ return user_pb.SetPreferredWalletCurrencyRequest.deserializeBinary(new Uint8Array(buffer_arg));
1853
+ }
1854
+
1844
1855
  function serialize_user_SetResponsibleGamingPolicyRequest(arg) {
1845
1856
  if (!(arg instanceof user_pb.SetResponsibleGamingPolicyRequest)) {
1846
1857
  throw new Error('Expected argument of type user.SetResponsibleGamingPolicyRequest');
@@ -2578,6 +2589,17 @@ function deserialize_user_VkCommonIdLoginRequest(buffer_arg) {
2578
2589
  return user_pb.VkCommonIdLoginRequest.deserializeBinary(new Uint8Array(buffer_arg));
2579
2590
  }
2580
2591
 
2592
+ function serialize_user_WalletPreferenceResponse(arg) {
2593
+ if (!(arg instanceof user_pb.WalletPreferenceResponse)) {
2594
+ throw new Error('Expected argument of type user.WalletPreferenceResponse');
2595
+ }
2596
+ return Buffer.from(arg.serializeBinary());
2597
+ }
2598
+
2599
+ function deserialize_user_WalletPreferenceResponse(buffer_arg) {
2600
+ return user_pb.WalletPreferenceResponse.deserializeBinary(new Uint8Array(buffer_arg));
2601
+ }
2602
+
2581
2603
  function serialize_user_XLoginRequest(arg) {
2582
2604
  if (!(arg instanceof user_pb.XLoginRequest)) {
2583
2605
  throw new Error('Expected argument of type user.XLoginRequest');
@@ -2837,6 +2859,17 @@ inspectPlayerInvitation: {
2837
2859
  responseSerialize: serialize_user_UserWalletBalancesResponse,
2838
2860
  responseDeserialize: deserialize_user_UserWalletBalancesResponse,
2839
2861
  },
2862
+ setPreferredWalletCurrency: {
2863
+ path: '/user.User/setPreferredWalletCurrency',
2864
+ requestStream: false,
2865
+ responseStream: false,
2866
+ requestType: user_pb.SetPreferredWalletCurrencyRequest,
2867
+ responseType: user_pb.WalletPreferenceResponse,
2868
+ requestSerialize: serialize_user_SetPreferredWalletCurrencyRequest,
2869
+ requestDeserialize: deserialize_user_SetPreferredWalletCurrencyRequest,
2870
+ responseSerialize: serialize_user_WalletPreferenceResponse,
2871
+ responseDeserialize: deserialize_user_WalletPreferenceResponse,
2872
+ },
2840
2873
  getUserCachedData: {
2841
2874
  path: '/user.User/getUserCachedData',
2842
2875
  requestStream: false,
package/user/user_pb.js CHANGED
@@ -249,6 +249,7 @@ goog.exportSymbol('proto.user.SegmentSessionRuleRequest', null, global);
249
249
  goog.exportSymbol('proto.user.SegmentStatusResponse', null, global);
250
250
  goog.exportSymbol('proto.user.SetNewPasswordConfirmedRequest', null, global);
251
251
  goog.exportSymbol('proto.user.SetNewPasswordFromSmsResetRequest', null, global);
252
+ goog.exportSymbol('proto.user.SetPreferredWalletCurrencyRequest', null, global);
252
253
  goog.exportSymbol('proto.user.SetResponsibleGamingPolicyRequest', null, global);
253
254
  goog.exportSymbol('proto.user.SmsResetPasswordConfirmationRequest', null, global);
254
255
  goog.exportSymbol('proto.user.StartUserKycVerificationRequest', null, global);
@@ -342,6 +343,7 @@ goog.exportSymbol('proto.user.VerificationStatusItemsResponse', null, global);
342
343
  goog.exportSymbol('proto.user.VerifySmsResetPasswordCodeRequest', null, global);
343
344
  goog.exportSymbol('proto.user.VerifySmsResetPasswordCodeResponse', null, global);
344
345
  goog.exportSymbol('proto.user.VkCommonIdLoginRequest', null, global);
346
+ goog.exportSymbol('proto.user.WalletPreferenceResponse', null, global);
345
347
  goog.exportSymbol('proto.user.XLoginRequest', null, global);
346
348
  goog.exportSymbol('proto.user.YandexLoginRequest', null, global);
347
349
  /**
@@ -1205,6 +1207,48 @@ if (goog.DEBUG && !COMPILED) {
1205
1207
  */
1206
1208
  proto.user.CheckWithdrawalEligibilityResponse.displayName = 'proto.user.CheckWithdrawalEligibilityResponse';
1207
1209
  }
1210
+ /**
1211
+ * Generated by JsPbCodeGenerator.
1212
+ * @param {Array=} opt_data Optional initial data array, typically from a
1213
+ * server response, or constructed directly in Javascript. The array is used
1214
+ * in place and becomes part of the constructed object. It is not cloned.
1215
+ * If no data is provided, the constructed object will be empty, but still
1216
+ * valid.
1217
+ * @extends {jspb.Message}
1218
+ * @constructor
1219
+ */
1220
+ proto.user.SetPreferredWalletCurrencyRequest = function(opt_data) {
1221
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1222
+ };
1223
+ goog.inherits(proto.user.SetPreferredWalletCurrencyRequest, jspb.Message);
1224
+ if (goog.DEBUG && !COMPILED) {
1225
+ /**
1226
+ * @public
1227
+ * @override
1228
+ */
1229
+ proto.user.SetPreferredWalletCurrencyRequest.displayName = 'proto.user.SetPreferredWalletCurrencyRequest';
1230
+ }
1231
+ /**
1232
+ * Generated by JsPbCodeGenerator.
1233
+ * @param {Array=} opt_data Optional initial data array, typically from a
1234
+ * server response, or constructed directly in Javascript. The array is used
1235
+ * in place and becomes part of the constructed object. It is not cloned.
1236
+ * If no data is provided, the constructed object will be empty, but still
1237
+ * valid.
1238
+ * @extends {jspb.Message}
1239
+ * @constructor
1240
+ */
1241
+ proto.user.WalletPreferenceResponse = function(opt_data) {
1242
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1243
+ };
1244
+ goog.inherits(proto.user.WalletPreferenceResponse, jspb.Message);
1245
+ if (goog.DEBUG && !COMPILED) {
1246
+ /**
1247
+ * @public
1248
+ * @override
1249
+ */
1250
+ proto.user.WalletPreferenceResponse.displayName = 'proto.user.WalletPreferenceResponse';
1251
+ }
1208
1252
  /**
1209
1253
  * Generated by JsPbCodeGenerator.
1210
1254
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -10868,7 +10912,8 @@ proto.user.LoggedInResponse.toObject = function(includeInstance, msg) {
10868
10912
  twoFaTempToken: jspb.Message.getFieldWithDefault(msg, 14, ""),
10869
10913
  twoFaQrDataUrl: jspb.Message.getFieldWithDefault(msg, 15, ""),
10870
10914
  presetId: jspb.Message.getFieldWithDefault(msg, 16, 0),
10871
- roleId: jspb.Message.getFieldWithDefault(msg, 17, 0)
10915
+ roleId: jspb.Message.getFieldWithDefault(msg, 17, 0),
10916
+ preferredWalletCurrency: jspb.Message.getFieldWithDefault(msg, 18, "")
10872
10917
  };
10873
10918
 
10874
10919
  if (includeInstance) {
@@ -10973,6 +11018,10 @@ proto.user.LoggedInResponse.deserializeBinaryFromReader = function(msg, reader)
10973
11018
  var value = /** @type {number} */ (reader.readInt32());
10974
11019
  msg.setRoleId(value);
10975
11020
  break;
11021
+ case 18:
11022
+ var value = /** @type {string} */ (reader.readString());
11023
+ msg.setPreferredWalletCurrency(value);
11024
+ break;
10976
11025
  default:
10977
11026
  reader.skipField();
10978
11027
  break;
@@ -11121,6 +11170,13 @@ proto.user.LoggedInResponse.serializeBinaryToWriter = function(message, writer)
11121
11170
  f
11122
11171
  );
11123
11172
  }
11173
+ f = /** @type {string} */ (jspb.Message.getField(message, 18));
11174
+ if (f != null) {
11175
+ writer.writeString(
11176
+ 18,
11177
+ f
11178
+ );
11179
+ }
11124
11180
  };
11125
11181
 
11126
11182
 
@@ -11682,6 +11738,42 @@ proto.user.LoggedInResponse.prototype.hasRoleId = function() {
11682
11738
  };
11683
11739
 
11684
11740
 
11741
+ /**
11742
+ * optional string preferred_wallet_currency = 18;
11743
+ * @return {string}
11744
+ */
11745
+ proto.user.LoggedInResponse.prototype.getPreferredWalletCurrency = function() {
11746
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, ""));
11747
+ };
11748
+
11749
+
11750
+ /**
11751
+ * @param {string} value
11752
+ * @return {!proto.user.LoggedInResponse} returns this
11753
+ */
11754
+ proto.user.LoggedInResponse.prototype.setPreferredWalletCurrency = function(value) {
11755
+ return jspb.Message.setField(this, 18, value);
11756
+ };
11757
+
11758
+
11759
+ /**
11760
+ * Clears the field making it undefined.
11761
+ * @return {!proto.user.LoggedInResponse} returns this
11762
+ */
11763
+ proto.user.LoggedInResponse.prototype.clearPreferredWalletCurrency = function() {
11764
+ return jspb.Message.setField(this, 18, undefined);
11765
+ };
11766
+
11767
+
11768
+ /**
11769
+ * Returns whether this field is set.
11770
+ * @return {boolean}
11771
+ */
11772
+ proto.user.LoggedInResponse.prototype.hasPreferredWalletCurrency = function() {
11773
+ return jspb.Message.getField(this, 18) != null;
11774
+ };
11775
+
11776
+
11685
11777
 
11686
11778
 
11687
11779
 
@@ -25348,6 +25440,314 @@ proto.user.CheckWithdrawalEligibilityResponse.prototype.hasCurrencyScale = funct
25348
25440
 
25349
25441
 
25350
25442
 
25443
+ if (jspb.Message.GENERATE_TO_OBJECT) {
25444
+ /**
25445
+ * Creates an object representation of this proto.
25446
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
25447
+ * Optional fields that are not set will be set to undefined.
25448
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
25449
+ * For the list of reserved names please see:
25450
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
25451
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
25452
+ * JSPB instance for transitional soy proto support:
25453
+ * http://goto/soy-param-migration
25454
+ * @return {!Object}
25455
+ */
25456
+ proto.user.SetPreferredWalletCurrencyRequest.prototype.toObject = function(opt_includeInstance) {
25457
+ return proto.user.SetPreferredWalletCurrencyRequest.toObject(opt_includeInstance, this);
25458
+ };
25459
+
25460
+
25461
+ /**
25462
+ * Static version of the {@see toObject} method.
25463
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
25464
+ * the JSPB instance for transitional soy proto support:
25465
+ * http://goto/soy-param-migration
25466
+ * @param {!proto.user.SetPreferredWalletCurrencyRequest} msg The msg instance to transform.
25467
+ * @return {!Object}
25468
+ * @suppress {unusedLocalVariables} f is only used for nested messages
25469
+ */
25470
+ proto.user.SetPreferredWalletCurrencyRequest.toObject = function(includeInstance, msg) {
25471
+ var f, obj = {
25472
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
25473
+ currency: jspb.Message.getFieldWithDefault(msg, 2, "")
25474
+ };
25475
+
25476
+ if (includeInstance) {
25477
+ obj.$jspbMessageInstance = msg;
25478
+ }
25479
+ return obj;
25480
+ };
25481
+ }
25482
+
25483
+
25484
+ /**
25485
+ * Deserializes binary data (in protobuf wire format).
25486
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
25487
+ * @return {!proto.user.SetPreferredWalletCurrencyRequest}
25488
+ */
25489
+ proto.user.SetPreferredWalletCurrencyRequest.deserializeBinary = function(bytes) {
25490
+ var reader = new jspb.BinaryReader(bytes);
25491
+ var msg = new proto.user.SetPreferredWalletCurrencyRequest;
25492
+ return proto.user.SetPreferredWalletCurrencyRequest.deserializeBinaryFromReader(msg, reader);
25493
+ };
25494
+
25495
+
25496
+ /**
25497
+ * Deserializes binary data (in protobuf wire format) from the
25498
+ * given reader into the given message object.
25499
+ * @param {!proto.user.SetPreferredWalletCurrencyRequest} msg The message object to deserialize into.
25500
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
25501
+ * @return {!proto.user.SetPreferredWalletCurrencyRequest}
25502
+ */
25503
+ proto.user.SetPreferredWalletCurrencyRequest.deserializeBinaryFromReader = function(msg, reader) {
25504
+ while (reader.nextField()) {
25505
+ if (reader.isEndGroup()) {
25506
+ break;
25507
+ }
25508
+ var field = reader.getFieldNumber();
25509
+ switch (field) {
25510
+ case 1:
25511
+ var value = /** @type {number} */ (reader.readInt32());
25512
+ msg.setUserId(value);
25513
+ break;
25514
+ case 2:
25515
+ var value = /** @type {string} */ (reader.readString());
25516
+ msg.setCurrency(value);
25517
+ break;
25518
+ default:
25519
+ reader.skipField();
25520
+ break;
25521
+ }
25522
+ }
25523
+ return msg;
25524
+ };
25525
+
25526
+
25527
+ /**
25528
+ * Serializes the message to binary data (in protobuf wire format).
25529
+ * @return {!Uint8Array}
25530
+ */
25531
+ proto.user.SetPreferredWalletCurrencyRequest.prototype.serializeBinary = function() {
25532
+ var writer = new jspb.BinaryWriter();
25533
+ proto.user.SetPreferredWalletCurrencyRequest.serializeBinaryToWriter(this, writer);
25534
+ return writer.getResultBuffer();
25535
+ };
25536
+
25537
+
25538
+ /**
25539
+ * Serializes the given message to binary data (in protobuf wire
25540
+ * format), writing to the given BinaryWriter.
25541
+ * @param {!proto.user.SetPreferredWalletCurrencyRequest} message
25542
+ * @param {!jspb.BinaryWriter} writer
25543
+ * @suppress {unusedLocalVariables} f is only used for nested messages
25544
+ */
25545
+ proto.user.SetPreferredWalletCurrencyRequest.serializeBinaryToWriter = function(message, writer) {
25546
+ var f = undefined;
25547
+ f = message.getUserId();
25548
+ if (f !== 0) {
25549
+ writer.writeInt32(
25550
+ 1,
25551
+ f
25552
+ );
25553
+ }
25554
+ f = message.getCurrency();
25555
+ if (f.length > 0) {
25556
+ writer.writeString(
25557
+ 2,
25558
+ f
25559
+ );
25560
+ }
25561
+ };
25562
+
25563
+
25564
+ /**
25565
+ * optional int32 user_id = 1;
25566
+ * @return {number}
25567
+ */
25568
+ proto.user.SetPreferredWalletCurrencyRequest.prototype.getUserId = function() {
25569
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
25570
+ };
25571
+
25572
+
25573
+ /**
25574
+ * @param {number} value
25575
+ * @return {!proto.user.SetPreferredWalletCurrencyRequest} returns this
25576
+ */
25577
+ proto.user.SetPreferredWalletCurrencyRequest.prototype.setUserId = function(value) {
25578
+ return jspb.Message.setProto3IntField(this, 1, value);
25579
+ };
25580
+
25581
+
25582
+ /**
25583
+ * optional string currency = 2;
25584
+ * @return {string}
25585
+ */
25586
+ proto.user.SetPreferredWalletCurrencyRequest.prototype.getCurrency = function() {
25587
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
25588
+ };
25589
+
25590
+
25591
+ /**
25592
+ * @param {string} value
25593
+ * @return {!proto.user.SetPreferredWalletCurrencyRequest} returns this
25594
+ */
25595
+ proto.user.SetPreferredWalletCurrencyRequest.prototype.setCurrency = function(value) {
25596
+ return jspb.Message.setProto3StringField(this, 2, value);
25597
+ };
25598
+
25599
+
25600
+
25601
+
25602
+
25603
+ if (jspb.Message.GENERATE_TO_OBJECT) {
25604
+ /**
25605
+ * Creates an object representation of this proto.
25606
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
25607
+ * Optional fields that are not set will be set to undefined.
25608
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
25609
+ * For the list of reserved names please see:
25610
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
25611
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
25612
+ * JSPB instance for transitional soy proto support:
25613
+ * http://goto/soy-param-migration
25614
+ * @return {!Object}
25615
+ */
25616
+ proto.user.WalletPreferenceResponse.prototype.toObject = function(opt_includeInstance) {
25617
+ return proto.user.WalletPreferenceResponse.toObject(opt_includeInstance, this);
25618
+ };
25619
+
25620
+
25621
+ /**
25622
+ * Static version of the {@see toObject} method.
25623
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
25624
+ * the JSPB instance for transitional soy proto support:
25625
+ * http://goto/soy-param-migration
25626
+ * @param {!proto.user.WalletPreferenceResponse} msg The msg instance to transform.
25627
+ * @return {!Object}
25628
+ * @suppress {unusedLocalVariables} f is only used for nested messages
25629
+ */
25630
+ proto.user.WalletPreferenceResponse.toObject = function(includeInstance, msg) {
25631
+ var f, obj = {
25632
+ preferredWalletCurrency: jspb.Message.getFieldWithDefault(msg, 1, "")
25633
+ };
25634
+
25635
+ if (includeInstance) {
25636
+ obj.$jspbMessageInstance = msg;
25637
+ }
25638
+ return obj;
25639
+ };
25640
+ }
25641
+
25642
+
25643
+ /**
25644
+ * Deserializes binary data (in protobuf wire format).
25645
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
25646
+ * @return {!proto.user.WalletPreferenceResponse}
25647
+ */
25648
+ proto.user.WalletPreferenceResponse.deserializeBinary = function(bytes) {
25649
+ var reader = new jspb.BinaryReader(bytes);
25650
+ var msg = new proto.user.WalletPreferenceResponse;
25651
+ return proto.user.WalletPreferenceResponse.deserializeBinaryFromReader(msg, reader);
25652
+ };
25653
+
25654
+
25655
+ /**
25656
+ * Deserializes binary data (in protobuf wire format) from the
25657
+ * given reader into the given message object.
25658
+ * @param {!proto.user.WalletPreferenceResponse} msg The message object to deserialize into.
25659
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
25660
+ * @return {!proto.user.WalletPreferenceResponse}
25661
+ */
25662
+ proto.user.WalletPreferenceResponse.deserializeBinaryFromReader = function(msg, reader) {
25663
+ while (reader.nextField()) {
25664
+ if (reader.isEndGroup()) {
25665
+ break;
25666
+ }
25667
+ var field = reader.getFieldNumber();
25668
+ switch (field) {
25669
+ case 1:
25670
+ var value = /** @type {string} */ (reader.readString());
25671
+ msg.setPreferredWalletCurrency(value);
25672
+ break;
25673
+ default:
25674
+ reader.skipField();
25675
+ break;
25676
+ }
25677
+ }
25678
+ return msg;
25679
+ };
25680
+
25681
+
25682
+ /**
25683
+ * Serializes the message to binary data (in protobuf wire format).
25684
+ * @return {!Uint8Array}
25685
+ */
25686
+ proto.user.WalletPreferenceResponse.prototype.serializeBinary = function() {
25687
+ var writer = new jspb.BinaryWriter();
25688
+ proto.user.WalletPreferenceResponse.serializeBinaryToWriter(this, writer);
25689
+ return writer.getResultBuffer();
25690
+ };
25691
+
25692
+
25693
+ /**
25694
+ * Serializes the given message to binary data (in protobuf wire
25695
+ * format), writing to the given BinaryWriter.
25696
+ * @param {!proto.user.WalletPreferenceResponse} message
25697
+ * @param {!jspb.BinaryWriter} writer
25698
+ * @suppress {unusedLocalVariables} f is only used for nested messages
25699
+ */
25700
+ proto.user.WalletPreferenceResponse.serializeBinaryToWriter = function(message, writer) {
25701
+ var f = undefined;
25702
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
25703
+ if (f != null) {
25704
+ writer.writeString(
25705
+ 1,
25706
+ f
25707
+ );
25708
+ }
25709
+ };
25710
+
25711
+
25712
+ /**
25713
+ * optional string preferred_wallet_currency = 1;
25714
+ * @return {string}
25715
+ */
25716
+ proto.user.WalletPreferenceResponse.prototype.getPreferredWalletCurrency = function() {
25717
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
25718
+ };
25719
+
25720
+
25721
+ /**
25722
+ * @param {string} value
25723
+ * @return {!proto.user.WalletPreferenceResponse} returns this
25724
+ */
25725
+ proto.user.WalletPreferenceResponse.prototype.setPreferredWalletCurrency = function(value) {
25726
+ return jspb.Message.setField(this, 1, value);
25727
+ };
25728
+
25729
+
25730
+ /**
25731
+ * Clears the field making it undefined.
25732
+ * @return {!proto.user.WalletPreferenceResponse} returns this
25733
+ */
25734
+ proto.user.WalletPreferenceResponse.prototype.clearPreferredWalletCurrency = function() {
25735
+ return jspb.Message.setField(this, 1, undefined);
25736
+ };
25737
+
25738
+
25739
+ /**
25740
+ * Returns whether this field is set.
25741
+ * @return {boolean}
25742
+ */
25743
+ proto.user.WalletPreferenceResponse.prototype.hasPreferredWalletCurrency = function() {
25744
+ return jspb.Message.getField(this, 1) != null;
25745
+ };
25746
+
25747
+
25748
+
25749
+
25750
+
25351
25751
  if (jspb.Message.GENERATE_TO_OBJECT) {
25352
25752
  /**
25353
25753
  * Creates an object representation of this proto.
@@ -25783,7 +26183,8 @@ proto.user.UserWalletBalancesResponse.prototype.toObject = function(opt_includeI
25783
26183
  proto.user.UserWalletBalancesResponse.toObject = function(includeInstance, msg) {
25784
26184
  var f, obj = {
25785
26185
  itemsList: jspb.Message.toObjectList(msg.getItemsList(),
25786
- proto.user.UserWalletBalanceItem.toObject, includeInstance)
26186
+ proto.user.UserWalletBalanceItem.toObject, includeInstance),
26187
+ preferredWalletCurrency: jspb.Message.getFieldWithDefault(msg, 2, "")
25787
26188
  };
25788
26189
 
25789
26190
  if (includeInstance) {
@@ -25825,6 +26226,10 @@ proto.user.UserWalletBalancesResponse.deserializeBinaryFromReader = function(msg
25825
26226
  reader.readMessage(value,proto.user.UserWalletBalanceItem.deserializeBinaryFromReader);
25826
26227
  msg.addItems(value);
25827
26228
  break;
26229
+ case 2:
26230
+ var value = /** @type {string} */ (reader.readString());
26231
+ msg.setPreferredWalletCurrency(value);
26232
+ break;
25828
26233
  default:
25829
26234
  reader.skipField();
25830
26235
  break;
@@ -25862,6 +26267,13 @@ proto.user.UserWalletBalancesResponse.serializeBinaryToWriter = function(message
25862
26267
  proto.user.UserWalletBalanceItem.serializeBinaryToWriter
25863
26268
  );
25864
26269
  }
26270
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
26271
+ if (f != null) {
26272
+ writer.writeString(
26273
+ 2,
26274
+ f
26275
+ );
26276
+ }
25865
26277
  };
25866
26278
 
25867
26279
 
@@ -25903,6 +26315,42 @@ proto.user.UserWalletBalancesResponse.prototype.clearItemsList = function() {
25903
26315
  };
25904
26316
 
25905
26317
 
26318
+ /**
26319
+ * optional string preferred_wallet_currency = 2;
26320
+ * @return {string}
26321
+ */
26322
+ proto.user.UserWalletBalancesResponse.prototype.getPreferredWalletCurrency = function() {
26323
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
26324
+ };
26325
+
26326
+
26327
+ /**
26328
+ * @param {string} value
26329
+ * @return {!proto.user.UserWalletBalancesResponse} returns this
26330
+ */
26331
+ proto.user.UserWalletBalancesResponse.prototype.setPreferredWalletCurrency = function(value) {
26332
+ return jspb.Message.setField(this, 2, value);
26333
+ };
26334
+
26335
+
26336
+ /**
26337
+ * Clears the field making it undefined.
26338
+ * @return {!proto.user.UserWalletBalancesResponse} returns this
26339
+ */
26340
+ proto.user.UserWalletBalancesResponse.prototype.clearPreferredWalletCurrency = function() {
26341
+ return jspb.Message.setField(this, 2, undefined);
26342
+ };
26343
+
26344
+
26345
+ /**
26346
+ * Returns whether this field is set.
26347
+ * @return {boolean}
26348
+ */
26349
+ proto.user.UserWalletBalancesResponse.prototype.hasPreferredWalletCurrency = function() {
26350
+ return jspb.Message.getField(this, 2) != null;
26351
+ };
26352
+
26353
+
25906
26354
 
25907
26355
 
25908
26356
 
@@ -27802,7 +28250,8 @@ proto.user.UserDataResponse.toObject = function(includeInstance, msg) {
27802
28250
  emailSubscribedAt: jspb.Message.getFieldWithDefault(msg, 57, ""),
27803
28251
  emailUnsubscribedAt: jspb.Message.getFieldWithDefault(msg, 58, ""),
27804
28252
  isSelfExclusionActive: jspb.Message.getBooleanFieldWithDefault(msg, 59, false),
27805
- isTest: jspb.Message.getBooleanFieldWithDefault(msg, 60, false)
28253
+ isTest: jspb.Message.getBooleanFieldWithDefault(msg, 60, false),
28254
+ preferredWalletCurrency: jspb.Message.getFieldWithDefault(msg, 61, "")
27806
28255
  };
27807
28256
 
27808
28257
  if (includeInstance) {
@@ -28080,6 +28529,10 @@ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader)
28080
28529
  var value = /** @type {boolean} */ (reader.readBool());
28081
28530
  msg.setIsTest(value);
28082
28531
  break;
28532
+ case 61:
28533
+ var value = /** @type {string} */ (reader.readString());
28534
+ msg.setPreferredWalletCurrency(value);
28535
+ break;
28083
28536
  default:
28084
28537
  reader.skipField();
28085
28538
  break;
@@ -28530,6 +28983,13 @@ proto.user.UserDataResponse.serializeBinaryToWriter = function(message, writer)
28530
28983
  f
28531
28984
  );
28532
28985
  }
28986
+ f = /** @type {string} */ (jspb.Message.getField(message, 61));
28987
+ if (f != null) {
28988
+ writer.writeString(
28989
+ 61,
28990
+ f
28991
+ );
28992
+ }
28533
28993
  };
28534
28994
 
28535
28995
 
@@ -30658,6 +31118,42 @@ proto.user.UserDataResponse.prototype.hasIsTest = function() {
30658
31118
  };
30659
31119
 
30660
31120
 
31121
+ /**
31122
+ * optional string preferred_wallet_currency = 61;
31123
+ * @return {string}
31124
+ */
31125
+ proto.user.UserDataResponse.prototype.getPreferredWalletCurrency = function() {
31126
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 61, ""));
31127
+ };
31128
+
31129
+
31130
+ /**
31131
+ * @param {string} value
31132
+ * @return {!proto.user.UserDataResponse} returns this
31133
+ */
31134
+ proto.user.UserDataResponse.prototype.setPreferredWalletCurrency = function(value) {
31135
+ return jspb.Message.setField(this, 61, value);
31136
+ };
31137
+
31138
+
31139
+ /**
31140
+ * Clears the field making it undefined.
31141
+ * @return {!proto.user.UserDataResponse} returns this
31142
+ */
31143
+ proto.user.UserDataResponse.prototype.clearPreferredWalletCurrency = function() {
31144
+ return jspb.Message.setField(this, 61, undefined);
31145
+ };
31146
+
31147
+
31148
+ /**
31149
+ * Returns whether this field is set.
31150
+ * @return {boolean}
31151
+ */
31152
+ proto.user.UserDataResponse.prototype.hasPreferredWalletCurrency = function() {
31153
+ return jspb.Message.getField(this, 61) != null;
31154
+ };
31155
+
31156
+
30661
31157
 
30662
31158
 
30663
31159