meshtrade 0.0.6__py3-none-any.whl → 0.0.8__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 (30) hide show
  1. meshtrade/compliance/client/v1/__init__.py +31 -0
  2. meshtrade/iam/group/v1/__init__.py +5 -0
  3. meshtrade/issuance_hub/instrument/v1/__init__.py +11 -0
  4. meshtrade/ledger/__init__.py +0 -0
  5. meshtrade/ledger/transaction/__init__.py +0 -0
  6. meshtrade/ledger/transaction/v1/__init__.py +7 -0
  7. meshtrade/option/v1/__init__.py +7 -0
  8. meshtrade/option/v1/auth_pb2.py +5 -5
  9. meshtrade/option/v1/auth_pb2.pyi +12 -12
  10. meshtrade/trading/direct_order/v1/__init__.py +7 -0
  11. meshtrade/trading/limit_order/v1/__init__.py +7 -0
  12. meshtrade/trading/spot/v1/__init__.py +7 -0
  13. meshtrade/type/v1/__init__.py +79 -2
  14. meshtrade/type/v1/date.py +201 -0
  15. meshtrade/type/v1/date_pb2.py +37 -0
  16. meshtrade/type/v1/date_pb2.pyi +15 -0
  17. meshtrade/type/v1/ledger.py +1 -2
  18. meshtrade/type/v1/time_of_day.py +300 -0
  19. meshtrade/type/v1/time_of_day_pb2.py +37 -0
  20. meshtrade/type/v1/time_of_day_pb2.pyi +17 -0
  21. meshtrade/wallet/account/v1/__init__.py +19 -0
  22. meshtrade/wallet/account/v1/service_pb2.py +15 -24
  23. meshtrade/wallet/account/v1/service_pb2.pyi +0 -1
  24. {meshtrade-0.0.6.dist-info → meshtrade-0.0.8.dist-info}/METADATA +1 -1
  25. {meshtrade-0.0.6.dist-info → meshtrade-0.0.8.dist-info}/RECORD +30 -19
  26. /meshtrade/{iam/role → issuance_hub}/__init__.py +0 -0
  27. /meshtrade/{iam/role/v1 → issuance_hub/instrument}/__init__.py +0 -0
  28. {meshtrade-0.0.6.dist-info → meshtrade-0.0.8.dist-info}/WHEEL +0 -0
  29. {meshtrade-0.0.6.dist-info → meshtrade-0.0.8.dist-info}/licenses/LICENSE +0 -0
  30. {meshtrade-0.0.6.dist-info → meshtrade-0.0.8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,31 @@
1
+ from .client_pb2 import Client
2
+ from .company_pb2 import Company
3
+ from .company_representative_pb2 import CompanyRepresentative
4
+ from .company_representative_role_pb2 import CompanyRepresentativeRole
5
+ from .fund_pb2 import Fund
6
+ from .identification_document_type_pb2 import IdentificationDocumentType
7
+ from .industry_classification_pb2 import IndustryClassification
8
+ from .natural_person_connection_type_pb2 import NaturalPersonConnectionType
9
+ from .natural_person_pb2 import NaturalPerson
10
+ from .pep_status_pb2 import PepStatus
11
+ from .source_of_income_and_wealth_pb2 import SourceOfIncomeAndWealth
12
+ from .tax_residency_pb2 import TaxResidency
13
+ from .trust_pb2 import Trust
14
+ from .verification_status_pb2 import VerificationStatus
15
+
16
+ __all__ = [
17
+ "Client",
18
+ "Company",
19
+ "CompanyRepresentative",
20
+ "CompanyRepresentativeRole",
21
+ "Fund",
22
+ "IdentificationDocumentType",
23
+ "IndustryClassification",
24
+ "NaturalPerson",
25
+ "NaturalPersonConnectionType",
26
+ "PepStatus",
27
+ "SourceOfIncomeAndWealth",
28
+ "TaxResidency",
29
+ "Trust",
30
+ "VerificationStatus",
31
+ ]
@@ -0,0 +1,5 @@
1
+ from .group_pb2 import Group
2
+
3
+ __all__ = [
4
+ "Group"
5
+ ]
@@ -0,0 +1,11 @@
1
+ from .instrument_pb2 import Instrument
2
+ from .service_pb2 import BurnInstrumentRequest, BurnInstrumentResponse, GetInstrumentRequest, MintInstrumentRequest, MintInstrumentResponse
3
+
4
+ __all__ = [
5
+ "Instrument",
6
+ "GetInstrumentRequest",
7
+ "MintInstrumentRequest",
8
+ "MintInstrumentResponse",
9
+ "BurnInstrumentRequest",
10
+ "BurnInstrumentResponse",
11
+ ]
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ from .transaction_action_pb2 import TransactionAction
2
+ from .transaction_state_pb2 import TransactionState
3
+
4
+ __all__ = [
5
+ "TransactionAction",
6
+ "TransactionState",
7
+ ]
@@ -0,0 +1,7 @@
1
+ from .auth_pb2 import Role
2
+ from .service_type_pb2 import ServiceType
3
+
4
+ __all__ = [
5
+ "Role",
6
+ "ServiceType",
7
+ ]
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
25
25
  from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
26
26
 
27
27
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emeshtrade/option/v1/auth.proto\x12\x13meshtrade.option.v1\x1a google/protobuf/descriptor.proto\"K\n\x10StandardRoleList\x12\x37\n\x05roles\x18\x01 \x03(\x0e\x32!.meshtrade.option.v1.StandardRoleR\x05roles*n\n\x0cStandardRole\x12\x1d\n\x19STANDARD_ROLE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aSTANDARD_ROLE_WALLET_ADMIN\x10\x01\x12\x1f\n\x1bSTANDARD_ROLE_WALLET_VIEWER\x10\x02:l\n\x0estandard_roles\x12\x1c.google.protobuf.FileOptions\x18\xd3\x86\x03 \x01(\x0b\x32%.meshtrade.option.v1.StandardRoleListR\rstandardRoles:n\n\x0erequired_roles\x12\x1e.google.protobuf.MethodOptions\x18\xd5\x86\x03 \x01(\x0b\x32%.meshtrade.option.v1.StandardRoleListR\rrequiredRolesB0Z.github.com/meshtrade/api/go/option/v1;optionv1b\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emeshtrade/option/v1/auth.proto\x12\x13meshtrade.option.v1\x1a google/protobuf/descriptor.proto\";\n\x08RoleList\x12/\n\x05roles\x18\x01 \x03(\x0e\x32\x19.meshtrade.option.v1.RoleR\x05roles*K\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x15\n\x11ROLE_WALLET_ADMIN\x10\x01\x12\x16\n\x12ROLE_WALLET_VIEWER\x10\x02:d\n\x0estandard_roles\x12\x1c.google.protobuf.FileOptions\x18\xd3\x86\x03 \x01(\x0b\x32\x1d.meshtrade.option.v1.RoleListR\rstandardRoles:U\n\x05roles\x12\x1e.google.protobuf.MethodOptions\x18\xd5\x86\x03 \x01(\x0b\x32\x1d.meshtrade.option.v1.RoleListR\x05rolesB0Z.github.com/meshtrade/api/go/option/v1;optionv1b\x06proto3')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -33,8 +33,8 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.option.v1.auth_pb
33
33
  if not _descriptor._USE_C_DESCRIPTORS:
34
34
  _globals['DESCRIPTOR']._loaded_options = None
35
35
  _globals['DESCRIPTOR']._serialized_options = b'Z.github.com/meshtrade/api/go/option/v1;optionv1'
36
- _globals['_STANDARDROLE']._serialized_start=166
37
- _globals['_STANDARDROLE']._serialized_end=276
38
- _globals['_STANDARDROLELIST']._serialized_start=89
39
- _globals['_STANDARDROLELIST']._serialized_end=164
36
+ _globals['_ROLE']._serialized_start=150
37
+ _globals['_ROLE']._serialized_end=225
38
+ _globals['_ROLELIST']._serialized_start=89
39
+ _globals['_ROLELIST']._serialized_end=148
40
40
  # @@protoc_insertion_point(module_scope)
@@ -8,21 +8,21 @@ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
8
8
 
9
9
  DESCRIPTOR: _descriptor.FileDescriptor
10
10
 
11
- class StandardRole(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
11
+ class Role(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
12
12
  __slots__ = ()
13
- STANDARD_ROLE_UNSPECIFIED: _ClassVar[StandardRole]
14
- STANDARD_ROLE_WALLET_ADMIN: _ClassVar[StandardRole]
15
- STANDARD_ROLE_WALLET_VIEWER: _ClassVar[StandardRole]
16
- STANDARD_ROLE_UNSPECIFIED: StandardRole
17
- STANDARD_ROLE_WALLET_ADMIN: StandardRole
18
- STANDARD_ROLE_WALLET_VIEWER: StandardRole
13
+ ROLE_UNSPECIFIED: _ClassVar[Role]
14
+ ROLE_WALLET_ADMIN: _ClassVar[Role]
15
+ ROLE_WALLET_VIEWER: _ClassVar[Role]
16
+ ROLE_UNSPECIFIED: Role
17
+ ROLE_WALLET_ADMIN: Role
18
+ ROLE_WALLET_VIEWER: Role
19
19
  STANDARD_ROLES_FIELD_NUMBER: _ClassVar[int]
20
20
  standard_roles: _descriptor.FieldDescriptor
21
- REQUIRED_ROLES_FIELD_NUMBER: _ClassVar[int]
22
- required_roles: _descriptor.FieldDescriptor
21
+ ROLES_FIELD_NUMBER: _ClassVar[int]
22
+ roles: _descriptor.FieldDescriptor
23
23
 
24
- class StandardRoleList(_message.Message):
24
+ class RoleList(_message.Message):
25
25
  __slots__ = ("roles",)
26
26
  ROLES_FIELD_NUMBER: _ClassVar[int]
27
- roles: _containers.RepeatedScalarFieldContainer[StandardRole]
28
- def __init__(self, roles: _Optional[_Iterable[_Union[StandardRole, str]]] = ...) -> None: ...
27
+ roles: _containers.RepeatedScalarFieldContainer[Role]
28
+ def __init__(self, roles: _Optional[_Iterable[_Union[Role, str]]] = ...) -> None: ...
@@ -0,0 +1,7 @@
1
+ from .direct_order_pb2 import DirectOrder
2
+ from .service_pb2 import GetDirectOrderRequest
3
+
4
+ __all__ = [
5
+ "DirectOrder",
6
+ "GetDirectOrderRequest",
7
+ ]
@@ -0,0 +1,7 @@
1
+ from .limit_order_pb2 import LimitOrder
2
+ from .service_pb2 import GetLimitOrderRequest
3
+
4
+ __all__ = [
5
+ "LimitOrder",
6
+ "GetLimitOrderRequest",
7
+ ]
@@ -0,0 +1,7 @@
1
+ from .service_pb2 import GetSpotRequest
2
+ from .spot_pb2 import Spot
3
+
4
+ __all__ = [
5
+ "Spot",
6
+ "GetSpotRequest",
7
+ ]
@@ -1,7 +1,84 @@
1
+ from .address_pb2 import Address
1
2
  from .amount import new_amount
3
+ from .amount_pb2 import Amount
4
+ from .contact_details_pb2 import ContactDetails
5
+ from .date import (
6
+ date_to_python_date,
7
+ date_to_string,
8
+ new_date,
9
+ new_date_from_python_date,
10
+ )
11
+ from .date import (
12
+ is_complete as date_is_complete,
13
+ )
14
+ from .date import (
15
+ is_month_day as date_is_month_day,
16
+ )
17
+ from .date import (
18
+ is_valid as date_is_valid,
19
+ )
20
+ from .date import (
21
+ is_year_month as date_is_year_month,
22
+ )
23
+ from .date import (
24
+ is_year_only as date_is_year_only,
25
+ )
26
+ from .date_pb2 import Date
2
27
  from .decimal_built_in_conversions import built_in_to_decimal, decimal_to_built_in
3
28
  from .decimal_pb2 import Decimal
4
- from .ledger_pb2 import Ledger
5
29
  from .ledger import get_ledger_no_decimal_places
30
+ from .ledger_pb2 import Ledger
31
+ from .time_of_day import (
32
+ is_end_of_day,
33
+ is_midnight,
34
+ new_time_of_day,
35
+ new_time_of_day_from_datetime,
36
+ new_time_of_day_from_python_time,
37
+ new_time_of_day_from_timedelta,
38
+ time_of_day_to_datetime_with_date,
39
+ time_of_day_to_python_time,
40
+ time_of_day_to_string,
41
+ time_of_day_to_timedelta,
42
+ total_seconds,
43
+ )
44
+ from .time_of_day import (
45
+ is_valid as time_of_day_is_valid,
46
+ )
47
+ from .time_of_day_pb2 import TimeOfDay
6
48
  from .token_pb2 import Token
7
- from .amount_pb2 import Amount
49
+
50
+ __all__ = [
51
+ "Address",
52
+ "new_amount",
53
+ "Amount",
54
+ "ContactDetails",
55
+ "new_date",
56
+ "new_date_from_python_date",
57
+ "date_to_python_date",
58
+ "date_is_valid",
59
+ "date_is_complete",
60
+ "date_is_year_only",
61
+ "date_is_year_month",
62
+ "date_is_month_day",
63
+ "date_to_string",
64
+ "Date",
65
+ "built_in_to_decimal",
66
+ "decimal_to_built_in",
67
+ "Decimal",
68
+ "get_ledger_no_decimal_places",
69
+ "Ledger",
70
+ "new_time_of_day",
71
+ "new_time_of_day_from_python_time",
72
+ "new_time_of_day_from_datetime",
73
+ "new_time_of_day_from_timedelta",
74
+ "time_of_day_to_python_time",
75
+ "time_of_day_to_timedelta",
76
+ "time_of_day_to_datetime_with_date",
77
+ "time_of_day_is_valid",
78
+ "is_midnight",
79
+ "is_end_of_day",
80
+ "time_of_day_to_string",
81
+ "total_seconds",
82
+ "TimeOfDay",
83
+ "Token",
84
+ ]
@@ -0,0 +1,201 @@
1
+ """
2
+ This module provides helper functions for working with Date protobuf messages.
3
+ """
4
+
5
+ from datetime import date as python_date
6
+
7
+ from .date_pb2 import Date
8
+
9
+
10
+ def new_date(year: int, month: int, day: int) -> Date:
11
+ """Creates a new Date from year, month, and day values.
12
+
13
+ Args:
14
+ year: Year value (1-9999, or 0 for partial dates)
15
+ month: Month value (1-12, or 0 for partial dates)
16
+ day: Day value (1-31, or 0 for partial dates)
17
+
18
+ Returns:
19
+ A Date protobuf message
20
+
21
+ Raises:
22
+ ValueError: If the date values are invalid
23
+ """
24
+ _validate_date(year, month, day)
25
+ return Date(year=year, month=month, day=day)
26
+
27
+
28
+ def new_date_from_python_date(python_date_obj: python_date) -> Date:
29
+ """Creates a Date from a Python date object.
30
+
31
+ Args:
32
+ python_date_obj: A Python datetime.date object
33
+
34
+ Returns:
35
+ A Date protobuf message
36
+ """
37
+ return Date(
38
+ year=python_date_obj.year,
39
+ month=python_date_obj.month,
40
+ day=python_date_obj.day
41
+ )
42
+
43
+
44
+ def date_to_python_date(date_obj: Date) -> python_date:
45
+ """Converts a Date protobuf message to a Python date object.
46
+
47
+ Args:
48
+ date_obj: A Date protobuf message
49
+
50
+ Returns:
51
+ A Python datetime.date object
52
+
53
+ Raises:
54
+ ValueError: If the date is incomplete or invalid
55
+ """
56
+ if not date_obj:
57
+ raise ValueError("Date object is None")
58
+
59
+ if not is_complete(date_obj):
60
+ raise ValueError(f"Incomplete date: year={date_obj.year}, month={date_obj.month}, day={date_obj.day}")
61
+
62
+ try:
63
+ return python_date(date_obj.year, date_obj.month, date_obj.day)
64
+ except ValueError as e:
65
+ raise ValueError(f"Invalid date values: {e}")
66
+
67
+
68
+ def is_valid(date_obj: Date | None) -> bool:
69
+ """Checks if a Date has valid values according to the protobuf constraints.
70
+
71
+ Args:
72
+ date_obj: A Date protobuf message or None
73
+
74
+ Returns:
75
+ True if the date is valid, False otherwise
76
+ """
77
+ if not date_obj:
78
+ return False
79
+
80
+ try:
81
+ _validate_date(date_obj.year, date_obj.month, date_obj.day)
82
+ return True
83
+ except ValueError:
84
+ return False
85
+
86
+
87
+ def is_complete(date_obj: Date | None) -> bool:
88
+ """Returns True if the date has non-zero year, month, and day values.
89
+
90
+ Args:
91
+ date_obj: A Date protobuf message or None
92
+
93
+ Returns:
94
+ True if the date is complete, False otherwise
95
+ """
96
+ if not date_obj:
97
+ return False
98
+ return date_obj.year != 0 and date_obj.month != 0 and date_obj.day != 0
99
+
100
+
101
+ def is_year_only(date_obj: Date | None) -> bool:
102
+ """Returns True if only the year is specified (month and day are 0).
103
+
104
+ Args:
105
+ date_obj: A Date protobuf message or None
106
+
107
+ Returns:
108
+ True if only year is specified, False otherwise
109
+ """
110
+ if not date_obj:
111
+ return False
112
+ return date_obj.year != 0 and date_obj.month == 0 and date_obj.day == 0
113
+
114
+
115
+ def is_year_month(date_obj: Date | None) -> bool:
116
+ """Returns True if year and month are specified but day is 0.
117
+
118
+ Args:
119
+ date_obj: A Date protobuf message or None
120
+
121
+ Returns:
122
+ True if year and month are specified but day is 0, False otherwise
123
+ """
124
+ if not date_obj:
125
+ return False
126
+ return date_obj.year != 0 and date_obj.month != 0 and date_obj.day == 0
127
+
128
+
129
+ def is_month_day(date_obj: Date | None) -> bool:
130
+ """Returns True if month and day are specified but year is 0.
131
+
132
+ Args:
133
+ date_obj: A Date protobuf message or None
134
+
135
+ Returns:
136
+ True if month and day are specified but year is 0, False otherwise
137
+ """
138
+ if not date_obj:
139
+ return False
140
+ return date_obj.year == 0 and date_obj.month != 0 and date_obj.day != 0
141
+
142
+
143
+ def date_to_string(date_obj: Date | None) -> str:
144
+ """Returns a string representation of the date.
145
+
146
+ Args:
147
+ date_obj: A Date protobuf message or None
148
+
149
+ Returns:
150
+ String representation of the date
151
+ """
152
+ if not date_obj:
153
+ return "<None>"
154
+
155
+ if is_complete(date_obj):
156
+ return f"{date_obj.year:04d}-{date_obj.month:02d}-{date_obj.day:02d}"
157
+ elif is_year_only(date_obj):
158
+ return f"{date_obj.year:04d}"
159
+ elif is_year_month(date_obj):
160
+ return f"{date_obj.year:04d}-{date_obj.month:02d}"
161
+ elif is_month_day(date_obj):
162
+ return f"--{date_obj.month:02d}-{date_obj.day:02d}"
163
+ else:
164
+ return f"Date(year={date_obj.year}, month={date_obj.month}, day={date_obj.day})"
165
+
166
+
167
+ def _validate_date(year: int, month: int, day: int) -> None:
168
+ """Validates the year, month, and day values according to Date constraints.
169
+
170
+ Args:
171
+ year: Year value
172
+ month: Month value
173
+ day: Day value
174
+
175
+ Raises:
176
+ ValueError: If the date values are invalid
177
+ """
178
+ # Year validation
179
+ if year != 0 and (year < 1 or year > 9999):
180
+ raise ValueError(f"Year must be 0 or between 1 and 9999, got {year}")
181
+
182
+ # Month validation
183
+ if month != 0 and (month < 1 or month > 12):
184
+ raise ValueError(f"Month must be 0 or between 1 and 12, got {month}")
185
+
186
+ # Day validation
187
+ if day != 0 and (day < 1 or day > 31):
188
+ raise ValueError(f"Day must be 0 or between 1 and 31, got {day}")
189
+
190
+ # Additional validation for complete dates
191
+ if year != 0 and month != 0 and day != 0:
192
+ try:
193
+ python_date(year, month, day)
194
+ except ValueError as e:
195
+ raise ValueError(f"Invalid date: {year}-{month:02d}-{day:02d}: {e}")
196
+
197
+ # Validate partial date combinations
198
+ if year == 0 and month != 0 and day == 0:
199
+ raise ValueError("Month cannot be specified without year")
200
+ if year == 0 and month == 0 and day != 0:
201
+ raise ValueError("Day cannot be specified without month")
@@ -0,0 +1,37 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/type/v1/date.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/type/v1/date.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cmeshtrade/type/v1/date.proto\x12\x11meshtrade.type.v1\"B\n\x04\x44\x61te\x12\x12\n\x04year\x18\x01 \x01(\x05R\x04year\x12\x14\n\x05month\x18\x02 \x01(\x05R\x05month\x12\x10\n\x03\x64\x61y\x18\x03 \x01(\x05R\x03\x64\x61yB,Z*github.com/meshtrade/api/go/type/v1;typev1b\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.type.v1.date_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'Z*github.com/meshtrade/api/go/type/v1;typev1'
35
+ _globals['_DATE']._serialized_start=51
36
+ _globals['_DATE']._serialized_end=117
37
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,15 @@
1
+ from google.protobuf import descriptor as _descriptor
2
+ from google.protobuf import message as _message
3
+ from typing import ClassVar as _ClassVar, Optional as _Optional
4
+
5
+ DESCRIPTOR: _descriptor.FileDescriptor
6
+
7
+ class Date(_message.Message):
8
+ __slots__ = ("year", "month", "day")
9
+ YEAR_FIELD_NUMBER: _ClassVar[int]
10
+ MONTH_FIELD_NUMBER: _ClassVar[int]
11
+ DAY_FIELD_NUMBER: _ClassVar[int]
12
+ year: int
13
+ month: int
14
+ day: int
15
+ def __init__(self, year: _Optional[int] = ..., month: _Optional[int] = ..., day: _Optional[int] = ...) -> None: ...
@@ -1,8 +1,7 @@
1
- from typing import Dict
2
1
 
3
2
  from .ledger_pb2 import Ledger
4
3
 
5
- _ledger_decimal_places: Dict[Ledger, int] = {
4
+ _ledger_decimal_places: dict[Ledger, int] = {
6
5
  Ledger.LEDGER_STELLAR: 7,
7
6
  Ledger.LEDGER_SA_STOCK_BROKERS: 2,
8
7
  }
@@ -0,0 +1,300 @@
1
+ """
2
+ This module provides helper functions for working with TimeOfDay protobuf messages.
3
+ """
4
+
5
+ from datetime import datetime, timedelta
6
+ from datetime import time as python_time
7
+
8
+ from .date_pb2 import Date
9
+ from .time_of_day_pb2 import TimeOfDay
10
+
11
+
12
+ def new_time_of_day(hours: int, minutes: int, seconds: int = 0, nanos: int = 0) -> TimeOfDay:
13
+ """Creates a new TimeOfDay from hours, minutes, seconds, and nanos values.
14
+
15
+ Args:
16
+ hours: Hours value (0-24)
17
+ minutes: Minutes value (0-59)
18
+ seconds: Seconds value (0-60, default 0)
19
+ nanos: Nanoseconds value (0-999999999, default 0)
20
+
21
+ Returns:
22
+ A TimeOfDay protobuf message
23
+
24
+ Raises:
25
+ ValueError: If the time values are invalid
26
+ """
27
+ _validate_time_of_day(hours, minutes, seconds, nanos)
28
+ return TimeOfDay(hours=hours, minutes=minutes, seconds=seconds, nanos=nanos)
29
+
30
+
31
+ def new_time_of_day_from_python_time(python_time_obj: python_time) -> TimeOfDay:
32
+ """Creates a TimeOfDay from a Python time object.
33
+
34
+ Args:
35
+ python_time_obj: A Python datetime.time object
36
+
37
+ Returns:
38
+ A TimeOfDay protobuf message
39
+ """
40
+ return TimeOfDay(
41
+ hours=python_time_obj.hour,
42
+ minutes=python_time_obj.minute,
43
+ seconds=python_time_obj.second,
44
+ nanos=python_time_obj.microsecond * 1000 # Convert microseconds to nanoseconds
45
+ )
46
+
47
+
48
+ def new_time_of_day_from_datetime(datetime_obj: datetime) -> TimeOfDay:
49
+ """Creates a TimeOfDay from a Python datetime object.
50
+ Only extracts the time components, ignoring the date.
51
+
52
+ Args:
53
+ datetime_obj: A Python datetime.datetime object
54
+
55
+ Returns:
56
+ A TimeOfDay protobuf message
57
+ """
58
+ return new_time_of_day_from_python_time(datetime_obj.time())
59
+
60
+
61
+ def new_time_of_day_from_timedelta(delta: timedelta) -> TimeOfDay:
62
+ """Creates a TimeOfDay from a timedelta representing time since midnight.
63
+
64
+ Args:
65
+ delta: A timedelta object representing time elapsed since midnight
66
+
67
+ Returns:
68
+ A TimeOfDay protobuf message
69
+
70
+ Raises:
71
+ ValueError: If the timedelta is negative or >= 24 hours
72
+ """
73
+ if delta.total_seconds() < 0:
74
+ raise ValueError(f"Timedelta cannot be negative: {delta}")
75
+ if delta.total_seconds() >= 24 * 3600:
76
+ raise ValueError(f"Timedelta cannot be 24 hours or more: {delta}")
77
+
78
+ total_seconds = int(delta.total_seconds())
79
+ hours = total_seconds // 3600
80
+ minutes = (total_seconds % 3600) // 60
81
+ seconds = total_seconds % 60
82
+
83
+ # Calculate nanoseconds from microseconds
84
+ nanos = delta.microseconds * 1000
85
+
86
+ return TimeOfDay(hours=hours, minutes=minutes, seconds=seconds, nanos=nanos)
87
+
88
+
89
+ def time_of_day_to_python_time(time_obj: TimeOfDay) -> python_time:
90
+ """Converts a TimeOfDay protobuf message to a Python time object.
91
+
92
+ Args:
93
+ time_obj: A TimeOfDay protobuf message
94
+
95
+ Returns:
96
+ A Python datetime.time object
97
+
98
+ Raises:
99
+ ValueError: If the time is invalid or represents end of day (24:00:00)
100
+ """
101
+ if not time_obj:
102
+ raise ValueError("TimeOfDay object is None")
103
+
104
+ if time_obj.hours == 24:
105
+ raise ValueError("Cannot convert 24:00:00 to Python time object")
106
+
107
+ try:
108
+ return python_time(
109
+ hour=time_obj.hours,
110
+ minute=time_obj.minutes,
111
+ second=time_obj.seconds,
112
+ microsecond=time_obj.nanos // 1000 # Convert nanoseconds to microseconds
113
+ )
114
+ except ValueError as e:
115
+ raise ValueError(f"Invalid time values: {e}")
116
+
117
+
118
+ def time_of_day_to_timedelta(time_obj: TimeOfDay) -> timedelta:
119
+ """Converts a TimeOfDay to a timedelta representing time since midnight.
120
+
121
+ Args:
122
+ time_obj: A TimeOfDay protobuf message
123
+
124
+ Returns:
125
+ A timedelta object representing time elapsed since midnight
126
+ """
127
+ if not time_obj:
128
+ return timedelta()
129
+
130
+ return timedelta(
131
+ hours=time_obj.hours,
132
+ minutes=time_obj.minutes,
133
+ seconds=time_obj.seconds,
134
+ microseconds=time_obj.nanos // 1000 # Convert nanoseconds to microseconds
135
+ )
136
+
137
+
138
+ def time_of_day_to_datetime_with_date(time_obj: TimeOfDay, date_obj: Date) -> datetime:
139
+ """Combines a TimeOfDay with a Date to create a datetime object.
140
+
141
+ Args:
142
+ time_obj: A TimeOfDay protobuf message
143
+ date_obj: A Date protobuf message
144
+
145
+ Returns:
146
+ A Python datetime.datetime object
147
+
148
+ Raises:
149
+ ValueError: If either object is None/invalid or if date is incomplete
150
+ """
151
+ if not time_obj:
152
+ raise ValueError("TimeOfDay object is None")
153
+ if not date_obj:
154
+ raise ValueError("Date object is None")
155
+
156
+ # Import here to avoid circular imports
157
+ from .date import is_complete
158
+
159
+ if not is_complete(date_obj):
160
+ raise ValueError("Date must be complete")
161
+
162
+ if time_obj.hours == 24:
163
+ # Handle end of day by adding a day and setting time to midnight
164
+ base_datetime = datetime(
165
+ year=date_obj.year,
166
+ month=date_obj.month,
167
+ day=date_obj.day,
168
+ hour=0,
169
+ minute=0,
170
+ second=0,
171
+ microsecond=0
172
+ )
173
+ return base_datetime + timedelta(days=1)
174
+
175
+ try:
176
+ return datetime(
177
+ year=date_obj.year,
178
+ month=date_obj.month,
179
+ day=date_obj.day,
180
+ hour=time_obj.hours,
181
+ minute=time_obj.minutes,
182
+ second=time_obj.seconds,
183
+ microsecond=time_obj.nanos // 1000 # Convert nanoseconds to microseconds
184
+ )
185
+ except ValueError as e:
186
+ raise ValueError(f"Invalid datetime values: {e}")
187
+
188
+
189
+ def is_valid(time_obj: TimeOfDay | None) -> bool:
190
+ """Checks if a TimeOfDay has valid values according to the protobuf constraints.
191
+
192
+ Args:
193
+ time_obj: A TimeOfDay protobuf message or None
194
+
195
+ Returns:
196
+ True if the time is valid, False otherwise
197
+ """
198
+ if not time_obj:
199
+ return False
200
+
201
+ try:
202
+ _validate_time_of_day(time_obj.hours, time_obj.minutes, time_obj.seconds, time_obj.nanos)
203
+ return True
204
+ except ValueError:
205
+ return False
206
+
207
+
208
+ def is_midnight(time_obj: TimeOfDay | None) -> bool:
209
+ """Returns True if the time represents midnight (00:00:00.000000000).
210
+
211
+ Args:
212
+ time_obj: A TimeOfDay protobuf message or None
213
+
214
+ Returns:
215
+ True if the time is midnight, False otherwise
216
+ """
217
+ if not time_obj:
218
+ return False
219
+ return (time_obj.hours == 0 and time_obj.minutes == 0 and
220
+ time_obj.seconds == 0 and time_obj.nanos == 0)
221
+
222
+
223
+ def is_end_of_day(time_obj: TimeOfDay | None) -> bool:
224
+ """Returns True if the time represents 24:00:00 (end of day).
225
+
226
+ Args:
227
+ time_obj: A TimeOfDay protobuf message or None
228
+
229
+ Returns:
230
+ True if the time is end of day, False otherwise
231
+ """
232
+ if not time_obj:
233
+ return False
234
+ return (time_obj.hours == 24 and time_obj.minutes == 0 and
235
+ time_obj.seconds == 0 and time_obj.nanos == 0)
236
+
237
+
238
+ def time_of_day_to_string(time_obj: TimeOfDay | None) -> str:
239
+ """Returns a string representation of the time in HH:MM:SS.nnnnnnnnn format.
240
+
241
+ Args:
242
+ time_obj: A TimeOfDay protobuf message or None
243
+
244
+ Returns:
245
+ String representation of the time
246
+ """
247
+ if not time_obj:
248
+ return "<None>"
249
+
250
+ if time_obj.nanos == 0:
251
+ return f"{time_obj.hours:02d}:{time_obj.minutes:02d}:{time_obj.seconds:02d}"
252
+ else:
253
+ return f"{time_obj.hours:02d}:{time_obj.minutes:02d}:{time_obj.seconds:02d}.{time_obj.nanos:09d}"
254
+
255
+
256
+ def total_seconds(time_obj: TimeOfDay | None) -> float:
257
+ """Returns the total number of seconds since midnight as a float.
258
+
259
+ Args:
260
+ time_obj: A TimeOfDay protobuf message or None
261
+
262
+ Returns:
263
+ Total seconds since midnight
264
+ """
265
+ if not time_obj:
266
+ return 0.0
267
+
268
+ return (time_obj.hours * 3600 + time_obj.minutes * 60 +
269
+ time_obj.seconds + time_obj.nanos / 1e9)
270
+
271
+
272
+ def _validate_time_of_day(hours: int, minutes: int, seconds: int, nanos: int) -> None:
273
+ """Validates the hours, minutes, seconds, and nanos values according to TimeOfDay constraints.
274
+
275
+ Args:
276
+ hours: Hours value
277
+ minutes: Minutes value
278
+ seconds: Seconds value
279
+ nanos: Nanoseconds value
280
+
281
+ Raises:
282
+ ValueError: If the time values are invalid
283
+ """
284
+ # Hours validation (0-23, or 24 for end of day scenarios)
285
+ if hours < 0 or hours > 24:
286
+ raise ValueError(f"Hours must be between 0 and 24, got {hours}")
287
+ if hours == 24 and (minutes != 0 or seconds != 0 or nanos != 0):
288
+ raise ValueError("When hours is 24, minutes, seconds, and nanos must be 0")
289
+
290
+ # Minutes validation
291
+ if minutes < 0 or minutes > 59:
292
+ raise ValueError(f"Minutes must be between 0 and 59, got {minutes}")
293
+
294
+ # Seconds validation (0-59, or 60 for leap seconds if allowed)
295
+ if seconds < 0 or seconds > 60:
296
+ raise ValueError(f"Seconds must be between 0 and 60, got {seconds}")
297
+
298
+ # Nanos validation
299
+ if nanos < 0 or nanos > 999999999:
300
+ raise ValueError(f"Nanos must be between 0 and 999,999,999, got {nanos}")
@@ -0,0 +1,37 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/type/v1/time_of_day.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/type/v1/time_of_day.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtrade/type/v1/time_of_day.proto\x12\x11meshtrade.type.v1\"k\n\tTimeOfDay\x12\x14\n\x05hours\x18\x01 \x01(\x05R\x05hours\x12\x18\n\x07minutes\x18\x02 \x01(\x05R\x07minutes\x12\x18\n\x07seconds\x18\x03 \x01(\x05R\x07seconds\x12\x14\n\x05nanos\x18\x04 \x01(\x05R\x05nanosB,Z*github.com/meshtrade/api/go/type/v1;typev1b\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.type.v1.time_of_day_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'Z*github.com/meshtrade/api/go/type/v1;typev1'
35
+ _globals['_TIMEOFDAY']._serialized_start=58
36
+ _globals['_TIMEOFDAY']._serialized_end=165
37
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,17 @@
1
+ from google.protobuf import descriptor as _descriptor
2
+ from google.protobuf import message as _message
3
+ from typing import ClassVar as _ClassVar, Optional as _Optional
4
+
5
+ DESCRIPTOR: _descriptor.FileDescriptor
6
+
7
+ class TimeOfDay(_message.Message):
8
+ __slots__ = ("hours", "minutes", "seconds", "nanos")
9
+ HOURS_FIELD_NUMBER: _ClassVar[int]
10
+ MINUTES_FIELD_NUMBER: _ClassVar[int]
11
+ SECONDS_FIELD_NUMBER: _ClassVar[int]
12
+ NANOS_FIELD_NUMBER: _ClassVar[int]
13
+ hours: int
14
+ minutes: int
15
+ seconds: int
16
+ nanos: int
17
+ def __init__(self, hours: _Optional[int] = ..., minutes: _Optional[int] = ..., seconds: _Optional[int] = ..., nanos: _Optional[int] = ...) -> None: ...
@@ -0,0 +1,19 @@
1
+ from .account_pb2 import Account
2
+ from .service_pb2 import (
3
+ CreateAccountRequest,
4
+ GetAccountRequest,
5
+ ListAccountsRequest,
6
+ ListAccountsResponse,
7
+ SearchAccountsRequest,
8
+ SearchAccountsResponse,
9
+ )
10
+
11
+ __all__ = [
12
+ "Account",
13
+ "CreateAccountRequest",
14
+ "GetAccountRequest",
15
+ "ListAccountsRequest",
16
+ "ListAccountsResponse",
17
+ "SearchAccountsRequest",
18
+ "SearchAccountsResponse",
19
+ ]
@@ -22,14 +22,13 @@ _runtime_version.ValidateProtobufRuntimeVersion(
22
22
  _sym_db = _symbol_database.Default()
23
23
 
24
24
 
25
- from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
26
25
  from meshtrade.option.v1 import auth_pb2 as meshtrade_dot_option_dot_v1_dot_auth__pb2
27
26
  from meshtrade.option.v1 import service_type_pb2 as meshtrade_dot_option_dot_v1_dot_service__type__pb2
28
27
  from meshtrade.type.v1 import ledger_pb2 as meshtrade_dot_type_dot_v1_dot_ledger__pb2
29
28
  from meshtrade.wallet.account.v1 import account_pb2 as meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2
30
29
 
31
30
 
32
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)meshtrade/wallet/account/v1/service.proto\x12\x1bmeshtrade.wallet.account.v1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1emeshtrade/option/v1/auth.proto\x1a&meshtrade/option/v1/service_type.proto\x1a\x1emeshtrade/type/v1/ledger.proto\x1a)meshtrade/wallet/account/v1/account.proto\"\x8b\x01\n\x14\x43reateAccountRequest\x12\"\n\x05label\x18\x01 \x01(\tB\x0c\xbaH\tr\x04\x10\x03\x18\x32\xc8\x01\x01R\x05label\x12;\n\x06ledger\x18\x02 \x01(\x0e\x32\x19.meshtrade.type.v1.LedgerB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x06ledger\x12\x12\n\x04open\x18\x03 \x01(\x08R\x04open\"8\n\x11GetAccountRequest\x12#\n\x06number\x18\x01 \x01(\tB\x0b\xbaH\x08r\x03\x98\x01\x07\xc8\x01\x01R\x06number\"\x15\n\x13ListAccountsRequest\"X\n\x14ListAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts\";\n\x15SearchAccountsRequest\x12\"\n\x05label\x18\x01 \x01(\tB\x0c\xbaH\tr\x04\x10\x03\x18\x32\xc8\x01\x00R\x05label\"Z\n\x16SearchAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts2\x87\x04\n\x0e\x41\x63\x63ountService\x12u\n\rCreateAccount\x12\x31.meshtrade.wallet.account.v1.CreateAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\x0b\xa0\xb5\x18\x02\xaa\xb5\x18\x03\n\x01\x01\x12p\n\nGetAccount\x12..meshtrade.wallet.account.v1.GetAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x12\x81\x01\n\x0cListAccounts\x12\x30.meshtrade.wallet.account.v1.ListAccountsRequest\x1a\x31.meshtrade.wallet.account.v1.ListAccountsResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x12\x87\x01\n\x0eSearchAccounts\x12\x32.meshtrade.wallet.account.v1.SearchAccountsRequest\x1a\x33.meshtrade.wallet.account.v1.SearchAccountsResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x42\x41Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1\x9a\xb5\x18\x04\n\x02\x01\x02\x62\x06proto3')
31
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)meshtrade/wallet/account/v1/service.proto\x12\x1bmeshtrade.wallet.account.v1\x1a\x1emeshtrade/option/v1/auth.proto\x1a&meshtrade/option/v1/service_type.proto\x1a\x1emeshtrade/type/v1/ledger.proto\x1a)meshtrade/wallet/account/v1/account.proto\"s\n\x14\x43reateAccountRequest\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x31\n\x06ledger\x18\x02 \x01(\x0e\x32\x19.meshtrade.type.v1.LedgerR\x06ledger\x12\x12\n\x04open\x18\x03 \x01(\x08R\x04open\"+\n\x11GetAccountRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number\"\x15\n\x13ListAccountsRequest\"X\n\x14ListAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts\"-\n\x15SearchAccountsRequest\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\"Z\n\x16SearchAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts2\x87\x04\n\x0e\x41\x63\x63ountService\x12u\n\rCreateAccount\x12\x31.meshtrade.wallet.account.v1.CreateAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\x0b\xa0\xb5\x18\x02\xaa\xb5\x18\x03\n\x01\x01\x12p\n\nGetAccount\x12..meshtrade.wallet.account.v1.GetAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x12\x81\x01\n\x0cListAccounts\x12\x30.meshtrade.wallet.account.v1.ListAccountsRequest\x1a\x31.meshtrade.wallet.account.v1.ListAccountsResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x12\x87\x01\n\x0eSearchAccounts\x12\x32.meshtrade.wallet.account.v1.SearchAccountsRequest\x1a\x33.meshtrade.wallet.account.v1.SearchAccountsResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x42\x41Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1\x9a\xb5\x18\x04\n\x02\x01\x02\x62\x06proto3')
33
32
 
34
33
  _globals = globals()
35
34
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -37,14 +36,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.wallet.account.v1
37
36
  if not _descriptor._USE_C_DESCRIPTORS:
38
37
  _globals['DESCRIPTOR']._loaded_options = None
39
38
  _globals['DESCRIPTOR']._serialized_options = b'Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1\232\265\030\004\n\002\001\002'
40
- _globals['_CREATEACCOUNTREQUEST'].fields_by_name['label']._loaded_options = None
41
- _globals['_CREATEACCOUNTREQUEST'].fields_by_name['label']._serialized_options = b'\272H\tr\004\020\003\0302\310\001\001'
42
- _globals['_CREATEACCOUNTREQUEST'].fields_by_name['ledger']._loaded_options = None
43
- _globals['_CREATEACCOUNTREQUEST'].fields_by_name['ledger']._serialized_options = b'\272H\005\202\001\002\020\001'
44
- _globals['_GETACCOUNTREQUEST'].fields_by_name['number']._loaded_options = None
45
- _globals['_GETACCOUNTREQUEST'].fields_by_name['number']._serialized_options = b'\272H\010r\003\230\001\007\310\001\001'
46
- _globals['_SEARCHACCOUNTSREQUEST'].fields_by_name['label']._loaded_options = None
47
- _globals['_SEARCHACCOUNTSREQUEST'].fields_by_name['label']._serialized_options = b'\272H\tr\004\020\003\0302\310\001\000'
48
39
  _globals['_ACCOUNTSERVICE'].methods_by_name['CreateAccount']._loaded_options = None
49
40
  _globals['_ACCOUNTSERVICE'].methods_by_name['CreateAccount']._serialized_options = b'\240\265\030\002\252\265\030\003\n\001\001'
50
41
  _globals['_ACCOUNTSERVICE'].methods_by_name['GetAccount']._loaded_options = None
@@ -53,18 +44,18 @@ if not _descriptor._USE_C_DESCRIPTORS:
53
44
  _globals['_ACCOUNTSERVICE'].methods_by_name['ListAccounts']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
54
45
  _globals['_ACCOUNTSERVICE'].methods_by_name['SearchAccounts']._loaded_options = None
55
46
  _globals['_ACCOUNTSERVICE'].methods_by_name['SearchAccounts']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
56
- _globals['_CREATEACCOUNTREQUEST']._serialized_start=251
57
- _globals['_CREATEACCOUNTREQUEST']._serialized_end=390
58
- _globals['_GETACCOUNTREQUEST']._serialized_start=392
59
- _globals['_GETACCOUNTREQUEST']._serialized_end=448
60
- _globals['_LISTACCOUNTSREQUEST']._serialized_start=450
61
- _globals['_LISTACCOUNTSREQUEST']._serialized_end=471
62
- _globals['_LISTACCOUNTSRESPONSE']._serialized_start=473
63
- _globals['_LISTACCOUNTSRESPONSE']._serialized_end=561
64
- _globals['_SEARCHACCOUNTSREQUEST']._serialized_start=563
65
- _globals['_SEARCHACCOUNTSREQUEST']._serialized_end=622
66
- _globals['_SEARCHACCOUNTSRESPONSE']._serialized_start=624
67
- _globals['_SEARCHACCOUNTSRESPONSE']._serialized_end=714
68
- _globals['_ACCOUNTSERVICE']._serialized_start=717
69
- _globals['_ACCOUNTSERVICE']._serialized_end=1236
47
+ _globals['_CREATEACCOUNTREQUEST']._serialized_start=221
48
+ _globals['_CREATEACCOUNTREQUEST']._serialized_end=336
49
+ _globals['_GETACCOUNTREQUEST']._serialized_start=338
50
+ _globals['_GETACCOUNTREQUEST']._serialized_end=381
51
+ _globals['_LISTACCOUNTSREQUEST']._serialized_start=383
52
+ _globals['_LISTACCOUNTSREQUEST']._serialized_end=404
53
+ _globals['_LISTACCOUNTSRESPONSE']._serialized_start=406
54
+ _globals['_LISTACCOUNTSRESPONSE']._serialized_end=494
55
+ _globals['_SEARCHACCOUNTSREQUEST']._serialized_start=496
56
+ _globals['_SEARCHACCOUNTSREQUEST']._serialized_end=541
57
+ _globals['_SEARCHACCOUNTSRESPONSE']._serialized_start=543
58
+ _globals['_SEARCHACCOUNTSRESPONSE']._serialized_end=633
59
+ _globals['_ACCOUNTSERVICE']._serialized_start=636
60
+ _globals['_ACCOUNTSERVICE']._serialized_end=1155
70
61
  # @@protoc_insertion_point(module_scope)
@@ -1,4 +1,3 @@
1
- from buf.validate import validate_pb2 as _validate_pb2
2
1
  from meshtrade.option.v1 import auth_pb2 as _auth_pb2
3
2
  from meshtrade.option.v1 import service_type_pb2 as _service_type_pb2
4
3
  from meshtrade.type.v1 import ledger_pb2 as _ledger_pb2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshtrade
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Integration SDK for Mesh API Services
5
5
  Author-email: Bernard Bussy <bernard@meshtrade.co>
6
6
  License-Expression: LicenseRef-My-Custom-License
@@ -1,7 +1,7 @@
1
1
  meshtrade/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  meshtrade/compliance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  meshtrade/compliance/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- meshtrade/compliance/client/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ meshtrade/compliance/client/v1/__init__.py,sha256=xe7p3ZxHq7TYn60GlF0YEBaIaQupVs5DKa_xmU7XjzY,1064
5
5
  meshtrade/compliance/client/v1/client_pb2.py,sha256=JHUUJSaDWEIL76ZpWikN5z3dME2t5i35kN0XvsjasDU,3553
6
6
  meshtrade/compliance/client/v1/client_pb2.pyi,sha256=TTRVskF2-GWz9vpgYG7DLQ9RTpBSS07wWIAPkte5IeM,2598
7
7
  meshtrade/compliance/client/v1/company_pb2.py,sha256=IHlphoJ2-8CuZVtPHFZplU6i7vq9C4texhDGNkqYJPI,5822
@@ -34,46 +34,51 @@ meshtrade/compliance/client/v1/verification_status_pb2.py,sha256=hDbQfqXI8ysOHNa
34
34
  meshtrade/compliance/client/v1/verification_status_pb2.pyi,sha256=kqP24po3o2Ks8HWAoQ-tLlMirCJCKwxlQlWJXWkRmAI,880
35
35
  meshtrade/iam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  meshtrade/iam/group/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- meshtrade/iam/group/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ meshtrade/iam/group/v1/__init__.py,sha256=IyiMmD3NNNwi63ec9jSShoiUdn9I7h-OKk9FmJnrDHg,56
38
38
  meshtrade/iam/group/v1/group_pb2.py,sha256=_RmnGfyVz05Rq1OupOIenN7MoQlqB4DFMJOJh9efp08,1519
39
39
  meshtrade/iam/group/v1/group_pb2.pyi,sha256=hYHylacNV2llToNzhISbJ5GFXuGtZeEK95LHNnylK90,380
40
40
  meshtrade/iam/group/v1/service_pb2.py,sha256=_MZb6_mL0fH4fzgQGSuBdJ5UGvA3B8Mf6yoNnr8qFXg,1872
41
41
  meshtrade/iam/group/v1/service_pb2.pyi,sha256=a2NpoJK5VbPodThgX6jksggA8EG-HGMVaDw4E7WIl0M,339
42
- meshtrade/iam/role/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
- meshtrade/iam/role/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
+ meshtrade/issuance_hub/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ meshtrade/issuance_hub/instrument/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
+ meshtrade/issuance_hub/instrument/v1/__init__.py,sha256=UiRCA9kAhrqPZR0zORG-M7d9JTYaS7O1R7t05jzimNU,358
44
45
  meshtrade/issuance_hub/instrument/v1/instrument_pb2.py,sha256=MH12krsLsJjdhTQZoxiXxYqy5jQBgte2QutTyjLtbOE,1658
45
46
  meshtrade/issuance_hub/instrument/v1/instrument_pb2.pyi,sha256=7OKPuALjJ0x_qPnAUKAh7jX0d65eSMA9GZrzSm_Lxvo,393
46
47
  meshtrade/issuance_hub/instrument/v1/service_pb2.py,sha256=wCzPgWLuAZwVVMvOl37IRKTP0OS1NdxNxd-VOSqX6c8,3768
47
48
  meshtrade/issuance_hub/instrument/v1/service_pb2.pyi,sha256=vl9Y9VLHIKutzF4Vl7_PITnmiBU9EDSko9G7ZD81j1E,2059
49
+ meshtrade/ledger/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ meshtrade/ledger/transaction/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
+ meshtrade/ledger/transaction/v1/__init__.py,sha256=6esmSr3BOIemwDW1afBZpfDZM9CDsy5zKoU--CUvfsE,170
48
52
  meshtrade/ledger/transaction/v1/transaction_action_pb2.py,sha256=NZ6GOQmTVaYf1xJh1QdOQsezFvYtDhRmTgUMIcT5r1I,1981
49
53
  meshtrade/ledger/transaction/v1/transaction_action_pb2.pyi,sha256=h85ohgkpEu2K6qP4Ge66PowcU2FNaEjXVLlOwff7Log,1067
50
54
  meshtrade/ledger/transaction/v1/transaction_state_pb2.py,sha256=omGyMuS1vpyNBUmCIBc1Kqk7RbtZrpwprV7d79Y00BU,2033
51
55
  meshtrade/ledger/transaction/v1/transaction_state_pb2.pyi,sha256=pl93a9UVYiVEPPrF1SuKUz47CDjytstLLROZ-YpvR8Y,1205
52
- meshtrade/option/v1/auth_pb2.py,sha256=qOfu5U-esUAr0Gj7P2FL262RKBH7ZwtgSePBUIdtcI0,2242
53
- meshtrade/option/v1/auth_pb2.pyi,sha256=nFCf6Khyq5EADZxfsl8CB4SeFsrHumN87_lHo36SoKA,1306
56
+ meshtrade/option/v1/__init__.py,sha256=u_k0Ik08jg7dU7g57HoT1rXKXiHuEf4T_BjtH_9gjBc,115
57
+ meshtrade/option/v1/auth_pb2.py,sha256=2Jod_21noG4sfJv0CEKGyqdfu2wHdjiNbezHemuH6sE,2134
58
+ meshtrade/option/v1/auth_pb2.pyi,sha256=PmphWZWAVZy9BrOcD9w-4gJnoAdZ01G4cwqQBd_g_S0,1154
54
59
  meshtrade/option/v1/service_type_pb2.py,sha256=FEl6PE8rZwuqXcsMpDGfMSjAW__QfLIf7rkdLoQf4wI,1884
55
60
  meshtrade/option/v1/service_type_pb2.pyi,sha256=sWz7M90lqpbHJCdRyFmSDubuVFBoow6SX_vAYvq4LME,695
56
61
  meshtrade/trading/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
62
  meshtrade/trading/direct_order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
- meshtrade/trading/direct_order/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
+ meshtrade/trading/direct_order/v1/__init__.py,sha256=AUm8wNpVkGVbfj3B5VaaB3KGDvpzogIHR_uDMNrq1NE,152
59
64
  meshtrade/trading/direct_order/v1/direct_order_pb2.py,sha256=b23kBE2YhzvDoYudEbpznmCMOf_C5e1jLBMQLo1D8iE,1655
60
65
  meshtrade/trading/direct_order/v1/direct_order_pb2.pyi,sha256=NO_DHoHGFxzTiX5MHJhS7b0szZTXevRNDzxJt5wzt4E,394
61
66
  meshtrade/trading/direct_order/v1/service_pb2.py,sha256=f8AgjE-YADHqEfQo3bgMIBQZNv7mwY-qGdHIRXKIybQ,2145
62
67
  meshtrade/trading/direct_order/v1/service_pb2.pyi,sha256=PcArOyXsBJgCnbtwZVyMt1gM1hGa4nfnAsn6gkrRiqQ,488
63
68
  meshtrade/trading/limit_order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
- meshtrade/trading/limit_order/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
+ meshtrade/trading/limit_order/v1/__init__.py,sha256=a_-Ba8Uc_91TJu2JgJog5gY1iOZ_JFi_41ifeQWTFUg,147
65
70
  meshtrade/trading/limit_order/v1/limit_order_pb2.py,sha256=LPHGKwwh5ZLzwaWaPM7fMwh3_O20cUea9lNkK5_WIfw,1634
66
71
  meshtrade/trading/limit_order/v1/limit_order_pb2.pyi,sha256=qqW6yIlOa146Cr7vuiHBLd8DSOvhhUy3CwJJeC52zFU,393
67
72
  meshtrade/trading/limit_order/v1/service_pb2.py,sha256=5fnim6BIvw0JkpjpYNiPA0JbhIn5iUNcgjwEKnpxaIw,2114
68
73
  meshtrade/trading/limit_order/v1/service_pb2.pyi,sha256=wwOFcr3mzI2-JK9gJ8o_HUkqbwVM_-SYDRpc9Py8N_w,484
69
74
  meshtrade/trading/spot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
- meshtrade/trading/spot/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
+ meshtrade/trading/spot/v1/__init__.py,sha256=UMjL9PwlJ0hrBpmRSSumvAxGzg9WaCAq-K0EWN5W5wM,116
71
76
  meshtrade/trading/spot/v1/service_pb2.py,sha256=SBVtcVpUBTrVxGUVOK-j0BibDPbQnpF7SA6WXnHUDeQ,1937
72
77
  meshtrade/trading/spot/v1/service_pb2.pyi,sha256=GdFcCTEDwZre2NkomiE7WojLfItpPvllkZa7bBNefH0,457
73
78
  meshtrade/trading/spot/v1/spot_pb2.py,sha256=zXtfxzJdH_mfZpadjaIjLpg3rmBUi7sm_9i5-mvuVRc,1534
74
79
  meshtrade/trading/spot/v1/spot_pb2.pyi,sha256=DELXsprA9tDCE2Pn1I7J3qIVgYVEI8oJiT6BPIwrR2I,387
75
80
  meshtrade/type/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
- meshtrade/type/v1/__init__.py,sha256=mN_HvUFZ1uxR6ETeLcxiGYtPluaUSk3Tx5LJMZJ3hrI,286
81
+ meshtrade/type/v1/__init__.py,sha256=dhp6V2wYhb2VtDvRvLjRy_BWGXMxakmOwP4IRI0EodE,2079
77
82
  meshtrade/type/v1/address_pb2.py,sha256=dRokCvBkbOIE_AxDfCtQnNUoFSNjZ8f9lFW2ii4yqQk,1795
78
83
  meshtrade/type/v1/address_pb2.pyi,sha256=A1PdvzCZpd-JKQhTwwQ3gz2Kw9mOkH3S1imSm78_4Uw,1107
79
84
  meshtrade/type/v1/amount.py,sha256=iDaAEB0WpuFwU5qE_gY5XWgqD0x0Z131mrAf-S45x1A,3696
@@ -81,22 +86,28 @@ meshtrade/type/v1/amount_pb2.py,sha256=ympMEAxoG95ElDB_l5fk5y0dTLi5gXgwtD25_8ZNo
81
86
  meshtrade/type/v1/amount_pb2.pyi,sha256=uI8D2Ch66e2hvzQCA5SARE8lrGdU_BYby__P_H-QwvY,749
82
87
  meshtrade/type/v1/contact_details_pb2.py,sha256=fKhg7lUMJqa6XyA_cVDCin-hDg1garQ3-xYQlnuxPs0,2007
83
88
  meshtrade/type/v1/contact_details_pb2.pyi,sha256=Wk9EFWI_rPuuOvPdKsW9Qo0_c8uNg61U-w__YwPQD9E,1292
89
+ meshtrade/type/v1/date.py,sha256=zrU8HfNFCwht1PyZKsd4lGJZ9OA1UX-bsQYf_4L8CHY,5848
90
+ meshtrade/type/v1/date_pb2.py,sha256=_da0M7jwFYZg1QOaojIesfZUUTTet2vcxjsHaauY_eM,1585
91
+ meshtrade/type/v1/date_pb2.pyi,sha256=knrar5r3GE7weH87Ie0IWv-jN57W3EJN6pTJeXGGPTw,554
84
92
  meshtrade/type/v1/decimal_built_in_conversions.py,sha256=Cbxjp8kHJ7E74C4DdXup8uMvZofrwNaXTyIY3xa1iLU,913
85
93
  meshtrade/type/v1/decimal_pb2.py,sha256=kzcMQ9eaGUWZlv06K6XftteRwX3vvudwrsKqmA_bkcI,1509
86
94
  meshtrade/type/v1/decimal_pb2.pyi,sha256=8qhL7jqAhoYJNzTpEiEPKDSRAYSWgvKd8altyVLISFg,386
87
- meshtrade/type/v1/ledger.py,sha256=psduzLQCIKvEj3rZBHWcsvq1ZjUh3Hb34ycd48TAcy0,743
95
+ meshtrade/type/v1/ledger.py,sha256=6ftLj8_hTLziAtmUqm71v3hUZ1mG401UzQNp0LZyFqc,719
88
96
  meshtrade/type/v1/ledger_pb2.py,sha256=8xJ_7ClfGDwRGImZerIA6D4Zdvdq6jQL0Ebv5XJUgc0,1747
89
97
  meshtrade/type/v1/ledger_pb2.pyi,sha256=r3emyUDafn9p3XTzwpnM0gzLiwrmgXYTp8GwZxw8_FM,801
98
+ meshtrade/type/v1/time_of_day.py,sha256=h-o8GoyH-jkMqZQiZ86ylx6Z6jaBPOTLRKCwXPe_oYk,9258
99
+ meshtrade/type/v1/time_of_day_pb2.py,sha256=A6Te0kmK4Qgo-h3tiIkj7oM5nVyaESmwmmTgJezYzkw,1666
100
+ meshtrade/type/v1/time_of_day_pb2.pyi,sha256=VJqfuglQos5-kAHBpWVxwDz4SV5aZ6-EyUFQaNl-VyM,679
90
101
  meshtrade/type/v1/token_pb2.py,sha256=48dMzVixXluV46B1Pqnfp-yLIeL0NYVg3ZzKQlX-ohc,1741
91
102
  meshtrade/type/v1/token_pb2.pyi,sha256=vsEKtXtIo5xisr1I4oqxcaMMYyfV-GBMM_f9l8cRxlc,687
92
103
  meshtrade/wallet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
93
- meshtrade/wallet/account/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
+ meshtrade/wallet/account/v1/__init__.py,sha256=61CCic_TAKRKDXH7TSowlXdpZ4MioMylUkQ98P2o2Uo,414
94
105
  meshtrade/wallet/account/v1/account_pb2.py,sha256=Jh8Dnju5zktGXfzWY5HGrvq1iO82SNZintEZoIZhgXI,1581
95
106
  meshtrade/wallet/account/v1/account_pb2.pyi,sha256=GN2bT5Ld2B0KyQUmkDQjHfeXEjLSwfuIE2j70jSMIJE,382
96
- meshtrade/wallet/account/v1/service_pb2.py,sha256=7U7Syp9araNuilxv3ozBbMLb7WKS62xj43lJbMkUQ-I,6224
97
- meshtrade/wallet/account/v1/service_pb2.pyi,sha256=7N2ovadHR1hZdLISYku-E8c42aq3n0JOX8wZ3BkeRQc,2187
98
- meshtrade-0.0.6.dist-info/licenses/LICENSE,sha256=7e68NmtCi6H_-e-fbQ82lyTjKKEnLX-Kob8NcYVNaDA,1095
99
- meshtrade-0.0.6.dist-info/METADATA,sha256=O7PcvWS_ztnW47TK_SniONz1VSQotIJNZIJsCxpJdjg,1440
100
- meshtrade-0.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
101
- meshtrade-0.0.6.dist-info/top_level.txt,sha256=L1riO18qkORBnB4bc8vQrHyXdTkgl61nII3cLYQYD_g,10
102
- meshtrade-0.0.6.dist-info/RECORD,,
107
+ meshtrade/wallet/account/v1/service_pb2.py,sha256=ckd-WXE0S8ngN9T3opioXhJ06pqw6ok3iAkhfbrM2aI,5129
108
+ meshtrade/wallet/account/v1/service_pb2.pyi,sha256=P6wbs2NYJNJpBUINYv986T7Mxpt3kcY7_JotP1h_gWU,2132
109
+ meshtrade-0.0.8.dist-info/licenses/LICENSE,sha256=7e68NmtCi6H_-e-fbQ82lyTjKKEnLX-Kob8NcYVNaDA,1095
110
+ meshtrade-0.0.8.dist-info/METADATA,sha256=72iy9yKHuDEsNk8NmxxuIq3o3ZgKwHplw4AzzBlEtSQ,1440
111
+ meshtrade-0.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
112
+ meshtrade-0.0.8.dist-info/top_level.txt,sha256=L1riO18qkORBnB4bc8vQrHyXdTkgl61nII3cLYQYD_g,10
113
+ meshtrade-0.0.8.dist-info/RECORD,,
File without changes