meshtrade 0.0.7__py3-none-any.whl → 0.0.10__py3-none-any.whl

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.

Potentially problematic release.


This version of meshtrade might be problematic. Click here for more details.

Files changed (154) hide show
  1. buf/validate/validate_pb2.py +450 -0
  2. buf/validate/validate_pb2.pyi +627 -0
  3. meshtrade/common/__init__.py +28 -0
  4. meshtrade/common/config.py +30 -0
  5. meshtrade/common/grpc_client.py +202 -0
  6. meshtrade/compliance/client/v1/__init__.py +89 -0
  7. meshtrade/compliance/client/v1/client_pb2.py +2 -2
  8. meshtrade/compliance/client/v1/client_pb2_grpc.py +4 -0
  9. meshtrade/compliance/client/v1/company_pb2.py +2 -2
  10. meshtrade/compliance/client/v1/company_pb2_grpc.py +4 -0
  11. meshtrade/compliance/client/v1/company_representative_pb2.py +2 -2
  12. meshtrade/compliance/client/v1/company_representative_pb2_grpc.py +4 -0
  13. meshtrade/compliance/client/v1/company_representative_role_pb2.py +2 -2
  14. meshtrade/compliance/client/v1/company_representative_role_pb2_grpc.py +4 -0
  15. meshtrade/compliance/client/v1/fund_pb2.py +2 -2
  16. meshtrade/compliance/client/v1/fund_pb2_grpc.py +4 -0
  17. meshtrade/compliance/client/v1/identification_document_type_pb2.py +2 -2
  18. meshtrade/compliance/client/v1/identification_document_type_pb2_grpc.py +4 -0
  19. meshtrade/compliance/client/v1/industry_classification_pb2.py +2 -2
  20. meshtrade/compliance/client/v1/industry_classification_pb2_grpc.py +4 -0
  21. meshtrade/compliance/client/v1/natural_person_connection_type_pb2.py +2 -2
  22. meshtrade/compliance/client/v1/natural_person_connection_type_pb2_grpc.py +4 -0
  23. meshtrade/compliance/client/v1/natural_person_pb2.py +2 -2
  24. meshtrade/compliance/client/v1/natural_person_pb2_grpc.py +4 -0
  25. meshtrade/compliance/client/v1/pep_status_pb2.py +2 -2
  26. meshtrade/compliance/client/v1/pep_status_pb2_grpc.py +4 -0
  27. meshtrade/compliance/client/v1/service_meshpy.py +186 -0
  28. meshtrade/compliance/client/v1/service_options_meshpy.py +65 -0
  29. meshtrade/compliance/client/v1/service_pb2.py +20 -10
  30. meshtrade/compliance/client/v1/service_pb2.pyi +8 -0
  31. meshtrade/compliance/client/v1/service_pb2_grpc.py +192 -0
  32. meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2.py +2 -2
  33. meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2_grpc.py +4 -0
  34. meshtrade/compliance/client/v1/tax_residency_pb2.py +2 -2
  35. meshtrade/compliance/client/v1/tax_residency_pb2_grpc.py +4 -0
  36. meshtrade/compliance/client/v1/trust_pb2.py +2 -2
  37. meshtrade/compliance/client/v1/trust_pb2_grpc.py +4 -0
  38. meshtrade/compliance/client/v1/verification_status_pb2.py +2 -2
  39. meshtrade/compliance/client/v1/verification_status_pb2_grpc.py +4 -0
  40. meshtrade/iam/api_user/v1/__init__.py +99 -0
  41. meshtrade/iam/api_user/v1/api_credentials.py +156 -0
  42. meshtrade/iam/api_user/v1/api_credentials_pb2.py +42 -0
  43. meshtrade/iam/api_user/v1/api_credentials_pb2.pyi +14 -0
  44. meshtrade/iam/api_user/v1/api_credentials_pb2_grpc.py +4 -0
  45. meshtrade/iam/api_user/v1/api_user_pb2.py +48 -0
  46. meshtrade/iam/api_user/v1/api_user_pb2.pyi +49 -0
  47. meshtrade/iam/api_user/v1/api_user_pb2_grpc.py +4 -0
  48. meshtrade/iam/api_user/v1/service.py +58 -0
  49. meshtrade/iam/api_user/v1/service_meshpy.py +255 -0
  50. meshtrade/iam/api_user/v1/service_options_meshpy.py +65 -0
  51. meshtrade/iam/api_user/v1/service_pb2.py +77 -0
  52. meshtrade/iam/api_user/v1/service_pb2.pyi +63 -0
  53. meshtrade/iam/api_user/v1/service_pb2_grpc.py +458 -0
  54. meshtrade/iam/group/v1/__init__.py +63 -0
  55. meshtrade/iam/group/v1/group_pb2.py +2 -2
  56. meshtrade/iam/group/v1/group_pb2_grpc.py +4 -0
  57. meshtrade/iam/group/v1/service_meshpy.py +187 -0
  58. meshtrade/iam/group/v1/service_options_meshpy.py +65 -0
  59. meshtrade/iam/group/v1/service_pb2.py +22 -6
  60. meshtrade/iam/group/v1/service_pb2.pyi +29 -1
  61. meshtrade/iam/group/v1/service_pb2_grpc.py +170 -0
  62. meshtrade/iam/role/v1/__init__.py +44 -0
  63. meshtrade/iam/role/v1/role.py +23 -0
  64. meshtrade/iam/role/v1/role_pb2.py +40 -0
  65. meshtrade/{option/v1/auth_pb2.pyi → iam/role/v1/role_pb2.pyi} +16 -0
  66. meshtrade/iam/role/v1/role_pb2_grpc.py +4 -0
  67. meshtrade/iam/user/v1/__init__.py +53 -0
  68. meshtrade/iam/user/v1/service_meshpy.py +151 -0
  69. meshtrade/iam/user/v1/service_options_meshpy.py +65 -0
  70. meshtrade/iam/user/v1/service_pb2.py +51 -0
  71. meshtrade/iam/user/v1/service_pb2.pyi +19 -0
  72. meshtrade/iam/user/v1/service_pb2_grpc.py +82 -0
  73. meshtrade/{issuance_hub/instrument/v1/instrument_pb2.py → iam/user/v1/user_pb2.py} +7 -7
  74. meshtrade/iam/user/v1/user_pb2.pyi +15 -0
  75. meshtrade/iam/user/v1/user_pb2_grpc.py +4 -0
  76. meshtrade/ledger/transaction/v1/__init__.py +41 -0
  77. meshtrade/ledger/transaction/v1/transaction_action_pb2.py +2 -2
  78. meshtrade/ledger/transaction/v1/transaction_action_pb2_grpc.py +4 -0
  79. meshtrade/ledger/transaction/v1/transaction_state_pb2.py +2 -2
  80. meshtrade/ledger/transaction/v1/transaction_state_pb2_grpc.py +4 -0
  81. meshtrade/option/v1/__init__.py +39 -0
  82. meshtrade/option/v1/{service_type_pb2.py → method_type_pb2.py} +7 -7
  83. meshtrade/option/v1/method_type_pb2.pyi +17 -0
  84. meshtrade/option/v1/method_type_pb2_grpc.py +4 -0
  85. meshtrade/trading/limit_order/v1/__init__.py +53 -0
  86. meshtrade/trading/limit_order/v1/limit_order_pb2.py +2 -2
  87. meshtrade/trading/limit_order/v1/limit_order_pb2_grpc.py +4 -0
  88. meshtrade/trading/limit_order/v1/service_meshpy.py +151 -0
  89. meshtrade/trading/limit_order/v1/service_options_meshpy.py +65 -0
  90. meshtrade/trading/limit_order/v1/service_pb2.py +10 -6
  91. meshtrade/trading/limit_order/v1/service_pb2.pyi +2 -0
  92. meshtrade/trading/limit_order/v1/service_pb2_grpc.py +78 -0
  93. meshtrade/trading/market_order/v1/__init__.py +53 -0
  94. meshtrade/trading/{direct_order/v1/direct_order_pb2.py → market_order/v1/market_order_pb2.py} +7 -7
  95. meshtrade/{issuance_hub/instrument/v1/instrument_pb2.pyi → trading/market_order/v1/market_order_pb2.pyi} +1 -1
  96. meshtrade/trading/market_order/v1/market_order_pb2_grpc.py +4 -0
  97. meshtrade/trading/market_order/v1/service_meshpy.py +151 -0
  98. meshtrade/trading/market_order/v1/service_options_meshpy.py +65 -0
  99. meshtrade/trading/market_order/v1/service_pb2.py +44 -0
  100. meshtrade/trading/{spot → market_order}/v1/service_pb2.pyi +4 -2
  101. meshtrade/trading/market_order/v1/service_pb2_grpc.py +78 -0
  102. meshtrade/type/v1/__init__.py +120 -4
  103. meshtrade/type/v1/address_pb2.py +2 -2
  104. meshtrade/type/v1/address_pb2_grpc.py +4 -0
  105. meshtrade/type/v1/amount.py +2 -8
  106. meshtrade/type/v1/amount_pb2.py +2 -2
  107. meshtrade/type/v1/amount_pb2_grpc.py +4 -0
  108. meshtrade/type/v1/contact_details_pb2.py +2 -2
  109. meshtrade/type/v1/contact_details_pb2_grpc.py +4 -0
  110. meshtrade/type/v1/date.py +373 -0
  111. meshtrade/{trading/spot/v1/spot_pb2.py → type/v1/date_pb2.py} +7 -7
  112. meshtrade/type/v1/date_pb2.pyi +15 -0
  113. meshtrade/type/v1/date_pb2_grpc.py +4 -0
  114. meshtrade/type/v1/decimal_built_in_conversions.py +1 -1
  115. meshtrade/type/v1/decimal_pb2.py +2 -2
  116. meshtrade/type/v1/decimal_pb2_grpc.py +4 -0
  117. meshtrade/type/v1/ledger.py +2 -3
  118. meshtrade/type/v1/ledger_pb2.py +2 -2
  119. meshtrade/type/v1/ledger_pb2_grpc.py +4 -0
  120. meshtrade/type/v1/time_of_day.py +265 -0
  121. meshtrade/type/v1/time_of_day_pb2.py +37 -0
  122. meshtrade/type/v1/time_of_day_pb2.pyi +17 -0
  123. meshtrade/type/v1/time_of_day_pb2_grpc.py +4 -0
  124. meshtrade/type/v1/token_pb2.py +2 -2
  125. meshtrade/type/v1/token_pb2_grpc.py +4 -0
  126. meshtrade/wallet/account/v1/__init__.py +65 -0
  127. meshtrade/wallet/account/v1/account_pb2.py +2 -2
  128. meshtrade/wallet/account/v1/account_pb2_grpc.py +4 -0
  129. meshtrade/wallet/account/v1/service_meshpy.py +204 -0
  130. meshtrade/wallet/account/v1/service_options_meshpy.py +65 -0
  131. meshtrade/wallet/account/v1/service_pb2.py +18 -27
  132. meshtrade/wallet/account/v1/service_pb2.pyi +2 -3
  133. meshtrade/wallet/account/v1/service_pb2_grpc.py +222 -0
  134. meshtrade-0.0.10.dist-info/METADATA +95 -0
  135. meshtrade-0.0.10.dist-info/RECORD +173 -0
  136. {meshtrade-0.0.7.dist-info → meshtrade-0.0.10.dist-info}/top_level.txt +1 -0
  137. meshtrade/issuance_hub/instrument/v1/service_pb2.py +0 -49
  138. meshtrade/issuance_hub/instrument/v1/service_pb2.pyi +0 -46
  139. meshtrade/option/v1/auth_pb2.py +0 -40
  140. meshtrade/option/v1/service_type_pb2.pyi +0 -17
  141. meshtrade/trading/direct_order/v1/__init__.py +0 -0
  142. meshtrade/trading/direct_order/v1/direct_order_pb2.pyi +0 -11
  143. meshtrade/trading/direct_order/v1/service_pb2.py +0 -40
  144. meshtrade/trading/direct_order/v1/service_pb2.pyi +0 -12
  145. meshtrade/trading/spot/__init__.py +0 -0
  146. meshtrade/trading/spot/v1/__init__.py +0 -0
  147. meshtrade/trading/spot/v1/service_pb2.py +0 -40
  148. meshtrade/trading/spot/v1/spot_pb2.pyi +0 -11
  149. meshtrade-0.0.7.dist-info/METADATA +0 -35
  150. meshtrade-0.0.7.dist-info/RECORD +0 -102
  151. meshtrade-0.0.7.dist-info/licenses/LICENSE +0 -10
  152. /meshtrade/{iam/role → ledger}/__init__.py +0 -0
  153. /meshtrade/{trading/direct_order → ledger/transaction}/__init__.py +0 -0
  154. {meshtrade-0.0.7.dist-info → meshtrade-0.0.10.dist-info}/WHEEL +0 -0
