@meshtrade/api-node 1.30.0

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.
Files changed (186) hide show
  1. package/README.md +93 -0
  2. package/dist/buf/validate/validate_pb.d.ts +4597 -0
  3. package/dist/buf/validate/validate_pb.js +354 -0
  4. package/dist/google/type/date_pb.d.ts +52 -0
  5. package/dist/google/type/date_pb.js +26 -0
  6. package/dist/meshtrade/common/config.d.ts +50 -0
  7. package/dist/meshtrade/common/config.js +34 -0
  8. package/dist/meshtrade/common/connectInterceptors.d.ts +137 -0
  9. package/dist/meshtrade/common/connectInterceptors.js +233 -0
  10. package/dist/meshtrade/common/validation.d.ts +62 -0
  11. package/dist/meshtrade/common/validation.js +77 -0
  12. package/dist/meshtrade/compliance/client/v1/client_pb.d.ts +138 -0
  13. package/dist/meshtrade/compliance/client/v1/client_pb.js +23 -0
  14. package/dist/meshtrade/compliance/client/v1/company_pb.d.ts +313 -0
  15. package/dist/meshtrade/compliance/client/v1/company_pb.js +100 -0
  16. package/dist/meshtrade/compliance/client/v1/company_representative_pb.d.ts +81 -0
  17. package/dist/meshtrade/compliance/client/v1/company_representative_pb.js +22 -0
  18. package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.d.ts +88 -0
  19. package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.js +95 -0
  20. package/dist/meshtrade/compliance/client/v1/fund_pb.d.ts +65 -0
  21. package/dist/meshtrade/compliance/client/v1/fund_pb.js +18 -0
  22. package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.d.ts +55 -0
  23. package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.js +62 -0
  24. package/dist/meshtrade/compliance/client/v1/index.d.ts +16 -0
  25. package/dist/meshtrade/compliance/client/v1/index.js +59 -0
  26. package/dist/meshtrade/compliance/client/v1/industry_classification_pb.d.ts +86 -0
  27. package/dist/meshtrade/compliance/client/v1/industry_classification_pb.js +16 -0
  28. package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.d.ts +133 -0
  29. package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.js +140 -0
  30. package/dist/meshtrade/compliance/client/v1/natural_person_pb.d.ts +143 -0
  31. package/dist/meshtrade/compliance/client/v1/natural_person_pb.js +24 -0
  32. package/dist/meshtrade/compliance/client/v1/pep_status_pb.d.ts +46 -0
  33. package/dist/meshtrade/compliance/client/v1/pep_status_pb.js +53 -0
  34. package/dist/meshtrade/compliance/client/v1/service_node_meshts.d.ts +78 -0
  35. package/dist/meshtrade/compliance/client/v1/service_node_meshts.js +141 -0
  36. package/dist/meshtrade/compliance/client/v1/service_pb.d.ts +123 -0
  37. package/dist/meshtrade/compliance/client/v1/service_pb.js +45 -0
  38. package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.d.ts +180 -0
  39. package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.js +187 -0
  40. package/dist/meshtrade/compliance/client/v1/tax_residency_pb.d.ts +40 -0
  41. package/dist/meshtrade/compliance/client/v1/tax_residency_pb.js +17 -0
  42. package/dist/meshtrade/compliance/client/v1/trust_pb.d.ts +65 -0
  43. package/dist/meshtrade/compliance/client/v1/trust_pb.js +18 -0
  44. package/dist/meshtrade/compliance/client/v1/verification_status_pb.d.ts +57 -0
  45. package/dist/meshtrade/compliance/client/v1/verification_status_pb.js +64 -0
  46. package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.d.ts +43 -0
  47. package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.js +17 -0
  48. package/dist/meshtrade/iam/api_user/v1/api_user_pb.d.ts +152 -0
  49. package/dist/meshtrade/iam/api_user/v1/api_user_pb.js +95 -0
  50. package/dist/meshtrade/iam/api_user/v1/index.d.ts +4 -0
  51. package/dist/meshtrade/iam/api_user/v1/index.js +45 -0
  52. package/dist/meshtrade/iam/api_user/v1/service_node_meshts.d.ts +114 -0
  53. package/dist/meshtrade/iam/api_user/v1/service_node_meshts.js +201 -0
  54. package/dist/meshtrade/iam/api_user/v1/service_pb.d.ts +343 -0
  55. package/dist/meshtrade/iam/api_user/v1/service_pb.js +86 -0
  56. package/dist/meshtrade/iam/group/v1/group_pb.d.ts +58 -0
  57. package/dist/meshtrade/iam/group/v1/group_pb.js +17 -0
  58. package/dist/meshtrade/iam/group/v1/index.d.ts +3 -0
  59. package/dist/meshtrade/iam/group/v1/index.js +44 -0
  60. package/dist/meshtrade/iam/group/v1/service_node_meshts.d.ts +90 -0
  61. package/dist/meshtrade/iam/group/v1/service_node_meshts.js +161 -0
  62. package/dist/meshtrade/iam/group/v1/service_pb.d.ts +306 -0
  63. package/dist/meshtrade/iam/group/v1/service_pb.js +75 -0
  64. package/dist/meshtrade/iam/role/v1/index.d.ts +2 -0
  65. package/dist/meshtrade/iam/role/v1/index.js +43 -0
  66. package/dist/meshtrade/iam/role/v1/role.d.ts +71 -0
  67. package/dist/meshtrade/iam/role/v1/role.js +192 -0
  68. package/dist/meshtrade/iam/role/v1/role_pb.d.ts +164 -0
  69. package/dist/meshtrade/iam/role/v1/role_pb.js +171 -0
  70. package/dist/meshtrade/iam/user/v1/index.d.ts +3 -0
  71. package/dist/meshtrade/iam/user/v1/index.js +44 -0
  72. package/dist/meshtrade/iam/user/v1/service_node_meshts.d.ts +108 -0
  73. package/dist/meshtrade/iam/user/v1/service_node_meshts.js +191 -0
  74. package/dist/meshtrade/iam/user/v1/service_pb.d.ts +379 -0
  75. package/dist/meshtrade/iam/user/v1/service_pb.js +90 -0
  76. package/dist/meshtrade/iam/user/v1/user_pb.d.ts +58 -0
  77. package/dist/meshtrade/iam/user/v1/user_pb.js +17 -0
  78. package/dist/meshtrade/ledger/transaction/v1/index.d.ts +5 -0
  79. package/dist/meshtrade/ledger/transaction/v1/index.js +46 -0
  80. package/dist/meshtrade/ledger/transaction/v1/service_node_meshts.d.ts +80 -0
  81. package/dist/meshtrade/ledger/transaction/v1/service_node_meshts.js +140 -0
  82. package/dist/meshtrade/ledger/transaction/v1/service_pb.d.ts +102 -0
  83. package/dist/meshtrade/ledger/transaction/v1/service_pb.js +41 -0
  84. package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.d.ts +46 -0
  85. package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.js +53 -0
  86. package/dist/meshtrade/ledger/transaction/v1/transaction_state.d.ts +14 -0
  87. package/dist/meshtrade/ledger/transaction/v1/transaction_state.js +64 -0
  88. package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.d.ts +50 -0
  89. package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.js +57 -0
  90. package/dist/meshtrade/market_data/price/v1/index.d.ts +3 -0
  91. package/dist/meshtrade/market_data/price/v1/index.js +44 -0
  92. package/dist/meshtrade/market_data/price/v1/price_pb.d.ts +50 -0
  93. package/dist/meshtrade/market_data/price/v1/price_pb.js +19 -0
  94. package/dist/meshtrade/market_data/price/v1/service_node_meshts.d.ts +66 -0
  95. package/dist/meshtrade/market_data/price/v1/service_node_meshts.js +121 -0
  96. package/dist/meshtrade/market_data/price/v1/service_pb.d.ts +48 -0
  97. package/dist/meshtrade/market_data/price/v1/service_pb.js +27 -0
  98. package/dist/meshtrade/option/method_options/v1/index.d.ts +1 -0
  99. package/dist/meshtrade/option/method_options/v1/index.js +42 -0
  100. package/dist/meshtrade/option/method_options/v1/method_options_pb.d.ts +132 -0
  101. package/dist/meshtrade/option/method_options/v1/method_options_pb.js +108 -0
  102. package/dist/meshtrade/reporting/account_report/v1/account_report_pb.d.ts +136 -0
  103. package/dist/meshtrade/reporting/account_report/v1/account_report_pb.js +28 -0
  104. package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.d.ts +39 -0
  105. package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.js +16 -0
  106. package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.d.ts +66 -0
  107. package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.js +18 -0
  108. package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.d.ts +139 -0
  109. package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.js +80 -0
  110. package/dist/meshtrade/reporting/account_report/v1/index.d.ts +7 -0
  111. package/dist/meshtrade/reporting/account_report/v1/index.js +48 -0
  112. package/dist/meshtrade/reporting/account_report/v1/service_node_meshts.d.ts +72 -0
  113. package/dist/meshtrade/reporting/account_report/v1/service_node_meshts.js +131 -0
  114. package/dist/meshtrade/reporting/account_report/v1/service_pb.d.ts +162 -0
  115. package/dist/meshtrade/reporting/account_report/v1/service_pb.js +46 -0
  116. package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.d.ts +80 -0
  117. package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.js +18 -0
  118. package/dist/meshtrade/studio/instrument/v1/index.d.ts +3 -0
  119. package/dist/meshtrade/studio/instrument/v1/index.js +44 -0
  120. package/dist/meshtrade/studio/instrument/v1/instrument_pb.d.ts +53 -0
  121. package/dist/meshtrade/studio/instrument/v1/instrument_pb.js +18 -0
  122. package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.d.ts +214 -0
  123. package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.js +221 -0
  124. package/dist/meshtrade/studio/instrument/v1/unit_pb.d.ts +148 -0
  125. package/dist/meshtrade/studio/instrument/v1/unit_pb.js +155 -0
  126. package/dist/meshtrade/trading/limit_order/v1/index.d.ts +3 -0
  127. package/dist/meshtrade/trading/limit_order/v1/index.js +44 -0
  128. package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.d.ts +211 -0
  129. package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.js +111 -0
  130. package/dist/meshtrade/trading/limit_order/v1/service_node_meshts.d.ts +111 -0
  131. package/dist/meshtrade/trading/limit_order/v1/service_node_meshts.js +190 -0
  132. package/dist/meshtrade/trading/limit_order/v1/service_pb.d.ts +357 -0
  133. package/dist/meshtrade/trading/limit_order/v1/service_pb.js +73 -0
  134. package/dist/meshtrade/trading/market_order/v1/index.d.ts +3 -0
  135. package/dist/meshtrade/trading/market_order/v1/index.js +44 -0
  136. package/dist/meshtrade/trading/market_order/v1/market_order_pb.d.ts +20 -0
  137. package/dist/meshtrade/trading/market_order/v1/market_order_pb.js +16 -0
  138. package/dist/meshtrade/trading/market_order/v1/service_node_meshts.d.ts +66 -0
  139. package/dist/meshtrade/trading/market_order/v1/service_node_meshts.js +121 -0
  140. package/dist/meshtrade/trading/market_order/v1/service_pb.d.ts +34 -0
  141. package/dist/meshtrade/trading/market_order/v1/service_pb.js +22 -0
  142. package/dist/meshtrade/type/v1/address_pb.d.ts +82 -0
  143. package/dist/meshtrade/type/v1/address_pb.js +16 -0
  144. package/dist/meshtrade/type/v1/amount.d.ts +13 -0
  145. package/dist/meshtrade/type/v1/amount.js +68 -0
  146. package/dist/meshtrade/type/v1/amountWrapper.d.ts +74 -0
  147. package/dist/meshtrade/type/v1/amountWrapper.js +98 -0
  148. package/dist/meshtrade/type/v1/amount_pb.d.ts +44 -0
  149. package/dist/meshtrade/type/v1/amount_pb.js +18 -0
  150. package/dist/meshtrade/type/v1/contact_details_pb.d.ts +98 -0
  151. package/dist/meshtrade/type/v1/contact_details_pb.js +16 -0
  152. package/dist/meshtrade/type/v1/date.d.ts +49 -0
  153. package/dist/meshtrade/type/v1/date.js +136 -0
  154. package/dist/meshtrade/type/v1/date_pb.d.ts +50 -0
  155. package/dist/meshtrade/type/v1/date_pb.js +16 -0
  156. package/dist/meshtrade/type/v1/decimalConversions.d.ts +24 -0
  157. package/dist/meshtrade/type/v1/decimalConversions.js +39 -0
  158. package/dist/meshtrade/type/v1/decimal_pb.d.ts +24 -0
  159. package/dist/meshtrade/type/v1/decimal_pb.js +16 -0
  160. package/dist/meshtrade/type/v1/index.d.ts +15 -0
  161. package/dist/meshtrade/type/v1/index.js +56 -0
  162. package/dist/meshtrade/type/v1/ledger.d.ts +27 -0
  163. package/dist/meshtrade/type/v1/ledger.js +115 -0
  164. package/dist/meshtrade/type/v1/ledger_pb.d.ts +83 -0
  165. package/dist/meshtrade/type/v1/ledger_pb.js +90 -0
  166. package/dist/meshtrade/type/v1/sorting_pb.d.ts +35 -0
  167. package/dist/meshtrade/type/v1/sorting_pb.js +42 -0
  168. package/dist/meshtrade/type/v1/time_of_day.d.ts +74 -0
  169. package/dist/meshtrade/type/v1/time_of_day.js +199 -0
  170. package/dist/meshtrade/type/v1/time_of_day_pb.d.ts +67 -0
  171. package/dist/meshtrade/type/v1/time_of_day_pb.js +16 -0
  172. package/dist/meshtrade/type/v1/token.d.ts +4 -0
  173. package/dist/meshtrade/type/v1/token.js +23 -0
  174. package/dist/meshtrade/type/v1/tokenWrapper.d.ts +49 -0
  175. package/dist/meshtrade/type/v1/tokenWrapper.js +92 -0
  176. package/dist/meshtrade/type/v1/token_pb.d.ts +56 -0
  177. package/dist/meshtrade/type/v1/token_pb.js +17 -0
  178. package/dist/meshtrade/wallet/account/v1/account_pb.d.ts +264 -0
  179. package/dist/meshtrade/wallet/account/v1/account_pb.js +74 -0
  180. package/dist/meshtrade/wallet/account/v1/index.d.ts +3 -0
  181. package/dist/meshtrade/wallet/account/v1/index.js +44 -0
  182. package/dist/meshtrade/wallet/account/v1/service_node_meshts.d.ts +114 -0
  183. package/dist/meshtrade/wallet/account/v1/service_node_meshts.js +201 -0
  184. package/dist/meshtrade/wallet/account/v1/service_pb.d.ts +559 -0
  185. package/dist/meshtrade/wallet/account/v1/service_pb.js +112 -0
  186. package/package.json +171 -0
