protobuf-platform 1.2.691 → 1.2.693
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/loyalty/loyalty.proto +47 -0
- package/loyalty/loyalty_grpc_pb.js +166 -0
- package/loyalty/loyalty_pb.js +1864 -0
- package/package.json +1 -1
- package/payment/payment.proto +11 -0
- package/payment/payment_pb.js +421 -2
- package/scripts/verify-financial-admission-contract.js +66 -0
package/package.json
CHANGED
package/payment/payment.proto
CHANGED
|
@@ -1004,6 +1004,8 @@ message ResolveGameWalletContextRequest {
|
|
|
1004
1004
|
optional string wallet_currency = 2;
|
|
1005
1005
|
// Opt-in authoritative bonus bucket read for terminal/recovery verification.
|
|
1006
1006
|
optional bool include_bonus_balance = 3;
|
|
1007
|
+
// Explicit setup opt-in; never implies automatic enrollment of existing callers.
|
|
1008
|
+
optional bool prepare_financial_admission = 4;
|
|
1007
1009
|
}
|
|
1008
1010
|
message ResolveGameWalletContextResponse {
|
|
1009
1011
|
int32 user_id = 1;
|
|
@@ -1013,6 +1015,15 @@ message ResolveGameWalletContextResponse {
|
|
|
1013
1015
|
string balance_major = 5;
|
|
1014
1016
|
// Exact minor units in wallet_currency. Absent means unavailable; "0" is confirmed zero.
|
|
1015
1017
|
optional string bonus_balance_minor = 6;
|
|
1018
|
+
optional FinancialAdmissionWalletContext financial_admission = 7;
|
|
1019
|
+
}
|
|
1020
|
+
message FinancialAdmissionWalletContext {
|
|
1021
|
+
uint32 protocol_version = 1;
|
|
1022
|
+
string wallet_reference = 2;
|
|
1023
|
+
string ownership_epoch = 3;
|
|
1024
|
+
string admission_version = 4;
|
|
1025
|
+
string cash_ledger_entry_id = 5;
|
|
1026
|
+
optional string bonus_ledger_entry_id = 6;
|
|
1016
1027
|
}
|
|
1017
1028
|
//Segmentation
|
|
1018
1029
|
message SegmentedUserRequest {
|
package/payment/payment_pb.js
CHANGED
|
@@ -64,6 +64,7 @@ goog.exportSymbol('proto.payment.DepositWebHookRequest', null, global);
|
|
|
64
64
|
goog.exportSymbol('proto.payment.ExecuteGameplayPrecisionCommandRequest', null, global);
|
|
65
65
|
goog.exportSymbol('proto.payment.ExecuteManualWithdrawalRequest', null, global);
|
|
66
66
|
goog.exportSymbol('proto.payment.File', null, global);
|
|
67
|
+
goog.exportSymbol('proto.payment.FinancialAdmissionWalletContext', null, global);
|
|
67
68
|
goog.exportSymbol('proto.payment.FinancialOperationResponse', null, global);
|
|
68
69
|
goog.exportSymbol('proto.payment.GameplayPrecisionAccountingLeg', null, global);
|
|
69
70
|
goog.exportSymbol('proto.payment.GameplayPrecisionLeg', null, global);
|
|
@@ -2115,6 +2116,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
2115
2116
|
*/
|
|
2116
2117
|
proto.payment.ResolveGameWalletContextResponse.displayName = 'proto.payment.ResolveGameWalletContextResponse';
|
|
2117
2118
|
}
|
|
2119
|
+
/**
|
|
2120
|
+
* Generated by JsPbCodeGenerator.
|
|
2121
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
2122
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
2123
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
2124
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
2125
|
+
* valid.
|
|
2126
|
+
* @extends {jspb.Message}
|
|
2127
|
+
* @constructor
|
|
2128
|
+
*/
|
|
2129
|
+
proto.payment.FinancialAdmissionWalletContext = function(opt_data) {
|
|
2130
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
2131
|
+
};
|
|
2132
|
+
goog.inherits(proto.payment.FinancialAdmissionWalletContext, jspb.Message);
|
|
2133
|
+
if (goog.DEBUG && !COMPILED) {
|
|
2134
|
+
/**
|
|
2135
|
+
* @public
|
|
2136
|
+
* @override
|
|
2137
|
+
*/
|
|
2138
|
+
proto.payment.FinancialAdmissionWalletContext.displayName = 'proto.payment.FinancialAdmissionWalletContext';
|
|
2139
|
+
}
|
|
2118
2140
|
/**
|
|
2119
2141
|
* Generated by JsPbCodeGenerator.
|
|
2120
2142
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -42416,7 +42438,8 @@ proto.payment.ResolveGameWalletContextRequest.toObject = function(includeInstanc
|
|
|
42416
42438
|
var f, obj = {
|
|
42417
42439
|
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
42418
42440
|
walletCurrency: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
42419
|
-
includeBonusBalance: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
|
|
42441
|
+
includeBonusBalance: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
42442
|
+
prepareFinancialAdmission: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
|
|
42420
42443
|
};
|
|
42421
42444
|
|
|
42422
42445
|
if (includeInstance) {
|
|
@@ -42465,6 +42488,10 @@ proto.payment.ResolveGameWalletContextRequest.deserializeBinaryFromReader = func
|
|
|
42465
42488
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
42466
42489
|
msg.setIncludeBonusBalance(value);
|
|
42467
42490
|
break;
|
|
42491
|
+
case 4:
|
|
42492
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
42493
|
+
msg.setPrepareFinancialAdmission(value);
|
|
42494
|
+
break;
|
|
42468
42495
|
default:
|
|
42469
42496
|
reader.skipField();
|
|
42470
42497
|
break;
|
|
@@ -42515,6 +42542,13 @@ proto.payment.ResolveGameWalletContextRequest.serializeBinaryToWriter = function
|
|
|
42515
42542
|
f
|
|
42516
42543
|
);
|
|
42517
42544
|
}
|
|
42545
|
+
f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
|
|
42546
|
+
if (f != null) {
|
|
42547
|
+
writer.writeBool(
|
|
42548
|
+
4,
|
|
42549
|
+
f
|
|
42550
|
+
);
|
|
42551
|
+
}
|
|
42518
42552
|
};
|
|
42519
42553
|
|
|
42520
42554
|
|
|
@@ -42608,6 +42642,42 @@ proto.payment.ResolveGameWalletContextRequest.prototype.hasIncludeBonusBalance =
|
|
|
42608
42642
|
};
|
|
42609
42643
|
|
|
42610
42644
|
|
|
42645
|
+
/**
|
|
42646
|
+
* optional bool prepare_financial_admission = 4;
|
|
42647
|
+
* @return {boolean}
|
|
42648
|
+
*/
|
|
42649
|
+
proto.payment.ResolveGameWalletContextRequest.prototype.getPrepareFinancialAdmission = function() {
|
|
42650
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
|
|
42651
|
+
};
|
|
42652
|
+
|
|
42653
|
+
|
|
42654
|
+
/**
|
|
42655
|
+
* @param {boolean} value
|
|
42656
|
+
* @return {!proto.payment.ResolveGameWalletContextRequest} returns this
|
|
42657
|
+
*/
|
|
42658
|
+
proto.payment.ResolveGameWalletContextRequest.prototype.setPrepareFinancialAdmission = function(value) {
|
|
42659
|
+
return jspb.Message.setField(this, 4, value);
|
|
42660
|
+
};
|
|
42661
|
+
|
|
42662
|
+
|
|
42663
|
+
/**
|
|
42664
|
+
* Clears the field making it undefined.
|
|
42665
|
+
* @return {!proto.payment.ResolveGameWalletContextRequest} returns this
|
|
42666
|
+
*/
|
|
42667
|
+
proto.payment.ResolveGameWalletContextRequest.prototype.clearPrepareFinancialAdmission = function() {
|
|
42668
|
+
return jspb.Message.setField(this, 4, undefined);
|
|
42669
|
+
};
|
|
42670
|
+
|
|
42671
|
+
|
|
42672
|
+
/**
|
|
42673
|
+
* Returns whether this field is set.
|
|
42674
|
+
* @return {boolean}
|
|
42675
|
+
*/
|
|
42676
|
+
proto.payment.ResolveGameWalletContextRequest.prototype.hasPrepareFinancialAdmission = function() {
|
|
42677
|
+
return jspb.Message.getField(this, 4) != null;
|
|
42678
|
+
};
|
|
42679
|
+
|
|
42680
|
+
|
|
42611
42681
|
|
|
42612
42682
|
|
|
42613
42683
|
|
|
@@ -42645,7 +42715,8 @@ proto.payment.ResolveGameWalletContextResponse.toObject = function(includeInstan
|
|
|
42645
42715
|
currencyScale: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
42646
42716
|
balanceMinor: jspb.Message.getFieldWithDefault(msg, 4, "0"),
|
|
42647
42717
|
balanceMajor: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
42648
|
-
bonusBalanceMinor: jspb.Message.getFieldWithDefault(msg, 6, "")
|
|
42718
|
+
bonusBalanceMinor: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
|
42719
|
+
financialAdmission: (f = msg.getFinancialAdmission()) && proto.payment.FinancialAdmissionWalletContext.toObject(includeInstance, f)
|
|
42649
42720
|
};
|
|
42650
42721
|
|
|
42651
42722
|
if (includeInstance) {
|
|
@@ -42706,6 +42777,11 @@ proto.payment.ResolveGameWalletContextResponse.deserializeBinaryFromReader = fun
|
|
|
42706
42777
|
var value = /** @type {string} */ (reader.readString());
|
|
42707
42778
|
msg.setBonusBalanceMinor(value);
|
|
42708
42779
|
break;
|
|
42780
|
+
case 7:
|
|
42781
|
+
var value = new proto.payment.FinancialAdmissionWalletContext;
|
|
42782
|
+
reader.readMessage(value,proto.payment.FinancialAdmissionWalletContext.deserializeBinaryFromReader);
|
|
42783
|
+
msg.setFinancialAdmission(value);
|
|
42784
|
+
break;
|
|
42709
42785
|
default:
|
|
42710
42786
|
reader.skipField();
|
|
42711
42787
|
break;
|
|
@@ -42777,6 +42853,14 @@ proto.payment.ResolveGameWalletContextResponse.serializeBinaryToWriter = functio
|
|
|
42777
42853
|
f
|
|
42778
42854
|
);
|
|
42779
42855
|
}
|
|
42856
|
+
f = message.getFinancialAdmission();
|
|
42857
|
+
if (f != null) {
|
|
42858
|
+
writer.writeMessage(
|
|
42859
|
+
7,
|
|
42860
|
+
f,
|
|
42861
|
+
proto.payment.FinancialAdmissionWalletContext.serializeBinaryToWriter
|
|
42862
|
+
);
|
|
42863
|
+
}
|
|
42780
42864
|
};
|
|
42781
42865
|
|
|
42782
42866
|
|
|
@@ -42906,6 +42990,341 @@ proto.payment.ResolveGameWalletContextResponse.prototype.hasBonusBalanceMinor =
|
|
|
42906
42990
|
};
|
|
42907
42991
|
|
|
42908
42992
|
|
|
42993
|
+
/**
|
|
42994
|
+
* optional FinancialAdmissionWalletContext financial_admission = 7;
|
|
42995
|
+
* @return {?proto.payment.FinancialAdmissionWalletContext}
|
|
42996
|
+
*/
|
|
42997
|
+
proto.payment.ResolveGameWalletContextResponse.prototype.getFinancialAdmission = function() {
|
|
42998
|
+
return /** @type{?proto.payment.FinancialAdmissionWalletContext} */ (
|
|
42999
|
+
jspb.Message.getWrapperField(this, proto.payment.FinancialAdmissionWalletContext, 7));
|
|
43000
|
+
};
|
|
43001
|
+
|
|
43002
|
+
|
|
43003
|
+
/**
|
|
43004
|
+
* @param {?proto.payment.FinancialAdmissionWalletContext|undefined} value
|
|
43005
|
+
* @return {!proto.payment.ResolveGameWalletContextResponse} returns this
|
|
43006
|
+
*/
|
|
43007
|
+
proto.payment.ResolveGameWalletContextResponse.prototype.setFinancialAdmission = function(value) {
|
|
43008
|
+
return jspb.Message.setWrapperField(this, 7, value);
|
|
43009
|
+
};
|
|
43010
|
+
|
|
43011
|
+
|
|
43012
|
+
/**
|
|
43013
|
+
* Clears the message field making it undefined.
|
|
43014
|
+
* @return {!proto.payment.ResolveGameWalletContextResponse} returns this
|
|
43015
|
+
*/
|
|
43016
|
+
proto.payment.ResolveGameWalletContextResponse.prototype.clearFinancialAdmission = function() {
|
|
43017
|
+
return this.setFinancialAdmission(undefined);
|
|
43018
|
+
};
|
|
43019
|
+
|
|
43020
|
+
|
|
43021
|
+
/**
|
|
43022
|
+
* Returns whether this field is set.
|
|
43023
|
+
* @return {boolean}
|
|
43024
|
+
*/
|
|
43025
|
+
proto.payment.ResolveGameWalletContextResponse.prototype.hasFinancialAdmission = function() {
|
|
43026
|
+
return jspb.Message.getField(this, 7) != null;
|
|
43027
|
+
};
|
|
43028
|
+
|
|
43029
|
+
|
|
43030
|
+
|
|
43031
|
+
|
|
43032
|
+
|
|
43033
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
43034
|
+
/**
|
|
43035
|
+
* Creates an object representation of this proto.
|
|
43036
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
43037
|
+
* Optional fields that are not set will be set to undefined.
|
|
43038
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
43039
|
+
* For the list of reserved names please see:
|
|
43040
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
43041
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
43042
|
+
* JSPB instance for transitional soy proto support:
|
|
43043
|
+
* http://goto/soy-param-migration
|
|
43044
|
+
* @return {!Object}
|
|
43045
|
+
*/
|
|
43046
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.toObject = function(opt_includeInstance) {
|
|
43047
|
+
return proto.payment.FinancialAdmissionWalletContext.toObject(opt_includeInstance, this);
|
|
43048
|
+
};
|
|
43049
|
+
|
|
43050
|
+
|
|
43051
|
+
/**
|
|
43052
|
+
* Static version of the {@see toObject} method.
|
|
43053
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
43054
|
+
* the JSPB instance for transitional soy proto support:
|
|
43055
|
+
* http://goto/soy-param-migration
|
|
43056
|
+
* @param {!proto.payment.FinancialAdmissionWalletContext} msg The msg instance to transform.
|
|
43057
|
+
* @return {!Object}
|
|
43058
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
43059
|
+
*/
|
|
43060
|
+
proto.payment.FinancialAdmissionWalletContext.toObject = function(includeInstance, msg) {
|
|
43061
|
+
var f, obj = {
|
|
43062
|
+
protocolVersion: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
43063
|
+
walletReference: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
43064
|
+
ownershipEpoch: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
43065
|
+
admissionVersion: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
43066
|
+
cashLedgerEntryId: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
43067
|
+
bonusLedgerEntryId: jspb.Message.getFieldWithDefault(msg, 6, "")
|
|
43068
|
+
};
|
|
43069
|
+
|
|
43070
|
+
if (includeInstance) {
|
|
43071
|
+
obj.$jspbMessageInstance = msg;
|
|
43072
|
+
}
|
|
43073
|
+
return obj;
|
|
43074
|
+
};
|
|
43075
|
+
}
|
|
43076
|
+
|
|
43077
|
+
|
|
43078
|
+
/**
|
|
43079
|
+
* Deserializes binary data (in protobuf wire format).
|
|
43080
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
43081
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext}
|
|
43082
|
+
*/
|
|
43083
|
+
proto.payment.FinancialAdmissionWalletContext.deserializeBinary = function(bytes) {
|
|
43084
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
43085
|
+
var msg = new proto.payment.FinancialAdmissionWalletContext;
|
|
43086
|
+
return proto.payment.FinancialAdmissionWalletContext.deserializeBinaryFromReader(msg, reader);
|
|
43087
|
+
};
|
|
43088
|
+
|
|
43089
|
+
|
|
43090
|
+
/**
|
|
43091
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
43092
|
+
* given reader into the given message object.
|
|
43093
|
+
* @param {!proto.payment.FinancialAdmissionWalletContext} msg The message object to deserialize into.
|
|
43094
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
43095
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext}
|
|
43096
|
+
*/
|
|
43097
|
+
proto.payment.FinancialAdmissionWalletContext.deserializeBinaryFromReader = function(msg, reader) {
|
|
43098
|
+
while (reader.nextField()) {
|
|
43099
|
+
if (reader.isEndGroup()) {
|
|
43100
|
+
break;
|
|
43101
|
+
}
|
|
43102
|
+
var field = reader.getFieldNumber();
|
|
43103
|
+
switch (field) {
|
|
43104
|
+
case 1:
|
|
43105
|
+
var value = /** @type {number} */ (reader.readUint32());
|
|
43106
|
+
msg.setProtocolVersion(value);
|
|
43107
|
+
break;
|
|
43108
|
+
case 2:
|
|
43109
|
+
var value = /** @type {string} */ (reader.readString());
|
|
43110
|
+
msg.setWalletReference(value);
|
|
43111
|
+
break;
|
|
43112
|
+
case 3:
|
|
43113
|
+
var value = /** @type {string} */ (reader.readString());
|
|
43114
|
+
msg.setOwnershipEpoch(value);
|
|
43115
|
+
break;
|
|
43116
|
+
case 4:
|
|
43117
|
+
var value = /** @type {string} */ (reader.readString());
|
|
43118
|
+
msg.setAdmissionVersion(value);
|
|
43119
|
+
break;
|
|
43120
|
+
case 5:
|
|
43121
|
+
var value = /** @type {string} */ (reader.readString());
|
|
43122
|
+
msg.setCashLedgerEntryId(value);
|
|
43123
|
+
break;
|
|
43124
|
+
case 6:
|
|
43125
|
+
var value = /** @type {string} */ (reader.readString());
|
|
43126
|
+
msg.setBonusLedgerEntryId(value);
|
|
43127
|
+
break;
|
|
43128
|
+
default:
|
|
43129
|
+
reader.skipField();
|
|
43130
|
+
break;
|
|
43131
|
+
}
|
|
43132
|
+
}
|
|
43133
|
+
return msg;
|
|
43134
|
+
};
|
|
43135
|
+
|
|
43136
|
+
|
|
43137
|
+
/**
|
|
43138
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
43139
|
+
* @return {!Uint8Array}
|
|
43140
|
+
*/
|
|
43141
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.serializeBinary = function() {
|
|
43142
|
+
var writer = new jspb.BinaryWriter();
|
|
43143
|
+
proto.payment.FinancialAdmissionWalletContext.serializeBinaryToWriter(this, writer);
|
|
43144
|
+
return writer.getResultBuffer();
|
|
43145
|
+
};
|
|
43146
|
+
|
|
43147
|
+
|
|
43148
|
+
/**
|
|
43149
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
43150
|
+
* format), writing to the given BinaryWriter.
|
|
43151
|
+
* @param {!proto.payment.FinancialAdmissionWalletContext} message
|
|
43152
|
+
* @param {!jspb.BinaryWriter} writer
|
|
43153
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
43154
|
+
*/
|
|
43155
|
+
proto.payment.FinancialAdmissionWalletContext.serializeBinaryToWriter = function(message, writer) {
|
|
43156
|
+
var f = undefined;
|
|
43157
|
+
f = message.getProtocolVersion();
|
|
43158
|
+
if (f !== 0) {
|
|
43159
|
+
writer.writeUint32(
|
|
43160
|
+
1,
|
|
43161
|
+
f
|
|
43162
|
+
);
|
|
43163
|
+
}
|
|
43164
|
+
f = message.getWalletReference();
|
|
43165
|
+
if (f.length > 0) {
|
|
43166
|
+
writer.writeString(
|
|
43167
|
+
2,
|
|
43168
|
+
f
|
|
43169
|
+
);
|
|
43170
|
+
}
|
|
43171
|
+
f = message.getOwnershipEpoch();
|
|
43172
|
+
if (f.length > 0) {
|
|
43173
|
+
writer.writeString(
|
|
43174
|
+
3,
|
|
43175
|
+
f
|
|
43176
|
+
);
|
|
43177
|
+
}
|
|
43178
|
+
f = message.getAdmissionVersion();
|
|
43179
|
+
if (f.length > 0) {
|
|
43180
|
+
writer.writeString(
|
|
43181
|
+
4,
|
|
43182
|
+
f
|
|
43183
|
+
);
|
|
43184
|
+
}
|
|
43185
|
+
f = message.getCashLedgerEntryId();
|
|
43186
|
+
if (f.length > 0) {
|
|
43187
|
+
writer.writeString(
|
|
43188
|
+
5,
|
|
43189
|
+
f
|
|
43190
|
+
);
|
|
43191
|
+
}
|
|
43192
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 6));
|
|
43193
|
+
if (f != null) {
|
|
43194
|
+
writer.writeString(
|
|
43195
|
+
6,
|
|
43196
|
+
f
|
|
43197
|
+
);
|
|
43198
|
+
}
|
|
43199
|
+
};
|
|
43200
|
+
|
|
43201
|
+
|
|
43202
|
+
/**
|
|
43203
|
+
* optional uint32 protocol_version = 1;
|
|
43204
|
+
* @return {number}
|
|
43205
|
+
*/
|
|
43206
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.getProtocolVersion = function() {
|
|
43207
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
43208
|
+
};
|
|
43209
|
+
|
|
43210
|
+
|
|
43211
|
+
/**
|
|
43212
|
+
* @param {number} value
|
|
43213
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext} returns this
|
|
43214
|
+
*/
|
|
43215
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.setProtocolVersion = function(value) {
|
|
43216
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
43217
|
+
};
|
|
43218
|
+
|
|
43219
|
+
|
|
43220
|
+
/**
|
|
43221
|
+
* optional string wallet_reference = 2;
|
|
43222
|
+
* @return {string}
|
|
43223
|
+
*/
|
|
43224
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.getWalletReference = function() {
|
|
43225
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
43226
|
+
};
|
|
43227
|
+
|
|
43228
|
+
|
|
43229
|
+
/**
|
|
43230
|
+
* @param {string} value
|
|
43231
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext} returns this
|
|
43232
|
+
*/
|
|
43233
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.setWalletReference = function(value) {
|
|
43234
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
43235
|
+
};
|
|
43236
|
+
|
|
43237
|
+
|
|
43238
|
+
/**
|
|
43239
|
+
* optional string ownership_epoch = 3;
|
|
43240
|
+
* @return {string}
|
|
43241
|
+
*/
|
|
43242
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.getOwnershipEpoch = function() {
|
|
43243
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
43244
|
+
};
|
|
43245
|
+
|
|
43246
|
+
|
|
43247
|
+
/**
|
|
43248
|
+
* @param {string} value
|
|
43249
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext} returns this
|
|
43250
|
+
*/
|
|
43251
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.setOwnershipEpoch = function(value) {
|
|
43252
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
|
43253
|
+
};
|
|
43254
|
+
|
|
43255
|
+
|
|
43256
|
+
/**
|
|
43257
|
+
* optional string admission_version = 4;
|
|
43258
|
+
* @return {string}
|
|
43259
|
+
*/
|
|
43260
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.getAdmissionVersion = function() {
|
|
43261
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
43262
|
+
};
|
|
43263
|
+
|
|
43264
|
+
|
|
43265
|
+
/**
|
|
43266
|
+
* @param {string} value
|
|
43267
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext} returns this
|
|
43268
|
+
*/
|
|
43269
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.setAdmissionVersion = function(value) {
|
|
43270
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
43271
|
+
};
|
|
43272
|
+
|
|
43273
|
+
|
|
43274
|
+
/**
|
|
43275
|
+
* optional string cash_ledger_entry_id = 5;
|
|
43276
|
+
* @return {string}
|
|
43277
|
+
*/
|
|
43278
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.getCashLedgerEntryId = function() {
|
|
43279
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
|
43280
|
+
};
|
|
43281
|
+
|
|
43282
|
+
|
|
43283
|
+
/**
|
|
43284
|
+
* @param {string} value
|
|
43285
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext} returns this
|
|
43286
|
+
*/
|
|
43287
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.setCashLedgerEntryId = function(value) {
|
|
43288
|
+
return jspb.Message.setProto3StringField(this, 5, value);
|
|
43289
|
+
};
|
|
43290
|
+
|
|
43291
|
+
|
|
43292
|
+
/**
|
|
43293
|
+
* optional string bonus_ledger_entry_id = 6;
|
|
43294
|
+
* @return {string}
|
|
43295
|
+
*/
|
|
43296
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.getBonusLedgerEntryId = function() {
|
|
43297
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
|
|
43298
|
+
};
|
|
43299
|
+
|
|
43300
|
+
|
|
43301
|
+
/**
|
|
43302
|
+
* @param {string} value
|
|
43303
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext} returns this
|
|
43304
|
+
*/
|
|
43305
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.setBonusLedgerEntryId = function(value) {
|
|
43306
|
+
return jspb.Message.setField(this, 6, value);
|
|
43307
|
+
};
|
|
43308
|
+
|
|
43309
|
+
|
|
43310
|
+
/**
|
|
43311
|
+
* Clears the field making it undefined.
|
|
43312
|
+
* @return {!proto.payment.FinancialAdmissionWalletContext} returns this
|
|
43313
|
+
*/
|
|
43314
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.clearBonusLedgerEntryId = function() {
|
|
43315
|
+
return jspb.Message.setField(this, 6, undefined);
|
|
43316
|
+
};
|
|
43317
|
+
|
|
43318
|
+
|
|
43319
|
+
/**
|
|
43320
|
+
* Returns whether this field is set.
|
|
43321
|
+
* @return {boolean}
|
|
43322
|
+
*/
|
|
43323
|
+
proto.payment.FinancialAdmissionWalletContext.prototype.hasBonusLedgerEntryId = function() {
|
|
43324
|
+
return jspb.Message.getField(this, 6) != null;
|
|
43325
|
+
};
|
|
43326
|
+
|
|
43327
|
+
|
|
42909
43328
|
|
|
42910
43329
|
/**
|
|
42911
43330
|
* List of repeated fields within this message type.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const assert = require('node:assert/strict');
|
|
4
|
+
const vm = require('node:vm');
|
|
5
|
+
const { execFileSync } = require('node:child_process');
|
|
6
|
+
const { createRequire } = require('node:module');
|
|
7
|
+
const path = require('node:path');
|
|
8
|
+
const current = require('../payment/payment_pb');
|
|
9
|
+
const filename = path.resolve(__dirname, '../payment/payment_pb.js');
|
|
10
|
+
const baseline = execFileSync('git', ['show', '96b2d7e:payment/payment_pb.js'], {
|
|
11
|
+
cwd: path.resolve(__dirname, '..'), encoding: 'utf8', maxBuffer: 8 * 1024 * 1024,
|
|
12
|
+
});
|
|
13
|
+
const moduleBefore = { exports: {} };
|
|
14
|
+
vm.runInNewContext(baseline, {
|
|
15
|
+
module: moduleBefore, exports: moduleBefore.exports, require: createRequire(filename),
|
|
16
|
+
}, { filename: 'baseline-payment_pb.js' });
|
|
17
|
+
const previous = moduleBefore.exports;
|
|
18
|
+
|
|
19
|
+
const request = (bindings) => {
|
|
20
|
+
const value = new bindings.ResolveGameWalletContextRequest();
|
|
21
|
+
value.setUserId(7001); value.setWalletCurrency('EUR'); value.setIncludeBonusBalance(true);
|
|
22
|
+
return value;
|
|
23
|
+
};
|
|
24
|
+
const oldRequest = request(previous);
|
|
25
|
+
const nextRequest = request(current);
|
|
26
|
+
assert.deepEqual(Buffer.from(nextRequest.serializeBinary()), Buffer.from(oldRequest.serializeBinary()));
|
|
27
|
+
assert.equal(nextRequest.hasPrepareFinancialAdmission(), false);
|
|
28
|
+
assert.equal(nextRequest.getPrepareFinancialAdmission(), false);
|
|
29
|
+
nextRequest.setPrepareFinancialAdmission(true);
|
|
30
|
+
const oldReader = previous.ResolveGameWalletContextRequest.deserializeBinary(nextRequest.serializeBinary());
|
|
31
|
+
assert.equal(oldReader.getUserId(), 7001);
|
|
32
|
+
assert.equal(oldReader.getWalletCurrency(), 'EUR');
|
|
33
|
+
assert.equal(oldReader.getIncludeBonusBalance(), true);
|
|
34
|
+
const nextReader = current.ResolveGameWalletContextRequest.deserializeBinary(oldRequest.serializeBinary());
|
|
35
|
+
assert.equal(nextReader.hasPrepareFinancialAdmission(), false);
|
|
36
|
+
|
|
37
|
+
const response = (bindings) => {
|
|
38
|
+
const value = new bindings.ResolveGameWalletContextResponse();
|
|
39
|
+
value.setUserId(7001); value.setWalletCurrency('EUR'); value.setCurrencyScale(2);
|
|
40
|
+
value.setBalanceMinor('9007199254740993'); value.setBalanceMajor('90071992547409.93');
|
|
41
|
+
value.setBonusBalanceMinor('30');
|
|
42
|
+
return value;
|
|
43
|
+
};
|
|
44
|
+
const oldResponse = response(previous);
|
|
45
|
+
const nextResponse = response(current);
|
|
46
|
+
assert.deepEqual(Buffer.from(nextResponse.serializeBinary()), Buffer.from(oldResponse.serializeBinary()));
|
|
47
|
+
assert.equal(nextResponse.hasFinancialAdmission(), false);
|
|
48
|
+
const context = new current.FinancialAdmissionWalletContext();
|
|
49
|
+
context.setProtocolVersion(1);
|
|
50
|
+
context.setWalletReference('fixture-wallet-reference');
|
|
51
|
+
context.setOwnershipEpoch('fixture-payment-epoch');
|
|
52
|
+
context.setAdmissionVersion('18446744073709551615');
|
|
53
|
+
context.setCashLedgerEntryId('9007199254740993');
|
|
54
|
+
assert.equal(context.hasBonusLedgerEntryId(), false);
|
|
55
|
+
context.setBonusLedgerEntryId('9007199254740995');
|
|
56
|
+
nextResponse.setFinancialAdmission(context);
|
|
57
|
+
const oldResponseReader = previous.ResolveGameWalletContextResponse.deserializeBinary(nextResponse.serializeBinary());
|
|
58
|
+
assert.equal(oldResponseReader.getBalanceMinor(), '9007199254740993');
|
|
59
|
+
assert.equal(oldResponseReader.getBalanceMajor(), '90071992547409.93');
|
|
60
|
+
assert.equal(oldResponseReader.getBonusBalanceMinor(), '30');
|
|
61
|
+
const decoded = current.ResolveGameWalletContextResponse.deserializeBinary(nextResponse.serializeBinary()).getFinancialAdmission();
|
|
62
|
+
assert.equal(decoded.getCashLedgerEntryId(), '9007199254740993');
|
|
63
|
+
assert.equal(decoded.getBonusLedgerEntryId(), '9007199254740995');
|
|
64
|
+
assert.equal(decoded.getAdmissionVersion(), '18446744073709551615');
|
|
65
|
+
assert.equal(current.ResolveGameWalletContextResponse.deserializeBinary(oldResponse.serializeBinary()).hasFinancialAdmission(), false);
|
|
66
|
+
console.log('PASS additive admission protobuf: legacy byte equality, old/new readers, absent opt-in/context, exact ledger/version strings above MAX_SAFE_INTEGER; no RPC/field/type removed');
|