@@ -0,0 +1,53 @@
1
+ """User v1 package."""
2
+
3
+ # ===================================================================
4
+ # AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
5
+ # ===================================================================
6
+ # This section is automatically managed by protoc-gen-meshpy.
7
+ #
8
+ # DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
9
+ # Your changes will be overwritten during code generation.
10
+ #
11
+ # To add custom imports and exports, scroll down to the
12
+ # "MANUAL SECTION" indicated below.
13
+ # ===================================================================
14
+
15
+ # Generated protobuf imports
16
+ from .user_pb2 import User
17
+ from .service_pb2 import AssignRoleToUserRequest
18
+
19
+ # Generated service imports
20
+ from .service_meshpy import (
21
+ UserService,
22
+ UserServiceGRPCClient,
23
+ UserServiceGRPCClientInterface,
24
+ )
25
+ from .service_options_meshpy import ClientOptions
26
+
27
+ # ===================================================================
28
+ # END OF AUTO-GENERATED SECTION
29
+ # ===================================================================
30
+ #
31
+ # MANUAL SECTION - ADD YOUR CUSTOM IMPORTS AND EXPORTS BELOW
32
+ #
33
+ # You can safely add your own imports, functions, classes, and exports
34
+ # in this section. They will be preserved across code generation.
35
+ #
36
+ # Example:
37
+ # from my_custom_module import my_function
38
+ #
39
+ # ===================================================================
40
+
41
+ # ===================================================================
42
+ # MODULE EXPORTS
43
+ # ===================================================================
44
+ # Combined auto-generated and manual exports
45
+ __all__ = [
46
+ # Generated exports
47
+ "AssignRoleToUserRequest",
48
+ "ClientOptions",
49
+ "User",
50
+ "UserService",
51
+ "UserServiceGRPCClient",
52
+ "UserServiceGRPCClientInterface",
53
+ ]
@@ -0,0 +1,151 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/iam/user/v1/service.proto
3
+
4
+ """
5
+ UserService gRPC service wrapper with authentication, timeouts, and resource management.
6
+
7
+ This module provides a high-level gRPC service for the UserService service that combines
8
+ the service interface with resource management capabilities, providing authentication,
9
+ timeouts, and proper connection handling.
10
+ """
11
+
12
+ from datetime import timedelta
13
+ from typing import Optional
14
+
15
+ from meshtrade.common import BaseGRPCClient
16
+ from meshtrade.iam.api_user.v1.api_credentials import find_credentials
17
+
18
+ from .user_pb2 import User
19
+ from .service_options_meshpy import ServiceOptions
20
+ from .service_pb2 import (
21
+ AssignRoleToUserRequest,
22
+ )
23
+ from .service_pb2_grpc import UserServiceStub
24
+
25
+
26
+ def _create_userservice_stub(channel):
27
+ """Factory function to create UserServiceStub from gRPC channel."""
28
+ return UserServiceStub(channel)
29
+
30
+
31
+ class UserService(BaseGRPCClient):
32
+ """UserService gRPC service with authentication, timeouts, and resource management.
33
+
34
+ This service provides a complete implementation of the UserService with proper authentication, timeout handling, and automatic resource cleanup.
35
+
36
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/iam/user/v1
37
+
38
+ Basic service usage with default SDK Configuration:
39
+ ```python
40
+ service = UserService()
41
+
42
+ with service: # `with` ensures proper clean up of underlying connection after use
43
+ response = service.get_api_user(request)
44
+ ```
45
+
46
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
47
+
48
+ 1. MESH_API_CREDENTIALS environment variable
49
+
50
+ 2. Default credential file location:
51
+
52
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
53
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
54
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
55
+
56
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
57
+
58
+ The service may also be configured with custom options:
59
+ ```python
60
+ from .service_options_meshpy import ServiceOptions
61
+ from datetime import timedelta
62
+
63
+ options = ServiceOptions(
64
+ url="api.staging.example.com",
65
+ port=443,
66
+ api_key="your-api-key",
67
+ group="groups/your-group-id",
68
+ timeout=timedelta(seconds=60)
69
+ )
70
+
71
+ service = UserService(options)
72
+
73
+ with service: # `with` ensures proper clean up of underlying connection after use
74
+ response = service.get_api_user(request)
75
+ ```
76
+
77
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
78
+ """
79
+
80
+ def __init__(self, options: Optional[ServiceOptions] = None):
81
+ """Construct and initialize the UserService service.
82
+
83
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/iam/user/v1
84
+
85
+ Args:
86
+ options: Optional ServiceOptions for configuring the service.
87
+ If None, service is constructed with default configuration.
88
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
89
+
90
+ 1. MESH_API_CREDENTIALS environment variable
91
+
92
+ 2. Default credential file location:
93
+
94
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
95
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
96
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
97
+
98
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
99
+
100
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
101
+
102
+ Example:
103
+ ```python
104
+ # construct with default configuration
105
+ service = UserService()
106
+
107
+ # construct with custom configuration
108
+ options = ServiceOptions(
109
+ url="api.example.com",
110
+ api_key="your-key",
111
+ group="groups/your-group"
112
+ )
113
+ service = UserService(options)
114
+ ```
115
+ """
116
+ if options is None:
117
+ options = ServiceOptions()
118
+
119
+ # Initialize the base client with all common functionality
120
+ super().__init__(
121
+ service_name="UserService",
122
+ stub_factory=_create_userservice_stub,
123
+ find_credentials_func=find_credentials,
124
+ url=options.url,
125
+ port=options.port,
126
+ api_key=options.api_key,
127
+ group=options.group,
128
+ timeout=options.timeout,
129
+ tls=options.tls,
130
+ )
131
+
132
+ def assign_role_to_user(self, request: AssignRoleToUserRequest, timeout: Optional[timedelta] = None) -> User:
133
+ """AssignRoleToUser method.
134
+
135
+ Args:
136
+ request: The AssignRoleToUser request message
137
+ timeout: Optional timeout override for this call
138
+
139
+ Returns:
140
+ The AssignRoleToUser response message
141
+
142
+ Raises:
143
+ grpc.RpcError: If the gRPC call fails
144
+ ValueError: If authentication credentials are missing
145
+ """
146
+ return self._execute_method("AssignRoleToUser", request, timeout)
147
+
148
+
149
+ # Create aliases to match expected exports
150
+ UserServiceGRPCClient = UserService
151
+ UserServiceGRPCClientInterface = UserService
@@ -0,0 +1,65 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/iam/user/v1/service.proto
3
+
4
+ """
5
+ Configuration options for UserService gRPC service.
6
+ This module provides a clean, extensible way to configure the service with optional
7
+ parameters while maintaining backward compatibility and readability.
8
+ """
9
+
10
+ from datetime import timedelta
11
+
12
+
13
+ class ServiceOptions:
14
+ """Configuration options for UserService gRPC service.
15
+
16
+ This class provides a clean, extensible way to configure the service with optional
17
+ parameters while maintaining backward compatibility and readability.
18
+ """
19
+
20
+ def __init__(
21
+ self,
22
+ tls: bool = True,
23
+ url: str | None = None,
24
+ port: int | None = None,
25
+ api_key: str | None = None,
26
+ group: str | None = None,
27
+ timeout: timedelta = timedelta(seconds=30),
28
+ ):
29
+ """Initialize service options.
30
+
31
+ Args:
32
+ tls: Whether to use TLS encryption for the gRPC connection.
33
+ When True, establishes a secure connection using TLS.
34
+ When False, uses an insecure connection.
35
+ Default: True (secure connection)
36
+
37
+ url: The server hostname or IP address (e.g., "api.example.com", "localhost").
38
+ Default: Uses DEFAULT_GRPC_URL from common module
39
+
40
+ port: The server port number (e.g., 443 for HTTPS, 8080 for development).
41
+ Default: Uses DEFAULT_GRPC_PORT from common module
42
+
43
+ api_key: The API key string (without "Bearer " prefix) for authentication.
44
+ The API key will be sent as a Bearer token in the Authorization header.
45
+ This is the primary authentication method for service-to-service communication.
46
+
47
+ group: The group resource name in format groups/{group_id} required for all API requests.
48
+ The group determines the authorization context for operations
49
+ and is sent as an "x-group" header with every request.
50
+
51
+ timeout: The default timeout for all gRPC method calls.
52
+ This timeout applies to individual method calls and helps prevent hanging requests.
53
+ If a request takes longer than the specified timeout, it will be cancelled.
54
+ Default: 30 seconds
55
+ """
56
+ self.tls = tls
57
+ self.url = url
58
+ self.port = port
59
+ self.api_key = api_key
60
+ self.group = group
61
+ self.timeout = timeout
62
+
63
+
64
+ # Create alias to match expected exports
65
+ ClientOptions = ServiceOptions
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/iam/user/v1/service.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'meshtrade/iam/user/v1/service.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
26
+ from meshtrade.iam.role.v1 import role_pb2 as meshtrade_dot_iam_dot_role_dot_v1_dot_role__pb2
27
+ from meshtrade.iam.user.v1 import user_pb2 as meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2
28
+ from meshtrade.option.v1 import method_type_pb2 as meshtrade_dot_option_dot_v1_dot_method__type__pb2
29
+
30
+
31
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtrade/iam/user/v1/service.proto\x12\x15meshtrade.iam.user.v1\x1a\x1b\x62uf/validate/validate.proto\x1a meshtrade/iam/role/v1/role.proto\x1a meshtrade/iam/user/v1/user.proto\x1a%meshtrade/option/v1/method_type.proto\"\x88\x04\n\x17\x41ssignRoleToUserRequest\x12\xac\x01\n\x05\x65mail\x18\x01 \x01(\tB\x95\x01\xbaH\x91\x01r7\x10\x01\x18\xfe\x01\x32\x30^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\xba\x01U\n\x0e\x65mail.required\x12\x33\x65mail is required and must be a valid email address\x1a\x0esize(this) > 0R\x05\x65mail\x12\x9b\x01\n\x05group\x18\x02 \x01(\tB\x84\x01\xbaH\x80\x01r\x05\x10\x01\x18\xff\x01\xba\x01v\n\x0egroup.required\x12?group name is required and must be between 1 and 255 characters\x1a#size(this) > 0 && size(this) <= 255R\x05group\x12\x9f\x01\n\x04role\x18\x03 \x01(\x0e\x32\x1b.meshtrade.iam.role.v1.RoleBn\xbaHk\x82\x01\x04\x10\x01 \x00\xba\x01\x61\n\rrole.required\x12@role is required and must be a valid role type (not UNSPECIFIED)\x1a\x0eint(this) != 0R\x04role2{\n\x0bUserService\x12l\n\x10\x41ssignRoleToUser\x12..meshtrade.iam.user.v1.AssignRoleToUserRequest\x1a\x1b.meshtrade.iam.user.v1.User\"\x0b\xa0\xb5\x18\x02\xaa\xb5\x18\x03\n\x01\x05\x42N\n\x1c\x63o.meshtrade.api.iam.user.v1Z.github.com/meshtrade/api/go/iam/user/v1;userv1b\x06proto3')
32
+
33
+ _globals = globals()
34
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
35
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.iam.user.v1.service_pb2', _globals)
36
+ if not _descriptor._USE_C_DESCRIPTORS:
37
+ _globals['DESCRIPTOR']._loaded_options = None
38
+ _globals['DESCRIPTOR']._serialized_options = b'\n\034co.meshtrade.api.iam.user.v1Z.github.com/meshtrade/api/go/iam/user/v1;userv1'
39
+ _globals['_ASSIGNROLETOUSERREQUEST'].fields_by_name['email']._loaded_options = None
40
+ _globals['_ASSIGNROLETOUSERREQUEST'].fields_by_name['email']._serialized_options = b'\272H\221\001r7\020\001\030\376\00120^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\272\001U\n\016email.required\0223email is required and must be a valid email address\032\016size(this) > 0'
41
+ _globals['_ASSIGNROLETOUSERREQUEST'].fields_by_name['group']._loaded_options = None
42
+ _globals['_ASSIGNROLETOUSERREQUEST'].fields_by_name['group']._serialized_options = b'\272H\200\001r\005\020\001\030\377\001\272\001v\n\016group.required\022?group name is required and must be between 1 and 255 characters\032#size(this) > 0 && size(this) <= 255'
43
+ _globals['_ASSIGNROLETOUSERREQUEST'].fields_by_name['role']._loaded_options = None
44
+ _globals['_ASSIGNROLETOUSERREQUEST'].fields_by_name['role']._serialized_options = b'\272Hk\202\001\004\020\001 \000\272\001a\n\rrole.required\022@role is required and must be a valid role type (not UNSPECIFIED)\032\016int(this) != 0'
45
+ _globals['_USERSERVICE'].methods_by_name['AssignRoleToUser']._loaded_options = None
46
+ _globals['_USERSERVICE'].methods_by_name['AssignRoleToUser']._serialized_options = b'\240\265\030\002\252\265\030\003\n\001\005'
47
+ _globals['_ASSIGNROLETOUSERREQUEST']._serialized_start=199
48
+ _globals['_ASSIGNROLETOUSERREQUEST']._serialized_end=719
49
+ _globals['_USERSERVICE']._serialized_start=721
50
+ _globals['_USERSERVICE']._serialized_end=844
51
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,19 @@
1
+ from buf.validate import validate_pb2 as _validate_pb2
2
+ from meshtrade.iam.role.v1 import role_pb2 as _role_pb2
3
+ from meshtrade.iam.user.v1 import user_pb2 as _user_pb2
4
+ from meshtrade.option.v1 import method_type_pb2 as _method_type_pb2
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
8
+
9
+ DESCRIPTOR: _descriptor.FileDescriptor
10
+
11
+ class AssignRoleToUserRequest(_message.Message):
12
+ __slots__ = ("email", "group", "role")
13
+ EMAIL_FIELD_NUMBER: _ClassVar[int]
14
+ GROUP_FIELD_NUMBER: _ClassVar[int]
15
+ ROLE_FIELD_NUMBER: _ClassVar[int]
16
+ email: str
17
+ group: str
18
+ role: _role_pb2.Role
19
+ def __init__(self, email: _Optional[str] = ..., group: _Optional[str] = ..., role: _Optional[_Union[_role_pb2.Role, str]] = ...) -> None: ...
@@ -0,0 +1,82 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from meshtrade.iam.user.v1 import service_pb2 as meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2
6
+ from meshtrade.iam.user.v1 import user_pb2 as meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2
7
+
8
+
9
+ class UserServiceStub(object):
10
+ """Service defines the RPC methods for interacting with the user resource,
11
+ """
12
+
13
+ def __init__(self, channel):
14
+ """Constructor.
15
+
16
+ Args:
17
+ channel: A grpc.Channel.
18
+ """
19
+ self.AssignRoleToUser = channel.unary_unary(
20
+ '/meshtrade.iam.user.v1.UserService/AssignRoleToUser',
21
+ request_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRoleToUserRequest.SerializeToString,
22
+ response_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
23
+ _registered_method=True)
24
+
25
+
26
+ class UserServiceServicer(object):
27
+ """Service defines the RPC methods for interacting with the user resource,
28
+ """
29
+
30
+ def AssignRoleToUser(self, request, context):
31
+ """Assign Role To User
32
+ """
33
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
34
+ context.set_details('Method not implemented!')
35
+ raise NotImplementedError('Method not implemented!')
36
+
37
+
38
+ def add_UserServiceServicer_to_server(servicer, server):
39
+ rpc_method_handlers = {
40
+ 'AssignRoleToUser': grpc.unary_unary_rpc_method_handler(
41
+ servicer.AssignRoleToUser,
42
+ request_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRoleToUserRequest.FromString,
43
+ response_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.SerializeToString,
44
+ ),
45
+ }
46
+ generic_handler = grpc.method_handlers_generic_handler(
47
+ 'meshtrade.iam.user.v1.UserService', rpc_method_handlers)
48
+ server.add_generic_rpc_handlers((generic_handler,))
49
+ server.add_registered_method_handlers('meshtrade.iam.user.v1.UserService', rpc_method_handlers)
50
+
51
+
52
+ # This class is part of an EXPERIMENTAL API.
53
+ class UserService(object):
54
+ """Service defines the RPC methods for interacting with the user resource,
55
+ """
56
+
57
+ @staticmethod
58
+ def AssignRoleToUser(request,
59
+ target,
60
+ options=(),
61
+ channel_credentials=None,
62
+ call_credentials=None,
63
+ insecure=False,
64
+ compression=None,
65
+ wait_for_ready=None,
66
+ timeout=None,
67
+ metadata=None):
68
+ return grpc.experimental.unary_unary(
69
+ request,
70
+ target,
71
+ '/meshtrade.iam.user.v1.UserService/AssignRoleToUser',
72
+ meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRoleToUserRequest.SerializeToString,
73
+ meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
74
+ options,
75
+ channel_credentials,
76
+ insecure,
77
+ call_credentials,
78
+ compression,
79
+ wait_for_ready,
80
+ timeout,
81
+ metadata,
82
+ _registered_method=True)
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: meshtrade/issuance_hub/instrument/v1/instrument.proto
4
+ # source: meshtrade/iam/user/v1/user.proto
5
5
  # Protobuf Python Version: 6.31.1
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
@@ -15,7 +15,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
15
15
  31,
