Compare commits
6 Commits
eae6a03222
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| f2bf697984 | |||
| 09782d739d | |||
| 2f77f29118 | |||
| 6b789cfdc1 | |||
| d1cdbfd7de | |||
| 729331b0fa |
@@ -6,6 +6,7 @@ import "auth/v1/msg.proto";
|
|||||||
import "base/v1/msg.proto";
|
import "base/v1/msg.proto";
|
||||||
|
|
||||||
service InternalAuthorizationService {
|
service InternalAuthorizationService {
|
||||||
|
rpc GetUserAnalytics(base.v1.Empty) returns (UserAnalytics);
|
||||||
rpc InternalAuthorizationSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
rpc InternalAuthorizationSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
||||||
rpc LookUpName(LookUpNameReq) returns (LookUpNameRes) {}
|
rpc LookUpName(LookUpNameReq) returns (LookUpNameRes) {}
|
||||||
// This meant to only be used in a worker process
|
// This meant to only be used in a worker process
|
||||||
@@ -21,3 +22,8 @@ service InternalAuthorizationService {
|
|||||||
rpc AssignRoleToUser(AssignRoleToUserReq) returns (InternalIAM) {}
|
rpc AssignRoleToUser(AssignRoleToUserReq) returns (InternalIAM) {}
|
||||||
rpc AssignPermissionToUser(AssignPermissionToUserReq) returns (InternalIAM) {}
|
rpc AssignPermissionToUser(AssignPermissionToUserReq) returns (InternalIAM) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message UserAnalytics {
|
||||||
|
int64 user_count = 1;
|
||||||
|
map<string, int64> user_count_by_kyc_level = 2;
|
||||||
|
}
|
||||||
|
|||||||
@@ -253,3 +253,13 @@ message RetrySettlementRequest {
|
|||||||
message RetrySettlementResponse {
|
message RetrySettlementResponse {
|
||||||
Settlement settlement = 1;
|
Settlement settlement = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message IgnoreSettlementRequest {
|
||||||
|
string settlement_id = 1;
|
||||||
|
string actor_id = 2;
|
||||||
|
string reason = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message IgnoreSettlementResponse {
|
||||||
|
Settlement settlement = 1;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,4 +23,7 @@ service GeneralLedgerService {
|
|||||||
rpc GetSettlement(GetSettlementRequest) returns (Settlement);
|
rpc GetSettlement(GetSettlementRequest) returns (Settlement);
|
||||||
// Restricted operator command. Requires the configured x-admin-token metadata.
|
// Restricted operator command. Requires the configured x-admin-token metadata.
|
||||||
rpc RetrySettlement(RetrySettlementRequest) returns (RetrySettlementResponse);
|
rpc RetrySettlement(RetrySettlementRequest) returns (RetrySettlementResponse);
|
||||||
|
// Operator-reviewed, terminal dismissal. Does not confirm or reverse payment.
|
||||||
|
// Requires x-admin-token and a recorded reason; only unlocked failed settlements.
|
||||||
|
rpc IgnoreSettlement(IgnoreSettlementRequest) returns (IgnoreSettlementResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,13 @@ service InternalWalletSrv {
|
|||||||
rpc AdminDeactivateAsset(AdminDeactivateAssetReq) returns (base.v1.StatusRes);
|
rpc AdminDeactivateAsset(AdminDeactivateAssetReq) returns (base.v1.StatusRes);
|
||||||
|
|
||||||
rpc AdminApproveIRTWithdrawal(AdminApproveIRTWithdrawalReq) returns (base.v1.StatusRes);
|
rpc AdminApproveIRTWithdrawal(AdminApproveIRTWithdrawalReq) returns (base.v1.StatusRes);
|
||||||
|
// Cancels an unapproved request and releases its reservation atomically.
|
||||||
|
rpc AdminCancelIRTWithdrawal(AdminCancelIRTWithdrawalReq) returns (base.v1.StatusRes);
|
||||||
|
// Cancel only an undecided ICO agreement, atomically against user acceptance.
|
||||||
|
rpc AdminCancelICOAgreement(AdminCancelICOAgreementReq) returns (base.v1.StatusRes);
|
||||||
|
|
||||||
|
// Bank statement receipts are checked and confirmed through the wallet owner.
|
||||||
|
// Confirmation is idempotent by bank_transaction_number.
|
||||||
|
rpc AdminCheckBankDeposit(AdminBankDepositReq) returns (AdminBankDepositRes);
|
||||||
|
rpc AdminConfirmBankDeposit(AdminBankDepositReq) returns (AdminBankDepositRes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -236,6 +236,24 @@ message AdminApproveIRTWithdrawalReq {
|
|||||||
int64 actor_user_id = 3;
|
int64 actor_user_id = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message AdminBankDepositReq {
|
||||||
|
string bank_transaction_number = 1;
|
||||||
|
string depositor_id = 2; // ten-digit national ID followed by the two-digit checksum
|
||||||
|
int64 amount_rial = 3;
|
||||||
|
string paid_at = 4; // RFC3339
|
||||||
|
int64 user_id = 5; // wallet verifies this user's national ID against depositor_id
|
||||||
|
int64 actor_user_id = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AdminBankDepositRes {
|
||||||
|
int64 user_id = 1;
|
||||||
|
string national_id = 2;
|
||||||
|
int64 transaction_id = 3; // zero until confirmed
|
||||||
|
bool already_registered = 4;
|
||||||
|
string amount_irt = 5; // exact decimal amount
|
||||||
|
string status = 6;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BNPL - not really but close name
|
BNPL - not really but close name
|
||||||
*/
|
*/
|
||||||
@@ -880,3 +898,15 @@ message AdminDeactivateAssetReq {
|
|||||||
message AdminAssetMutationRes {
|
message AdminAssetMutationRes {
|
||||||
int64 asset_id = 1;
|
int64 asset_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Administrative cancellation never changes a decided agreement or moves funds.
|
||||||
|
message AdminCancelICOAgreementReq {
|
||||||
|
uint64 agreement_id = 1;
|
||||||
|
int64 actor_user_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AdminCancelIRTWithdrawalReq {
|
||||||
|
uint64 withdraw_log_id = 1;
|
||||||
|
string reason = 2;
|
||||||
|
int64 actor_user_id = 3;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import "base/v1/msg.proto";
|
|||||||
import "wallet/v1/msg.proto";
|
import "wallet/v1/msg.proto";
|
||||||
|
|
||||||
service WalletService {
|
service WalletService {
|
||||||
|
rpc GetWalletAnalytics(base.v1.Empty) returns (WalletAnalytics);
|
||||||
rpc WalletSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
rpc WalletSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
||||||
|
|
||||||
rpc GetNetworkList(base.v1.Empty) returns (NetworkList);
|
rpc GetNetworkList(base.v1.Empty) returns (NetworkList);
|
||||||
@@ -68,3 +69,10 @@ service WalletService {
|
|||||||
rpc DeclineBuyContract(DeclineBuyContractReq) returns (base.v1.StatusRes);
|
rpc DeclineBuyContract(DeclineBuyContractReq) returns (base.v1.StatusRes);
|
||||||
// rpc GenerateMarketContract(MarketContractReq) returns (ContractRes);
|
// rpc GenerateMarketContract(MarketContractReq) returns (ContractRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message WalletAnalytics {
|
||||||
|
int64 transaction_count = 1;
|
||||||
|
map<string, int64> transaction_count_by_type = 2;
|
||||||
|
int64 account_count = 3;
|
||||||
|
int64 project_count = 4;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user