protobuf-platform 1.2.716 → 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/loyalty/loyalty.proto +61 -1
- package/loyalty/loyalty_grpc_pb.js +122 -0
- package/loyalty/loyalty_pb.js +2331 -0
- package/package.json +1 -1
- package/payment/payment.proto +62 -0
- package/payment/payment_grpc_pb.js +123 -0
- package/payment/payment_pb.js +2165 -3
- 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
|
@@ -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,
|