protobuf-platform 1.2.657 → 1.2.659
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 +1 -1
- package/payment/payment.proto +133 -0
- package/payment/payment_grpc_pb.js +122 -0
- package/payment/payment_pb.js +4375 -0
- package/scripts/verify-precision-rg-contract.js +180 -0
- package/user/user.proto +57 -1
- package/user/user_grpc_pb.js +33 -0
- package/user/user_pb.js +1188 -0
package/package.json
CHANGED
package/payment/payment.proto
CHANGED
|
@@ -59,6 +59,11 @@ service Payment {
|
|
|
59
59
|
rpc getUserCashbackPaymentOperands(GetUserCashbackPaymentOperandsRequest) returns (GetUserCashbackPaymentOperandsResponse);
|
|
60
60
|
rpc getUserFinancialSummary(GetUserFinancialSummaryRequest) returns (GetUserFinancialSummaryResponse);
|
|
61
61
|
rpc resolveGameWalletContext(ResolveGameWalletContextRequest) returns (ResolveGameWalletContextResponse);
|
|
62
|
+
// Opt-in, commit-confirmed cross-currency gameplay. Legacy RPCs are unchanged.
|
|
63
|
+
rpc registerGameplayPrecisionSession(RegisterGameplayPrecisionSessionRequest) returns (GameplayPrecisionResult);
|
|
64
|
+
rpc executeGameplayPrecisionCommand(ExecuteGameplayPrecisionCommandRequest) returns (GameplayPrecisionResult);
|
|
65
|
+
rpc readGameplayPrecisionBalance(GameplayPrecisionSessionRequest) returns (GameplayPrecisionResult);
|
|
66
|
+
rpc closeGameplayPrecisionSession(GameplayPrecisionSessionRequest) returns (GameplayPrecisionResult);
|
|
62
67
|
//Segmentation
|
|
63
68
|
rpc getSegmentedUsers(SegmentedUserRequest) returns (SegmentedUserResponse);
|
|
64
69
|
//Currency source-of-truth
|
|
@@ -78,6 +83,8 @@ service Payment {
|
|
|
78
83
|
rpc readListConfiscations(PaginationRequest) returns (ConfiscationItemsResponse);
|
|
79
84
|
rpc createAdjustment(AdjustmentRequest) returns (FinancialOperationResponse);
|
|
80
85
|
rpc readListAdjustments(PaginationRequest) returns (AdjustmentItemsResponse);
|
|
86
|
+
rpc prepareGameplayPrecisionCommand(PrepareGameplayPrecisionCommandRequest)
|
|
87
|
+
returns (PrepareGameplayPrecisionCommandResponse);
|
|
81
88
|
}
|
|
82
89
|
//Technical
|
|
83
90
|
message PingRequest { string ping = 1; }
|
|
@@ -1228,3 +1235,129 @@ message FinancialOperationResponse {
|
|
|
1228
1235
|
optional string created_at = 17;
|
|
1229
1236
|
optional string completed_at = 18;
|
|
1230
1237
|
}
|
|
1238
|
+
|
|
1239
|
+
// Exact money and identifiers are decimal strings, never floating-point values.
|
|
1240
|
+
message RegisterGameplayPrecisionSessionRequest {
|
|
1241
|
+
string user_id = 1;
|
|
1242
|
+
string internal_session_id = 2;
|
|
1243
|
+
string vendor = 3;
|
|
1244
|
+
string provider_id = 4;
|
|
1245
|
+
string accounting_currency = 5;
|
|
1246
|
+
uint32 accounting_scale = 6;
|
|
1247
|
+
string provider_currency = 7;
|
|
1248
|
+
string wire_currency = 8;
|
|
1249
|
+
string wire_multiplier = 9;
|
|
1250
|
+
string fx_rate = 10; // Provider major units per accounting major unit.
|
|
1251
|
+
string fx_snapshot_json = 11;
|
|
1252
|
+
uint32 precision_model_version = 12;
|
|
1253
|
+
string balance_type = 13;
|
|
1254
|
+
string game_type = 14;
|
|
1255
|
+
string game_id = 15;
|
|
1256
|
+
string game_code = 16;
|
|
1257
|
+
string user_bonus_id = 17;
|
|
1258
|
+
string user_freespin_bonus_id = 18;
|
|
1259
|
+
string bankroll_mode = 19;
|
|
1260
|
+
string response_policy_version = 20;
|
|
1261
|
+
}
|
|
1262
|
+
message GameplayPrecisionSessionRequest {
|
|
1263
|
+
string precision_session_id = 1;
|
|
1264
|
+
string user_id = 2;
|
|
1265
|
+
string context_fingerprint = 3;
|
|
1266
|
+
}
|
|
1267
|
+
message GameplayPrecisionLeg {
|
|
1268
|
+
string action = 1; // bet | win | reversal
|
|
1269
|
+
string provider_transaction_id = 2;
|
|
1270
|
+
string wire_amount_decimal = 3;
|
|
1271
|
+
string original_transaction_id = 4;
|
|
1272
|
+
string original_action = 5;
|
|
1273
|
+
string event_context_json = 6;
|
|
1274
|
+
}
|
|
1275
|
+
message ExecuteGameplayPrecisionCommandRequest {
|
|
1276
|
+
GameplayPrecisionSessionRequest session = 1;
|
|
1277
|
+
string command_id = 2;
|
|
1278
|
+
string callback_action = 3;
|
|
1279
|
+
repeated GameplayPrecisionLeg legs = 4;
|
|
1280
|
+
string preparation_generation = 5;
|
|
1281
|
+
string preparation_fingerprint = 6;
|
|
1282
|
+
GameplayPrecisionRgEvidence rg_admission = 7;
|
|
1283
|
+
}
|
|
1284
|
+
message GameplayPrecisionResult {
|
|
1285
|
+
string status = 1; // ok | ineligible | insufficient_funds | conflict | closed | STALE_PREPARATION
|
|
1286
|
+
string precision_session_id = 2;
|
|
1287
|
+
string context_fingerprint = 3;
|
|
1288
|
+
uint32 precision_model_version = 4;
|
|
1289
|
+
string accounting_currency = 5;
|
|
1290
|
+
uint32 accounting_scale = 6;
|
|
1291
|
+
string balance_minor = 7;
|
|
1292
|
+
string remainder_numerator = 8;
|
|
1293
|
+
string remainder_denominator = 9;
|
|
1294
|
+
string cash_ledger_entry_id = 10;
|
|
1295
|
+
string precision_version = 11;
|
|
1296
|
+
repeated string operation_ids = 12;
|
|
1297
|
+
string provider_balance_numerator = 13; // Wire major units, derived from accounting.
|
|
1298
|
+
string provider_balance_denominator = 14;
|
|
1299
|
+
string provider_balance_decimal = 15; // Populated only under the bound response policy.
|
|
1300
|
+
string response_policy_version = 16;
|
|
1301
|
+
repeated GameplayPrecisionAccountingLeg accounting_legs = 17;
|
|
1302
|
+
string preparation_generation = 18;
|
|
1303
|
+
string preparation_fingerprint = 19;
|
|
1304
|
+
string command_key = 20;
|
|
1305
|
+
string request_fingerprint = 21;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
enum GameplayPrecisionPrepareMode {
|
|
1309
|
+
GAMEPLAY_PRECISION_PREPARE_UNSPECIFIED = 0;
|
|
1310
|
+
GAMEPLAY_PRECISION_PREPARE_INITIAL = 1;
|
|
1311
|
+
GAMEPLAY_PRECISION_REPREPARE = 2;
|
|
1312
|
+
}
|
|
1313
|
+
message GameplayPrecisionRgEvidence {
|
|
1314
|
+
string command_key = 1;
|
|
1315
|
+
string request_fingerprint = 2;
|
|
1316
|
+
string preparation_generation = 3;
|
|
1317
|
+
string preparation_fingerprint = 4;
|
|
1318
|
+
string accounting_currency = 5;
|
|
1319
|
+
uint32 accounting_scale = 6;
|
|
1320
|
+
string requested_debit_minor = 7;
|
|
1321
|
+
string state = 8; // RESERVED or RELEASED, strictly validated.
|
|
1322
|
+
string receipt_id = 9; // Admission receipt or release receipt, per state.
|
|
1323
|
+
}
|
|
1324
|
+
message GameplayPrecisionAccountingLeg {
|
|
1325
|
+
string action = 1;
|
|
1326
|
+
string provider_transaction_id = 2;
|
|
1327
|
+
string integer_delta_minor = 3;
|
|
1328
|
+
string fractional_delta_numerator = 4;
|
|
1329
|
+
string fractional_delta_denominator = 5;
|
|
1330
|
+
string accounting_currency = 6;
|
|
1331
|
+
uint32 accounting_scale = 7;
|
|
1332
|
+
string payment_operation_id = 8; // Empty before commit.
|
|
1333
|
+
string original_transaction_id = 9;
|
|
1334
|
+
string original_action = 10;
|
|
1335
|
+
}
|
|
1336
|
+
message GameplayPrecisionPreparation {
|
|
1337
|
+
string command_key = 1;
|
|
1338
|
+
string request_fingerprint = 2;
|
|
1339
|
+
string generation = 3;
|
|
1340
|
+
string fingerprint = 4;
|
|
1341
|
+
string cash_ledger_entry_id = 5; // Empty means no cash entry, not invented zero.
|
|
1342
|
+
string precision_version = 6;
|
|
1343
|
+
string accounting_currency = 7;
|
|
1344
|
+
uint32 accounting_scale = 8;
|
|
1345
|
+
string requested_debit_minor = 9;
|
|
1346
|
+
repeated GameplayPrecisionAccountingLeg accounting_legs = 10;
|
|
1347
|
+
bool requires_rg_admission = 11;
|
|
1348
|
+
}
|
|
1349
|
+
message PrepareGameplayPrecisionCommandRequest {
|
|
1350
|
+
ExecuteGameplayPrecisionCommandRequest command = 1;
|
|
1351
|
+
GameplayPrecisionPrepareMode mode = 2;
|
|
1352
|
+
string reprepare_request_id = 3;
|
|
1353
|
+
string expected_generation = 4;
|
|
1354
|
+
string expected_preparation_fingerprint = 5;
|
|
1355
|
+
GameplayPrecisionRgEvidence previous_release = 6;
|
|
1356
|
+
}
|
|
1357
|
+
message PrepareGameplayPrecisionCommandResponse {
|
|
1358
|
+
string status = 1; // PREPARED | STALE_PREPARATION | RELEASE_REQUIRED |
|
|
1359
|
+
// COMMITTED | REJECTED | CONFLICT
|
|
1360
|
+
GameplayPrecisionPreparation preparation = 2;
|
|
1361
|
+
GameplayPrecisionResult committed_result = 3;
|
|
1362
|
+
string reason_key = 4;
|
|
1363
|
+
}
|
|
@@ -279,6 +279,17 @@ function deserialize_payment_DepositWebHookRequest(buffer_arg) {
|
|
|
279
279
|
return payment_pb.DepositWebHookRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
+
function serialize_payment_ExecuteGameplayPrecisionCommandRequest(arg) {
|
|
283
|
+
if (!(arg instanceof payment_pb.ExecuteGameplayPrecisionCommandRequest)) {
|
|
284
|
+
throw new Error('Expected argument of type payment.ExecuteGameplayPrecisionCommandRequest');
|
|
285
|
+
}
|
|
286
|
+
return Buffer.from(arg.serializeBinary());
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function deserialize_payment_ExecuteGameplayPrecisionCommandRequest(buffer_arg) {
|
|
290
|
+
return payment_pb.ExecuteGameplayPrecisionCommandRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
291
|
+
}
|
|
292
|
+
|
|
282
293
|
function serialize_payment_File(arg) {
|
|
283
294
|
if (!(arg instanceof payment_pb.File)) {
|
|
284
295
|
throw new Error('Expected argument of type payment.File');
|
|
@@ -301,6 +312,28 @@ function deserialize_payment_FinancialOperationResponse(buffer_arg) {
|
|
|
301
312
|
return payment_pb.FinancialOperationResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
302
313
|
}
|
|
303
314
|
|
|
315
|
+
function serialize_payment_GameplayPrecisionResult(arg) {
|
|
316
|
+
if (!(arg instanceof payment_pb.GameplayPrecisionResult)) {
|
|
317
|
+
throw new Error('Expected argument of type payment.GameplayPrecisionResult');
|
|
318
|
+
}
|
|
319
|
+
return Buffer.from(arg.serializeBinary());
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function deserialize_payment_GameplayPrecisionResult(buffer_arg) {
|
|
323
|
+
return payment_pb.GameplayPrecisionResult.deserializeBinary(new Uint8Array(buffer_arg));
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
function serialize_payment_GameplayPrecisionSessionRequest(arg) {
|
|
327
|
+
if (!(arg instanceof payment_pb.GameplayPrecisionSessionRequest)) {
|
|
328
|
+
throw new Error('Expected argument of type payment.GameplayPrecisionSessionRequest');
|
|
329
|
+
}
|
|
330
|
+
return Buffer.from(arg.serializeBinary());
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function deserialize_payment_GameplayPrecisionSessionRequest(buffer_arg) {
|
|
334
|
+
return payment_pb.GameplayPrecisionSessionRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
335
|
+
}
|
|
336
|
+
|
|
304
337
|
function serialize_payment_GetCurrenciesMetadataRequest(arg) {
|
|
305
338
|
if (!(arg instanceof payment_pb.GetCurrenciesMetadataRequest)) {
|
|
306
339
|
throw new Error('Expected argument of type payment.GetCurrenciesMetadataRequest');
|
|
@@ -719,6 +752,28 @@ function deserialize_payment_PoorMethodsRequest(buffer_arg) {
|
|
|
719
752
|
return payment_pb.PoorMethodsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
720
753
|
}
|
|
721
754
|
|
|
755
|
+
function serialize_payment_PrepareGameplayPrecisionCommandRequest(arg) {
|
|
756
|
+
if (!(arg instanceof payment_pb.PrepareGameplayPrecisionCommandRequest)) {
|
|
757
|
+
throw new Error('Expected argument of type payment.PrepareGameplayPrecisionCommandRequest');
|
|
758
|
+
}
|
|
759
|
+
return Buffer.from(arg.serializeBinary());
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
function deserialize_payment_PrepareGameplayPrecisionCommandRequest(buffer_arg) {
|
|
763
|
+
return payment_pb.PrepareGameplayPrecisionCommandRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
function serialize_payment_PrepareGameplayPrecisionCommandResponse(arg) {
|
|
767
|
+
if (!(arg instanceof payment_pb.PrepareGameplayPrecisionCommandResponse)) {
|
|
768
|
+
throw new Error('Expected argument of type payment.PrepareGameplayPrecisionCommandResponse');
|
|
769
|
+
}
|
|
770
|
+
return Buffer.from(arg.serializeBinary());
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
function deserialize_payment_PrepareGameplayPrecisionCommandResponse(buffer_arg) {
|
|
774
|
+
return payment_pb.PrepareGameplayPrecisionCommandResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
775
|
+
}
|
|
776
|
+
|
|
722
777
|
function serialize_payment_ProcessedDepositResponse(arg) {
|
|
723
778
|
if (!(arg instanceof payment_pb.ProcessedDepositResponse)) {
|
|
724
779
|
throw new Error('Expected argument of type payment.ProcessedDepositResponse');
|
|
@@ -796,6 +851,17 @@ function deserialize_payment_ProviderTranslationResponse(buffer_arg) {
|
|
|
796
851
|
return payment_pb.ProviderTranslationResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
797
852
|
}
|
|
798
853
|
|
|
854
|
+
function serialize_payment_RegisterGameplayPrecisionSessionRequest(arg) {
|
|
855
|
+
if (!(arg instanceof payment_pb.RegisterGameplayPrecisionSessionRequest)) {
|
|
856
|
+
throw new Error('Expected argument of type payment.RegisterGameplayPrecisionSessionRequest');
|
|
857
|
+
}
|
|
858
|
+
return Buffer.from(arg.serializeBinary());
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
function deserialize_payment_RegisterGameplayPrecisionSessionRequest(buffer_arg) {
|
|
862
|
+
return payment_pb.RegisterGameplayPrecisionSessionRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
863
|
+
}
|
|
864
|
+
|
|
799
865
|
function serialize_payment_ResolveGameWalletContextRequest(arg) {
|
|
800
866
|
if (!(arg instanceof payment_pb.ResolveGameWalletContextRequest)) {
|
|
801
867
|
throw new Error('Expected argument of type payment.ResolveGameWalletContextRequest');
|
|
@@ -1499,6 +1565,51 @@ userPaymentsInfo: {
|
|
|
1499
1565
|
responseSerialize: serialize_payment_ResolveGameWalletContextResponse,
|
|
1500
1566
|
responseDeserialize: deserialize_payment_ResolveGameWalletContextResponse,
|
|
1501
1567
|
},
|
|
1568
|
+
// Opt-in, commit-confirmed cross-currency gameplay. Legacy RPCs are unchanged.
|
|
1569
|
+
registerGameplayPrecisionSession: {
|
|
1570
|
+
path: '/payment.Payment/registerGameplayPrecisionSession',
|
|
1571
|
+
requestStream: false,
|
|
1572
|
+
responseStream: false,
|
|
1573
|
+
requestType: payment_pb.RegisterGameplayPrecisionSessionRequest,
|
|
1574
|
+
responseType: payment_pb.GameplayPrecisionResult,
|
|
1575
|
+
requestSerialize: serialize_payment_RegisterGameplayPrecisionSessionRequest,
|
|
1576
|
+
requestDeserialize: deserialize_payment_RegisterGameplayPrecisionSessionRequest,
|
|
1577
|
+
responseSerialize: serialize_payment_GameplayPrecisionResult,
|
|
1578
|
+
responseDeserialize: deserialize_payment_GameplayPrecisionResult,
|
|
1579
|
+
},
|
|
1580
|
+
executeGameplayPrecisionCommand: {
|
|
1581
|
+
path: '/payment.Payment/executeGameplayPrecisionCommand',
|
|
1582
|
+
requestStream: false,
|
|
1583
|
+
responseStream: false,
|
|
1584
|
+
requestType: payment_pb.ExecuteGameplayPrecisionCommandRequest,
|
|
1585
|
+
responseType: payment_pb.GameplayPrecisionResult,
|
|
1586
|
+
requestSerialize: serialize_payment_ExecuteGameplayPrecisionCommandRequest,
|
|
1587
|
+
requestDeserialize: deserialize_payment_ExecuteGameplayPrecisionCommandRequest,
|
|
1588
|
+
responseSerialize: serialize_payment_GameplayPrecisionResult,
|
|
1589
|
+
responseDeserialize: deserialize_payment_GameplayPrecisionResult,
|
|
1590
|
+
},
|
|
1591
|
+
readGameplayPrecisionBalance: {
|
|
1592
|
+
path: '/payment.Payment/readGameplayPrecisionBalance',
|
|
1593
|
+
requestStream: false,
|
|
1594
|
+
responseStream: false,
|
|
1595
|
+
requestType: payment_pb.GameplayPrecisionSessionRequest,
|
|
1596
|
+
responseType: payment_pb.GameplayPrecisionResult,
|
|
1597
|
+
requestSerialize: serialize_payment_GameplayPrecisionSessionRequest,
|
|
1598
|
+
requestDeserialize: deserialize_payment_GameplayPrecisionSessionRequest,
|
|
1599
|
+
responseSerialize: serialize_payment_GameplayPrecisionResult,
|
|
1600
|
+
responseDeserialize: deserialize_payment_GameplayPrecisionResult,
|
|
1601
|
+
},
|
|
1602
|
+
closeGameplayPrecisionSession: {
|
|
1603
|
+
path: '/payment.Payment/closeGameplayPrecisionSession',
|
|
1604
|
+
requestStream: false,
|
|
1605
|
+
responseStream: false,
|
|
1606
|
+
requestType: payment_pb.GameplayPrecisionSessionRequest,
|
|
1607
|
+
responseType: payment_pb.GameplayPrecisionResult,
|
|
1608
|
+
requestSerialize: serialize_payment_GameplayPrecisionSessionRequest,
|
|
1609
|
+
requestDeserialize: deserialize_payment_GameplayPrecisionSessionRequest,
|
|
1610
|
+
responseSerialize: serialize_payment_GameplayPrecisionResult,
|
|
1611
|
+
responseDeserialize: deserialize_payment_GameplayPrecisionResult,
|
|
1612
|
+
},
|
|
1502
1613
|
// Segmentation
|
|
1503
1614
|
getSegmentedUsers: {
|
|
1504
1615
|
path: '/payment.Payment/getSegmentedUsers',
|
|
@@ -1668,6 +1779,17 @@ createManualDeposit: {
|
|
|
1668
1779
|
responseSerialize: serialize_payment_AdjustmentItemsResponse,
|
|
1669
1780
|
responseDeserialize: deserialize_payment_AdjustmentItemsResponse,
|
|
1670
1781
|
},
|
|
1782
|
+
prepareGameplayPrecisionCommand: {
|
|
1783
|
+
path: '/payment.Payment/prepareGameplayPrecisionCommand',
|
|
1784
|
+
requestStream: false,
|
|
1785
|
+
responseStream: false,
|
|
1786
|
+
requestType: payment_pb.PrepareGameplayPrecisionCommandRequest,
|
|
1787
|
+
responseType: payment_pb.PrepareGameplayPrecisionCommandResponse,
|
|
1788
|
+
requestSerialize: serialize_payment_PrepareGameplayPrecisionCommandRequest,
|
|
1789
|
+
requestDeserialize: deserialize_payment_PrepareGameplayPrecisionCommandRequest,
|
|
1790
|
+
responseSerialize: serialize_payment_PrepareGameplayPrecisionCommandResponse,
|
|
1791
|
+
responseDeserialize: deserialize_payment_PrepareGameplayPrecisionCommandResponse,
|
|
1792
|
+
},
|
|
1671
1793
|
};
|
|
1672
1794
|
|
|
1673
1795
|
exports.PaymentClient = grpc.makeGenericClientConstructor(PaymentService, 'Payment');
|