meshtrade 0.0.4__py3-none-any.whl → 0.0.6__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 (32) hide show
  1. meshtrade/compliance/client/v1/service_pb2.py +7 -9
  2. meshtrade/compliance/client/v1/service_pb2.pyi +0 -6
  3. meshtrade/iam/group/v1/service_pb2.py +3 -5
  4. meshtrade/iam/group/v1/service_pb2.pyi +1 -8
  5. meshtrade/issuance_hub/instrument/v1/service_pb2.py +11 -13
  6. meshtrade/issuance_hub/instrument/v1/service_pb2.pyi +0 -6
  7. meshtrade/option/v1/auth_pb2.py +5 -9
  8. meshtrade/option/v1/auth_pb2.pyi +15 -27
  9. meshtrade/trading/direct_order/v1/service_pb2.py +3 -5
  10. meshtrade/trading/direct_order/v1/service_pb2.pyi +1 -8
  11. meshtrade/trading/limit_order/v1/service_pb2.py +3 -5
  12. meshtrade/trading/limit_order/v1/service_pb2.pyi +1 -8
  13. meshtrade/trading/spot/v1/service_pb2.py +3 -5
  14. meshtrade/trading/spot/v1/service_pb2.pyi +1 -8
  15. meshtrade/type/v1/__init__.py +7 -0
  16. meshtrade/type/v1/amount.py +84 -0
  17. meshtrade/type/v1/decimal_built_in_conversions.py +29 -0
  18. meshtrade/type/v1/ledger.py +26 -0
  19. meshtrade/wallet/account/v1/service_pb2.py +22 -26
  20. meshtrade/wallet/account/v1/service_pb2.pyi +0 -14
  21. meshtrade-0.0.6.dist-info/METADATA +35 -0
  22. {meshtrade-0.0.4.dist-info → meshtrade-0.0.6.dist-info}/RECORD +25 -28
  23. meshtrade/iam/role/v1/permission_pb2.py +0 -37
  24. meshtrade/iam/role/v1/permission_pb2.pyi +0 -15
  25. meshtrade/iam/role/v1/role_pb2.py +0 -38
  26. meshtrade/iam/role/v1/role_pb2.pyi +0 -16
  27. meshtrade/iam/role/v1/service_pb2.py +0 -42
  28. meshtrade/iam/role/v1/service_pb2.pyi +0 -17
  29. meshtrade-0.0.4.dist-info/METADATA +0 -196
  30. {meshtrade-0.0.4.dist-info → meshtrade-0.0.6.dist-info}/WHEEL +0 -0
  31. {meshtrade-0.0.4.dist-info → meshtrade-0.0.6.dist-info}/licenses/LICENSE +0 -0
  32. {meshtrade-0.0.4.dist-info → meshtrade-0.0.6.dist-info}/top_level.txt +0 -0
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
25
25
  from meshtrade.compliance.client.v1 import client_pb2 as meshtrade_dot_compliance_dot_client_dot_v1_dot_client__pb2
26
26
 