16
16
  1,
17
17
  '',
18
- 'meshtrade/issuance_hub/instrument/v1/instrument.proto'
18
+ 'meshtrade/iam/user/v1/user.proto'
19
19
  )
20
20
  # @@protoc_insertion_point(imports)
21
21
 
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n5meshtrade/issuance_hub/instrument/v1/instrument.proto\x12$meshtrade.issuance_hub.instrument.v1\"$\n\nInstrument\x12\x16\n\x06number\x18\x01 \x01(\tR\x06numberBEZCgithub.com/meshtrade/api/go/issuance_hub/instrument/v1;instrumentv1b\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n meshtrade/iam/user/v1/user.proto\x12\x15meshtrade.iam.user.v1\"2\n\x04User\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12\x14\n\x05roles\x18\x06 \x03(\tR\x05rolesBN\n\x1c\x63o.meshtrade.api.iam.user.v1Z.github.com/meshtrade/api/go/iam/user/v1;userv1b\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.issuance_hub.instrument.v1.instrument_pb2', _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.iam.user.v1.user_pb2', _globals)
32
32
  if not _descriptor._USE_C_DESCRIPTORS:
33
33
  _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'ZCgithub.com/meshtrade/api/go/issuance_hub/instrument/v1;instrumentv1'
35
- _globals['_INSTRUMENT']._serialized_start=95
36
- _globals['_INSTRUMENT']._serialized_end=131
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n\034co.meshtrade.api.iam.user.v1Z.github.com/meshtrade/api/go/iam/user/v1;userv1'
35
+ _globals['_USER']._serialized_start=59
36
+ _globals['_USER']._serialized_end=109
37
37
  # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,15 @@