@@ -0,0 +1,44 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Decimal } from "./decimal_pb";
3
+ import type { Token } from "./token_pb";
4
+ import type { Message } from "@bufbuild/protobuf";
5
+ /**
6
+ * Describes the file meshtrade/type/v1/amount.proto.
7
+ */
8
+ export declare const file_meshtrade_type_v1_amount: GenFile;
9
+ /**
10
+ *
11
+ * A canonical structure for representing a precise quantity of a specific
12
+ * digital asset.
13
+ * An Amount is a self-describing monetary value, pairing a Universal Token
14
+ * Identifier (the 'what') with a high-precision Decimal value (the 'how much').
15
+ * This model ensures that a quantity of an asset is never ambiguous.
16
+ *
17
+ * @generated from message meshtrade.type.v1.Amount
18
+ */
19
+ export type Amount = Message<"meshtrade.type.v1.Amount"> & {
20
+ /**
21
+ *
22
+ * Token is the unit of account. This field uses the Universal Token Identifier to
23
+ * define exactly WHAT asset is being quantified.
24
+ *
25
+ * @generated from field: meshtrade.type.v1.Token token = 1;
26
+ */
27
+ token?: Token;
28
+ /**
29
+ *
30
+ * Value is the magnitude of the amount, representing HOW MUCH of the specified
31
+ * token this value holds.
32
+ * CRITICAL: To prevent precision errors, this decimal value MUST be
33
+ * truncated to the exact number of decimal places supported by the
34
+ * token's native ledger.
35
+ *
36
+ * @generated from field: meshtrade.type.v1.Decimal value = 2;
37
+ */
38
+ value?: Decimal;
39
+ };
40
+ /**
41
+ * Describes the message meshtrade.type.v1.Amount.
42
+ * Use `create(AmountSchema)` to create a new message.
43
+ */
44
+ export declare const AmountSchema: GenMessage<Amount>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
3
+ // @generated from file meshtrade/type/v1/amount.proto (package meshtrade.type.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AmountSchema = exports.file_meshtrade_type_v1_amount = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ const decimal_pb_1 = require("./decimal_pb");
9
+ const token_pb_1 = require("./token_pb");
10
+ /**
11
+ * Describes the file meshtrade/type/v1/amount.proto.
12
+ */
13
+ exports.file_meshtrade_type_v1_amount = (0, codegenv2_1.fileDesc)("Ch5tZXNodHJhZGUvdHlwZS92MS9hbW91bnQucHJvdG8SEW1lc2h0cmFkZS50eXBlLnYxIlwKBkFtb3VudBInCgV0b2tlbhgBIAEoCzIYLm1lc2h0cmFkZS50eXBlLnYxLlRva2VuEikKBXZhbHVlGAIgASgLMhoubWVzaHRyYWRlLnR5cGUudjEuRGVjaW1hbEJHChhjby5tZXNodHJhZGUuYXBpLnR5cGUudjFaK2dpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby90eXBlL3YxO3R5cGVfdjFiBnByb3RvMw", [decimal_pb_1.file_meshtrade_type_v1_decimal, token_pb_1.file_meshtrade_type_v1_token]);
14
+ /**
15
+ * Describes the message meshtrade.type.v1.Amount.
16
+ * Use `create(AmountSchema)` to create a new message.
17
+ */
18
+ exports.AmountSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_type_v1_amount, 0);
@@ -0,0 +1,98 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Message } from "@bufbuild/protobuf";
3
+ /**
4
+ * Describes the file meshtrade/type/v1/contact_details.proto.
5
+ */
6
+ export declare const file_meshtrade_type_v1_contact_details: GenFile;
7
+ /**
8
+ *
9
+ * A generic set of contact information for an individual or an entity.
10
+ *
11
+ * @generated from message meshtrade.type.v1.ContactDetails
12
+ */
13
+ export type ContactDetails = Message<"meshtrade.type.v1.ContactDetails"> & {
14
+ /**
15
+ *
16
+ * Email address validated according to RFC 5322.
17
+ * Example: "user@example.com"
18
+ * Must be valid if provided.
19
+ *
20
+ * @generated from field: string email_address = 1;
21
+ */
22
+ emailAddress: string;
23
+ /**
24
+ *
25
+ * Phone number in E.164 international format.
26
+ * This consists of a '+' sign followed by the country code and subscriber number.
27
+ * Example: "+14155552671"
28
+ * Must be valid if provided.
29
+ *
30
+ * @generated from field: string phone_number = 3;
31
+ */
32
+ phoneNumber: string;
33
+ /**
34
+ *
35
+ * Mobile phone number in E.164 international format.
36
+ * This consists of a '+' sign followed by the country code and subscriber number.
37
+ * Example: "+14155552671"
38
+ * Must be valid if provided.
39
+ *
40
+ * @generated from field: string mobile_number = 5;
41
+ */
42
+ mobileNumber: string;
43
+ /**
44
+ *
45
+ * The domain name of the website without the protocol (http or https).
46
+ * Any provided protocol will be stripped by services processing this entity.
47
+ * Example: "www.mesh.trade".
48
+ *
49
+ * @generated from field: string website = 6;
50
+ */
51
+ website: string;
52
+ /**
53
+ *
54
+ * LinkedIn profile ID. This is the unique identifier found in the profile URL.
55
+ * Example for an individual: "in/john-doe-12345678"
56
+ * Example for a company: "company/mesh-trade"
57
+ *
58
+ * @generated from field: string linkedin = 7;
59
+ */
60
+ linkedin: string;
61
+ /**
62
+ *
63
+ * Facebook profile username or ID.
64
+ * Example: "Mesh.trade"
65
+ *
66
+ * @generated from field: string facebook = 8;
67
+ */
68
+ facebook: string;
69
+ /**
70
+ *
71
+ * Instagram handle, without the '@' symbol.
72
+ * Example: "mesh.trade"
73
+ *
74
+ * @generated from field: string instagram = 9;
75
+ */
76
+ instagram: string;
77
+ /**
78
+ *
79
+ * X (formerly Twitter) handle, without the '@' symbol.
80
+ * Example: "mesh_trade"
81
+ *
82
+ * @generated from field: string x_twitter = 10;
83
+ */
84
+ xTwitter: string;
85
+ /**
86
+ *
87
+ * YouTube handle, without the '@' symbol.
88
+ * Example: "Mesh_Trade"
89
+ *
90
+ * @generated from field: string youtube = 11;
91
+ */
92
+ youtube: string;
93
+ };
94
+ /**
95
+ * Describes the message meshtrade.type.v1.ContactDetails.
96
+ * Use `create(ContactDetailsSchema)` to create a new message.
97
+ */
98
+ export declare const ContactDetailsSchema: GenMessage<ContactDetails>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
3
+ // @generated from file meshtrade/type/v1/contact_details.proto (package meshtrade.type.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ContactDetailsSchema = exports.file_meshtrade_type_v1_contact_details = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ /**
9
+ * Describes the file meshtrade/type/v1/contact_details.proto.
10
+ */
11
+ exports.file_meshtrade_type_v1_contact_details = (0, codegenv2_1.fileDesc)("CidtZXNodHJhZGUvdHlwZS92MS9jb250YWN0X2RldGFpbHMucHJvdG8SEW1lc2h0cmFkZS50eXBlLnYxIsABCg5Db250YWN0RGV0YWlscxIVCg1lbWFpbF9hZGRyZXNzGAEgASgJEhQKDHBob25lX251bWJlchgDIAEoCRIVCg1tb2JpbGVfbnVtYmVyGAUgASgJEg8KB3dlYnNpdGUYBiABKAkSEAoIbGlua2VkaW4YByABKAkSEAoIZmFjZWJvb2sYCCABKAkSEQoJaW5zdGFncmFtGAkgASgJEhEKCXhfdHdpdHRlchgKIAEoCRIPCgd5b3V0dWJlGAsgASgJQkcKGGNvLm1lc2h0cmFkZS5hcGkudHlwZS52MVorZ2l0aHViLmNvbS9tZXNodHJhZGUvYXBpL2dvL3R5cGUvdjE7dHlwZV92MWIGcHJvdG8z");
12
+ /**
13
+ * Describes the message meshtrade.type.v1.ContactDetails.
14
+ * Use `create(ContactDetailsSchema)` to create a new message.
15
+ */
16
+ exports.ContactDetailsSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_type_v1_contact_details, 0);
@@ -0,0 +1,49 @@
1
+ import { Date as ProtoDate } from "./date_pb";
2
+ /**
3
+ * Creates a new Date protobuf message from year, month, and day values.
4
+ * Validates the input values according to the Date message constraints.
5
+ *
6
+ * @param year - Year value (1-9999)
7
+ * @param month - Month value (1-12)
8
+ * @param day - Day value (1-31)
9
+ * @returns A Date protobuf message
10
+ * @throws Error if the date values are invalid
11
+ */
12
+ export declare function newDate(year: number, month: number, day: number): ProtoDate;
13
+ /**
14
+ * Creates a Date protobuf message from a JavaScript Date object.
15
+ *
16
+ * @param jsDate - A JavaScript Date object
17
+ * @returns A Date protobuf message
18
+ */
19
+ export declare function newDateFromJsDate(jsDate: Date): ProtoDate;
20
+ /**
21
+ * Converts a Date protobuf message to a JavaScript Date object.
22
+ *
23
+ * @param protoDate - A Date protobuf message
24
+ * @returns A JavaScript Date object
25
+ * @throws Error if the date is invalid
26
+ */
27
+ export declare function dateToJsDate(protoDate: ProtoDate): Date;
28
+ /**
29
+ * Checks if a Date has valid values according to the protobuf constraints.
30
+ *
31
+ * @param protoDate - A Date protobuf message or undefined
32
+ * @returns True if the date is valid, false otherwise
33
+ */
34
+ export declare function isValid(protoDate?: ProtoDate): boolean;
35
+ /**
36
+ * Returns true if the date has non-zero year, month, and day values.
37
+ * Since only full dates are valid, this is equivalent to isValid().
38
+ *
39
+ * @param protoDate - A Date protobuf message or undefined
40
+ * @returns True if the date is complete, false otherwise
41
+ */
42
+ export declare function isComplete(protoDate?: ProtoDate): boolean;
43
+ /**
44
+ * Returns a string representation of the date.
45
+ *
46
+ * @param protoDate - A Date protobuf message or undefined
47
+ * @returns String representation of the date
48
+ */
49
+ export declare function dateToString(protoDate?: ProtoDate): string;
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.newDate = newDate;
4
+ exports.newDateFromJsDate = newDateFromJsDate;
5
+ exports.dateToJsDate = dateToJsDate;
6
+ exports.isValid = isValid;
7
+ exports.isComplete = isComplete;
8
+ exports.dateToString = dateToString;
9
+ const protobuf_1 = require("@bufbuild/protobuf");
10
+ const date_pb_1 = require("./date_pb");
11
+ /**
12
+ * Creates a new Date protobuf message from year, month, and day values.
13
+ * Validates the input values according to the Date message constraints.
14
+ *
15
+ * @param year - Year value (1-9999)
16
+ * @param month - Month value (1-12)
17
+ * @param day - Day value (1-31)
18
+ * @returns A Date protobuf message
19
+ * @throws Error if the date values are invalid
20
+ */
21
+ function newDate(year, month, day) {
22
+ validateDate(year, month, day);
23
+ return (0, protobuf_1.create)(date_pb_1.DateSchema, { year, month, day });
24
+ }
25
+ /**
26
+ * Creates a Date protobuf message from a JavaScript Date object.
27
+ *
28
+ * @param jsDate - A JavaScript Date object
29
+ * @returns A Date protobuf message
30
+ */
31
+ function newDateFromJsDate(jsDate) {
32
+ return (0, protobuf_1.create)(date_pb_1.DateSchema, {
33
+ year: jsDate.getFullYear(),
34
+ month: jsDate.getMonth() + 1, // JS months are 0-indexed
35
+ day: jsDate.getDate(),
36
+ });
37
+ }
38
+ /**
39
+ * Converts a Date protobuf message to a JavaScript Date object.
40
+ *
41
+ * @param protoDate - A Date protobuf message
42
+ * @returns A JavaScript Date object
43
+ * @throws Error if the date is invalid
44
+ */
45
+ function dateToJsDate(protoDate) {
46
+ if (!protoDate) {
47
+ throw new Error("Date object is null or undefined");
48
+ }
49
+ if (!isValid(protoDate)) {
50
+ throw new Error(`Invalid date: year=${protoDate.year}, month=${protoDate.month}, day=${protoDate.day}`);
51
+ }
52
+ try {
53
+ return new Date(protoDate.year, protoDate.month - 1, protoDate.day); // JS months are 0-indexed
54
+ }
55
+ catch (e) {
56
+ throw new Error(`Invalid date values: ${e}`);
57
+ }
58
+ }
59
+ /**
60
+ * Checks if a Date has valid values according to the protobuf constraints.
61
+ *
62
+ * @param protoDate - A Date protobuf message or undefined
63
+ * @returns True if the date is valid, false otherwise
64
+ */
65
+ function isValid(protoDate) {
66
+ if (!protoDate) {
67
+ return false;
68
+ }
69
+ try {
70
+ validateDate(protoDate.year, protoDate.month, protoDate.day);
71
+ return true;
72
+ }
73
+ catch {
74
+ return false;
75
+ }
76
+ }
77
+ /**
78
+ * Returns true if the date has non-zero year, month, and day values.
79
+ * Since only full dates are valid, this is equivalent to isValid().
80
+ *
81
+ * @param protoDate - A Date protobuf message or undefined
82
+ * @returns True if the date is complete, false otherwise
83
+ */
84
+ function isComplete(protoDate) {
85
+ if (!protoDate) {
86
+ return false;
87
+ }
88
+ return protoDate.year !== 0 && protoDate.month !== 0 && protoDate.day !== 0;
89
+ }
90
+ /**
91
+ * Returns a string representation of the date.
92
+ *
93
+ * @param protoDate - A Date protobuf message or undefined
94
+ * @returns String representation of the date
95
+ */
96
+ function dateToString(protoDate) {
97
+ if (!protoDate) {
98
+ return "<undefined>";
99
+ }
100
+ if (isValid(protoDate)) {
101
+ return `${protoDate.year.toString().padStart(4, "0")}-${protoDate.month.toString().padStart(2, "0")}-${protoDate.day.toString().padStart(2, "0")}`;
102
+ }
103
+ else {
104
+ return `Date{year=${protoDate.year}, month=${protoDate.month}, day=${protoDate.day}} [INVALID]`;
105
+ }
106
+ }
107
+ /**
108
+ * Validates the year, month, and day values according to Date constraints.
109
+ * Only full dates are valid - all fields must be non-zero.
110
+ *
111
+ * @param year - Year value
112
+ * @param month - Month value
113
+ * @param day - Day value
114
+ * @throws Error if the date values are invalid
115
+ */
116
+ function validateDate(year, month, day) {
117
+ // Year validation - must be non-zero
118
+ if (year < 1 || year > 9999) {
119
+ throw new Error(`Year must be between 1 and 9999, got ${year}`);
120
+ }
121
+ // Month validation - must be non-zero
122
+ if (month < 1 || month > 12) {
123
+ throw new Error(`Month must be between 1 and 12, got ${month}`);
124
+ }
125
+ // Day validation - must be non-zero
126
+ if (day < 1 || day > 31) {
127
+ throw new Error(`Day must be between 1 and 31, got ${day}`);
128
+ }
129
+ // Check if the day is valid for the given month and year
130
+ const testDate = new Date(year, month - 1, day); // JS months are 0-indexed
131
+ if (testDate.getFullYear() !== year ||
132
+ testDate.getMonth() !== month - 1 ||
133
+ testDate.getDate() !== day) {
134
+ throw new Error(`Invalid date: ${year}-${month.toString().padStart(2, "0")}-${day.toString().padStart(2, "0")}`);
135
+ }
136
+ }
@@ -0,0 +1,50 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Message } from "@bufbuild/protobuf";
3
+ /**
4
+ * Describes the file meshtrade/type/v1/date.proto.
5
+ */
6
+ export declare const file_meshtrade_type_v1_date: GenFile;
7
+ /**
8
+ * Represents a whole calendar date, such as a birthday. The time of
9
+ * day and timezone are either specified elsewhere or are insignificant. The
10
+ * date is relative to the Gregorian Calendar.
11
+ *
12
+ * Validation Rules:
13
+ * * Year: 1-9999 (must be non-zero)
14
+ * * Month: 1-12 (must be non-zero)
15
+ * * Day: 1-31 (must be non-zero and valid for the given month/year)
16
+ * * Complete dates must be valid calendar dates (respects leap years, month lengths)
17
+ *
18
+ * Examples:
19
+ * * Full date: year=2023, month=12, day=25 → "2023-12-25"
20
+ *
21
+ * Related types are [meshtrade.type.v1.TimeOfDay][meshtrade.type.v1.TimeOfDay] and
22
+ * `google.protobuf.Timestamp`.
23
+ *
24
+ * @generated from message meshtrade.type.v1.Date
25
+ */
26
+ export type Date = Message<"meshtrade.type.v1.Date"> & {
27
+ /**
28
+ * Year of the date. Must be from 1 to 9999.
29
+ *
30
+ * @generated from field: int32 year = 1;
31
+ */
32
+ year: number;
33
+ /**
34
+ * Month of a year. Must be from 1 to 12.
35
+ *
36
+ * @generated from field: int32 month = 2;
37
+ */
38
+ month: number;
39
+ /**
40
+ * Day of a month. Must be from 1 to 31 and valid for the year and month.
41
+ *
42
+ * @generated from field: int32 day = 3;
43
+ */
44
+ day: number;
45
+ };
46
+ /**
47
+ * Describes the message meshtrade.type.v1.Date.
48
+ * Use `create(DateSchema)` to create a new message.
49
+ */
50
+ export declare const DateSchema: GenMessage<Date>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
3
+ // @generated from file meshtrade/type/v1/date.proto (package meshtrade.type.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DateSchema = exports.file_meshtrade_type_v1_date = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ /**
9
+ * Describes the file meshtrade/type/v1/date.proto.
10
+ */
11
+ exports.file_meshtrade_type_v1_date = (0, codegenv2_1.fileDesc)("ChxtZXNodHJhZGUvdHlwZS92MS9kYXRlLnByb3RvEhFtZXNodHJhZGUudHlwZS52MSIwCgREYXRlEgwKBHllYXIYASABKAUSDQoFbW9udGgYAiABKAUSCwoDZGF5GAMgASgFQkcKGGNvLm1lc2h0cmFkZS5hcGkudHlwZS52MVorZ2l0aHViLmNvbS9tZXNodHJhZGUvYXBpL2dvL3R5cGUvdjE7dHlwZV92MWIGcHJvdG8z");
12
+ /**
13
+ * Describes the message meshtrade.type.v1.Date.
14
+ * Use `create(DateSchema)` to create a new message.
15
+ */
16
+ exports.DateSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_type_v1_date, 0);
@@ -0,0 +1,24 @@
1
+ import BigNumber from "bignumber.js";
2
+ import { Decimal } from "./decimal_pb";
3
+ /**
4
+ * Converts a BigNumber instance to a Decimal object.
5
+ *
6
+ * @param {BigNumber} bigNumberToConvert - The BigNumber instance to convert.
7
+ * @returns {Decimal} A Decimal object with the value set.
8
+ *
9
+ * @remarks
10
+ * This function uses the string representation of the BigNumber
11
+ * to construct a Decimal object.
12
+ */
13
+ export declare function bigNumberToDecimal(bigNumberToConvert: BigNumber): Decimal;
14
+ /**
15
+ * Converts a Decimal object to a BigNumber instance.
16
+ *
17
+ * @param {Decimal} decimal - The Decimal object to convert.
18
+ * @returns {BigNumber} A BigNumber instance with the value set.
19
+ *
20
+ * @remarks
21
+ * This function uses the value of the Decimal object
22
+ * to construct a BigNumber instance.
23
+ */
24
+ export declare function decimalToBigNumber(decimal?: Decimal): BigNumber;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.bigNumberToDecimal = bigNumberToDecimal;
7
+ exports.decimalToBigNumber = decimalToBigNumber;
8
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
9
+ const protobuf_1 = require("@bufbuild/protobuf");
10
+ const decimal_pb_1 = require("./decimal_pb");
11
+ /**
12
+ * Converts a BigNumber instance to a Decimal object.
13
+ *
14
+ * @param {BigNumber} bigNumberToConvert - The BigNumber instance to convert.
15
+ * @returns {Decimal} A Decimal object with the value set.
16
+ *
17
+ * @remarks
18
+ * This function uses the string representation of the BigNumber
19
+ * to construct a Decimal object.
20
+ */
21
+ function bigNumberToDecimal(bigNumberToConvert) {
22
+ return (0, protobuf_1.create)(decimal_pb_1.DecimalSchema, { value: bigNumberToConvert.toString() });
23
+ }
24
+ /**
25
+ * Converts a Decimal object to a BigNumber instance.
26
+ *
27
+ * @param {Decimal} decimal - The Decimal object to convert.
28
+ * @returns {BigNumber} A BigNumber instance with the value set.
29
+ *
30
+ * @remarks
31
+ * This function uses the value of the Decimal object
32
+ * to construct a BigNumber instance.
33
+ */
34
+ function decimalToBigNumber(decimal) {
35
+ if (!decimal || decimal.value === "") {
36
+ return new bignumber_js_1.default("0");
37
+ }
38
+ return new bignumber_js_1.default(decimal.value);
39
+ }
@@ -0,0 +1,24 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Message } from "@bufbuild/protobuf";
3
+ /**
4
+ * Describes the file meshtrade/type/v1/decimal.proto.
5
+ */
6
+ export declare const file_meshtrade_type_v1_decimal: GenFile;
7
+ /**
8
+ * Decimal is a representation of a decimal value, such as 2.5.
9
+ *
10
+ * @generated from message meshtrade.type.v1.Decimal
11
+ */
12
+ export type Decimal = Message<"meshtrade.type.v1.Decimal"> & {
13
+ /**
14
+ * The decimal value, as a string.
15
+ *
16
+ * @generated from field: string value = 1;
17
+ */
18
+ value: string;
19
+ };
20
+ /**
21
+ * Describes the message meshtrade.type.v1.Decimal.
22
+ * Use `create(DecimalSchema)` to create a new message.
23
+ */
24
+ export declare const DecimalSchema: GenMessage<Decimal>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
3
+ // @generated from file meshtrade/type/v1/decimal.proto (package meshtrade.type.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DecimalSchema = exports.file_meshtrade_type_v1_decimal = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ /**
9
+ * Describes the file meshtrade/type/v1/decimal.proto.
10
+ */
11
+ exports.file_meshtrade_type_v1_decimal = (0, codegenv2_1.fileDesc)("Ch9tZXNodHJhZGUvdHlwZS92MS9kZWNpbWFsLnByb3RvEhFtZXNodHJhZGUudHlwZS52MSIYCgdEZWNpbWFsEg0KBXZhbHVlGAEgASgJQkcKGGNvLm1lc2h0cmFkZS5hcGkudHlwZS52MVorZ2l0aHViLmNvbS9tZXNodHJhZGUvYXBpL2dvL3R5cGUvdjE7dHlwZV92MWIGcHJvdG8z");
12
+ /**
13
+ * Describes the message meshtrade.type.v1.Decimal.
14
+ * Use `create(DecimalSchema)` to create a new message.
15
+ */
16
+ exports.DecimalSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_type_v1_decimal, 0);
@@ -0,0 +1,15 @@
1
+ export * from "./address_pb";
2
+ export * from "./amount_pb";
3
+ export * from "./contact_details_pb";
4
+ export * from "./date_pb";
5
+ export * from "./decimal_pb";
6
+ export * from "./ledger_pb";
7
+ export * from "./sorting_pb";
8
+ export * from "./time_of_day_pb";
9
+ export * from "./token_pb";
10
+ export * from "./amount";
11
+ export * from "./amountWrapper";
12
+ export * from "./decimalConversions";
13
+ export * from "./ledger";
14
+ export * from "./token";
15
+ export * from "./tokenWrapper";
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ // ===================================================================
3
+ // AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
4
+ // ===================================================================
5
+ // This section is automatically managed by protoc-gen-meshts.
6
+ //
7
+ // DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
8
+ // Your changes will be overwritten during code generation.
9
+ //
10
+ // To add custom exports, scroll down to the
11
+ // "MANUAL EXPORTS" section indicated below.
12
+ // ===================================================================
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ // Generated exports
29
+ __exportStar(require("./address_pb"), exports);
30
+ __exportStar(require("./amount_pb"), exports);
31
+ __exportStar(require("./contact_details_pb"), exports);
32
+ __exportStar(require("./date_pb"), exports);
33
+ __exportStar(require("./decimal_pb"), exports);
34
+ __exportStar(require("./ledger_pb"), exports);
35
+ __exportStar(require("./sorting_pb"), exports);
36
+ __exportStar(require("./time_of_day_pb"), exports);
37
+ __exportStar(require("./token_pb"), exports);
38
+ // ===================================================================
39
+ // END OF AUTO-GENERATED SECTION
40
+ // ===================================================================
41
+ //
42
+ // MANUAL EXPORTS - ADD YOUR CUSTOM EXPORTS BELOW
43
+ //
44
+ // You can safely add your own export statements in this section.
45
+ // They will be preserved across code generation.
46
+ //
47
+ // Example:
48
+ // export * from "./my_custom_module";
49
+ // export { MyCustomClass } from "./another_module";
50
+ // ===================================================================
51
+ __exportStar(require("./amount"), exports);
52
+ __exportStar(require("./amountWrapper"), exports);
53
+ __exportStar(require("./decimalConversions"), exports);
54
+ __exportStar(require("./ledger"), exports);
55
+ __exportStar(require("./token"), exports);
56
+ __exportStar(require("./tokenWrapper"), exports);
@@ -0,0 +1,27 @@
1
+ import { Ledger } from "./ledger_pb";
2
+ export declare const allLedgers: Ledger[];
3
+ /**
4
+ * Converts a Ledger enum instance to a custom string representation.
5
+ * @param {Ledger} Ledger - The Ledger to convert.
6
+ * @returns {string} The custom string representation of the Ledger.
7
+ */
8
+ export declare function ledgerToString(Ledger: Ledger): string;
9
+ /**
10
+ * Converts a custom string representation to a Ledger enum instance.
11
+ * @param {string} LedgerStr - The custom string representation of the Ledger.
12
+ * @returns {Ledger} The corresponding Ledger enum instance.
13
+ */
14
+ export declare function stringToLedger(LedgerStr: string): Ledger;
15
+ /**
16
+ * Creates a new Amount object using a BigNumber and a Token.
17
+ *
18
+ * @param {Ledger} ledger - The ledger for which to get decimal places.
19
+ * @returns {number} Returns the number of decimal places supported on ledger.
20
+ */
21
+ export declare function getLedgerNoDecimalPlaces(ledger: Ledger): number;
22
+ /**
23
+ * Converts a Ledger enum instance to a BE string representation.
24
+ * @param {Ledger} Ledger - The Ledger to convert.
25
+ * @returns {string} The custom string representation of the Ledger.
26
+ */
27
+ export declare function ledgerToBEString(Ledger: Ledger): string;