protobuf-platform 1.2.717 → 1.2.719
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/bonus/bonus.proto +6 -0
- package/bonus/bonus_pb.js +147 -3
- package/package.json +1 -1
- package/payment/payment.proto +15 -0
- package/payment/payment_grpc_pb.js +12 -0
- package/payment/payment_pb.js +449 -3
- package/scripts/verify-bonus-currency-contract.js +34 -0
- package/scripts/verify-wallet-selection.js +20 -0
- package/user/user.proto +11 -0
- package/user/user_grpc_pb.js +33 -0
- package/user/user_pb.js +499 -3
package/payment/payment_pb.js
CHANGED
|
@@ -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,
|
|
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,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const assert = require('node:assert/strict');
|
|
3
|
+
const { execFileSync } = require('node:child_process');
|
|
4
|
+
const vm = require('node:vm');
|
|
5
|
+
const current = require('../bonus/bonus_pb');
|
|
6
|
+
// Actual last bindings before the additive contract, isolated from global proto symbols.
|
|
7
|
+
const legacySource = execFileSync('git', ['show', '6e9c17f:bonus/bonus_pb.js'], { encoding: 'utf8', maxBuffer: 8 * 1024 * 1024 });
|
|
8
|
+
const sandbox = { exports: {}, proto: {}, require, console };
|
|
9
|
+
sandbox.global = sandbox;
|
|
10
|
+
vm.runInNewContext(legacySource, sandbox);
|
|
11
|
+
const legacy = sandbox.exports;
|
|
12
|
+
for (const [name, getter, setter, has, clear, identitySetter, identityGetter] of [
|
|
13
|
+
['ValidateSelectedWageringUserBonusRequest', 'getWalletCurrency', 'setWalletCurrency', 'hasWalletCurrency', 'clearWalletCurrency', 'setUserId', 'getUserId'],
|
|
14
|
+
['ValidateSelectedWageringUserBonusResponse', 'getCurrency', 'setCurrency', 'hasCurrency', 'clearCurrency', 'setSelectedUserBonusId', 'getSelectedUserBonusId'],
|
|
15
|
+
['ActiveWageringUserBonusItem', 'getCurrency', 'setCurrency', 'hasCurrency', 'clearCurrency', 'setUserBonusId', 'getUserBonusId'],
|
|
16
|
+
]) {
|
|
17
|
+
const old = new legacy[name](); old[identitySetter](462);
|
|
18
|
+
const received = current[name].deserializeBinary(old.serializeBinary());
|
|
19
|
+
assert.equal(received[has](), false);
|
|
20
|
+
assert.equal(received[getter](), '');
|
|
21
|
+
assert.equal(received[identityGetter](), 462);
|
|
22
|
+
for (const currency of ['USDT', 'BTC', '']) {
|
|
23
|
+
received[setter](currency);
|
|
24
|
+
const roundTrip = current[name].deserializeBinary(received.serializeBinary());
|
|
25
|
+
assert.equal(roundTrip[has](), true);
|
|
26
|
+
assert.equal(roundTrip[getter](), currency);
|
|
27
|
+
const oldReader = legacy[name].deserializeBinary(received.serializeBinary());
|
|
28
|
+
assert.equal(oldReader[identityGetter](), 462);
|
|
29
|
+
// Older reserialization drops unknown fields; new readers must still treat that as unknown.
|
|
30
|
+
assert.equal(current[name].deserializeBinary(oldReader.serializeBinary())[has](), false);
|
|
31
|
+
}
|
|
32
|
+
received[clear](); assert.equal(received[has](), false);
|
|
33
|
+
}
|
|
34
|
+
console.log('PASS bonus currency mixed-version wire contract');
|
|
@@ -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;
|
package/user/user_grpc_pb.js
CHANGED
|
@@ -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,
|