1
+ from google.protobuf.internal import containers as _containers
2
+ from google.protobuf import descriptor as _descriptor
3
+ from google.protobuf import message as _message
4
+ from collections.abc import Iterable as _Iterable
5
+ from typing import ClassVar as _ClassVar, Optional as _Optional
6
+
7
+ DESCRIPTOR: _descriptor.FileDescriptor
8
+
9
+ class User(_message.Message):
10
+ __slots__ = ("email", "roles")
11
+ EMAIL_FIELD_NUMBER: _ClassVar[int]
12
+ ROLES_FIELD_NUMBER: _ClassVar[int]
13
+ email: str
14
+ roles: _containers.RepeatedScalarFieldContainer[str]
15
+ def __init__(self, email: _Optional[str] = ..., roles: _Optional[_Iterable[str]] = ...) -> None: ...
@@ -0,0 +1,4 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
@@ -0,0 +1,41 @@
1
+ """Transaction v1 package."""
2
+
3
+ # ===================================================================
4
+ # AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
5
+ # ===================================================================
6
+ # This section is automatically managed by protoc-gen-meshpy.
7
+ #
8
+ # DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
9
+ # Your changes will be overwritten during code generation.
10
+ #
11
+ # To add custom imports and exports, scroll down to the
12
+ # "MANUAL SECTION" indicated below.
13
+ # ===================================================================
14
+
15
+ # Generated protobuf imports
16
+ from .transaction_action_pb2 import TransactionAction
17
+ from .transaction_state_pb2 import TransactionState
18
+
19
+ # ===================================================================
20
+ # END OF AUTO-GENERATED SECTION
21
+ # ===================================================================
22
+ #
23
+ # MANUAL SECTION - ADD YOUR CUSTOM IMPORTS AND EXPORTS BELOW
24
+ #
25
+ # You can safely add your own imports, functions, classes, and exports
26
+ # in this section. They will be preserved across code generation.
27
+ #
28
+ # Example:
29
+ # from my_custom_module import my_function
30
+ #
31
+ # ===================================================================
32
+
33
+ # ===================================================================
34
+ # MODULE EXPORTS
35
+ # ===================================================================
36
+ # Combined auto-generated and manual exports
37
+ __all__ = [
38
+ # Generated exports
39
+ "TransactionAction",
40
+ "TransactionState",
41
+ ]
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8meshtrade/ledger/transaction/v1/transaction_action.proto\x12\x1fmeshtrade.ledger.transaction.v1*\xf8\x01\n\x11TransactionAction\x12\"\n\x1eTRANSACTION_ACTION_UNSPECIFIED\x10\x00\x12!\n\x1dTRANSACTION_ACTION_DO_NOTHING\x10\x01\x12\x1c\n\x18TRANSACTION_ACTION_BUILD\x10\x02\x12\x1d\n\x19TRANSACTION_ACTION_COMMIT\x10\x03\x12\x1b\n\x17TRANSACTION_ACTION_SIGN\x10\x04\x12#\n\x1fTRANSACTION_ACTION_MARK_PENDING\x10\x05\x12\x1d\n\x19TRANSACTION_ACTION_SUBMIT\x10\x06\x42\x41Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1b\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8meshtrade/ledger/transaction/v1/transaction_action.proto\x12\x1fmeshtrade.ledger.transaction.v1*\xf8\x01\n\x11TransactionAction\x12\"\n\x1eTRANSACTION_ACTION_UNSPECIFIED\x10\x00\x12!\n\x1dTRANSACTION_ACTION_DO_NOTHING\x10\x01\x12\x1c\n\x18TRANSACTION_ACTION_BUILD\x10\x02\x12\x1d\n\x19TRANSACTION_ACTION_COMMIT\x10\x03\x12\x1b\n\x17TRANSACTION_ACTION_SIGN\x10\x04\x12#\n\x1fTRANSACTION_ACTION_MARK_PENDING\x10\x05\x12\x1d\n\x19TRANSACTION_ACTION_SUBMIT\x10\x06\x42i\n&co.meshtrade.api.ledger.transaction.v1Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1b\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
31
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.ledger.transaction.v1.transaction_action_pb2', _globals)
32
32
  if not _descriptor._USE_C_DESCRIPTORS:
