@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,74 @@
|
|
|
1
|
+
import { Amount } from "./amount_pb";
|
|
2
|
+
import { Token } from "./token_pb";
|
|
3
|
+
import { Decimal } from "./decimal_pb";
|
|
4
|
+
/**
|
|
5
|
+
* Wrapper class around a Amount.
|
|
6
|
+
*
|
|
7
|
+
* The AmountWrapper class provides convenience methods to manipulate and retrieve the
|
|
8
|
+
* Amount instance it wraps, along with its associated Token and value.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AmountWrapper {
|
|
11
|
+
private _amount;
|
|
12
|
+
/**
|
|
13
|
+
* Constructs an instance of the AmountWrapper class.
|
|
14
|
+
*
|
|
15
|
+
* This constructor initializes the AmountWrapper with a given Amount.
|
|
16
|
+
* If the amount is not provided or is undefined, a TypeError will be thrown.
|
|
17
|
+
* The amount argument is set to option (i.e. could be undefined) as objects
|
|
18
|
+
* returned by protobuf types are typically optionally undefined.
|
|
19
|
+
*
|
|
20
|
+
* @param {Amount} [amount] - The Amount to be wrapped. Must be defined.
|
|
21
|
+
*
|
|
22
|
+
* @throws {TypeError} If the amount is undefined.
|
|
23
|
+
*/
|
|
24
|
+
constructor(amount?: Amount);
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the wrapped Amount.
|
|
27
|
+
*
|
|
28
|
+
* This getter provides access to the Amount instance that is wrapped by this class.
|
|
29
|
+
*
|
|
30
|
+
* @returns {Amount} The wrapped Amount.
|
|
31
|
+
*/
|
|
32
|
+
get amount(): Amount;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the token associated with the wrapped Amount.
|
|
35
|
+
*
|
|
36
|
+
* This getter returns the Token instance associated with the wrapped Amount.
|
|
37
|
+
* If the token is undefined, a TypeError will be thrown.
|
|
38
|
+
*
|
|
39
|
+
* @returns {Token} The token associated with the wrapped Amount.
|
|
40
|
+
* @throws {TypeError} If the token is undefined in the wrapped amount.
|
|
41
|
+
*/
|
|
42
|
+
get token(): Token;
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves the value associated with the wrapped Amount.
|
|
45
|
+
*
|
|
46
|
+
* This getter returns the Decimal value associated with the wrapped Amount.
|
|
47
|
+
* If the value is undefined, a TypeError will be thrown.
|
|
48
|
+
*
|
|
49
|
+
* @returns {Decimal} The value associated with the wrapped Amount.
|
|
50
|
+
* @throws {TypeError} If the value is undefined in the wrapped amount.
|
|
51
|
+
*/
|
|
52
|
+
get value(): Decimal;
|
|
53
|
+
/**
|
|
54
|
+
* Sets a new value for the wrapped Amount.
|
|
55
|
+
*
|
|
56
|
+
* This method creates a new AmountWrapper instance with the provided value,
|
|
57
|
+
* which can be either a BigNumber or a Decimal. The new value is converted
|
|
58
|
+
* into a Amount using the associated token.
|
|
59
|
+
*
|
|
60
|
+
* @param {BigNumber | Decimal} value - The value to set for the wrapped Amount.
|
|
61
|
+
* @returns {AmountWrapper} A new AmountWrapper instance with the updated value.
|
|
62
|
+
*/
|
|
63
|
+
setValue(value: BigNumber | Decimal): AmountWrapper;
|
|
64
|
+
/**
|
|
65
|
+
* Sets a new token for the wrapped Amount.
|
|
66
|
+
*
|
|
67
|
+
* This method creates a new AmountWrapper instance with the provided token.
|
|
68
|
+
* The current value of the wrapped Amount is associated with the new token.
|
|
69
|
+
*
|
|
70
|
+
* @param {Token} token - The new token to set for the wrapped Amount.
|
|
71
|
+
* @returns {AmountWrapper} A new AmountWrapper instance with the updated token.
|
|
72
|
+
*/
|
|
73
|
+
setToken(token: Token): AmountWrapper;
|
|
74
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AmountWrapper = void 0;
|
|
4
|
+
const tokenWrapper_1 = require("./tokenWrapper");
|
|
5
|
+
/**
|
|
6
|
+
* Wrapper class around a Amount.
|
|
7
|
+
*
|
|
8
|
+
* The AmountWrapper class provides convenience methods to manipulate and retrieve the
|
|
9
|
+
* Amount instance it wraps, along with its associated Token and value.
|
|
10
|
+
*/
|
|
11
|
+
class AmountWrapper {
|
|
12
|
+
/**
|
|
13
|
+
* Constructs an instance of the AmountWrapper class.
|
|
14
|
+
*
|
|
15
|
+
* This constructor initializes the AmountWrapper with a given Amount.
|
|
16
|
+
* If the amount is not provided or is undefined, a TypeError will be thrown.
|
|
17
|
+
* The amount argument is set to option (i.e. could be undefined) as objects
|
|
18
|
+
* returned by protobuf types are typically optionally undefined.
|
|
19
|
+
*
|
|
20
|
+
* @param {Amount} [amount] - The Amount to be wrapped. Must be defined.
|
|
21
|
+
*
|
|
22
|
+
* @throws {TypeError} If the amount is undefined.
|
|
23
|
+
*/
|
|
24
|
+
constructor(amount) {
|
|
25
|
+
if (!amount) {
|
|
26
|
+
throw new TypeError("constructing amount wrapper with an undefined amount");
|
|
27
|
+
}
|
|
28
|
+
this._amount = amount;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves the wrapped Amount.
|
|
32
|
+
*
|
|
33
|
+
* This getter provides access to the Amount instance that is wrapped by this class.
|
|
34
|
+
*
|
|
35
|
+
* @returns {Amount} The wrapped Amount.
|
|
36
|
+
*/
|
|
37
|
+
get amount() {
|
|
38
|
+
return this._amount;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves the token associated with the wrapped Amount.
|
|
42
|
+
*
|
|
43
|
+
* This getter returns the Token instance associated with the wrapped Amount.
|
|
44
|
+
* If the token is undefined, a TypeError will be thrown.
|
|
45
|
+
*
|
|
46
|
+
* @returns {Token} The token associated with the wrapped Amount.
|
|
47
|
+
* @throws {TypeError} If the token is undefined in the wrapped amount.
|
|
48
|
+
*/
|
|
49
|
+
get token() {
|
|
50
|
+
const token = this._amount.getToken();
|
|
51
|
+
if (!token) {
|
|
52
|
+
throw new TypeError("token is undefined in wrapped amount");
|
|
53
|
+
}
|
|
54
|
+
return token;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Retrieves the value associated with the wrapped Amount.
|
|
58
|
+
*
|
|
59
|
+
* This getter returns the Decimal value associated with the wrapped Amount.
|
|
60
|
+
* If the value is undefined, a TypeError will be thrown.
|
|
61
|
+
*
|
|
62
|
+
* @returns {Decimal} The value associated with the wrapped Amount.
|
|
63
|
+
* @throws {TypeError} If the value is undefined in the wrapped amount.
|
|
64
|
+
*/
|
|
65
|
+
get value() {
|
|
66
|
+
const value = this._amount.getValue();
|
|
67
|
+
if (!value) {
|
|
68
|
+
throw new TypeError("value is undefined in wrapped amount");
|
|
69
|
+
}
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Sets a new value for the wrapped Amount.
|
|
74
|
+
*
|
|
75
|
+
* This method creates a new AmountWrapper instance with the provided value,
|
|
76
|
+
* which can be either a BigNumber or a Decimal. The new value is converted
|
|
77
|
+
* into a Amount using the associated token.
|
|
78
|
+
*
|
|
79
|
+
* @param {BigNumber | Decimal} value - The value to set for the wrapped Amount.
|
|
80
|
+
* @returns {AmountWrapper} A new AmountWrapper instance with the updated value.
|
|
81
|
+
*/
|
|
82
|
+
setValue(value) {
|
|
83
|
+
return new AmountWrapper(new tokenWrapper_1.TokenWrapper(this.token).newAmountOf(value));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Sets a new token for the wrapped Amount.
|
|
87
|
+
*
|
|
88
|
+
* This method creates a new AmountWrapper instance with the provided token.
|
|
89
|
+
* The current value of the wrapped Amount is associated with the new token.
|
|
90
|
+
*
|
|
91
|
+
* @param {Token} token - The new token to set for the wrapped Amount.
|
|
92
|
+
* @returns {AmountWrapper} A new AmountWrapper instance with the updated token.
|
|
93
|
+
*/
|
|
94
|
+
setToken(token) {
|
|
95
|
+
return new AmountWrapper(new tokenWrapper_1.TokenWrapper(token).newAmountOf(this.value));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.AmountWrapper = AmountWrapper;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as jspb from 'google-protobuf'
|
|
2
|
+
|
|
3
|
+
import * as meshtrade_type_v1_decimal_pb from '../../../meshtrade/type/v1/decimal_pb'; // proto import: "meshtrade/type/v1/decimal.proto"
|
|
4
|
+
import * as meshtrade_type_v1_token_pb from '../../../meshtrade/type/v1/token_pb'; // proto import: "meshtrade/type/v1/token.proto"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class Amount extends jspb.Message {
|
|
8
|
+
getToken(): meshtrade_type_v1_token_pb.Token | undefined;
|
|
9
|
+
setToken(value?: meshtrade_type_v1_token_pb.Token): Amount;
|
|
10
|
+
hasToken(): boolean;
|
|
11
|
+
clearToken(): Amount;
|
|
12
|
+
|
|
13
|
+
getValue(): meshtrade_type_v1_decimal_pb.Decimal | undefined;
|
|
14
|
+
setValue(value?: meshtrade_type_v1_decimal_pb.Decimal): Amount;
|
|
15
|
+
hasValue(): boolean;
|
|
16
|
+
clearValue(): Amount;
|
|
17
|
+
|
|
18
|
+
serializeBinary(): Uint8Array;
|
|
19
|
+
toObject(includeInstance?: boolean): Amount.AsObject;
|
|
20
|
+
static toObject(includeInstance: boolean, msg: Amount): Amount.AsObject;
|
|
21
|
+
static serializeBinaryToWriter(message: Amount, writer: jspb.BinaryWriter): void;
|
|
22
|
+
static deserializeBinary(bytes: Uint8Array): Amount;
|
|
23
|
+
static deserializeBinaryFromReader(message: Amount, reader: jspb.BinaryReader): Amount;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export namespace Amount {
|
|
27
|
+
export type AsObject = {
|
|
28
|
+
token?: meshtrade_type_v1_token_pb.Token.AsObject,
|
|
29
|
+
value?: meshtrade_type_v1_decimal_pb.Decimal.AsObject,
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
// source: meshtrade/type/v1/amount.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
|
+
var meshtrade_type_v1_decimal_pb = require('../../../meshtrade/type/v1/decimal_pb.js');
|
|
25
|
+
goog.object.extend(proto, meshtrade_type_v1_decimal_pb);
|
|
26
|
+
var meshtrade_type_v1_token_pb = require('../../../meshtrade/type/v1/token_pb.js');
|
|
27
|
+
goog.object.extend(proto, meshtrade_type_v1_token_pb);
|
|
28
|
+
goog.exportSymbol('proto.meshtrade.type.v1.Amount', null, global);
|
|
29
|
+
/**
|
|
30
|
+
* Generated by JsPbCodeGenerator.
|
|
31
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
32
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
33
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
34
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
35
|
+
* valid.
|
|
36
|
+
* @extends {jspb.Message}
|
|
37
|
+
* @constructor
|
|
38
|
+
*/
|
|
39
|
+
proto.meshtrade.type.v1.Amount = function(opt_data) {
|
|
40
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
41
|
+
};
|
|
42
|
+
goog.inherits(proto.meshtrade.type.v1.Amount, jspb.Message);
|
|
43
|
+
if (goog.DEBUG && !COMPILED) {
|
|
44
|
+
/**
|
|
45
|
+
* @public
|
|
46
|
+
* @override
|
|
47
|
+
*/
|
|
48
|
+
proto.meshtrade.type.v1.Amount.displayName = 'proto.meshtrade.type.v1.Amount';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
54
|
+
/**
|
|
55
|
+
* Creates an object representation of this proto.
|
|
56
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
57
|
+
* Optional fields that are not set will be set to undefined.
|
|
58
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
59
|
+
* For the list of reserved names please see:
|
|
60
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
61
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
62
|
+
* JSPB instance for transitional soy proto support:
|
|
63
|
+
* http://goto/soy-param-migration
|
|
64
|
+
* @return {!Object}
|
|
65
|
+
*/
|
|
66
|
+
proto.meshtrade.type.v1.Amount.prototype.toObject = function(opt_includeInstance) {
|
|
67
|
+
return proto.meshtrade.type.v1.Amount.toObject(opt_includeInstance, this);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Static version of the {@see toObject} method.
|
|
73
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
74
|
+
* the JSPB instance for transitional soy proto support:
|
|
75
|
+
* http://goto/soy-param-migration
|
|
76
|
+
* @param {!proto.meshtrade.type.v1.Amount} msg The msg instance to transform.
|
|
77
|
+
* @return {!Object}
|
|
78
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
79
|
+
*/
|
|
80
|
+
proto.meshtrade.type.v1.Amount.toObject = function(includeInstance, msg) {
|
|
81
|
+
var f, obj = {
|
|
82
|
+
token: (f = msg.getToken()) && meshtrade_type_v1_token_pb.Token.toObject(includeInstance, f),
|
|
83
|
+
value: (f = msg.getValue()) && meshtrade_type_v1_decimal_pb.Decimal.toObject(includeInstance, f)
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
if (includeInstance) {
|
|
87
|
+
obj.$jspbMessageInstance = msg;
|
|
88
|
+
}
|
|
89
|
+
return obj;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Deserializes binary data (in protobuf wire format).
|
|
96
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
97
|
+
* @return {!proto.meshtrade.type.v1.Amount}
|
|
98
|
+
*/
|
|
99
|
+
proto.meshtrade.type.v1.Amount.deserializeBinary = function(bytes) {
|
|
100
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
101
|
+
var msg = new proto.meshtrade.type.v1.Amount;
|
|
102
|
+
return proto.meshtrade.type.v1.Amount.deserializeBinaryFromReader(msg, reader);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
108
|
+
* given reader into the given message object.
|
|
109
|
+
* @param {!proto.meshtrade.type.v1.Amount} msg The message object to deserialize into.
|
|
110
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
111
|
+
* @return {!proto.meshtrade.type.v1.Amount}
|
|
112
|
+
*/
|
|
113
|
+
proto.meshtrade.type.v1.Amount.deserializeBinaryFromReader = function(msg, reader) {
|
|
114
|
+
while (reader.nextField()) {
|
|
115
|
+
if (reader.isEndGroup()) {
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
var field = reader.getFieldNumber();
|
|
119
|
+
switch (field) {
|
|
120
|
+
case 1:
|
|
121
|
+
var value = new meshtrade_type_v1_token_pb.Token;
|
|
122
|
+
reader.readMessage(value,meshtrade_type_v1_token_pb.Token.deserializeBinaryFromReader);
|
|
123
|
+
msg.setToken(value);
|
|
124
|
+
break;
|
|
125
|
+
case 2:
|
|
126
|
+
var value = new meshtrade_type_v1_decimal_pb.Decimal;
|
|
127
|
+
reader.readMessage(value,meshtrade_type_v1_decimal_pb.Decimal.deserializeBinaryFromReader);
|
|
128
|
+
msg.setValue(value);
|
|
129
|
+
break;
|
|
130
|
+
default:
|
|
131
|
+
reader.skipField();
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return msg;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
141
|
+
* @return {!Uint8Array}
|
|
142
|
+
*/
|
|
143
|
+
proto.meshtrade.type.v1.Amount.prototype.serializeBinary = function() {
|
|
144
|
+
var writer = new jspb.BinaryWriter();
|
|
145
|
+
proto.meshtrade.type.v1.Amount.serializeBinaryToWriter(this, writer);
|
|
146
|
+
return writer.getResultBuffer();
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
152
|
+
* format), writing to the given BinaryWriter.
|
|
153
|
+
* @param {!proto.meshtrade.type.v1.Amount} message
|
|
154
|
+
* @param {!jspb.BinaryWriter} writer
|
|
155
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
156
|
+
*/
|
|
157
|
+
proto.meshtrade.type.v1.Amount.serializeBinaryToWriter = function(message, writer) {
|
|
158
|
+
var f = undefined;
|
|
159
|
+
f = message.getToken();
|
|
160
|
+
if (f != null) {
|
|
161
|
+
writer.writeMessage(
|
|
162
|
+
1,
|
|
163
|
+
f,
|
|
164
|
+
meshtrade_type_v1_token_pb.Token.serializeBinaryToWriter
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
f = message.getValue();
|
|
168
|
+
if (f != null) {
|
|
169
|
+
writer.writeMessage(
|
|
170
|
+
2,
|
|
171
|
+
f,
|
|
172
|
+
meshtrade_type_v1_decimal_pb.Decimal.serializeBinaryToWriter
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* optional Token token = 1;
|
|
180
|
+
* @return {?proto.meshtrade.type.v1.Token}
|
|
181
|
+
*/
|
|
182
|
+
proto.meshtrade.type.v1.Amount.prototype.getToken = function() {
|
|
183
|
+
return /** @type{?proto.meshtrade.type.v1.Token} */ (
|
|
184
|
+
jspb.Message.getWrapperField(this, meshtrade_type_v1_token_pb.Token, 1));
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @param {?proto.meshtrade.type.v1.Token|undefined} value
|
|
190
|
+
* @return {!proto.meshtrade.type.v1.Amount} returns this
|
|
191
|
+
*/
|
|
192
|
+
proto.meshtrade.type.v1.Amount.prototype.setToken = function(value) {
|
|
193
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Clears the message field making it undefined.
|
|
199
|
+
* @return {!proto.meshtrade.type.v1.Amount} returns this
|
|
200
|
+
*/
|
|
201
|
+
proto.meshtrade.type.v1.Amount.prototype.clearToken = function() {
|
|
202
|
+
return this.setToken(undefined);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Returns whether this field is set.
|
|
208
|
+
* @return {boolean}
|
|
209
|
+
*/
|
|
210
|
+
proto.meshtrade.type.v1.Amount.prototype.hasToken = function() {
|
|
211
|
+
return jspb.Message.getField(this, 1) != null;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* optional Decimal value = 2;
|
|
217
|
+
* @return {?proto.meshtrade.type.v1.Decimal}
|
|
218
|
+
*/
|
|
219
|
+
proto.meshtrade.type.v1.Amount.prototype.getValue = function() {
|
|
220
|
+
return /** @type{?proto.meshtrade.type.v1.Decimal} */ (
|
|
221
|
+
jspb.Message.getWrapperField(this, meshtrade_type_v1_decimal_pb.Decimal, 2));
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @param {?proto.meshtrade.type.v1.Decimal|undefined} value
|
|
227
|
+
* @return {!proto.meshtrade.type.v1.Amount} returns this
|
|
228
|
+
*/
|
|
229
|
+
proto.meshtrade.type.v1.Amount.prototype.setValue = function(value) {
|
|
230
|
+
return jspb.Message.setWrapperField(this, 2, value);
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Clears the message field making it undefined.
|
|
236
|
+
* @return {!proto.meshtrade.type.v1.Amount} returns this
|
|
237
|
+
*/
|
|
238
|
+
proto.meshtrade.type.v1.Amount.prototype.clearValue = function() {
|
|
239
|
+
return this.setValue(undefined);
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Returns whether this field is set.
|
|
245
|
+
* @return {boolean}
|
|
246
|
+
*/
|
|
247
|
+
proto.meshtrade.type.v1.Amount.prototype.hasValue = function() {
|
|
248
|
+
return jspb.Message.getField(this, 2) != null;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
goog.object.extend(exports, proto.meshtrade.type.v1);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as jspb from 'google-protobuf'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class ContactDetails extends jspb.Message {
|
|
6
|
+
getEmailAddress(): string;
|
|
7
|
+
setEmailAddress(value: string): ContactDetails;
|
|
8
|
+
|
|
9
|
+
getPhoneNumber(): string;
|
|
10
|
+
setPhoneNumber(value: string): ContactDetails;
|
|
11
|
+
|
|
12
|
+
getMobileNumber(): string;
|
|
13
|
+
setMobileNumber(value: string): ContactDetails;
|
|
14
|
+
|
|
15
|
+
getWebsite(): string;
|
|
16
|
+
setWebsite(value: string): ContactDetails;
|
|
17
|
+
|
|
18
|
+
getLinkedin(): string;
|
|
19
|
+
setLinkedin(value: string): ContactDetails;
|
|
20
|
+
|
|
21
|
+
getFacebook(): string;
|
|
22
|
+
setFacebook(value: string): ContactDetails;
|
|
23
|
+
|
|
24
|
+
getInstagram(): string;
|
|
25
|
+
setInstagram(value: string): ContactDetails;
|
|
26
|
+
|
|
27
|
+
getXTwitter(): string;
|
|
28
|
+
setXTwitter(value: string): ContactDetails;
|
|
29
|
+
|
|
30
|
+
getYoutube(): string;
|
|
31
|
+
setYoutube(value: string): ContactDetails;
|
|
32
|
+
|
|
33
|
+
serializeBinary(): Uint8Array;
|
|
34
|
+
toObject(includeInstance?: boolean): ContactDetails.AsObject;
|
|
35
|
+
static toObject(includeInstance: boolean, msg: ContactDetails): ContactDetails.AsObject;
|
|
36
|
+
static serializeBinaryToWriter(message: ContactDetails, writer: jspb.BinaryWriter): void;
|
|
37
|
+
static deserializeBinary(bytes: Uint8Array): ContactDetails;
|
|
38
|
+
static deserializeBinaryFromReader(message: ContactDetails, reader: jspb.BinaryReader): ContactDetails;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export namespace ContactDetails {
|
|
42
|
+
export type AsObject = {
|
|
43
|
+
emailAddress: string,
|
|
44
|
+
phoneNumber: string,
|
|
45
|
+
mobileNumber: string,
|
|
46
|
+
website: string,
|
|
47
|
+
linkedin: string,
|
|
48
|
+
facebook: string,
|
|
49
|
+
instagram: string,
|
|
50
|
+
xTwitter: string,
|
|
51
|
+
youtube: string,
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|