@meshtrade/api-old 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.
- package/README.md +117 -0
- package/dist/buf/validate/validate_pb.js +17134 -0
- package/dist/meshtrade/common/config.d.ts +7 -0
- package/dist/meshtrade/common/config.js +9 -0
- package/dist/meshtrade/common/groupHeaderInterceptor.d.ts +64 -0
- package/dist/meshtrade/common/groupHeaderInterceptor.js +76 -0
- package/dist/meshtrade/common/grpc_web.d.ts +18 -0
- package/dist/meshtrade/common/grpc_web.js +34 -0
- package/dist/meshtrade/common/validation.d.ts +62 -0
- package/dist/meshtrade/common/validation.js +77 -0
- package/dist/meshtrade/compliance/client/v1/client_pb.d.ts +91 -0
- package/dist/meshtrade/compliance/client/v1/client_pb.js +645 -0
- package/dist/meshtrade/compliance/client/v1/company_pb.d.ts +178 -0
- package/dist/meshtrade/compliance/client/v1/company_pb.js +1322 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_pb.d.ts +56 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_pb.js +422 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.d.ts +15 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.js +40 -0
- package/dist/meshtrade/compliance/client/v1/fund_pb.d.ts +42 -0
- package/dist/meshtrade/compliance/client/v1/fund_pb.js +321 -0
- package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.d.ts +11 -0
- package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.js +36 -0
- package/dist/meshtrade/compliance/client/v1/index.d.ts +18 -0
- package/dist/meshtrade/compliance/client/v1/index.js +61 -0
- package/dist/meshtrade/compliance/client/v1/industry_classification_pb.d.ts +50 -0
- package/dist/meshtrade/compliance/client/v1/industry_classification_pb.js +386 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.d.ts +22 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.js +47 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_pb.d.ts +94 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_pb.js +729 -0
- package/dist/meshtrade/compliance/client/v1/pep_status_pb.d.ts +10 -0
- package/dist/meshtrade/compliance/client/v1/pep_status_pb.js +35 -0
- package/dist/meshtrade/compliance/client/v1/service_grpc_web_client_meshts.d.ts +47 -0
- package/dist/meshtrade/compliance/client/v1/service_grpc_web_client_meshts.js +78 -0
- package/dist/meshtrade/compliance/client/v1/service_grpc_web_pb.d.ts +56 -0
- package/dist/meshtrade/compliance/client/v1/service_grpc_web_pb.js +270 -0
- package/dist/meshtrade/compliance/client/v1/service_pb.d.ts +79 -0
- package/dist/meshtrade/compliance/client/v1/service_pb.js +660 -0
- package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.d.ts +29 -0
- package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.js +54 -0
- package/dist/meshtrade/compliance/client/v1/tax_residency_pb.d.ts +27 -0
- package/dist/meshtrade/compliance/client/v1/tax_residency_pb.js +208 -0
- package/dist/meshtrade/compliance/client/v1/trust_pb.d.ts +42 -0
- package/dist/meshtrade/compliance/client/v1/trust_pb.js +321 -0
- package/dist/meshtrade/compliance/client/v1/verification_status_pb.d.ts +11 -0
- package/dist/meshtrade/compliance/client/v1/verification_status_pb.js +36 -0
- package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.d.ts +27 -0
- package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.js +208 -0
- package/dist/meshtrade/iam/api_user/v1/api_user_pb.d.ts +57 -0
- package/dist/meshtrade/iam/api_user/v1/api_user_pb.js +376 -0
- package/dist/meshtrade/iam/api_user/v1/index.d.ts +5 -0
- package/dist/meshtrade/iam/api_user/v1/index.js +46 -0
- package/dist/meshtrade/iam/api_user/v1/service_grpc_web_client_meshts.d.ts +83 -0
- package/dist/meshtrade/iam/api_user/v1/service_grpc_web_client_meshts.js +126 -0
- package/dist/meshtrade/iam/api_user/v1/service_grpc_web_pb.d.ts +128 -0
- package/dist/meshtrade/iam/api_user/v1/service_grpc_web_pb.js +636 -0
- package/dist/meshtrade/iam/api_user/v1/service_pb.d.ts +219 -0
- package/dist/meshtrade/iam/api_user/v1/service_pb.js +1866 -0
- package/dist/meshtrade/iam/group/v1/group_pb.d.ts +35 -0
- package/dist/meshtrade/iam/group/v1/group_pb.js +268 -0
- package/dist/meshtrade/iam/group/v1/index.d.ts +4 -0
- package/dist/meshtrade/iam/group/v1/index.js +45 -0
- package/dist/meshtrade/iam/group/v1/service_grpc_web_client_meshts.d.ts +59 -0
- package/dist/meshtrade/iam/group/v1/service_grpc_web_client_meshts.js +94 -0
- package/dist/meshtrade/iam/group/v1/service_grpc_web_pb.d.ts +80 -0
- package/dist/meshtrade/iam/group/v1/service_grpc_web_pb.js +394 -0
- package/dist/meshtrade/iam/group/v1/service_pb.d.ts +200 -0
- package/dist/meshtrade/iam/group/v1/service_pb.js +1664 -0
- package/dist/meshtrade/iam/role/v1/index.d.ts +2 -0
- package/dist/meshtrade/iam/role/v1/index.js +43 -0
- package/dist/meshtrade/iam/role/v1/role.d.ts +71 -0
- package/dist/meshtrade/iam/role/v1/role.js +192 -0
- package/dist/meshtrade/iam/role/v1/role_pb.d.ts +41 -0
- package/dist/meshtrade/iam/role/v1/role_pb.js +66 -0
- package/dist/meshtrade/iam/user/v1/index.d.ts +4 -0
- package/dist/meshtrade/iam/user/v1/index.js +45 -0
- package/dist/meshtrade/iam/user/v1/service_grpc_web_client_meshts.d.ts +77 -0
- package/dist/meshtrade/iam/user/v1/service_grpc_web_client_meshts.js +118 -0
- package/dist/meshtrade/iam/user/v1/service_grpc_web_pb.d.ts +116 -0
- package/dist/meshtrade/iam/user/v1/service_grpc_web_pb.js +577 -0
- package/dist/meshtrade/iam/user/v1/service_pb.d.ts +262 -0
- package/dist/meshtrade/iam/user/v1/service_pb.js +2202 -0
- package/dist/meshtrade/iam/user/v1/user_pb.d.ts +37 -0
- package/dist/meshtrade/iam/user/v1/user_pb.js +294 -0
- package/dist/meshtrade/ledger/transaction/v1/index.d.ts +6 -0
- package/dist/meshtrade/ledger/transaction/v1/index.js +47 -0
- package/dist/meshtrade/ledger/transaction/v1/service_grpc_web_client_meshts.d.ts +56 -0
- package/dist/meshtrade/ledger/transaction/v1/service_grpc_web_client_meshts.js +96 -0
- package/dist/meshtrade/ledger/transaction/v1/service_grpc_web_pb.d.ts +41 -0
- package/dist/meshtrade/ledger/transaction/v1/service_grpc_web_pb.js +204 -0
- package/dist/meshtrade/ledger/transaction/v1/service_pb.d.ts +79 -0
- package/dist/meshtrade/ledger/transaction/v1/service_pb.js +638 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.d.ts +13 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.js +38 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state.d.ts +14 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state.js +64 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.d.ts +14 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.js +39 -0
- package/dist/meshtrade/market_data/price/v1/index.d.ts +4 -0
- package/dist/meshtrade/market_data/price/v1/index.js +45 -0
- package/dist/meshtrade/market_data/price/v1/price_pb.d.ts +45 -0
- package/dist/meshtrade/market_data/price/v1/price_pb.js +356 -0
- package/dist/meshtrade/market_data/price/v1/service_grpc_web_client_meshts.d.ts +35 -0
- package/dist/meshtrade/market_data/price/v1/service_grpc_web_client_meshts.js +62 -0
- package/dist/meshtrade/market_data/price/v1/service_grpc_web_pb.d.ts +32 -0
- package/dist/meshtrade/market_data/price/v1/service_grpc_web_pb.js +150 -0
- package/dist/meshtrade/market_data/price/v1/service_pb.d.ts +34 -0
- package/dist/meshtrade/market_data/price/v1/service_pb.js +256 -0
- package/dist/meshtrade/option/method_options/v1/index.d.ts +1 -0
- package/dist/meshtrade/option/method_options/v1/index.js +42 -0
- package/dist/meshtrade/option/method_options/v1/method_options_pb.d.ts +44 -0
- package/dist/meshtrade/option/method_options/v1/method_options_pb.js +314 -0
- package/dist/meshtrade/reporting/account_report/v1/account_report_pb.d.ts +112 -0
- package/dist/meshtrade/reporting/account_report/v1/account_report_pb.js +897 -0
- package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.d.ts +26 -0
- package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.js +206 -0
- package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.d.ts +50 -0
- package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.js +393 -0
- package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.d.ts +66 -0
- package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.js +460 -0
- package/dist/meshtrade/reporting/account_report/v1/index.d.ts +8 -0
- package/dist/meshtrade/reporting/account_report/v1/index.js +49 -0
- package/dist/meshtrade/reporting/account_report/v1/service_grpc_web_client_meshts.d.ts +41 -0
- package/dist/meshtrade/reporting/account_report/v1/service_grpc_web_client_meshts.js +70 -0
- package/dist/meshtrade/reporting/account_report/v1/service_grpc_web_pb.d.ts +44 -0
- package/dist/meshtrade/reporting/account_report/v1/service_grpc_web_pb.js +213 -0
- package/dist/meshtrade/reporting/account_report/v1/service_pb.d.ts +99 -0
- package/dist/meshtrade/reporting/account_report/v1/service_pb.js +796 -0
- package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.d.ts +62 -0
- package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.js +495 -0
- package/dist/meshtrade/studio/instrument/v1/index.d.ts +3 -0
- package/dist/meshtrade/studio/instrument/v1/index.js +44 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_pb.d.ts +38 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_pb.js +291 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.d.ts +34 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.js +59 -0
- package/dist/meshtrade/studio/instrument/v1/unit_pb.d.ts +25 -0
- package/dist/meshtrade/studio/instrument/v1/unit_pb.js +50 -0
- package/dist/meshtrade/trading/limit_order/v1/index.d.ts +4 -0
- package/dist/meshtrade/trading/limit_order/v1/index.js +45 -0
- package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.d.ts +83 -0
- package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.js +559 -0
- package/dist/meshtrade/trading/limit_order/v1/service_grpc_web_client_meshts.d.ts +87 -0
- package/dist/meshtrade/trading/limit_order/v1/service_grpc_web_client_meshts.js +136 -0
- package/dist/meshtrade/trading/limit_order/v1/service_grpc_web_pb.d.ts +102 -0
- package/dist/meshtrade/trading/limit_order/v1/service_grpc_web_pb.js +509 -0
- package/dist/meshtrade/trading/limit_order/v1/service_pb.d.ts +203 -0
- package/dist/meshtrade/trading/limit_order/v1/service_pb.js +1692 -0
- package/dist/meshtrade/trading/market_order/v1/index.d.ts +4 -0
- package/dist/meshtrade/trading/market_order/v1/index.js +45 -0
- package/dist/meshtrade/trading/market_order/v1/market_order_pb.d.ts +22 -0
- package/dist/meshtrade/trading/market_order/v1/market_order_pb.js +176 -0
- package/dist/meshtrade/trading/market_order/v1/service_grpc_web_client_meshts.d.ts +35 -0
- package/dist/meshtrade/trading/market_order/v1/service_grpc_web_client_meshts.js +62 -0
- package/dist/meshtrade/trading/market_order/v1/service_grpc_web_pb.d.ts +32 -0
- package/dist/meshtrade/trading/market_order/v1/service_grpc_web_pb.js +146 -0
- package/dist/meshtrade/trading/market_order/v1/service_pb.d.ts +24 -0
- package/dist/meshtrade/trading/market_order/v1/service_pb.js +180 -0
- package/dist/meshtrade/type/v1/address_pb.d.ts +44 -0
- package/dist/meshtrade/type/v1/address_pb.js +352 -0
- package/dist/meshtrade/type/v1/amount.d.ts +13 -0
- package/dist/meshtrade/type/v1/amount.js +66 -0
- package/dist/meshtrade/type/v1/amountWrapper.d.ts +74 -0
- package/dist/meshtrade/type/v1/amountWrapper.js +98 -0
- package/dist/meshtrade/type/v1/amount_pb.d.ts +32 -0
- package/dist/meshtrade/type/v1/amount_pb.js +252 -0
- package/dist/meshtrade/type/v1/contact_details_pb.d.ts +54 -0
- package/dist/meshtrade/type/v1/contact_details_pb.js +416 -0
- package/dist/meshtrade/type/v1/date.d.ts +49 -0
- package/dist/meshtrade/type/v1/date.js +136 -0
- package/dist/meshtrade/type/v1/date_pb.d.ts +30 -0
- package/dist/meshtrade/type/v1/date_pb.js +236 -0
- package/dist/meshtrade/type/v1/decimalConversions.d.ts +24 -0
- package/dist/meshtrade/type/v1/decimalConversions.js +40 -0
- package/dist/meshtrade/type/v1/decimal_pb.d.ts +22 -0
- package/dist/meshtrade/type/v1/decimal_pb.js +176 -0
- package/dist/meshtrade/type/v1/index.d.ts +15 -0
- package/dist/meshtrade/type/v1/index.js +56 -0
- package/dist/meshtrade/type/v1/ledger.d.ts +27 -0
- package/dist/meshtrade/type/v1/ledger.js +115 -0
- package/dist/meshtrade/type/v1/ledger_pb.d.ts +14 -0
- package/dist/meshtrade/type/v1/ledger_pb.js +39 -0
- package/dist/meshtrade/type/v1/sorting_pb.d.ts +9 -0
- package/dist/meshtrade/type/v1/sorting_pb.js +34 -0
- package/dist/meshtrade/type/v1/time_of_day.d.ts +74 -0
- package/dist/meshtrade/type/v1/time_of_day.js +205 -0
- package/dist/meshtrade/type/v1/time_of_day_pb.d.ts +34 -0
- package/dist/meshtrade/type/v1/time_of_day_pb.js +266 -0
- package/dist/meshtrade/type/v1/token.d.ts +4 -0
- package/dist/meshtrade/type/v1/token.js +24 -0
- package/dist/meshtrade/type/v1/tokenWrapper.d.ts +49 -0
- package/dist/meshtrade/type/v1/tokenWrapper.js +76 -0
- package/dist/meshtrade/type/v1/token_pb.d.ts +31 -0
- package/dist/meshtrade/type/v1/token_pb.js +238 -0
- package/dist/meshtrade/wallet/account/v1/account_pb.d.ts +149 -0
- package/dist/meshtrade/wallet/account/v1/account_pb.js +1160 -0
- package/dist/meshtrade/wallet/account/v1/index.d.ts +4 -0
- package/dist/meshtrade/wallet/account/v1/index.js +45 -0
- package/dist/meshtrade/wallet/account/v1/service_grpc_web_client_meshts.d.ts +83 -0
- package/dist/meshtrade/wallet/account/v1/service_grpc_web_client_meshts.js +126 -0
- package/dist/meshtrade/wallet/account/v1/service_grpc_web_pb.d.ts +128 -0
- package/dist/meshtrade/wallet/account/v1/service_grpc_web_pb.js +638 -0
- package/dist/meshtrade/wallet/account/v1/service_pb.d.ts +350 -0
- package/dist/meshtrade/wallet/account/v1/service_pb.js +2930 -0
- package/package.json +171 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allLedgers = void 0;
|
|
4
|
+
exports.ledgerToString = ledgerToString;
|
|
5
|
+
exports.stringToLedger = stringToLedger;
|
|
6
|
+
exports.getLedgerNoDecimalPlaces = getLedgerNoDecimalPlaces;
|
|
7
|
+
exports.ledgerToBEString = ledgerToBEString;
|
|
8
|
+
const ledger_pb_1 = require("./ledger_pb");
|
|
9
|
+
// Get all Ledgers as enum values
|
|
10
|
+
exports.allLedgers = Object.values(ledger_pb_1.Ledger).filter((value) => typeof value === "number");
|
|
11
|
+
// Define explicit mappings between Ledger enums and custom string representations
|
|
12
|
+
const ledgerToStringMapping = {
|
|
13
|
+
[ledger_pb_1.Ledger.LEDGER_UNSPECIFIED]: "-",
|
|
14
|
+
[ledger_pb_1.Ledger.LEDGER_STELLAR]: "Stellar",
|
|
15
|
+
[ledger_pb_1.Ledger.LEDGER_BITCOIN]: "Bitcoin",
|
|
16
|
+
[ledger_pb_1.Ledger.LEDGER_LITECOIN]: "Litecoin",
|
|
17
|
+
[ledger_pb_1.Ledger.LEDGER_ETHEREUM]: "Ethereum",
|
|
18
|
+
[ledger_pb_1.Ledger.LEDGER_XRP]: "Ripple",
|
|
19
|
+
[ledger_pb_1.Ledger.LEDGER_SA_STOCK_BROKERS]: "SA Stock Brokers",
|
|
20
|
+
[ledger_pb_1.Ledger.LEDGER_NULL]: "NULL",
|
|
21
|
+
};
|
|
22
|
+
// Reverse mapping from string to Ledger enum
|
|
23
|
+
const stringToLedgerMapping = {};
|
|
24
|
+
for (const [key, value] of Object.entries(ledgerToStringMapping)) {
|
|
25
|
+
stringToLedgerMapping[value] = Number(key);
|
|
26
|
+
}
|
|
27
|
+
class UnsupportedLedgerError extends Error {
|
|
28
|
+
constructor(Ledger) {
|
|
29
|
+
const message = `Unsupported Ledger: ${Ledger}`;
|
|
30
|
+
super(message);
|
|
31
|
+
this.Ledger = Ledger;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Converts a Ledger enum instance to a custom string representation.
|
|
36
|
+
* @param {Ledger} Ledger - The Ledger to convert.
|
|
37
|
+
* @returns {string} The custom string representation of the Ledger.
|
|
38
|
+
*/
|
|
39
|
+
function ledgerToString(Ledger) {
|
|
40
|
+
if (Ledger in ledgerToStringMapping) {
|
|
41
|
+
return ledgerToStringMapping[Ledger];
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
throw new UnsupportedLedgerError(Ledger);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
class UnsupportedLedgerStringError extends Error {
|
|
48
|
+
constructor(LedgerStr) {
|
|
49
|
+
const message = `Unsupported Ledger string: ${LedgerStr}`;
|
|
50
|
+
super(message);
|
|
51
|
+
this.LedgerStr = LedgerStr;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Converts a custom string representation to a Ledger enum instance.
|
|
56
|
+
* @param {string} LedgerStr - The custom string representation of the Ledger.
|
|
57
|
+
* @returns {Ledger} The corresponding Ledger enum instance.
|
|
58
|
+
*/
|
|
59
|
+
function stringToLedger(LedgerStr) {
|
|
60
|
+
if (LedgerStr in stringToLedgerMapping) {
|
|
61
|
+
return stringToLedgerMapping[LedgerStr];
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
throw new UnsupportedLedgerStringError(LedgerStr);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Define a mapping from Ledger to the number of decimal places
|
|
68
|
+
const ledgerDecimalPlaces = {
|
|
69
|
+
[ledger_pb_1.Ledger.LEDGER_UNSPECIFIED]: 2,
|
|
70
|
+
[ledger_pb_1.Ledger.LEDGER_STELLAR]: 7,
|
|
71
|
+
[ledger_pb_1.Ledger.LEDGER_BITCOIN]: 8,
|
|
72
|
+
[ledger_pb_1.Ledger.LEDGER_LITECOIN]: 7,
|
|
73
|
+
[ledger_pb_1.Ledger.LEDGER_ETHEREUM]: 7,
|
|
74
|
+
[ledger_pb_1.Ledger.LEDGER_XRP]: 7,
|
|
75
|
+
[ledger_pb_1.Ledger.LEDGER_SA_STOCK_BROKERS]: 2,
|
|
76
|
+
[ledger_pb_1.Ledger.LEDGER_NULL]: 2,
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Creates a new Amount object using a BigNumber and a Token.
|
|
80
|
+
*
|
|
81
|
+
* @param {Ledger} ledger - The ledger for which to get decimal places.
|
|
82
|
+
* @returns {number} Returns the number of decimal places supported on ledger.
|
|
83
|
+
*/
|
|
84
|
+
function getLedgerNoDecimalPlaces(ledger) {
|
|
85
|
+
if (ledger in ledgerDecimalPlaces) {
|
|
86
|
+
return ledgerDecimalPlaces[ledger];
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
throw new UnsupportedLedgerError(ledger);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Define explicit mappings between Ledger enums backend string representations
|
|
93
|
+
const ledgerToBEStringMapping = {
|
|
94
|
+
[ledger_pb_1.Ledger.LEDGER_UNSPECIFIED]: "LEDGER_UNSPECIFIED",
|
|
95
|
+
[ledger_pb_1.Ledger.LEDGER_STELLAR]: "LEDGER_STELLAR",
|
|
96
|
+
[ledger_pb_1.Ledger.LEDGER_BITCOIN]: "LEDGER_BITCOIN",
|
|
97
|
+
[ledger_pb_1.Ledger.LEDGER_LITECOIN]: "LEDGER_LITECOIN",
|
|
98
|
+
[ledger_pb_1.Ledger.LEDGER_ETHEREUM]: "LEDGER_ETHEREUM",
|
|
99
|
+
[ledger_pb_1.Ledger.LEDGER_XRP]: "LEDGER_XRP",
|
|
100
|
+
[ledger_pb_1.Ledger.LEDGER_SA_STOCK_BROKERS]: "LEDGER_SA_STOCK_BROKERS",
|
|
101
|
+
[ledger_pb_1.Ledger.LEDGER_NULL]: "LEDGER_NULL",
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Converts a Ledger enum instance to a BE string representation.
|
|
105
|
+
* @param {Ledger} Ledger - The Ledger to convert.
|
|
106
|
+
* @returns {string} The custom string representation of the Ledger.
|
|
107
|
+
*/
|
|
108
|
+
function ledgerToBEString(Ledger) {
|
|
109
|
+
if (Ledger in ledgerToBEStringMapping) {
|
|
110
|
+
return ledgerToBEStringMapping[Ledger];
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
throw new UnsupportedLedgerError(Ledger);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as jspb from 'google-protobuf'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export enum Ledger {
|
|
6
|
+
LEDGER_UNSPECIFIED = 0,
|
|
7
|
+
LEDGER_STELLAR = 3,
|
|
8
|
+
LEDGER_BITCOIN = 5,
|
|
9
|
+
LEDGER_LITECOIN = 7,
|
|
10
|
+
LEDGER_ETHEREUM = 9,
|
|
11
|
+
LEDGER_XRP = 11,
|
|
12
|
+
LEDGER_SA_STOCK_BROKERS = 15,
|
|
13
|
+
LEDGER_NULL = 16,
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// source: meshtrade/type/v1/ledger.proto
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview
|
|
4
|
+
* @enhanceable
|
|
5
|
+
* @suppress {missingRequire} reports error on implicit type usages.
|
|
6
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
7
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
11
|
+
/* eslint-disable */
|
|
12
|
+
// @ts-nocheck
|
|
13
|
+
|
|
14
|
+
var jspb = require('google-protobuf');
|
|
15
|
+
var goog = jspb;
|
|
16
|
+
var global =
|
|
17
|
+
(typeof globalThis !== 'undefined' && globalThis) ||
|
|
18
|
+
(typeof window !== 'undefined' && window) ||
|
|
19
|
+
(typeof global !== 'undefined' && global) ||
|
|
20
|
+
(typeof self !== 'undefined' && self) ||
|
|
21
|
+
(function () { return this; }).call(null) ||
|
|
22
|
+
Function('return this')();
|
|
23
|
+
|
|
24
|
+
goog.exportSymbol('proto.meshtrade.type.v1.Ledger', null, global);
|
|
25
|
+
/**
|
|
26
|
+
* @enum {number}
|
|
27
|
+
*/
|
|
28
|
+
proto.meshtrade.type.v1.Ledger = {
|
|
29
|
+
LEDGER_UNSPECIFIED: 0,
|
|
30
|
+
LEDGER_STELLAR: 3,
|
|
31
|
+
LEDGER_BITCOIN: 5,
|
|
32
|
+
LEDGER_LITECOIN: 7,
|
|
33
|
+
LEDGER_ETHEREUM: 9,
|
|
34
|
+
LEDGER_XRP: 11,
|
|
35
|
+
LEDGER_SA_STOCK_BROKERS: 15,
|
|
36
|
+
LEDGER_NULL: 16
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
goog.object.extend(exports, proto.meshtrade.type.v1);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// source: meshtrade/type/v1/sorting.proto
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview
|
|
4
|
+
* @enhanceable
|
|
5
|
+
* @suppress {missingRequire} reports error on implicit type usages.
|
|
6
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
7
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
11
|
+
/* eslint-disable */
|
|
12
|
+
// @ts-nocheck
|
|
13
|
+
|
|
14
|
+
var jspb = require('google-protobuf');
|
|
15
|
+
var goog = jspb;
|
|
16
|
+
var global =
|
|
17
|
+
(typeof globalThis !== 'undefined' && globalThis) ||
|
|
18
|
+
(typeof window !== 'undefined' && window) ||
|
|
19
|
+
(typeof global !== 'undefined' && global) ||
|
|
20
|
+
(typeof self !== 'undefined' && self) ||
|
|
21
|
+
(function () { return this; }).call(null) ||
|
|
22
|
+
Function('return this')();
|
|
23
|
+
|
|
24
|
+
goog.exportSymbol('proto.meshtrade.type.v1.SortingOrder', null, global);
|
|
25
|
+
/**
|
|
26
|
+
* @enum {number}
|
|
27
|
+
*/
|
|
28
|
+
proto.meshtrade.type.v1.SortingOrder = {
|
|
29
|
+
SORTING_ORDER_UNSPECIFIED: 0,
|
|
30
|
+
SORTING_ORDER_ASC: 1,
|
|
31
|
+
SORTING_ORDER_DESC: 2
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
goog.object.extend(exports, proto.meshtrade.type.v1);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { TimeOfDay } from "./time_of_day_pb";
|
|
2
|
+
import { Date as ProtoDate } from "./date_pb";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new TimeOfDay protobuf message from hours, minutes, seconds, and nanos values.
|
|
5
|
+
* Validates the input values according to the TimeOfDay message constraints.
|
|
6
|
+
*
|
|
7
|
+
* @param hours - Hours value (0-23, default 0)
|
|
8
|
+
* @param minutes - Minutes value (0-59, default 0)
|
|
9
|
+
* @param seconds - Seconds value (0-59, default 0)
|
|
10
|
+
* @param nanos - Nanoseconds value (0-999999999, default 0)
|
|
11
|
+
* @returns A TimeOfDay protobuf message
|
|
12
|
+
* @throws Error if the time values are invalid
|
|
13
|
+
*/
|
|
14
|
+
export declare function newTimeOfDay(hours?: number, minutes?: number, seconds?: number, nanos?: number): TimeOfDay;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a TimeOfDay protobuf message from a JavaScript Date object.
|
|
17
|
+
* Only extracts the time components, ignoring the date.
|
|
18
|
+
*
|
|
19
|
+
* @param jsDate - A JavaScript Date object
|
|
20
|
+
* @returns A TimeOfDay protobuf message
|
|
21
|
+
*/
|
|
22
|
+
export declare function newTimeOfDayFromJsDate(jsDate: Date): TimeOfDay;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a TimeOfDay protobuf message from milliseconds since midnight.
|
|
25
|
+
*
|
|
26
|
+
* @param millisSinceMidnight - Milliseconds elapsed since midnight
|
|
27
|
+
* @returns A TimeOfDay protobuf message
|
|
28
|
+
* @throws Error if the value is negative or >= 24 hours
|
|
29
|
+
*/
|
|
30
|
+
export declare function newTimeOfDayFromMillis(millisSinceMidnight: number): TimeOfDay;
|
|
31
|
+
/**
|
|
32
|
+
* Converts a TimeOfDay protobuf message to milliseconds since midnight.
|
|
33
|
+
*
|
|
34
|
+
* @param protoTime - A TimeOfDay protobuf message
|
|
35
|
+
* @returns Milliseconds elapsed since midnight
|
|
36
|
+
*/
|
|
37
|
+
export declare function timeOfDayToMillis(protoTime: TimeOfDay): number;
|
|
38
|
+
/**
|
|
39
|
+
* Combines a TimeOfDay with a Date to create a JavaScript Date object.
|
|
40
|
+
*
|
|
41
|
+
* @param protoTime - A TimeOfDay protobuf message
|
|
42
|
+
* @param protoDate - A Date protobuf message
|
|
43
|
+
* @returns A JavaScript Date object
|
|
44
|
+
* @throws Error if either object is invalid or if date is incomplete
|
|
45
|
+
*/
|
|
46
|
+
export declare function timeOfDayToJsDateWithDate(protoTime: TimeOfDay, protoDate: ProtoDate): Date;
|
|
47
|
+
/**
|
|
48
|
+
* Checks if a TimeOfDay has valid values according to the protobuf constraints.
|
|
49
|
+
*
|
|
50
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
51
|
+
* @returns True if the time is valid, false otherwise
|
|
52
|
+
*/
|
|
53
|
+
export declare function isValid(protoTime?: TimeOfDay): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Returns true if the time represents midnight (00:00:00.000000000).
|
|
56
|
+
*
|
|
57
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
58
|
+
* @returns True if the time is midnight, false otherwise
|
|
59
|
+
*/
|
|
60
|
+
export declare function isMidnight(protoTime?: TimeOfDay): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Returns a string representation of the time in HH:MM:SS.nnnnnnnnn format.
|
|
63
|
+
*
|
|
64
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
65
|
+
* @returns String representation of the time
|
|
66
|
+
*/
|
|
67
|
+
export declare function timeOfDayToString(protoTime?: TimeOfDay): string;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the total number of seconds since midnight as a number.
|
|
70
|
+
*
|
|
71
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
72
|
+
* @returns Total seconds since midnight
|
|
73
|
+
*/
|
|
74
|
+
export declare function totalSeconds(protoTime?: TimeOfDay): number;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newTimeOfDay = newTimeOfDay;
|
|
4
|
+
exports.newTimeOfDayFromJsDate = newTimeOfDayFromJsDate;
|
|
5
|
+
exports.newTimeOfDayFromMillis = newTimeOfDayFromMillis;
|
|
6
|
+
exports.timeOfDayToMillis = timeOfDayToMillis;
|
|
7
|
+
exports.timeOfDayToJsDateWithDate = timeOfDayToJsDateWithDate;
|
|
8
|
+
exports.isValid = isValid;
|
|
9
|
+
exports.isMidnight = isMidnight;
|
|
10
|
+
exports.timeOfDayToString = timeOfDayToString;
|
|
11
|
+
exports.totalSeconds = totalSeconds;
|
|
12
|
+
const time_of_day_pb_1 = require("./time_of_day_pb");
|
|
13
|
+
const date_1 = require("./date");
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new TimeOfDay protobuf message from hours, minutes, seconds, and nanos values.
|
|
16
|
+
* Validates the input values according to the TimeOfDay message constraints.
|
|
17
|
+
*
|
|
18
|
+
* @param hours - Hours value (0-23, default 0)
|
|
19
|
+
* @param minutes - Minutes value (0-59, default 0)
|
|
20
|
+
* @param seconds - Seconds value (0-59, default 0)
|
|
21
|
+
* @param nanos - Nanoseconds value (0-999999999, default 0)
|
|
22
|
+
* @returns A TimeOfDay protobuf message
|
|
23
|
+
* @throws Error if the time values are invalid
|
|
24
|
+
*/
|
|
25
|
+
function newTimeOfDay(hours = 0, minutes = 0, seconds = 0, nanos = 0) {
|
|
26
|
+
validateTimeOfDay(hours, minutes, seconds, nanos);
|
|
27
|
+
return new time_of_day_pb_1.TimeOfDay()
|
|
28
|
+
.setHours(hours)
|
|
29
|
+
.setMinutes(minutes)
|
|
30
|
+
.setSeconds(seconds)
|
|
31
|
+
.setNanos(nanos);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates a TimeOfDay protobuf message from a JavaScript Date object.
|
|
35
|
+
* Only extracts the time components, ignoring the date.
|
|
36
|
+
*
|
|
37
|
+
* @param jsDate - A JavaScript Date object
|
|
38
|
+
* @returns A TimeOfDay protobuf message
|
|
39
|
+
*/
|
|
40
|
+
function newTimeOfDayFromJsDate(jsDate) {
|
|
41
|
+
return new time_of_day_pb_1.TimeOfDay()
|
|
42
|
+
.setHours(jsDate.getHours())
|
|
43
|
+
.setMinutes(jsDate.getMinutes())
|
|
44
|
+
.setSeconds(jsDate.getSeconds())
|
|
45
|
+
.setNanos(jsDate.getMilliseconds() * 1000000); // Convert milliseconds to nanoseconds
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Creates a TimeOfDay protobuf message from milliseconds since midnight.
|
|
49
|
+
*
|
|
50
|
+
* @param millisSinceMidnight - Milliseconds elapsed since midnight
|
|
51
|
+
* @returns A TimeOfDay protobuf message
|
|
52
|
+
* @throws Error if the value is negative or >= 24 hours
|
|
53
|
+
*/
|
|
54
|
+
function newTimeOfDayFromMillis(millisSinceMidnight) {
|
|
55
|
+
if (millisSinceMidnight < 0) {
|
|
56
|
+
throw new Error(`Milliseconds cannot be negative: ${millisSinceMidnight}`);
|
|
57
|
+
}
|
|
58
|
+
if (millisSinceMidnight >= 24 * 60 * 60 * 1000) {
|
|
59
|
+
throw new Error(`Milliseconds cannot be 24 hours or more: ${millisSinceMidnight}`);
|
|
60
|
+
}
|
|
61
|
+
const totalSeconds = Math.floor(millisSinceMidnight / 1000);
|
|
62
|
+
const hours = Math.floor(totalSeconds / 3600);
|
|
63
|
+
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
|
64
|
+
const seconds = totalSeconds % 60;
|
|
65
|
+
const nanos = (millisSinceMidnight % 1000) * 1000000; // Convert remaining milliseconds to nanoseconds
|
|
66
|
+
return new time_of_day_pb_1.TimeOfDay()
|
|
67
|
+
.setHours(hours)
|
|
68
|
+
.setMinutes(minutes)
|
|
69
|
+
.setSeconds(seconds)
|
|
70
|
+
.setNanos(nanos);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Converts a TimeOfDay protobuf message to milliseconds since midnight.
|
|
74
|
+
*
|
|
75
|
+
* @param protoTime - A TimeOfDay protobuf message
|
|
76
|
+
* @returns Milliseconds elapsed since midnight
|
|
77
|
+
*/
|
|
78
|
+
function timeOfDayToMillis(protoTime) {
|
|
79
|
+
if (!protoTime) {
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
return (protoTime.getHours() * 3600000 +
|
|
83
|
+
protoTime.getMinutes() * 60000 +
|
|
84
|
+
protoTime.getSeconds() * 1000 +
|
|
85
|
+
Math.floor(protoTime.getNanos() / 1000000)); // Convert nanoseconds to milliseconds
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Combines a TimeOfDay with a Date to create a JavaScript Date object.
|
|
89
|
+
*
|
|
90
|
+
* @param protoTime - A TimeOfDay protobuf message
|
|
91
|
+
* @param protoDate - A Date protobuf message
|
|
92
|
+
* @returns A JavaScript Date object
|
|
93
|
+
* @throws Error if either object is invalid or if date is incomplete
|
|
94
|
+
*/
|
|
95
|
+
function timeOfDayToJsDateWithDate(protoTime, protoDate) {
|
|
96
|
+
if (!protoTime) {
|
|
97
|
+
throw new Error("TimeOfDay object is null or undefined");
|
|
98
|
+
}
|
|
99
|
+
if (!protoDate) {
|
|
100
|
+
throw new Error("Date object is null or undefined");
|
|
101
|
+
}
|
|
102
|
+
if (!(0, date_1.isComplete)(protoDate)) {
|
|
103
|
+
throw new Error("Date must be complete");
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
return new Date(protoDate.getYear(), protoDate.getMonth() - 1, // JS months are 0-indexed
|
|
107
|
+
protoDate.getDay(), protoTime.getHours(), protoTime.getMinutes(), protoTime.getSeconds(), Math.floor(protoTime.getNanos() / 1000000) // Convert nanoseconds to milliseconds
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
throw new Error(`Invalid datetime values: ${e}`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Checks if a TimeOfDay has valid values according to the protobuf constraints.
|
|
116
|
+
*
|
|
117
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
118
|
+
* @returns True if the time is valid, false otherwise
|
|
119
|
+
*/
|
|
120
|
+
function isValid(protoTime) {
|
|
121
|
+
if (!protoTime) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
try {
|
|
125
|
+
validateTimeOfDay(protoTime.getHours(), protoTime.getMinutes(), protoTime.getSeconds(), protoTime.getNanos());
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Returns true if the time represents midnight (00:00:00.000000000).
|
|
134
|
+
*
|
|
135
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
136
|
+
* @returns True if the time is midnight, false otherwise
|
|
137
|
+
*/
|
|
138
|
+
function isMidnight(protoTime) {
|
|
139
|
+
if (!protoTime) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
return (protoTime.getHours() === 0 &&
|
|
143
|
+
protoTime.getMinutes() === 0 &&
|
|
144
|
+
protoTime.getSeconds() === 0 &&
|
|
145
|
+
protoTime.getNanos() === 0);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns a string representation of the time in HH:MM:SS.nnnnnnnnn format.
|
|
149
|
+
*
|
|
150
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
151
|
+
* @returns String representation of the time
|
|
152
|
+
*/
|
|
153
|
+
function timeOfDayToString(protoTime) {
|
|
154
|
+
if (!protoTime) {
|
|
155
|
+
return "<undefined>";
|
|
156
|
+
}
|
|
157
|
+
if (protoTime.getNanos() === 0) {
|
|
158
|
+
return `${protoTime.getHours().toString().padStart(2, "0")}:${protoTime.getMinutes().toString().padStart(2, "0")}:${protoTime.getSeconds().toString().padStart(2, "0")}`;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
return `${protoTime.getHours().toString().padStart(2, "0")}:${protoTime.getMinutes().toString().padStart(2, "0")}:${protoTime.getSeconds().toString().padStart(2, "0")}.${protoTime.getNanos().toString().padStart(9, "0")}`;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Returns the total number of seconds since midnight as a number.
|
|
166
|
+
*
|
|
167
|
+
* @param protoTime - A TimeOfDay protobuf message or undefined
|
|
168
|
+
* @returns Total seconds since midnight
|
|
169
|
+
*/
|
|
170
|
+
function totalSeconds(protoTime) {
|
|
171
|
+
if (!protoTime) {
|
|
172
|
+
return 0;
|
|
173
|
+
}
|
|
174
|
+
return (protoTime.getHours() * 3600 +
|
|
175
|
+
protoTime.getMinutes() * 60 +
|
|
176
|
+
protoTime.getSeconds() +
|
|
177
|
+
protoTime.getNanos() / 1e9);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Validates the hours, minutes, seconds, and nanos values according to TimeOfDay constraints.
|
|
181
|
+
*
|
|
182
|
+
* @param hours - Hours value
|
|
183
|
+
* @param minutes - Minutes value
|
|
184
|
+
* @param seconds - Seconds value
|
|
185
|
+
* @param nanos - Nanoseconds value
|
|
186
|
+
* @throws Error if the time values are invalid
|
|
187
|
+
*/
|
|
188
|
+
function validateTimeOfDay(hours, minutes, seconds, nanos) {
|
|
189
|
+
// Hours validation
|
|
190
|
+
if (hours < 0 || hours > 23) {
|
|
191
|
+
throw new Error(`Hours must be between 0 and 23, got ${hours}`);
|
|
192
|
+
}
|
|
193
|
+
// Minutes validation
|
|
194
|
+
if (minutes < 0 || minutes > 59) {
|
|
195
|
+
throw new Error(`Minutes must be between 0 and 59, got ${minutes}`);
|
|
196
|
+
}
|
|
197
|
+
// Seconds validation
|
|
198
|
+
if (seconds < 0 || seconds > 59) {
|
|
199
|
+
throw new Error(`Seconds must be between 0 and 59, got ${seconds}`);
|
|
200
|
+
}
|
|
201
|
+
// Nanos validation
|
|
202
|
+
if (nanos < 0 || nanos > 999999999) {
|
|
203
|
+
throw new Error(`Nanos must be between 0 and 999,999,999, got ${nanos}`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as jspb from 'google-protobuf'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class TimeOfDay extends jspb.Message {
|
|
6
|
+
getHours(): number;
|
|
7
|
+
setHours(value: number): TimeOfDay;
|
|
8
|
+
|
|
9
|
+
getMinutes(): number;
|
|
10
|
+
setMinutes(value: number): TimeOfDay;
|
|
11
|
+
|
|
12
|
+
getSeconds(): number;
|
|
13
|
+
setSeconds(value: number): TimeOfDay;
|
|
14
|
+
|
|
15
|
+
getNanos(): number;
|
|
16
|
+
setNanos(value: number): TimeOfDay;
|
|
17
|
+
|
|
18
|
+
serializeBinary(): Uint8Array;
|
|
19
|
+
toObject(includeInstance?: boolean): TimeOfDay.AsObject;
|
|
20
|
+
static toObject(includeInstance: boolean, msg: TimeOfDay): TimeOfDay.AsObject;
|
|
21
|
+
static serializeBinaryToWriter(message: TimeOfDay, writer: jspb.BinaryWriter): void;
|
|
22
|
+
static deserializeBinary(bytes: Uint8Array): TimeOfDay;
|
|
23
|
+
static deserializeBinaryFromReader(message: TimeOfDay, reader: jspb.BinaryReader): TimeOfDay;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export namespace TimeOfDay {
|
|
27
|
+
export type AsObject = {
|
|
28
|
+
hours: number,
|
|
29
|
+
minutes: number,
|
|
30
|
+
seconds: number,
|
|
31
|
+
nanos: number,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|