33
33
  _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1'
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n&co.meshtrade.api.ledger.transaction.v1Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1'
35
35
  _globals['_TRANSACTIONACTION']._serialized_start=94
36
36
  _globals['_TRANSACTIONACTION']._serialized_end=342
37
37
  # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,4 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7meshtrade/ledger/transaction/v1/transaction_state.proto\x12\x1fmeshtrade.ledger.transaction.v1*\xaf\x02\n\x10TransactionState\x12!\n\x1dTRANSACTION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17TRANSACTION_STATE_DRAFT\x10\x01\x12)\n%TRANSACTION_STATE_SIGNING_IN_PROGRESS\x10\x02\x12\x1d\n\x19TRANSACTION_STATE_PENDING\x10\x03\x12,\n(TRANSACTION_STATE_SUBMISSION_IN_PROGRESS\x10\x04\x12\x1c\n\x18TRANSACTION_STATE_FAILED\x10\x05\x12#\n\x1fTRANSACTION_STATE_INDETERMINATE\x10\x06\x12 \n\x1cTRANSACTION_STATE_SUCCESSFUL\x10\x07\x42\x41Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1b\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7meshtrade/ledger/transaction/v1/transaction_state.proto\x12\x1fmeshtrade.ledger.transaction.v1*\xaf\x02\n\x10TransactionState\x12!\n\x1dTRANSACTION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17TRANSACTION_STATE_DRAFT\x10\x01\x12)\n%TRANSACTION_STATE_SIGNING_IN_PROGRESS\x10\x02\x12\x1d\n\x19TRANSACTION_STATE_PENDING\x10\x03\x12,\n(TRANSACTION_STATE_SUBMISSION_IN_PROGRESS\x10\x04\x12\x1c\n\x18TRANSACTION_STATE_FAILED\x10\x05\x12#\n\x1fTRANSACTION_STATE_INDETERMINATE\x10\x06\x12 \n\x1cTRANSACTION_STATE_SUCCESSFUL\x10\x07\x42i\n&co.meshtrade.api.ledger.transaction.v1Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1b\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