27
27
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,meshtrade/compliance/client/v1/service.proto\x12\x1emeshtrade.compliance.client.v1\x1a+meshtrade/compliance/client/v1/client.proto\"&\n\x10GetClientRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"S\n\x11GetClientResponse\x12>\n\x06\x63lient\x18\x01 \x01(\x0b\x32&.meshtrade.compliance.client.v1.ClientR\x06\x63lient\"\x14\n\x12ListClientsRequest\"W\n\x13ListClientsResponse\x12@\n\x07\x63lients\x18\x01 \x03(\x0b\x32&.meshtrade.compliance.client.v1.ClientR\x07\x63lients2\xec\x01\n\rClientService\x12j\n\x03Get\x12\x30.meshtrade.compliance.client.v1.GetClientRequest\x1a\x31.meshtrade.compliance.client.v1.GetClientResponse\x12o\n\x04List\x12\x32.meshtrade.compliance.client.v1.ListClientsRequest\x1a\x33.meshtrade.compliance.client.v1.ListClientsResponseB;Z9github.com/meshtrade/api/go/compliance/client/v1;clientv1b\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,meshtrade/compliance/client/v1/service.proto\x12\x1emeshtrade.compliance.client.v1\x1a+meshtrade/compliance/client/v1/client.proto\"&\n\x10GetClientRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"\x14\n\x12ListClientsRequest\"W\n\x13ListClientsResponse\x12@\n\x07\x63lients\x18\x01 \x03(\x0b\x32&.meshtrade.compliance.client.v1.ClientR\x07\x63lients2\xee\x01\n\rClientService\x12\x65\n\tGetClient\x12\x30.meshtrade.compliance.client.v1.GetClientRequest\x1a&.meshtrade.compliance.client.v1.Client\x12v\n\x0bListClients\x12\x32.meshtrade.compliance.client.v1.ListClientsRequest\x1a\x33.meshtrade.compliance.client.v1.ListClientsResponseB;Z9github.com/meshtrade/api/go/compliance/client/v1;clientv1b\x06proto3')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -35,12 +35,10 @@ if not _descriptor._USE_C_DESCRIPTORS:
35
35
  _globals['DESCRIPTOR']._serialized_options = b'Z9github.com/meshtrade/api/go/compliance/client/v1;clientv1'
36
36
  _globals['_GETCLIENTREQUEST']._serialized_start=125
37
37
  _globals['_GETCLIENTREQUEST']._serialized_end=163
38
- _globals['_GETCLIENTRESPONSE']._serialized_start=165
39
- _globals['_GETCLIENTRESPONSE']._serialized_end=248
40
- _globals['_LISTCLIENTSREQUEST']._serialized_start=250
41
- _globals['_LISTCLIENTSREQUEST']._serialized_end=270
42
- _globals['_LISTCLIENTSRESPONSE']._serialized_start=272
43
- _globals['_LISTCLIENTSRESPONSE']._serialized_end=359
44
- _globals['_CLIENTSERVICE']._serialized_start=362
45
- _globals['_CLIENTSERVICE']._serialized_end=598
38
+ _globals['_LISTCLIENTSREQUEST']._serialized_start=165
39
+ _globals['_LISTCLIENTSREQUEST']._serialized_end=185
40
+ _globals['_LISTCLIENTSRESPONSE']._serialized_start=187
41
+ _globals['_LISTCLIENTSRESPONSE']._serialized_end=274
42
+ _globals['_CLIENTSERVICE']._serialized_start=277
43
+ _globals['_CLIENTSERVICE']._serialized_end=515
46
44
  # @@protoc_insertion_point(module_scope)
@@ -13,12 +13,6 @@ class GetClientRequest(_message.Message):
13
13
  name: str
14
14
  def __init__(self, name: _Optional[str] = ...) -> None: ...
15
15
 
16
- class GetClientResponse(_message.Message):
17
- __slots__ = ("client",)
18
- CLIENT_FIELD_NUMBER: _ClassVar[int]
19
- client: _client_pb2.Client
20
- def __init__(self, client: _Optional[_Union[_client_pb2.Client, _Mapping]] = ...) -> None: ...
21
-
22
16
  class ListClientsRequest(_message.Message):
23
17
  __slots__ = ()
24
18
  def __init__(self) -> None: ...
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
25
25
  from meshtrade.iam.group.v1 import group_pb2 as meshtrade_dot_iam_dot_group_dot_v1_dot_group__pb2
26
26
 
27
27
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$meshtrade/iam/group/v1/service.proto\x12\x16meshtrade.iam.group.v1\x1a\"meshtrade/iam/group/v1/group.proto\"\x11\n\x0fGetGroupRequest\"G\n\x10GetGroupResponse\x12\x33\n\x05group\x18\x01 \x01(\x0b\x32\x1d.meshtrade.iam.group.v1.GroupR\x05group2h\n\x0cGroupService\x12X\n\x03Get\x12\'.meshtrade.iam.group.v1.GetGroupRequest\x1a(.meshtrade.iam.group.v1.GetGroupResponseB2Z0github.com/meshtrade/api/go/iam/group/v1;groupv1b\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$meshtrade/iam/group/v1/service.proto\x12\x16meshtrade.iam.group.v1\x1a\"meshtrade/iam/group/v1/group.proto\"\x11\n\x0fGetGroupRequest2b\n\x0cGroupService\x12R\n\x08GetGroup\x12\'.meshtrade.iam.group.v1.GetGroupRequest\x1a\x1d.meshtrade.iam.group.v1.GroupB2Z0github.com/meshtrade/api/go/iam/group/v1;groupv1b\x06proto3')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -35,8 +35,6 @@ if not _descriptor._USE_C_DESCRIPTORS:
35
35
  _globals['DESCRIPTOR']._serialized_options = b'Z0github.com/meshtrade/api/go/iam/group/v1;groupv1'
36
36
  _globals['_GETGROUPREQUEST']._serialized_start=100
37
37
  _globals['_GETGROUPREQUEST']._serialized_end=117
38
- _globals['_GETGROUPRESPONSE']._serialized_start=119
39
- _globals['_GETGROUPRESPONSE']._serialized_end=190
40
- _globals['_GROUPSERVICE']._serialized_start=192
41
- _globals['_GROUPSERVICE']._serialized_end=296
38
+ _globals['_GROUPSERVICE']._serialized_start=119
39
+ _globals['_GROUPSERVICE']._serialized_end=217
42
40
  # @@protoc_insertion_point(module_scope)
@@ -1,17 +1,10 @@
1
1
  from meshtrade.iam.group.v1 import group_pb2 as _group_pb2
2
2
  from google.protobuf import descriptor as _descriptor
3
3
  from google.protobuf import message as _message
4
- from collections.abc import Mapping as _Mapping
5
- from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
4
+ from typing import ClassVar as _ClassVar
6
5
 
7
6
  DESCRIPTOR: _descriptor.FileDescriptor
8
7
 
9
8
  class GetGroupRequest(_message.Message):
10
9
  __slots__ = ()
11
10
  def __init__(self) -> None: ...
12
-
13
- class GetGroupResponse(_message.Message):
14
- __slots__ = ("group",)
15
- GROUP_FIELD_NUMBER: _ClassVar[int]
16
- group: _group_pb2.Group
17
- def __init__(self, group: _Optional[_Union[_group_pb2.Group, _Mapping]] = ...) -> None: ...
@@ -26,7 +26,7 @@ from meshtrade.issuance_hub.instrument.v1 import instrument_pb2 as meshtrade_dot
26
26
  from meshtrade.type.v1 import amount_pb2 as meshtrade_dot_type_dot_v1_dot_amount__pb2
27
27
 
28
28
 
29
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2meshtrade/issuance_hub/instrument/v1/service.proto\x12$meshtrade.issuance_hub.instrument.v1\x1a\x35meshtrade/issuance_hub/instrument/v1/instrument.proto\x1a\x1emeshtrade/type/v1/amount.proto\"*\n\x14GetInstrumentRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"i\n\x15GetInstrumentResponse\x12P\n\ninstrument\x18\x01 \x01(\x0b\x32\x30.meshtrade.issuance_hub.instrument.v1.InstrumentR\ninstrument\"\x9c\x01\n\x15MintInstrumentRequest\x12\x31\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x06\x61mount\x12\x1f\n\x0b\x66\x65\x65_account\x18\x02 \x01(\tR\nfeeAccount\x12/\n\x13\x64\x65stination_account\x18\x03 \x01(\tR\x12\x64\x65stinationAccount\"?\n\x16MintInstrumentResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\"\x92\x01\n\x15\x42urnInstrumentRequest\x12\x31\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x06\x61mount\x12\x1f\n\x0b\x66\x65\x65_account\x18\x02 \x01(\tR\nfeeAccount\x12%\n\x0esource_account\x18\x03 \x01(\tR\rsourceAccount\"?\n\x16\x42urnInstrumentResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId2\x9b\x03\n\x11InstrumentService\x12~\n\x03Get\x12:.meshtrade.issuance_hub.instrument.v1.GetInstrumentRequest\x1a;.meshtrade.issuance_hub.instrument.v1.GetInstrumentResponse\x12\x81\x01\n\x04Mint\x12;.meshtrade.issuance_hub.instrument.v1.MintInstrumentRequest\x1a<.meshtrade.issuance_hub.instrument.v1.MintInstrumentResponse\x12\x81\x01\n\x04\x42urn\x12;.meshtrade.issuance_hub.instrument.v1.BurnInstrumentRequest\x1a<.meshtrade.issuance_hub.instrument.v1.BurnInstrumentResponseBEZCgithub.com/meshtrade/api/go/issuance_hub/instrument/v1;instrumentv1b\x06proto3')
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2meshtrade/issuance_hub/instrument/v1/service.proto\x12$meshtrade.issuance_hub.instrument.v1\x1a\x35meshtrade/issuance_hub/instrument/v1/instrument.proto\x1a\x1emeshtrade/type/v1/amount.proto\"*\n\x14GetInstrumentRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"\x9c\x01\n\x15MintInstrumentRequest\x12\x31\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x06\x61mount\x12\x1f\n\x0b\x66\x65\x65_account\x18\x02 \x01(\tR\nfeeAccount\x12/\n\x13\x64\x65stination_account\x18\x03 \x01(\tR\x12\x64\x65stinationAccount\"?\n\x16MintInstrumentResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\"\x92\x01\n\x15\x42urnInstrumentRequest\x12\x31\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x06\x61mount\x12\x1f\n\x0b\x66\x65\x65_account\x18\x02 \x01(\tR\nfeeAccount\x12%\n\x0esource_account\x18\x03 \x01(\tR\rsourceAccount\"?\n\x16\x42urnInstrumentResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId2\xae\x03\n\x11InstrumentService\x12}\n\rGetInstrument\x12:.meshtrade.issuance_hub.instrument.v1.GetInstrumentRequest\x1a\x30.meshtrade.issuance_hub.instrument.v1.Instrument\x12\x8b\x01\n\x0eMintInstrument\x12;.meshtrade.issuance_hub.instrument.v1.MintInstrumentRequest\x1a<.meshtrade.issuance_hub.instrument.v1.MintInstrumentResponse\x12\x8b\x01\n\x0e\x42urnInstrument\x12;.meshtrade.issuance_hub.instrument.v1.BurnInstrumentRequest\x1a<.meshtrade.issuance_hub.instrument.v1.BurnInstrumentResponseBEZCgithub.com/meshtrade/api/go/issuance_hub/instrument/v1;instrumentv1b\x06proto3')
30
30
 
31
31
  _globals = globals()
32
32
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -36,16 +36,14 @@ if not _descriptor._USE_C_DESCRIPTORS:
36
36
  _globals['DESCRIPTOR']._serialized_options = b'ZCgithub.com/meshtrade/api/go/issuance_hub/instrument/v1;instrumentv1'
37
37
  _globals['_GETINSTRUMENTREQUEST']._serialized_start=179
38
38
  _globals['_GETINSTRUMENTREQUEST']._serialized_end=221
39
- _globals['_GETINSTRUMENTRESPONSE']._serialized_start=223
40
- _globals['_GETINSTRUMENTRESPONSE']._serialized_end=328
41
- _globals['_MINTINSTRUMENTREQUEST']._serialized_start=331
42
- _globals['_MINTINSTRUMENTREQUEST']._serialized_end=487
43
- _globals['_MINTINSTRUMENTRESPONSE']._serialized_start=489
44
- _globals['_MINTINSTRUMENTRESPONSE']._serialized_end=552
45
- _globals['_BURNINSTRUMENTREQUEST']._serialized_start=555
46
- _globals['_BURNINSTRUMENTREQUEST']._serialized_end=701
47
- _globals['_BURNINSTRUMENTRESPONSE']._serialized_start=703
48
- _globals['_BURNINSTRUMENTRESPONSE']._serialized_end=766
49
- _globals['_INSTRUMENTSERVICE']._serialized_start=769
50
- _globals['_INSTRUMENTSERVICE']._serialized_end=1180
39
+ _globals['_MINTINSTRUMENTREQUEST']._serialized_start=224
40
+ _globals['_MINTINSTRUMENTREQUEST']._serialized_end=380
41
+ _globals['_MINTINSTRUMENTRESPONSE']._serialized_start=382
42
+ _globals['_MINTINSTRUMENTRESPONSE']._serialized_end=445
43
+ _globals['_BURNINSTRUMENTREQUEST']._serialized_start=448
44
+ _globals['_BURNINSTRUMENTREQUEST']._serialized_end=594
45
+ _globals['_BURNINSTRUMENTRESPONSE']._serialized_start=596
46
+ _globals['_BURNINSTRUMENTRESPONSE']._serialized_end=659
47
+ _globals['_INSTRUMENTSERVICE']._serialized_start=662
48
+ _globals['_INSTRUMENTSERVICE']._serialized_end=1092
51
49
  # @@protoc_insertion_point(module_scope)
@@ -13,12 +13,6 @@ class GetInstrumentRequest(_message.Message):
13
13
  name: str
14
14
  def __init__(self, name: _Optional[str] = ...) -> None: ...
15
15
 
16
- class GetInstrumentResponse(_message.Message):
17
- __slots__ = ("instrument",)
18
- INSTRUMENT_FIELD_NUMBER: _ClassVar[int]
19
- instrument: _instrument_pb2.Instrument
20
- def __init__(self, instrument: _Optional[_Union[_instrument_pb2.Instrument, _Mapping]] = ...) -> None: ...
21
-
22
16
  class MintInstrumentRequest(_message.Message):
23
17
  __slots__ = ("amount", "fee_account", "destination_account")
24
18
  AMOUNT_FIELD_NUMBER: _ClassVar[int]
@@ -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\"D\n\x0cStandardRole\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0bpermissions\x18\x02 \x03(\tR\x0bpermissions\"8\n\x14PermissionStringList\x12 \n\x0bpermissions\x18\x01 \x03(\tR\x0bpermissions\",\n\x14StandardRoleNameList\x12\x14\n\x05roles\x18\x01 \x03(\tR\x05roles\"K\n\x10StandardRoleList\x12\x37\n\x05roles\x18\x01 \x03(\x0b\x32!.meshtrade.option.v1.StandardRoleR\x05roles:~\n\x14required_permissions\x12\x1e.google.protobuf.MethodOptions\x18\xd1\x86\x03 \x01(\x0b\x32).meshtrade.option.v1.PermissionStringListR\x13requiredPermissions:r\n\x0erequired_roles\x12\x1e.google.protobuf.MethodOptions\x18\xd2\x86\x03 \x01(\x0b\x32).meshtrade.option.v1.StandardRoleNameListR\rrequiredRoles:l\n\x0estandard_roles\x12\x1c.google.protobuf.FileOptions\x18\xd3\x86\x03 \x01(\x0b\x32%.meshtrade.option.v1.StandardRoleListR\rstandardRolesB0Z.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\"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')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -33,12 +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=89
37
- _globals['_STANDARDROLE']._serialized_end=157
38
- _globals['_PERMISSIONSTRINGLIST']._serialized_start=159
39
- _globals['_PERMISSIONSTRINGLIST']._serialized_end=215
40
- _globals['_STANDARDROLENAMELIST']._serialized_start=217
41
- _globals['_STANDARDROLENAMELIST']._serialized_end=261
42
- _globals['_STANDARDROLELIST']._serialized_start=263
43
- _globals['_STANDARDROLELIST']._serialized_end=338
36
+ _globals['_STANDARDROLE']._serialized_start=166
37
+ _globals['_STANDARDROLE']._serialized_end=276
38
+ _globals['_STANDARDROLELIST']._serialized_start=89
39
+ _globals['_STANDARDROLELIST']._serialized_end=164
44
40
  # @@protoc_insertion_point(module_scope)
@@ -1,40 +1,28 @@
1
1
  from google.protobuf import descriptor_pb2 as _descriptor_pb2
2
2
  from google.protobuf.internal import containers as _containers
3
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
3
4
  from google.protobuf import descriptor as _descriptor
4
5
  from google.protobuf import message as _message
5
- from collections.abc import Iterable as _Iterable, Mapping as _Mapping
6
+ from collections.abc import Iterable as _Iterable
6
7
  from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
7
8
 
8
9
  DESCRIPTOR: _descriptor.FileDescriptor
9
- REQUIRED_PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
10
- required_permissions: _descriptor.FieldDescriptor
11
- REQUIRED_ROLES_FIELD_NUMBER: _ClassVar[int]
12
- required_roles: _descriptor.FieldDescriptor
10
+
11
+ class StandardRole(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
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
19
  STANDARD_ROLES_FIELD_NUMBER: _ClassVar[int]
14
20
  standard_roles: _descriptor.FieldDescriptor
15
-
16
- class StandardRole(_message.Message):
17
- __slots__ = ("name", "permissions")
18
- NAME_FIELD_NUMBER: _ClassVar[int]
19
- PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
20
- name: str
21
- permissions: _containers.RepeatedScalarFieldContainer[str]
22
- def __init__(self, name: _Optional[str] = ..., permissions: _Optional[_Iterable[str]] = ...) -> None: ...
23
-
24
- class PermissionStringList(_message.Message):
25
- __slots__ = ("permissions",)
26
- PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
27
- permissions: _containers.RepeatedScalarFieldContainer[str]
28
- def __init__(self, permissions: _Optional[_Iterable[str]] = ...) -> None: ...
29
-
30
- class StandardRoleNameList(_message.Message):
31
- __slots__ = ("roles",)
32
- ROLES_FIELD_NUMBER: _ClassVar[int]
33
- roles: _containers.RepeatedScalarFieldContainer[str]
34
- def __init__(self, roles: _Optional[_Iterable[str]] = ...) -> None: ...
21
+ REQUIRED_ROLES_FIELD_NUMBER: _ClassVar[int]
22
+ required_roles: _descriptor.FieldDescriptor
35
23
 
36
24
  class StandardRoleList(_message.Message):
37
25
  __slots__ = ("roles",)
38
26
  ROLES_FIELD_NUMBER: _ClassVar[int]
39
- roles: _containers.RepeatedCompositeFieldContainer[StandardRole]
40
- def __init__(self, roles: _Optional[_Iterable[_Union[StandardRole, _Mapping]]] = ...) -> None: ...
27
+ roles: _containers.RepeatedScalarFieldContainer[StandardRole]
28
+ def __init__(self, roles: _Optional[_Iterable[_Union[StandardRole, str]]] = ...) -> None: ...
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
25
25
  from meshtrade.trading.direct_order.v1 import direct_order_pb2 as meshtrade_dot_trading_dot_direct__order_dot_v1_dot_direct__order__pb2
26
26
 
27
27
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/meshtrade/trading/direct_order/v1/service.proto\x12!meshtrade.trading.direct_order.v1\x1a\x34meshtrade/trading/direct_order/v1/direct_order.proto\"/\n\x15GetDirectOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number\"j\n\x16GetDirectOrderResponse\x12P\n\x0b\x64irectorder\x18\x01 \x01(\x0b\x32..meshtrade.trading.direct_order.v1.DirectOrderR\x0b\x64irectorder2\x90\x01\n\x12\x44irectOrderService\x12z\n\x03Get\x12\x38.meshtrade.trading.direct_order.v1.GetDirectOrderRequest\x1a\x39.meshtrade.trading.direct_order.v1.GetDirectOrderResponseBCZAgithub.com/meshtrade/api/go/trading/direct_order/v1;directorderv1b\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/meshtrade/trading/direct_order/v1/service.proto\x12!meshtrade.trading.direct_order.v1\x1a\x34meshtrade/trading/direct_order/v1/direct_order.proto\"/\n\x15GetDirectOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2\x90\x01\n\x12\x44irectOrderService\x12z\n\x0eGetDirectOrder\x12\x38.meshtrade.trading.direct_order.v1.GetDirectOrderRequest\x1a..meshtrade.trading.direct_order.v1.DirectOrderBCZAgithub.com/meshtrade/api/go/trading/direct_order/v1;directorderv1b\x06proto3')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -35,8 +35,6 @@ if not _descriptor._USE_C_DESCRIPTORS:
35
35
  _globals['DESCRIPTOR']._serialized_options = b'ZAgithub.com/meshtrade/api/go/trading/direct_order/v1;directorderv1'
36
36
  _globals['_GETDIRECTORDERREQUEST']._serialized_start=140
37
37
  _globals['_GETDIRECTORDERREQUEST']._serialized_end=187
38
- _globals['_GETDIRECTORDERRESPONSE']._serialized_start=189
39
- _globals['_GETDIRECTORDERRESPONSE']._serialized_end=295
40
- _globals['_DIRECTORDERSERVICE']._serialized_start=298
41
- _globals['_DIRECTORDERSERVICE']._serialized_end=442
38
+ _globals['_DIRECTORDERSERVICE']._serialized_start=190
39
+ _globals['_DIRECTORDERSERVICE']._serialized_end=334
42
40
  # @@protoc_insertion_point(module_scope)
@@ -1,8 +1,7 @@
1
1
  from meshtrade.trading.direct_order.v1 import direct_order_pb2 as _direct_order_pb2
2
2
  from google.protobuf import descriptor as _descriptor
3
3
  from google.protobuf import message as _message
4
- from collections.abc import Mapping as _Mapping
5
- from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
4
+ from typing import ClassVar as _ClassVar, Optional as _Optional
6
5
 
7
6
  DESCRIPTOR: _descriptor.FileDescriptor
8
7
 
@@ -11,9 +10,3 @@ class GetDirectOrderRequest(_message.Message):
11
10
  NUMBER_FIELD_NUMBER: _ClassVar[int]
12
11
  number: str
13
12
  def __init__(self, number: _Optional[str] = ...) -> None: ...
14
-
15
- class GetDirectOrderResponse(_message.Message):
16
- __slots__ = ("directorder",)
17
- DIRECTORDER_FIELD_NUMBER: _ClassVar[int]
18
- directorder: _direct_order_pb2.DirectOrder
19
- def __init__(self, directorder: _Optional[_Union[_direct_order_pb2.DirectOrder, _Mapping]] = ...) -> None: ...
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
25
25
  from meshtrade.trading.limit_order.v1 import limit_order_pb2 as meshtrade_dot_trading_dot_limit__order_dot_v1_dot_limit__order__pb2
26
26
 
27
27
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.meshtrade/trading/limit_order/v1/service.proto\x12 meshtrade.trading.limit_order.v1\x1a\x32meshtrade/trading/limit_order/v1/limit_order.proto\".\n\x14GetLimitOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number\"e\n\x15GetLimitOrderResponse\x12L\n\nlimitorder\x18\x01 \x01(\x0b\x32,.meshtrade.trading.limit_order.v1.LimitOrderR\nlimitorder2\x8b\x01\n\x11LimitOrderService\x12v\n\x03Get\x12\x36.meshtrade.trading.limit_order.v1.GetLimitOrderRequest\x1a\x37.meshtrade.trading.limit_order.v1.GetLimitOrderResponseBAZ?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1b\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.meshtrade/trading/limit_order/v1/service.proto\x12 meshtrade.trading.limit_order.v1\x1a\x32meshtrade/trading/limit_order/v1/limit_order.proto\".\n\x14GetLimitOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2\x8a\x01\n\x11LimitOrderService\x12u\n\rGetLimitOrder\x12\x36.meshtrade.trading.limit_order.v1.GetLimitOrderRequest\x1a,.meshtrade.trading.limit_order.v1.LimitOrderBAZ?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1b\x06proto3')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -35,8 +35,6 @@ if not _descriptor._USE_C_DESCRIPTORS:
35
35
  _globals['DESCRIPTOR']._serialized_options = b'Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1'
36
36
  _globals['_GETLIMITORDERREQUEST']._serialized_start=136
37
37
  _globals['_GETLIMITORDERREQUEST']._serialized_end=182
38
- _globals['_GETLIMITORDERRESPONSE']._serialized_start=184
39
- _globals['_GETLIMITORDERRESPONSE']._serialized_end=285
40
- _globals['_LIMITORDERSERVICE']._serialized_start=288
41
- _globals['_LIMITORDERSERVICE']._serialized_end=427
38
+ _globals['_LIMITORDERSERVICE']._serialized_start=185
39
+ _globals['_LIMITORDERSERVICE']._serialized_end=323
42
40
  # @@protoc_insertion_point(module_scope)
@@ -1,8 +1,7 @@
1
1
  from meshtrade.trading.limit_order.v1 import limit_order_pb2 as _limit_order_pb2
2
2
  from google.protobuf import descriptor as _descriptor
3
3
  from google.protobuf import message as _message
4
- from collections.abc import Mapping as _Mapping
5
- from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
4
+ from typing import ClassVar as _ClassVar, Optional as _Optional
6
5
 
7
6
  DESCRIPTOR: _descriptor.FileDescriptor
8
7
 
@@ -11,9 +10,3 @@ class GetLimitOrderRequest(_message.Message):
11
10
  NUMBER_FIELD_NUMBER: _ClassVar[int]
12
11
  number: str
13
12
  def __init__(self, number: _Optional[str] = ...) -> None: ...
14
-
15
- class GetLimitOrderResponse(_message.Message):
16
- __slots__ = ("limitorder",)
17
- LIMITORDER_FIELD_NUMBER: _ClassVar[int]
18
- limitorder: _limit_order_pb2.LimitOrder
19
- def __init__(self, limitorder: _Optional[_Union[_limit_order_pb2.LimitOrder, _Mapping]] = ...) -> None: ...
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
25
25
  from meshtrade.trading.spot.v1 import spot_pb2 as meshtrade_dot_trading_dot_spot_dot_v1_dot_spot__pb2
26
26
 
27
27
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'meshtrade/trading/spot/v1/service.proto\x12\x19meshtrade.trading.spot.v1\x1a$meshtrade/trading/spot/v1/spot.proto\"(\n\x0eGetSpotRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number\"F\n\x0fGetSpotResponse\x12\x33\n\x04spot\x18\x01 \x01(\x0b\x32\x1f.meshtrade.trading.spot.v1.SpotR\x04spot2k\n\x0bSpotService\x12\\\n\x03Get\x12).meshtrade.trading.spot.v1.GetSpotRequest\x1a*.meshtrade.trading.spot.v1.GetSpotResponseB4Z2github.com/meshtrade/api/go/trading/spot/v1;spotv1b\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'meshtrade/trading/spot/v1/service.proto\x12\x19meshtrade.trading.spot.v1\x1a$meshtrade/trading/spot/v1/spot.proto\"(\n\x0eGetSpotRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2d\n\x0bSpotService\x12U\n\x07GetSpot\x12).meshtrade.trading.spot.v1.GetSpotRequest\x1a\x1f.meshtrade.trading.spot.v1.SpotB4Z2github.com/meshtrade/api/go/trading/spot/v1;spotv1b\x06proto3')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -35,8 +35,6 @@ if not _descriptor._USE_C_DESCRIPTORS:
35
35
  _globals['DESCRIPTOR']._serialized_options = b'Z2github.com/meshtrade/api/go/trading/spot/v1;spotv1'
36
36
  _globals['_GETSPOTREQUEST']._serialized_start=108
37
37
  _globals['_GETSPOTREQUEST']._serialized_end=148
38
- _globals['_GETSPOTRESPONSE']._serialized_start=150
39
- _globals['_GETSPOTRESPONSE']._serialized_end=220
40
- _globals['_SPOTSERVICE']._serialized_start=222
41
- _globals['_SPOTSERVICE']._serialized_end=329
38
+ _globals['_SPOTSERVICE']._serialized_start=150
39
+ _globals['_SPOTSERVICE']._serialized_end=250
42
40
  # @@protoc_insertion_point(module_scope)
@@ -1,8 +1,7 @@
1
1
  from meshtrade.trading.spot.v1 import spot_pb2 as _spot_pb2
2
2
  from google.protobuf import descriptor as _descriptor
3
3
  from google.protobuf import message as _message
4
- from collections.abc import Mapping as _Mapping
5
- from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
4
+ from typing import ClassVar as _ClassVar, Optional as _Optional
6
5
 
7
6
  DESCRIPTOR: _descriptor.FileDescriptor
8
7
 
@@ -11,9 +10,3 @@ class GetSpotRequest(_message.Message):
11
10
  NUMBER_FIELD_NUMBER: _ClassVar[int]
12
11
  number: str
13
12
  def __init__(self, number: _Optional[str] = ...) -> None: ...
14
-
15
- class GetSpotResponse(_message.Message):
16
- __slots__ = ("spot",)
17
- SPOT_FIELD_NUMBER: _ClassVar[int]
18
- spot: _spot_pb2.Spot
19
- def __init__(self, spot: _Optional[_Union[_spot_pb2.Spot, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,7 @@
1
+ from .amount import new_amount
2
+ from .decimal_built_in_conversions import built_in_to_decimal, decimal_to_built_in
3
+ from .decimal_pb2 import Decimal
4
+ from .ledger_pb2 import Ledger
5
+ from .ledger import get_ledger_no_decimal_places
6
+ from .token_pb2 import Token
7
+ from .amount_pb2 import Amount
@@ -0,0 +1,84 @@
1
+ """
2
+ This module provides a factory function for creating Amount protobuf messages.
3
+ """
4
+
5
+ from decimal import ROUND_DOWN, Decimal
6
+
7
+ from .amount_pb2 import Amount
8
+ from .decimal_built_in_conversions import built_in_to_decimal, decimal_to_built_in
9
+ from .ledger import get_ledger_no_decimal_places
10
+ from .token_pb2 import Token
11
+
12
+
13
+ def new_amount(
14
+ value: Decimal,
15
+ token: Token,
16
+ precision_loss_tolerance: Decimal = Decimal("0.00000001")
17
+ ) -> Amount:
18
+ """Creates a new Amount, ensuring the value conforms to system-wide limits.
19
+
20
+ This function is the safe constructor for creating Amount protobuf messages.
21
+ While the underlying conversion from a Python `Decimal` to the protobuf's
22
+ `string` field is lossless, this function provides critical validation
23
+ to ensure the value adheres to constraints imposed by other downstream
24
+ systems (e.g., databases, other microservices with fixed-precision types).
25
+
26
+ Its primary operations are:
27
+
28
+ 1. **Validation:** It performs a serialization round-trip
29
+ (Python Decimal -> Protobuf Decimal -> Python Decimal) to simulate
30
+ how the value is stored and retrieved across the system. It then asserts
31
+ the value remains unchanged, guaranteeing it doesn't exceed the
32
+ precision limits of any consuming service.
33
+
34
+ 2. **Truncation:** It truncates the validated value to the exact number of
35
+ decimal places defined for the token's ledger, always rounding down to
36
+ prevent any inflation of values.
37
+
38
+ 3. **Construction:** It constructs and returns the final `Amount` message.
39
+
40
+ Args:
41
+ value: The numerical value of the amount as a Python `Decimal` object.
42
+ token: The `Token` protobuf message that defines the asset type
43
+ and its associated ledger.
44
+ precision_loss_tolerance: The maximum acceptable difference after the
45
+ validation round-trip. Since the string-based conversion is
46
+ lossless, any difference indicates a failure to conform to an
47
+ external system's parsing rules. Defaults to a small tolerance
48
+ for robustness.
49
+
50
+ Returns:
51
+ An `Amount` protobuf message containing the ledger-compliant, truncated
52
+ value and the specified token.
53
+
54
+ Raises:
55
+ AssertionError: If the input `value` changes during the validation
56
+ round-trip, indicating it exceeds the system's
57
+ representational limits and would be corrupted
58
+ downstream.
59
+ """
60
+
61
+ # Perform a serialization round-trip to validate the value against
62
+ # system-wide architectural constraints. This is a lossless operation
63
+ # in isolation, so any change reveals an incompatibility.
64
+ value_after_roundtrip = decimal_to_built_in(built_in_to_decimal(value))
65
+
66
+ # Confirm the value is perfectly representable within the system's limits.
67
+ # If the original value had too much precision for a downstream service to
68
+ # parse, it would change during the round-trip, and this would fail.
69
+ assert abs(value_after_roundtrip - value) \
70
+ <= precision_loss_tolerance, \
71
+ "value exceeds system's precision limits and would be corrupted"
72
+
73
+ # Truncate the validated value to the number of decimal places specified by the
74
+ # token's ledger. ROUND_DOWN ensures the value is never inflated.
75
+ truncated_value = value_after_roundtrip.quantize(
76
+ Decimal(10) ** -get_ledger_no_decimal_places(token.ledger),
77
+ rounding=ROUND_DOWN,
78
+ )
79
+
80
+ # Construct and return the final Amount protobuf message using the sanitized value.
81
+ return Amount(
82
+ token=token,
83
+ value=built_in_to_decimal(truncated_value),
84
+ )
@@ -0,0 +1,29 @@
1
+ import decimal
2
+
3
+ from .decimal_pb2 import Decimal
4
+
5
+
6
+ def built_in_to_decimal(decimal_value: decimal.Decimal) -> Decimal:
7
+ """
8
+ Converts an instance of the built-in decimal.Decimal type to an instance of the
9
+ financial Decimal protobuf type.
10
+
11
+ :param decimal_value: The decimal.Decimal object to convert.
12
+ :return: The converted financial Decimal protobuf object.
13
+ """
14
+
15
+ # Contruct and return resultant decimal object
16
+ return Decimal(
17
+ value=str(decimal_value),
18
+ )
19
+
20
+
21
+ def decimal_to_built_in(decimal_value: Decimal) -> decimal.Decimal:
22
+ """
23
+ Converts an instance of the financial Decimal protobuf type to an instance of the
24
+ built-in decimal.Decimal type.
25
+
26
+ :param decimal_value: The decimal_pb2.Decimal object to convert.
27
+ :return: The converted decimal.Decimal object.
28
+ """
29
+ return decimal.Decimal( decimal_value.value if decimal_value.value != "" else "0" )
@@ -0,0 +1,26 @@
1
+ from typing import Dict
2
+
3
+ from .ledger_pb2 import Ledger
4
+
5
+ _ledger_decimal_places: Dict[Ledger, int] = {
6
+ Ledger.LEDGER_STELLAR: 7,
7
+ Ledger.LEDGER_SA_STOCK_BROKERS: 2,
8
+ }
9
+
10
+ class UnsupportedLedgerError(Exception):
11
+ """Exception raised for unsupported Ledger values."""
12
+
13
+ def __init__(self, ledger: Ledger):
14
+ self.financial_business_day_convention = ledger
15
+ message = f"Unsupported Ledger: {ledger}"
16
+ super().__init__(message)
17
+
18
+
19
+ def get_ledger_no_decimal_places(ledger: Ledger) -> int:
20
+ """
21
+ Returns the number of decimal places supported by the given Ledger
22
+ """
23
+ if ledger in _ledger_decimal_places:
24
+ return _ledger_decimal_places[ledger]
25
+ else:
26
+ raise UnsupportedLedgerError(ledger)
@@ -29,14 +29,14 @@ from meshtrade.type.v1 import ledger_pb2 as meshtrade_dot_type_dot_v1_dot_ledger
29
29
  from meshtrade.wallet.account.v1 import account_pb2 as meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2
30
30
 
31
31
 
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\"~\n\x15\x43reateAccountResponse\x12>\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x07\x61\x63\x63ount\x12%\n\x0etransaction_id\x18\x02 \x01(\tR\rtransactionId\"8\n\x11GetAccountRequest\x12#\n\x06number\x18\x01 \x01(\tB\x0b\xbaH\x08r\x03\x98\x01\x07\xc8\x01\x01R\x06number\"T\n\x12GetAccountResponse\x12>\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x07\x61\x63\x63ount\"\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\xca\x05\n\x0e\x41\x63\x63ountService\x12\xa3\x01\n\x06\x43reate\x12\x31.meshtrade.wallet.account.v1.CreateAccountRequest\x1a\x32.meshtrade.wallet.account.v1.CreateAccountResponse\"2\x92\xb5\x18*\n(meshtrade.wallet.account.v1.AccountAdmin\xa0\xb5\x18\x02\x12\xa7\x01\n\x03Get\x12..meshtrade.wallet.account.v1.GetAccountRequest\x1a/.meshtrade.wallet.account.v1.GetAccountResponse\"?\x8a\xb5\x18\x37\n5meshtrade.wallet.account.v1.AccountService.GetAccount\xa0\xb5\x18\x01\x12\xae\x01\n\x04List\x12\x30.meshtrade.wallet.account.v1.ListAccountsRequest\x1a\x31.meshtrade.wallet.account.v1.ListAccountsResponse\"A\x8a\xb5\x18\x39\n7meshtrade.wallet.account.v1.AccountService.ListAccounts\xa0\xb5\x18\x01\x12\xb6\x01\n\x06Search\x12\x32.meshtrade.wallet.account.v1.SearchAccountsRequest\x1a\x33.meshtrade.wallet.account.v1.SearchAccountsResponse\"C\x8a\xb5\x18;\n9meshtrade.wallet.account.v1.AccountService.SearchAccounts\xa0\xb5\x18\x01\x42\xa9\x04Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1\x9a\xb5\x18\xeb\x03\n\xd6\x01\n)meshtrade.wallet.account.v1.AccountReader\x12\x35meshtrade.wallet.account.v1.AccountService.GetAccount\x12\x37meshtrade.wallet.account.v1.AccountService.ListAccounts\x12\x39meshtrade.wallet.account.v1.AccountService.SearchAccounts\n\x8f\x02\n(meshtrade.wallet.account.v1.AccountAdmin\x12\x38meshtrade.wallet.account.v1.AccountService.CreateAccount\x12\x35meshtrade.wallet.account.v1.AccountService.GetAccount\x12\x37meshtrade.wallet.account.v1.AccountService.ListAccounts\x12\x39meshtrade.wallet.account.v1.AccountService.SearchAccountsb\x06proto3')
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')
33
33
 
34
34
  _globals = globals()
35
35
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
36
36
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.wallet.account.v1.service_pb2', _globals)
37
37
  if not _descriptor._USE_C_DESCRIPTORS:
38
38
  _globals['DESCRIPTOR']._loaded_options = None
39
- _globals['DESCRIPTOR']._serialized_options = b'Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1\232\265\030\353\003\n\326\001\n)meshtrade.wallet.account.v1.AccountReader\0225meshtrade.wallet.account.v1.AccountService.GetAccount\0227meshtrade.wallet.account.v1.AccountService.ListAccounts\0229meshtrade.wallet.account.v1.AccountService.SearchAccounts\n\217\002\n(meshtrade.wallet.account.v1.AccountAdmin\0228meshtrade.wallet.account.v1.AccountService.CreateAccount\0225meshtrade.wallet.account.v1.AccountService.GetAccount\0227meshtrade.wallet.account.v1.AccountService.ListAccounts\0229meshtrade.wallet.account.v1.AccountService.SearchAccounts'
39
+ _globals['DESCRIPTOR']._serialized_options = b'Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1\232\265\030\004\n\002\001\002'
40
40
  _globals['_CREATEACCOUNTREQUEST'].fields_by_name['label']._loaded_options = None
41
41
  _globals['_CREATEACCOUNTREQUEST'].fields_by_name['label']._serialized_options = b'\272H\tr\004\020\003\0302\310\001\001'
42
42
  _globals['_CREATEACCOUNTREQUEST'].fields_by_name['ledger']._loaded_options = None
@@ -45,30 +45,26 @@ if not _descriptor._USE_C_DESCRIPTORS:
45
45
  _globals['_GETACCOUNTREQUEST'].fields_by_name['number']._serialized_options = b'\272H\010r\003\230\001\007\310\001\001'
46
46
  _globals['_SEARCHACCOUNTSREQUEST'].fields_by_name['label']._loaded_options = None
47
47
  _globals['_SEARCHACCOUNTSREQUEST'].fields_by_name['label']._serialized_options = b'\272H\tr\004\020\003\0302\310\001\000'
48
- _globals['_ACCOUNTSERVICE'].methods_by_name['Create']._loaded_options = None
49
- _globals['_ACCOUNTSERVICE'].methods_by_name['Create']._serialized_options = b'\222\265\030*\n(meshtrade.wallet.account.v1.AccountAdmin\240\265\030\002'
50
- _globals['_ACCOUNTSERVICE'].methods_by_name['Get']._loaded_options = None
51
- _globals['_ACCOUNTSERVICE'].methods_by_name['Get']._serialized_options = b'\212\265\0307\n5meshtrade.wallet.account.v1.AccountService.GetAccount\240\265\030\001'
52
- _globals['_ACCOUNTSERVICE'].methods_by_name['List']._loaded_options = None
53
- _globals['_ACCOUNTSERVICE'].methods_by_name['List']._serialized_options = b'\212\265\0309\n7meshtrade.wallet.account.v1.AccountService.ListAccounts\240\265\030\001'
54
- _globals['_ACCOUNTSERVICE'].methods_by_name['Search']._loaded_options = None
55
- _globals['_ACCOUNTSERVICE'].methods_by_name['Search']._serialized_options = b'\212\265\030;\n9meshtrade.wallet.account.v1.AccountService.SearchAccounts\240\265\030\001'
48
+ _globals['_ACCOUNTSERVICE'].methods_by_name['CreateAccount']._loaded_options = None
49
+ _globals['_ACCOUNTSERVICE'].methods_by_name['CreateAccount']._serialized_options = b'\240\265\030\002\252\265\030\003\n\001\001'
50
+ _globals['_ACCOUNTSERVICE'].methods_by_name['GetAccount']._loaded_options = None
51
+ _globals['_ACCOUNTSERVICE'].methods_by_name['GetAccount']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
52
+ _globals['_ACCOUNTSERVICE'].methods_by_name['ListAccounts']._loaded_options = None
53
+ _globals['_ACCOUNTSERVICE'].methods_by_name['ListAccounts']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
54
+ _globals['_ACCOUNTSERVICE'].methods_by_name['SearchAccounts']._loaded_options = None
55
+ _globals['_ACCOUNTSERVICE'].methods_by_name['SearchAccounts']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
56
56
  _globals['_CREATEACCOUNTREQUEST']._serialized_start=251
57
57
  _globals['_CREATEACCOUNTREQUEST']._serialized_end=390
58
- _globals['_CREATEACCOUNTRESPONSE']._serialized_start=392
59
- _globals['_CREATEACCOUNTRESPONSE']._serialized_end=518
60
- _globals['_GETACCOUNTREQUEST']._serialized_start=520
61
- _globals['_GETACCOUNTREQUEST']._serialized_end=576
62
- _globals['_GETACCOUNTRESPONSE']._serialized_start=578
63
- _globals['_GETACCOUNTRESPONSE']._serialized_end=662
64
- _globals['_LISTACCOUNTSREQUEST']._serialized_start=664
65
- _globals['_LISTACCOUNTSREQUEST']._serialized_end=685
66
- _globals['_LISTACCOUNTSRESPONSE']._serialized_start=687
67
- _globals['_LISTACCOUNTSRESPONSE']._serialized_end=775
68
- _globals['_SEARCHACCOUNTSREQUEST']._serialized_start=777
69
- _globals['_SEARCHACCOUNTSREQUEST']._serialized_end=836
70
- _globals['_SEARCHACCOUNTSRESPONSE']._serialized_start=838
71
- _globals['_SEARCHACCOUNTSRESPONSE']._serialized_end=928
72
- _globals['_ACCOUNTSERVICE']._serialized_start=931
73
- _globals['_ACCOUNTSERVICE']._serialized_end=1645
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
74
70
  # @@protoc_insertion_point(module_scope)
@@ -21,26 +21,12 @@ class CreateAccountRequest(_message.Message):
21
21
  open: bool
22
22
  def __init__(self, label: _Optional[str] = ..., ledger: _Optional[_Union[_ledger_pb2.Ledger, str]] = ..., open: bool = ...) -> None: ...
23
23
 
24
- class CreateAccountResponse(_message.Message):
25
- __slots__ = ("account", "transaction_id")
26
- ACCOUNT_FIELD_NUMBER: _ClassVar[int]
27
- TRANSACTION_ID_FIELD_NUMBER: _ClassVar[int]
28
- account: _account_pb2.Account
29
- transaction_id: str
30
- def __init__(self, account: _Optional[_Union[_account_pb2.Account, _Mapping]] = ..., transaction_id: _Optional[str] = ...) -> None: ...
31
-
32
24
  class GetAccountRequest(_message.Message):
33
25
  __slots__ = ("number",)
34
26
  NUMBER_FIELD_NUMBER: _ClassVar[int]
35
27
  number: str
36
28
  def __init__(self, number: _Optional[str] = ...) -> None: ...
37
29
 
38
- class GetAccountResponse(_message.Message):
39
- __slots__ = ("account",)
40
- ACCOUNT_FIELD_NUMBER: _ClassVar[int]
41
- account: _account_pb2.Account
42
- def __init__(self, account: _Optional[_Union[_account_pb2.Account, _Mapping]] = ...) -> None: ...
43
-
44
30
  class ListAccountsRequest(_message.Message):
45
31
  __slots__ = ()
46
32
  def __init__(self) -> None: ...
@@ -0,0 +1,35 @@
1
+ Metadata-Version: 2.4
2
+ Name: meshtrade
3
+ Version: 0.0.6
4
+ Summary: Integration SDK for Mesh API Services
5
+ Author-email: Bernard Bussy <bernard@meshtrade.co>
6
+ License-Expression: LicenseRef-My-Custom-License
7
+ Project-URL: Repository, https://github.com/meshtrade/api
8
+ Keywords: meshtrade,mesh,mesh-sdk,grpc,betterproto,grpclib
9
+ Classifier: Development Status :: 1 - Planning
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Requires-Python: >=3.12
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: grpcio<2.0,>=1.73.0
22
+ Requires-Dist: protobuf<7.0,>=6.31.1
23
+ Requires-Dist: googleapis-common-protos<2.0.0,>=1.70.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: ruff~=0.11.13; extra == "dev"
26
+ Requires-Dist: pytest~=8.4.0; extra == "dev"
27
+ Requires-Dist: build~=1.2.2; extra == "dev"
28
+ Requires-Dist: twine~=6.1.0; extra == "dev"
29
+ Requires-Dist: tox~=4.26.0; extra == "dev"
30
+ Requires-Dist: types-protobuf~=6.30.2.20250516; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # Python SDK
34
+
35
+ Please find the complete Python SDK documentation here: [docs/pages/python.md](../docs/pages/python.md)
@@ -22,8 +22,8 @@ meshtrade/compliance/client/v1/natural_person_pb2.py,sha256=7d3wg1HoIY425NKtI_IC
22
22
  meshtrade/compliance/client/v1/natural_person_pb2.pyi,sha256=sjtLLxbCQWsXUprMzzVGrplrkUK_yACweEDhc5VjOwI,3800
23
23
  meshtrade/compliance/client/v1/pep_status_pb2.py,sha256=ySzRu23wQGU5WuJaGrMFPHLBxd51WVKy4PCh3Nh7VwI,1734
24
24
  meshtrade/compliance/client/v1/pep_status_pb2.pyi,sha256=jBJjLEjA16K53Ss85Yab_KtrRG_2lWxFYcMJ0QuQpUk,622
25
- meshtrade/compliance/client/v1/service_pb2.py,sha256=qtCItYxMP-3e7WghZGY_SuZy7TTvuIXlgqVZlgTk2P8,2771
26
- meshtrade/compliance/client/v1/service_pb2.pyi,sha256=xFre3EXFX4wKri05evmWZoUhi-CM6kITpbjhRMqZOAg,1257
25
+ meshtrade/compliance/client/v1/service_pb2.py,sha256=DsM1dYoG9K-N75Zn7J6DomUqilnddH1BFlnF2dMtJ5Q,2542
26
+ meshtrade/compliance/client/v1/service_pb2.pyi,sha256=D_RYmufZNzy5UkpvTnjJr06pMKo-uPV9A4wiQLlSq-k,1015
27
27
  meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2.py,sha256=awWA7CGZc7itD2XbiVPYW5s98ZbyyWg9rjgZzE8iPnk,3079
28
28
  meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2.pyi,sha256=c2RuUjrykzgnuiIfn1i-ClFdGocEhZjnFolNKFzn7Ac,3883
29
29
  meshtrade/compliance/client/v1/tax_residency_pb2.py,sha256=Kx34evRFxurqxoZYY49pX3gZSNf0HyaTWYenib7xQWE,1686
@@ -37,26 +37,20 @@ meshtrade/iam/group/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
37
37
  meshtrade/iam/group/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
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
- meshtrade/iam/group/v1/service_pb2.py,sha256=jvaUe-GwZiqZMvm0vjeW6jtOlmB03VN2y6sl4rZXQ60,2090
41
- meshtrade/iam/group/v1/service_pb2.pyi,sha256=HAxNwcwvEWIuwIVeM4ojO-TLtI4d_D8Ih1ihwrGRyHw,660
40
+ meshtrade/iam/group/v1/service_pb2.py,sha256=_MZb6_mL0fH4fzgQGSuBdJ5UGvA3B8Mf6yoNnr8qFXg,1872
41
+ meshtrade/iam/group/v1/service_pb2.pyi,sha256=a2NpoJK5VbPodThgX6jksggA8EG-HGMVaDw4E7WIl0M,339
42
42
  meshtrade/iam/role/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  meshtrade/iam/role/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
- meshtrade/iam/role/v1/permission_pb2.py,sha256=P2mwMGxALkROisdLlnf_xFx0kcJQCizNd1JvucWgjDg,1675
45
- meshtrade/iam/role/v1/permission_pb2.pyi,sha256=4oJO_vn6w1d9drmu8velr0QrysJy5NIOMk7qPfpQHv8,648
46
- meshtrade/iam/role/v1/role_pb2.py,sha256=Wr9KYr5i1MOGiupWZ8W5SqevQXiwxwE6iFPcCwGxhDU,1746
47
- meshtrade/iam/role/v1/role_pb2.pyi,sha256=QOSM4_jVmDls_38sDoswWyc4eMQajEo_8PvM0pH8fEg,833
48
- meshtrade/iam/role/v1/service_pb2.py,sha256=qe0NRzsC9W9yUXOQvtjiWnq2jDXtdqUI9flcPDVdq-A,2052
49
- meshtrade/iam/role/v1/service_pb2.pyi,sha256=hdSinu-eqaVkzMfXm0ExxcQTAyUZeozS5tFh1_p7Ww0,647
50
44
  meshtrade/issuance_hub/instrument/v1/instrument_pb2.py,sha256=MH12krsLsJjdhTQZoxiXxYqy5jQBgte2QutTyjLtbOE,1658
51
45
  meshtrade/issuance_hub/instrument/v1/instrument_pb2.pyi,sha256=7OKPuALjJ0x_qPnAUKAh7jX0d65eSMA9GZrzSm_Lxvo,393
52
- meshtrade/issuance_hub/instrument/v1/service_pb2.py,sha256=x4HF4x9VC3lopUaRBHtDJ4mU5r2F9OwKiO5lIUR08jk,4000
53
- meshtrade/issuance_hub/instrument/v1/service_pb2.pyi,sha256=U-2Rc6QoDtFPs_lPptET5kmF0-XIoqqnMQ9nFzuCFHA,2337
46
+ meshtrade/issuance_hub/instrument/v1/service_pb2.py,sha256=wCzPgWLuAZwVVMvOl37IRKTP0OS1NdxNxd-VOSqX6c8,3768
47
+ meshtrade/issuance_hub/instrument/v1/service_pb2.pyi,sha256=vl9Y9VLHIKutzF4Vl7_PITnmiBU9EDSko9G7ZD81j1E,2059
54
48
  meshtrade/ledger/transaction/v1/transaction_action_pb2.py,sha256=NZ6GOQmTVaYf1xJh1QdOQsezFvYtDhRmTgUMIcT5r1I,1981
55
49
  meshtrade/ledger/transaction/v1/transaction_action_pb2.pyi,sha256=h85ohgkpEu2K6qP4Ge66PowcU2FNaEjXVLlOwff7Log,1067
56
50
  meshtrade/ledger/transaction/v1/transaction_state_pb2.py,sha256=omGyMuS1vpyNBUmCIBc1Kqk7RbtZrpwprV7d79Y00BU,2033
57
51
  meshtrade/ledger/transaction/v1/transaction_state_pb2.pyi,sha256=pl93a9UVYiVEPPrF1SuKUz47CDjytstLLROZ-YpvR8Y,1205
58
- meshtrade/option/v1/auth_pb2.py,sha256=tRUy0yCLgtGhNXoFu7VDCKrvR7Pb7zciLAv4s58j8lA,2747
59
- meshtrade/option/v1/auth_pb2.pyi,sha256=nFE9tgGqTATq5vPR9-aW3rY06ypK3Pz18Uh4wuuQqgw,1841
52
+ meshtrade/option/v1/auth_pb2.py,sha256=qOfu5U-esUAr0Gj7P2FL262RKBH7ZwtgSePBUIdtcI0,2242
53
+ meshtrade/option/v1/auth_pb2.pyi,sha256=nFCf6Khyq5EADZxfsl8CB4SeFsrHumN87_lHo36SoKA,1306
60
54
  meshtrade/option/v1/service_type_pb2.py,sha256=FEl6PE8rZwuqXcsMpDGfMSjAW__QfLIf7rkdLoQf4wI,1884
61
55
  meshtrade/option/v1/service_type_pb2.pyi,sha256=sWz7M90lqpbHJCdRyFmSDubuVFBoow6SX_vAYvq4LME,695
62
56
  meshtrade/trading/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -64,30 +58,33 @@ meshtrade/trading/direct_order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
64
58
  meshtrade/trading/direct_order/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
59
  meshtrade/trading/direct_order/v1/direct_order_pb2.py,sha256=b23kBE2YhzvDoYudEbpznmCMOf_C5e1jLBMQLo1D8iE,1655
66
60
  meshtrade/trading/direct_order/v1/direct_order_pb2.pyi,sha256=NO_DHoHGFxzTiX5MHJhS7b0szZTXevRNDzxJt5wzt4E,394
67
- meshtrade/trading/direct_order/v1/service_pb2.py,sha256=6nkCrZNYWonaTfrzd19YUa19TPWOMUTs2rsgGNibH90,2410
68
- meshtrade/trading/direct_order/v1/service_pb2.pyi,sha256=YtVkTT9bApixPeqjQBbYkK0BEAJ3oG6nvKC1jkDNjMg,842
61
+ meshtrade/trading/direct_order/v1/service_pb2.py,sha256=f8AgjE-YADHqEfQo3bgMIBQZNv7mwY-qGdHIRXKIybQ,2145
62
+ meshtrade/trading/direct_order/v1/service_pb2.pyi,sha256=PcArOyXsBJgCnbtwZVyMt1gM1hGa4nfnAsn6gkrRiqQ,488
69
63
  meshtrade/trading/limit_order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
64
  meshtrade/trading/limit_order/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
65
  meshtrade/trading/limit_order/v1/limit_order_pb2.py,sha256=LPHGKwwh5ZLzwaWaPM7fMwh3_O20cUea9lNkK5_WIfw,1634
72
66
  meshtrade/trading/limit_order/v1/limit_order_pb2.pyi,sha256=qqW6yIlOa146Cr7vuiHBLd8DSOvhhUy3CwJJeC52zFU,393
73
- meshtrade/trading/limit_order/v1/service_pb2.py,sha256=Ltk3PK8FaGQvhEGLvJYVZaqJM2scSBW33g9ok_nhs6I,2365
74
- meshtrade/trading/limit_order/v1/service_pb2.pyi,sha256=Q-xYi2x7d7Ujs10poYSslk_deJ4JcJRUMnuKuPHDSew,829
67
+ meshtrade/trading/limit_order/v1/service_pb2.py,sha256=5fnim6BIvw0JkpjpYNiPA0JbhIn5iUNcgjwEKnpxaIw,2114
68
+ meshtrade/trading/limit_order/v1/service_pb2.pyi,sha256=wwOFcr3mzI2-JK9gJ8o_HUkqbwVM_-SYDRpc9Py8N_w,484
75
69
  meshtrade/trading/spot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
70
  meshtrade/trading/spot/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
- meshtrade/trading/spot/v1/service_pb2.py,sha256=etCzNV19hUuKGPIIi_5eV-zl6Rj9FtdvMd_OMcTWa3E,2154
78
- meshtrade/trading/spot/v1/service_pb2.pyi,sha256=f0P_1fXtk9qWMRztTmSyq5t9a2zq44IzF678brRrSag,746
71
+ meshtrade/trading/spot/v1/service_pb2.py,sha256=SBVtcVpUBTrVxGUVOK-j0BibDPbQnpF7SA6WXnHUDeQ,1937
72
+ meshtrade/trading/spot/v1/service_pb2.pyi,sha256=GdFcCTEDwZre2NkomiE7WojLfItpPvllkZa7bBNefH0,457
79
73
  meshtrade/trading/spot/v1/spot_pb2.py,sha256=zXtfxzJdH_mfZpadjaIjLpg3rmBUi7sm_9i5-mvuVRc,1534
80
74
  meshtrade/trading/spot/v1/spot_pb2.pyi,sha256=DELXsprA9tDCE2Pn1I7J3qIVgYVEI8oJiT6BPIwrR2I,387
81
75
  meshtrade/type/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- meshtrade/type/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
+ meshtrade/type/v1/__init__.py,sha256=mN_HvUFZ1uxR6ETeLcxiGYtPluaUSk3Tx5LJMZJ3hrI,286
83
77
  meshtrade/type/v1/address_pb2.py,sha256=dRokCvBkbOIE_AxDfCtQnNUoFSNjZ8f9lFW2ii4yqQk,1795
84
78
  meshtrade/type/v1/address_pb2.pyi,sha256=A1PdvzCZpd-JKQhTwwQ3gz2Kw9mOkH3S1imSm78_4Uw,1107
79
+ meshtrade/type/v1/amount.py,sha256=iDaAEB0WpuFwU5qE_gY5XWgqD0x0Z131mrAf-S45x1A,3696
85
80
  meshtrade/type/v1/amount_pb2.py,sha256=ympMEAxoG95ElDB_l5fk5y0dTLi5gXgwtD25_8ZNobM,1855
86
81
  meshtrade/type/v1/amount_pb2.pyi,sha256=uI8D2Ch66e2hvzQCA5SARE8lrGdU_BYby__P_H-QwvY,749
87
82
  meshtrade/type/v1/contact_details_pb2.py,sha256=fKhg7lUMJqa6XyA_cVDCin-hDg1garQ3-xYQlnuxPs0,2007
88
83
  meshtrade/type/v1/contact_details_pb2.pyi,sha256=Wk9EFWI_rPuuOvPdKsW9Qo0_c8uNg61U-w__YwPQD9E,1292
84
+ meshtrade/type/v1/decimal_built_in_conversions.py,sha256=Cbxjp8kHJ7E74C4DdXup8uMvZofrwNaXTyIY3xa1iLU,913
89
85
  meshtrade/type/v1/decimal_pb2.py,sha256=kzcMQ9eaGUWZlv06K6XftteRwX3vvudwrsKqmA_bkcI,1509
90
86
  meshtrade/type/v1/decimal_pb2.pyi,sha256=8qhL7jqAhoYJNzTpEiEPKDSRAYSWgvKd8altyVLISFg,386
87
+ meshtrade/type/v1/ledger.py,sha256=psduzLQCIKvEj3rZBHWcsvq1ZjUh3Hb34ycd48TAcy0,743
91
88
  meshtrade/type/v1/ledger_pb2.py,sha256=8xJ_7ClfGDwRGImZerIA6D4Zdvdq6jQL0Ebv5XJUgc0,1747
92
89
  meshtrade/type/v1/ledger_pb2.pyi,sha256=r3emyUDafn9p3XTzwpnM0gzLiwrmgXYTp8GwZxw8_FM,801
93
90
  meshtrade/type/v1/token_pb2.py,sha256=48dMzVixXluV46B1Pqnfp-yLIeL0NYVg3ZzKQlX-ohc,1741
@@ -96,10 +93,10 @@ meshtrade/wallet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
96
93
  meshtrade/wallet/account/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
97
94
  meshtrade/wallet/account/v1/account_pb2.py,sha256=Jh8Dnju5zktGXfzWY5HGrvq1iO82SNZintEZoIZhgXI,1581
98
95
  meshtrade/wallet/account/v1/account_pb2.pyi,sha256=GN2bT5Ld2B0KyQUmkDQjHfeXEjLSwfuIE2j70jSMIJE,382
99
- meshtrade/wallet/account/v1/service_pb2.py,sha256=djmoH_Hlld8RlZhtRxDS6Iw2wLwFoHhunExy9EQmbJc,8098
100
- meshtrade/wallet/account/v1/service_pb2.pyi,sha256=K0d1vjgzzKdGrluF9h2InzFu3-lMy6UQIUqAmb0xDl4,2819
101
- meshtrade-0.0.4.dist-info/licenses/LICENSE,sha256=7e68NmtCi6H_-e-fbQ82lyTjKKEnLX-Kob8NcYVNaDA,1095
102
- meshtrade-0.0.4.dist-info/METADATA,sha256=20ufo2BXf7mq1KIMItUifOKcLqCG1fVSPGCMNQOhgOs,6680
103
- meshtrade-0.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
104
- meshtrade-0.0.4.dist-info/top_level.txt,sha256=L1riO18qkORBnB4bc8vQrHyXdTkgl61nII3cLYQYD_g,10
105
- meshtrade-0.0.4.dist-info/RECORD,,
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,,
@@ -1,37 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: meshtrade/iam/role/v1/permission.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/role/v1/permission.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/iam/role/v1/permission.proto\x12\x15meshtrade.iam.role.v1\"s\n\nPermission\x12)\n\x10service_provider\x18\x01 \x01(\tR\x0fserviceProvider\x12\x18\n\x07service\x18\x02 \x01(\tR\x07service\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scriptionB0Z.github.com/meshtrade/api/go/iam/role/v1;rolev1b\x06proto3')
28
-
29
- _globals = globals()
30
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.iam.role.v1.permission_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/iam/role/v1;rolev1'
35
- _globals['_PERMISSION']._serialized_start=65
36
- _globals['_PERMISSION']._serialized_end=180
37
- # @@protoc_insertion_point(module_scope)
@@ -1,15 +0,0 @@
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 Permission(_message.Message):
8
- __slots__ = ("service_provider", "service", "description")
9
- SERVICE_PROVIDER_FIELD_NUMBER: _ClassVar[int]
10
- SERVICE_FIELD_NUMBER: _ClassVar[int]
11
- DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
12
- service_provider: str
13
- service: str
14
- description: str
15
- def __init__(self, service_provider: _Optional[str] = ..., service: _Optional[str] = ..., description: _Optional[str] = ...) -> None: ...
@@ -1,38 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: meshtrade/iam/role/v1/role.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/role/v1/role.proto'
19
- )
20
- # @@protoc_insertion_point(imports)
21
-
22
- _sym_db = _symbol_database.Default()
23
-
24
-
25
- from meshtrade.iam.role.v1 import permission_pb2 as meshtrade_dot_iam_dot_role_dot_v1_dot_permission__pb2
26
-
27
-
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n meshtrade/iam/role/v1/role.proto\x12\x15meshtrade.iam.role.v1\x1a&meshtrade/iam/role/v1/permission.proto\"_\n\x04Role\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x43\n\x0bpermissions\x18\x02 \x03(\x0b\x32!.meshtrade.iam.role.v1.PermissionR\x0bpermissionsB0Z.github.com/meshtrade/api/go/iam/role/v1;rolev1b\x06proto3')
29
-
30
- _globals = globals()
31
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.iam.role.v1.role_pb2', _globals)
33
- if not _descriptor._USE_C_DESCRIPTORS:
34
- _globals['DESCRIPTOR']._loaded_options = None
35
- _globals['DESCRIPTOR']._serialized_options = b'Z.github.com/meshtrade/api/go/iam/role/v1;rolev1'
36
- _globals['_ROLE']._serialized_start=99
37
- _globals['_ROLE']._serialized_end=194
38
- # @@protoc_insertion_point(module_scope)
@@ -1,16 +0,0 @@
1
- from meshtrade.iam.role.v1 import permission_pb2 as _permission_pb2
2
- from google.protobuf.internal import containers as _containers
3
- from google.protobuf import descriptor as _descriptor
4
- from google.protobuf import message as _message
5
- from collections.abc import Iterable as _Iterable, Mapping as _Mapping
6
- from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
7
-
8
- DESCRIPTOR: _descriptor.FileDescriptor
9
-
10
- class Role(_message.Message):
11
- __slots__ = ("name", "permissions")
12
- NAME_FIELD_NUMBER: _ClassVar[int]
13
- PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
14
- name: str
15
- permissions: _containers.RepeatedCompositeFieldContainer[_permission_pb2.Permission]
16
- def __init__(self, name: _Optional[str] = ..., permissions: _Optional[_Iterable[_Union[_permission_pb2.Permission, _Mapping]]] = ...) -> None: ...
@@ -1,42 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: meshtrade/iam/role/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/role/v1/service.proto'
19
- )
20
- # @@protoc_insertion_point(imports)
21
-
22
- _sym_db = _symbol_database.Default()
23
-
24
-
25
- from meshtrade.iam.role.v1 import role_pb2 as meshtrade_dot_iam_dot_role_dot_v1_dot_role__pb2
26
-
27
-
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtrade/iam/role/v1/service.proto\x12\x15meshtrade.iam.role.v1\x1a meshtrade/iam/role/v1/role.proto\"\x10\n\x0eGetRoleRequest\"B\n\x0fGetRoleResponse\x12/\n\x04role\x18\x01 \x01(\x0b\x32\x1b.meshtrade.iam.role.v1.RoleR\x04role2c\n\x0bRoleService\x12T\n\x03Get\x12%.meshtrade.iam.role.v1.GetRoleRequest\x1a&.meshtrade.iam.role.v1.GetRoleResponseB0Z.github.com/meshtrade/api/go/iam/role/v1;rolev1b\x06proto3')
29
-
30
- _globals = globals()
31
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.iam.role.v1.service_pb2', _globals)
33
- if not _descriptor._USE_C_DESCRIPTORS:
34
- _globals['DESCRIPTOR']._loaded_options = None
35
- _globals['DESCRIPTOR']._serialized_options = b'Z.github.com/meshtrade/api/go/iam/role/v1;rolev1'
36
- _globals['_GETROLEREQUEST']._serialized_start=96
37
- _globals['_GETROLEREQUEST']._serialized_end=112
38
- _globals['_GETROLERESPONSE']._serialized_start=114
39
- _globals['_GETROLERESPONSE']._serialized_end=180
40
- _globals['_ROLESERVICE']._serialized_start=182
41
- _globals['_ROLESERVICE']._serialized_end=281
42
- # @@protoc_insertion_point(module_scope)
@@ -1,17 +0,0 @@
1
- from meshtrade.iam.role.v1 import role_pb2 as _role_pb2
2
- from google.protobuf import descriptor as _descriptor
3
- from google.protobuf import message as _message
4
- from collections.abc import Mapping as _Mapping
5
- from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
6
-
7
- DESCRIPTOR: _descriptor.FileDescriptor
8
-
9
- class GetRoleRequest(_message.Message):
10
- __slots__ = ()
11
- def __init__(self) -> None: ...
12
-
13
- class GetRoleResponse(_message.Message):
14
- __slots__ = ("role",)
15
- ROLE_FIELD_NUMBER: _ClassVar[int]
16
- role: _role_pb2.Role
17
- def __init__(self, role: _Optional[_Union[_role_pb2.Role, _Mapping]] = ...) -> None: ...
@@ -1,196 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: meshtrade
3
- Version: 0.0.4
4
- Summary: Integration SDK for Mesh API Services
5
- Author-email: Bernard Bussy <bernard@meshtrade.co>
6
- License-Expression: LicenseRef-My-Custom-License
7
- Project-URL: Repository, https://github.com/meshtrade/api
8
- Keywords: meshtrade,mesh,mesh-sdk,grpc,betterproto,grpclib
9
- Classifier: Development Status :: 1 - Planning
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Requires-Python: >=3.8
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: grpcio<2.0,>=1.73.0
22
- Requires-Dist: protobuf<7.0,>=6.31.1
23
- Requires-Dist: googleapis-common-protos<2.0.0,>=1.70.0
24
- Provides-Extra: dev
25
- Requires-Dist: ruff~=0.11.13; extra == "dev"
26
- Requires-Dist: pytest~=8.4.0; extra == "dev"
27
- Requires-Dist: build~=1.2.2; extra == "dev"
28
- Requires-Dist: twine~=6.1.0; extra == "dev"
29
- Requires-Dist: tox~=4.26.0; extra == "dev"
30
- Requires-Dist: types-protobuf~=6.30.2.20250516; extra == "dev"
31
- Dynamic: license-file
32
-
33
- ---
34
- parent: API Integration SDKs
35
- title: Python
36
- layout: page
37
- ---
38
- # Python SDKs for Mesh APIs
39
-
40
- [![CI Status](https://img.shields.io/badge/ci-passing-brightgreen.svg)](https://github.com/meshtrade/api)
41
-
42
- This directory is the Python Monorepo for all official Mesh API client SDKs.
43
-
44
- ## Quick Start for API Consumers
45
-
46
- This guide is for developers who want to **use** these SDKs in their own applications.
47
-
48
- ### 1. Installation
49
-
50
- Install the desired SDK integration library from PyPI using pip:
51
-
52
- ```bash
53
- pip install meshtrade
54
- ```
55
-
56
- ### 2. Example Usage
57
- Here is a basic example of how to use SDK clients:
58
- ```python
59
- import asyncio
60
- from meshtrade.account.v1 import AccountService
61
- from meshtrade.iam.v1 import as IAMService
62
-
63
- # NOTE: ensure that MESH_API_KEY="your-secret-api-key" is set
64
-
65
- async def main():
66
- # Instantiate the client for the Account v1 service
67
- account_client = AccountService()
68
-
69
- # Call an RPC method
70
- try:
71
- response = await account_client.get(number="1000111")
72
- print("Successfully retrieved account:", response.account)
73
- except Exception as e:
74
- print(f"An error occurred: {e}")
75
-
76
- # You can similarly use other clients
77
- iam_client = IAMService()
78
- # ... use iam_client ...
79
-
80
- if __name__ == "__main__":
81
- asyncio.run(main())
82
- ```
83
-
84
- For more detailed information on each SDK, please see their individual READMEs:
85
- * **[Account v1](python/mesh/account/v1/README.md)**
86
- * **[IAM v1](python/mesh/iam/v1/README.md)**
87
-
88
- ## Repository Structure
89
- This directory is a workspace within a larger polyglot monorepo. It manages versioned Python packages for each integration SDK.
90
-
91
- ```
92
- └── python
93
- ├── README.md <-- You are HERE
94
- ├── pyproject.toml <-- SDK workspace configuration
95
- ├── requirements-dev.txt <-- SDK Workspace development requirements
96
- ├── tox.ini <-- Task automation configuration
97
- ├── src
98
- │ └── meshtrade
99
- │ ├── __init__.py
100
- │ └── account <-- Defines the mesh account api service
101
- │ └── vX <-- Defines the mesh account vX api SDK
102
- │ ├── __init__.py
103
- │ ├── account_pb2.py
104
- │ └── README.md
105
- └── tests
106
- ├── integration
107
- └── unit
108
- ```
109
-
110
- ## Developer Guide
111
- This guide is for developers contributing to these SDKs. It explains how to set up the local development environment for this Python monorepo.
112
-
113
- ### 1. Prerequisites:
114
- - Python 3.8+
115
- - The `venv` module (usually included with Python)
116
-
117
- ### 2. Environment Setup
118
- All commands should be run from within this `python/` directory.
119
-
120
- Create and activate a single shared virtual environment for the workspace:
121
- ```
122
- python3 -m venv .venv
123
- source .venv/bin/activate
124
- ```
125
- Your terminal prompt should now be prefixed with (.venv), indicating the environment is active.
126
-
127
- <b>Tip:</b> If you are in an IDE that supports python you can point your IDE to the interpreter in this environment relative to the source of the repository: `./python/.venv/bin/python`. e.g. with VS code:
128
-
129
- 'cmd + shift + p' > 'Python: Select Interpreter' > 'Enter interpreter path...' > './python/.venv/bin/python'
130
-
131
-
132
-
133
- ### 3. Install Dependencies
134
-
135
- This project uses `pip-tools` to manage dependencies for a reproducible development environment.
136
- The top-level `pyproject.toml` is the source of truth for our direct dependencies, and `requirements-dev.txt` is the "lock file" that guarantees identical setups for everyone.
137
-
138
- **A) For a new setup (e.g. after a `git pull`):**
139
-
140
- Install the locked dependencies from `requirements-dev.txt`:
141
- ```bash
142
- pip install -r requirements-dev.txt
143
- ```
144
- This synchronises the local virtual environment to match the exact versions in the lock file.
145
-
146
- Once this is complete you are set up to begin programming in the sdk source code in: `./python/src/mesh`.
147
-
148
- Next to make the SDK discoverable locally for tests do:
149
- ```
150
- pip install -e .
151
- ```
152
-
153
- **B) After a manual change to `pyproject.toml` (e.g. to install a new workspace level dependency or bump its version):**
154
-
155
- If changes are made in the pyproject.toml then the lockfile must be regenerated:
156
- ```
157
- # Step 1: Re-compile the dependencies to update the lock file
158
- pip-compile --extra=dev --output-file=requirements-dev.txt pyproject.toml
159
-
160
- # Step 2: Synchronise the local virtual environment again with the newly updated lock file
161
- pip install -r requirements-dev.txt
162
- ```
163
-
164
- ### 4. Run Common Development Tasks
165
- Tox is used as the as the main command runner for all common tasks like linting, testing, and building.
166
-
167
- Tasks can be run from the command line (within the active virtual environment) as follows:
168
-
169
-
170
- - The linter:
171
- ```
172
- tox -e lint
173
- ```
174
- - The unit tests:
175
- ```
176
- tox -e unit-tests
177
- ```
178
- - The integration tests:
179
- ```
180
- MESH_API_KEY="your-secret-api-key" tox -e integration-tests
181
- ```
182
- - All checks (linting and unit tests):
183
- ```
184
- tox
185
- ```
186
-
187
- ### 5. Building and Publishing Packages
188
- - *Build all packages:* The build task in tox will create the distributable wheel (.whl) and sdist (.tar.gz) files for all packages and place them in their respective dist/ folders.
189
- ```
190
- tox -e build
191
- ```
192
-
193
- - *Publish to PyPi:* The `twine` tool is used to securely upload the built packages to PyPI. This is done as part of the official release process.
194
- ```
195
- twine upload ./dist/*
196
- ```