31
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.ledger.transaction.v1.transaction_state_pb2', _globals)
32
32
  if not _descriptor._USE_C_DESCRIPTORS:
33
33
  _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1'
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n&co.meshtrade.api.ledger.transaction.v1Z?github.com/meshtrade/api/go/ledger/transaction/v1;transactionv1'
35
35
  _globals['_TRANSACTIONSTATE']._serialized_start=93
36
36
  _globals['_TRANSACTIONSTATE']._serialized_end=396
37
37
  # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,4 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
@@ -0,0 +1,39 @@
1
+ """Option v1 package."""
2
+
3
+ # ===================================================================
4
+ # AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
5
+ # ===================================================================
6
+ # This section is automatically managed by protoc-gen-meshpy.
7
+ #
8
+ # DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
9
+ # Your changes will be overwritten during code generation.
10
+ #
11
+ # To add custom imports and exports, scroll down to the
12
+ # "MANUAL SECTION" indicated below.
13
+ # ===================================================================
14
+
15
+ # Generated protobuf imports
16
+ from .method_type_pb2 import MethodType
17
+
18
+ # ===================================================================
19
+ # END OF AUTO-GENERATED SECTION
20
+ # ===================================================================
21
+ #
22
+ # MANUAL SECTION - ADD YOUR CUSTOM IMPORTS AND EXPORTS BELOW
23
+ #
24
+ # You can safely add your own imports, functions, classes, and exports
25
+ # in this section. They will be preserved across code generation.
26
+ #
27
+ # Example:
28
+ # from my_custom_module import my_function
29
+ #
30
+ # ===================================================================
31
+
32
+ # ===================================================================
33
+ # MODULE EXPORTS
34
+ # ===================================================================
35
+ # Combined auto-generated and manual exports
36
+ __all__ = [
37
+ # Generated exports
38
+ "MethodType",
39
+ ]