@cobo/cobo-waas2 1.14.0 → 1.16.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 +70 -5
- package/dist/ApiClient.js +2 -3
- package/dist/PreRequestScript.js +1 -1
- package/dist/api/AddressBooksApi.js +4 -4
- package/dist/api/AppWorkflowsApi.js +275 -0
- package/dist/api/DevelopersApi.js +4 -4
- package/dist/api/DevelopersWebhooksApi.js +12 -12
- package/dist/api/FeeStationApi.js +26 -26
- package/dist/api/PaymentApi.js +16 -16
- package/dist/api/StakingsApi.js +28 -28
- package/dist/api/TransactionsApi.js +16 -8
- package/dist/api/WalletsApi.js +121 -70
- package/dist/api/WalletsExchangeWalletApi.js +8 -8
- package/dist/api/WalletsMPCWalletsApi.js +20 -20
- package/dist/crypto/ApiSigner.js +1 -2
- package/dist/index.js +420 -0
- package/dist/model/AddressBook.js +18 -0
- package/dist/model/AppWorkflow.js +173 -0
- package/dist/model/AppWorkflowField.js +137 -0
- package/dist/model/AppWorkflowPolicy.js +144 -0
- package/dist/model/ApprovalEntry.js +148 -0
- package/dist/model/ApprovalRequest.js +178 -0
- package/dist/model/ApprovalRequestDetail.js +176 -0
- package/dist/model/ApprovalStatus.js +71 -0
- package/dist/model/ApprovalUser.js +146 -0
- package/dist/model/BabylonStakeExtra.js +16 -0
- package/dist/model/BankAccount.js +18 -0
- package/dist/model/BatchCheckUtxo201Response.js +107 -0
- package/dist/model/BatchCheckUtxoRequest.js +142 -0
- package/dist/model/BatchUTXOParam.js +123 -0
- package/dist/model/ChainInfo.js +9 -0
- package/dist/model/CreateApprovalRequest201Response.js +109 -0
- package/dist/model/CreateSettlement.js +4 -29
- package/dist/model/CreateStakeActivityExtra.js +6 -0
- package/dist/model/CreateTokenListingRequest201Response.js +2 -2
- package/dist/model/CreateTokenListingRequestRequest.js +4 -4
- package/dist/model/CustodialWeb3TransferSource.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +13 -0
- package/dist/model/EstimateFeeParams.js +6 -0
- package/dist/model/EstimateTransferFeeParams.js +13 -0
- package/dist/model/FeeStationTransfer.js +1 -1
- package/dist/model/ListApprovalRequests200Response.js +123 -0
- package/dist/model/Merchant.js +18 -0
- package/dist/model/MpcTransferSource.js +1 -1
- package/dist/model/Order.js +49 -0
- package/dist/model/PaymentOrderEventData.js +64 -0
- package/dist/model/PaymentRefundEventData.js +77 -0
- package/dist/model/PaymentSettlementEvent.js +46 -0
- package/dist/model/PaymentTransaction.js +13 -0
- package/dist/model/PolicyAction.js +123 -0
- package/dist/model/PolicyActionContent.js +167 -0
- package/dist/model/PolicyActionType.js +66 -0
- package/dist/model/PolicyCondition.js +148 -0
- package/dist/model/PolicyFieldOperator.js +76 -0
- package/dist/model/PolicyFieldValueType.js +61 -0
- package/dist/model/Refund.js +53 -0
- package/dist/model/RequestApproval.js +188 -0
- package/dist/model/RevokeApprovalRequest201Response.js +118 -0
- package/dist/model/RevokeApprovalRequestRequest.js +110 -0
- package/dist/model/Settlement.js +31 -0
- package/dist/model/SettlementDetail.js +57 -0
- package/dist/model/SettlementInfo.js +31 -0
- package/dist/model/SwapActivity.js +3 -3
- package/dist/model/SwapActivityApprovers.js +122 -0
- package/dist/model/SwapActivityDetail.js +36 -6
- package/dist/model/SwapApproversStatus.js +66 -0
- package/dist/model/SwapQuote.js +49 -4
- package/dist/model/SwapToken.js +2 -2
- package/dist/model/TSSBaseRequestEventData.js +163 -0
- package/dist/model/TSSCallbackActionType.js +61 -0
- package/dist/model/TSSCallbackRequest.js +122 -0
- package/dist/model/TSSCallbackRequestType.js +76 -0
- package/dist/model/TSSCallbackResponse.js +118 -0
- package/dist/model/TSSCurve.js +61 -0
- package/dist/model/TSSCurveType.js +61 -0
- package/dist/model/TSSEvent.js +158 -0
- package/dist/model/TSSEventData.js +278 -0
- package/dist/model/TSSEventDataType.js +71 -0
- package/dist/model/TSSEventType.js +136 -0
- package/dist/model/TSSGroup.js +221 -0
- package/dist/model/TSSGroupType.js +61 -0
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TSSKeyGenEventData.js +228 -0
- package/dist/model/TSSKeyGenExtra.js +154 -0
- package/dist/model/TSSKeyGenRequest.js +130 -0
- package/dist/model/TSSKeyReshareEventData.js +228 -0
- package/dist/model/TSSKeyReshareExtra.js +169 -0
- package/dist/model/TSSKeyReshareRequest.js +177 -0
- package/dist/model/TSSKeyShareSignDetail.js +100 -0
- package/dist/model/TSSKeyShareSignEventData.js +228 -0
- package/dist/model/TSSKeyShareSignExtra.js +171 -0
- package/dist/model/TSSKeyShareSignRequest.js +146 -0
- package/dist/model/TSSKeyShareSignSignature.js +126 -0
- package/dist/model/TSSKeyShareSignSignatures.js +107 -0
- package/dist/model/TSSKeySignEventData.js +228 -0
- package/dist/model/TSSKeySignExtra.js +203 -0
- package/dist/model/TSSKeySignRequest.js +192 -0
- package/dist/model/TSSParticipant.js +113 -0
- package/dist/model/TSSProtocol.js +66 -0
- package/dist/model/TSSRequestTypeEenum.js +71 -0
- package/dist/model/TSSSignature.js +139 -0
- package/dist/model/TSSSignatureType.js +66 -0
- package/dist/model/TSSSignatures.js +125 -0
- package/dist/model/TSSStatus.js +96 -0
- package/dist/model/TokenListing.js +10 -10
- package/dist/model/TokenListingEventData.js +15 -15
- package/dist/model/TransactionCoboCategory.js +102 -7
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionSubStatus.js +35 -0
- package/dist/model/UTXO.js +9 -0
- package/dist/model/WebhookEventData.js +15 -9
- package/docs/AddressBook.md +2 -0
- package/docs/AddressBooksApi.md +2 -2
- package/docs/AppWorkflow.md +12 -0
- package/docs/AppWorkflowField.md +11 -0
- package/docs/AppWorkflowPolicy.md +10 -0
- package/docs/AppWorkflowsApi.md +273 -0
- package/docs/ApprovalEntry.md +11 -0
- package/docs/ApprovalRequest.md +13 -0
- package/docs/ApprovalRequestDetail.md +13 -0
- package/docs/ApprovalStatus.md +16 -0
- package/docs/ApprovalUser.md +12 -0
- package/docs/BabylonStakeExtra.md +1 -0
- package/docs/BankAccount.md +2 -0
- package/docs/BatchCheckUtxo201Response.md +9 -0
- package/docs/BatchCheckUtxoRequest.md +10 -0
- package/docs/BatchUTXOParam.md +10 -0
- package/docs/ChainInfo.md +1 -0
- package/docs/CreateApprovalRequest201Response.md +9 -0
- package/docs/CreateSettlement.md +2 -2
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateTokenListingRequest201Response.md +1 -1
- package/docs/CreateTokenListingRequestRequest.md +2 -2
- package/docs/CustodialWeb3TransferSource.md +1 -1
- package/docs/DevelopersApi.md +2 -2
- package/docs/DevelopersWebhooksApi.md +6 -6
- package/docs/EstimateContractCallFeeParams.md +1 -0
- package/docs/EstimateFeeParams.md +1 -0
- package/docs/EstimateTransferFeeParams.md +1 -0
- package/docs/FeeStationApi.md +14 -14
- package/docs/ListApprovalRequests200Response.md +10 -0
- package/docs/Merchant.md +2 -0
- package/docs/MpcTransferSource.md +1 -1
- package/docs/Order.md +3 -0
- package/docs/PaymentApi.md +8 -8
- package/docs/PaymentOrderEventData.md +3 -0
- package/docs/PaymentRefundEventData.md +5 -0
- package/docs/PaymentSettlementEvent.md +3 -0
- package/docs/PaymentTransaction.md +1 -0
- package/docs/PolicyAction.md +10 -0
- package/docs/PolicyActionContent.md +25 -0
- package/docs/PolicyActionType.md +14 -0
- package/docs/PolicyCondition.md +12 -0
- package/docs/PolicyFieldOperator.md +18 -0
- package/docs/PolicyFieldValueType.md +12 -0
- package/docs/Refund.md +5 -0
- package/docs/RequestApproval.md +13 -0
- package/docs/RevokeApprovalRequest201Response.md +10 -0
- package/docs/RevokeApprovalRequestRequest.md +9 -0
- package/docs/Settlement.md +3 -0
- package/docs/SettlementDetail.md +5 -0
- package/docs/SettlementInfo.md +3 -0
- package/docs/StakingsApi.md +14 -14
- package/docs/SwapActivity.md +3 -3
- package/docs/SwapActivityApprovers.md +10 -0
- package/docs/SwapActivityDetail.md +4 -3
- package/docs/SwapApproversStatus.md +14 -0
- package/docs/SwapQuote.md +3 -0
- package/docs/SwapToken.md +2 -2
- package/docs/TSSBaseRequestEventData.md +14 -0
- package/docs/TSSCallbackActionType.md +12 -0
- package/docs/TSSCallbackRequest.md +12 -0
- package/docs/TSSCallbackRequestType.md +18 -0
- package/docs/TSSCallbackResponse.md +12 -0
- package/docs/TSSCurve.md +12 -0
- package/docs/TSSCurveType.md +12 -0
- package/docs/TSSEvent.md +13 -0
- package/docs/TSSEventData.md +16 -0
- package/docs/TSSEventDataType.md +16 -0
- package/docs/TSSEventType.md +42 -0
- package/docs/TSSGroup.md +19 -0
- package/docs/TSSGroupType.md +12 -0
- package/docs/TSSKeyGenEventData.md +16 -0
- package/docs/TSSKeyGenExtra.md +13 -0
- package/docs/TSSKeyGenRequest.md +13 -0
- package/docs/TSSKeyReshareEventData.md +16 -0
- package/docs/TSSKeyReshareExtra.md +14 -0
- package/docs/TSSKeyReshareRequest.md +17 -0
- package/docs/TSSKeyShareSignDetail.md +10 -0
- package/docs/TSSKeyShareSignEventData.md +16 -0
- package/docs/TSSKeyShareSignExtra.md +13 -0
- package/docs/TSSKeyShareSignRequest.md +12 -0
- package/docs/TSSKeyShareSignSignature.md +12 -0
- package/docs/TSSKeyShareSignSignatures.md +9 -0
- package/docs/TSSKeySignEventData.md +16 -0
- package/docs/TSSKeySignExtra.md +15 -0
- package/docs/TSSKeySignRequest.md +18 -0
- package/docs/TSSParticipant.md +11 -0
- package/docs/TSSProtocol.md +14 -0
- package/docs/TSSRequestTypeEenum.md +16 -0
- package/docs/TSSSignature.md +13 -0
- package/docs/TSSSignatureType.md +14 -0
- package/docs/TSSSignatures.md +11 -0
- package/docs/TSSStatus.md +26 -0
- package/docs/TokenListing.md +6 -6
- package/docs/TokenListingEventData.md +6 -6
- package/docs/TransactionCoboCategory.md +41 -3
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionSubStatus.md +14 -0
- package/docs/TransactionsApi.md +8 -4
- package/docs/UTXO.md +1 -0
- package/docs/WalletsApi.md +91 -36
- package/docs/WalletsExchangeWalletApi.md +4 -4
- package/docs/WalletsMPCWalletsApi.md +10 -10
- package/docs/WebhookEventData.md +8 -7
- package/package.json +1 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _KeyShareHolderGroup = _interopRequireDefault(require("./KeyShareHolderGroup"));
|
|
9
|
+
var _MPCProject = _interopRequireDefault(require("./MPCProject"));
|
|
10
|
+
var _MPCVault = _interopRequireDefault(require("./MPCVault"));
|
|
11
|
+
var _OrgInfo = _interopRequireDefault(require("./OrgInfo"));
|
|
12
|
+
var _TSSRequest = _interopRequireDefault(require("./TSSRequest"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The TSSKeyReshareExtra model module.
|
|
31
|
+
* @module model/TSSKeyReshareExtra
|
|
32
|
+
*/
|
|
33
|
+
var TSSKeyReshareExtra = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>TSSKeyReshareExtra</code>.
|
|
36
|
+
* @alias module:model/TSSKeyReshareExtra
|
|
37
|
+
*/
|
|
38
|
+
function TSSKeyReshareExtra() {
|
|
39
|
+
_classCallCheck(this, TSSKeyReshareExtra);
|
|
40
|
+
TSSKeyReshareExtra.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(TSSKeyReshareExtra, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>TSSKeyReshareExtra</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/TSSKeyReshareExtra} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/TSSKeyReshareExtra} The populated <code>TSSKeyReshareExtra</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new TSSKeyReshareExtra();
|
|
64
|
+
if (data.hasOwnProperty('org')) {
|
|
65
|
+
obj['org'] = _OrgInfo["default"].constructFromObject(data['org']);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('project')) {
|
|
68
|
+
obj['project'] = _MPCProject["default"].constructFromObject(data['project']);
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('vault')) {
|
|
71
|
+
obj['vault'] = _MPCVault["default"].constructFromObject(data['vault']);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('source_key_share_holder_group')) {
|
|
74
|
+
obj['source_key_share_holder_group'] = _KeyShareHolderGroup["default"].constructFromObject(data['source_key_share_holder_group']);
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('target_key_share_holder_group')) {
|
|
77
|
+
obj['target_key_share_holder_group'] = _KeyShareHolderGroup["default"].constructFromObject(data['target_key_share_holder_group']);
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('tss_request')) {
|
|
80
|
+
obj['tss_request'] = _TSSRequest["default"].constructFromObject(data['tss_request']);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Validates the JSON data with respect to <code>TSSKeyReshareExtra</code>.
|
|
88
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
89
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyReshareExtra</code>.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "validateJSON",
|
|
93
|
+
value: function validateJSON(data) {
|
|
94
|
+
// validate the optional field `org`
|
|
95
|
+
if (data['org']) {
|
|
96
|
+
// data not null
|
|
97
|
+
if (!!_OrgInfo["default"].validateJSON) {
|
|
98
|
+
_OrgInfo["default"].validateJSON(data['org']);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// validate the optional field `project`
|
|
102
|
+
if (data['project']) {
|
|
103
|
+
// data not null
|
|
104
|
+
if (!!_MPCProject["default"].validateJSON) {
|
|
105
|
+
_MPCProject["default"].validateJSON(data['project']);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// validate the optional field `vault`
|
|
109
|
+
if (data['vault']) {
|
|
110
|
+
// data not null
|
|
111
|
+
if (!!_MPCVault["default"].validateJSON) {
|
|
112
|
+
_MPCVault["default"].validateJSON(data['vault']);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// validate the optional field `source_key_share_holder_group`
|
|
116
|
+
if (data['source_key_share_holder_group']) {
|
|
117
|
+
// data not null
|
|
118
|
+
if (!!_KeyShareHolderGroup["default"].validateJSON) {
|
|
119
|
+
_KeyShareHolderGroup["default"].validateJSON(data['source_key_share_holder_group']);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// validate the optional field `target_key_share_holder_group`
|
|
123
|
+
if (data['target_key_share_holder_group']) {
|
|
124
|
+
// data not null
|
|
125
|
+
if (!!_KeyShareHolderGroup["default"].validateJSON) {
|
|
126
|
+
_KeyShareHolderGroup["default"].validateJSON(data['target_key_share_holder_group']);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// validate the optional field `tss_request`
|
|
130
|
+
if (data['tss_request']) {
|
|
131
|
+
// data not null
|
|
132
|
+
if (!!_TSSRequest["default"].validateJSON) {
|
|
133
|
+
_TSSRequest["default"].validateJSON(data['tss_request']);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}]);
|
|
139
|
+
}();
|
|
140
|
+
/**
|
|
141
|
+
* @member {module:model/OrgInfo} org
|
|
142
|
+
*/
|
|
143
|
+
TSSKeyReshareExtra.prototype['org'] = undefined;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @member {module:model/MPCProject} project
|
|
147
|
+
*/
|
|
148
|
+
TSSKeyReshareExtra.prototype['project'] = undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @member {module:model/MPCVault} vault
|
|
152
|
+
*/
|
|
153
|
+
TSSKeyReshareExtra.prototype['vault'] = undefined;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @member {module:model/KeyShareHolderGroup} source_key_share_holder_group
|
|
157
|
+
*/
|
|
158
|
+
TSSKeyReshareExtra.prototype['source_key_share_holder_group'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @member {module:model/KeyShareHolderGroup} target_key_share_holder_group
|
|
162
|
+
*/
|
|
163
|
+
TSSKeyReshareExtra.prototype['target_key_share_holder_group'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @member {module:model/TSSRequest} tss_request
|
|
167
|
+
*/
|
|
168
|
+
TSSKeyReshareExtra.prototype['tss_request'] = undefined;
|
|
169
|
+
var _default = exports["default"] = TSSKeyReshareExtra;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _TSSCurve = _interopRequireDefault(require("./TSSCurve"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The TSSKeyReshareRequest model module.
|
|
27
|
+
* @module model/TSSKeyReshareRequest
|
|
28
|
+
*/
|
|
29
|
+
var TSSKeyReshareRequest = /*#__PURE__*/function () {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new <code>TSSKeyReshareRequest</code>.
|
|
32
|
+
* @alias module:model/TSSKeyReshareRequest
|
|
33
|
+
*/
|
|
34
|
+
function TSSKeyReshareRequest() {
|
|
35
|
+
_classCallCheck(this, TSSKeyReshareRequest);
|
|
36
|
+
TSSKeyReshareRequest.initialize(this);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializes the fields of this object.
|
|
41
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
|
+
* Only for internal use.
|
|
43
|
+
*/
|
|
44
|
+
return _createClass(TSSKeyReshareRequest, null, [{
|
|
45
|
+
key: "initialize",
|
|
46
|
+
value: function initialize(obj) {}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>TSSKeyReshareRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
50
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
51
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
+
* @param {module:model/TSSKeyReshareRequest} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/TSSKeyReshareRequest} The populated <code>TSSKeyReshareRequest</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new TSSKeyReshareRequest();
|
|
60
|
+
if (data.hasOwnProperty('old_group_id')) {
|
|
61
|
+
obj['old_group_id'] = _ApiClient["default"].convertToType(data['old_group_id'], 'String');
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('root_pub_key')) {
|
|
64
|
+
obj['root_pub_key'] = _ApiClient["default"].convertToType(data['root_pub_key'], 'String');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('curve')) {
|
|
67
|
+
obj['curve'] = _TSSCurve["default"].constructFromObject(data['curve']);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('used_node_ids')) {
|
|
70
|
+
obj['used_node_ids'] = _ApiClient["default"].convertToType(data['used_node_ids'], ['String']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('old_threshold')) {
|
|
73
|
+
obj['old_threshold'] = _ApiClient["default"].convertToType(data['old_threshold'], 'Number');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('new_threshold')) {
|
|
76
|
+
obj['new_threshold'] = _ApiClient["default"].convertToType(data['new_threshold'], 'Number');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('new_node_ids')) {
|
|
79
|
+
obj['new_node_ids'] = _ApiClient["default"].convertToType(data['new_node_ids'], ['String']);
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('task_id')) {
|
|
82
|
+
obj['task_id'] = _ApiClient["default"].convertToType(data['task_id'], 'String');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('biz_task_id')) {
|
|
85
|
+
obj['biz_task_id'] = _ApiClient["default"].convertToType(data['biz_task_id'], 'String');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return obj;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Validates the JSON data with respect to <code>TSSKeyReshareRequest</code>.
|
|
93
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
94
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyReshareRequest</code>.
|
|
95
|
+
*/
|
|
96
|
+
}, {
|
|
97
|
+
key: "validateJSON",
|
|
98
|
+
value: function validateJSON(data) {
|
|
99
|
+
// ensure the json data is a string
|
|
100
|
+
if (data['old_group_id'] && !(typeof data['old_group_id'] === 'string' || data['old_group_id'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `old_group_id` to be a primitive type in the JSON string but got " + data['old_group_id']);
|
|
102
|
+
}
|
|
103
|
+
// ensure the json data is a string
|
|
104
|
+
if (data['root_pub_key'] && !(typeof data['root_pub_key'] === 'string' || data['root_pub_key'] instanceof String)) {
|
|
105
|
+
throw new Error("Expected the field `root_pub_key` to be a primitive type in the JSON string but got " + data['root_pub_key']);
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is an array
|
|
108
|
+
if (!Array.isArray(data['used_node_ids'])) {
|
|
109
|
+
throw new Error("Expected the field `used_node_ids` to be an array in the JSON data but got " + data['used_node_ids']);
|
|
110
|
+
}
|
|
111
|
+
// ensure the json data is an array
|
|
112
|
+
if (!Array.isArray(data['new_node_ids'])) {
|
|
113
|
+
throw new Error("Expected the field `new_node_ids` to be an array in the JSON data but got " + data['new_node_ids']);
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
if (data['task_id'] && !(typeof data['task_id'] === 'string' || data['task_id'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `task_id` to be a primitive type in the JSON string but got " + data['task_id']);
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is a string
|
|
120
|
+
if (data['biz_task_id'] && !(typeof data['biz_task_id'] === 'string' || data['biz_task_id'] instanceof String)) {
|
|
121
|
+
throw new Error("Expected the field `biz_task_id` to be a primitive type in the JSON string but got " + data['biz_task_id']);
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
}]);
|
|
126
|
+
}();
|
|
127
|
+
/**
|
|
128
|
+
* The old TSS key share group ID.
|
|
129
|
+
* @member {String} old_group_id
|
|
130
|
+
*/
|
|
131
|
+
TSSKeyReshareRequest.prototype['old_group_id'] = undefined;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The The old TSS key share group's root extended public key.
|
|
135
|
+
* @member {String} root_pub_key
|
|
136
|
+
*/
|
|
137
|
+
TSSKeyReshareRequest.prototype['root_pub_key'] = undefined;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @member {module:model/TSSCurve} curve
|
|
141
|
+
*/
|
|
142
|
+
TSSKeyReshareRequest.prototype['curve'] = undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @member {Array.<String>} used_node_ids
|
|
146
|
+
*/
|
|
147
|
+
TSSKeyReshareRequest.prototype['used_node_ids'] = undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* The number of key share holders required to approve each operation in the old TSS key share group.
|
|
151
|
+
* @member {Number} old_threshold
|
|
152
|
+
*/
|
|
153
|
+
TSSKeyReshareRequest.prototype['old_threshold'] = undefined;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The number of key share holders required to approve each operation in the new TSS key share group.
|
|
157
|
+
* @member {Number} new_threshold
|
|
158
|
+
*/
|
|
159
|
+
TSSKeyReshareRequest.prototype['new_threshold'] = undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @member {Array.<String>} new_node_ids
|
|
163
|
+
*/
|
|
164
|
+
TSSKeyReshareRequest.prototype['new_node_ids'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The task ID.
|
|
168
|
+
* @member {String} task_id
|
|
169
|
+
*/
|
|
170
|
+
TSSKeyReshareRequest.prototype['task_id'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The business task ID. This field contains the TSS request ID.
|
|
174
|
+
* @member {String} biz_task_id
|
|
175
|
+
*/
|
|
176
|
+
TSSKeyReshareRequest.prototype['biz_task_id'] = undefined;
|
|
177
|
+
var _default = exports["default"] = TSSKeyReshareRequest;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
15
|
+
* Cobo Wallet as a Service 2.0
|
|
16
|
+
*
|
|
17
|
+
* Contact: help@cobo.com
|
|
18
|
+
*
|
|
19
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20
|
+
* https://openapi-generator.tech
|
|
21
|
+
* Do not edit the class manually.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* The TSSKeyShareSignDetail model module.
|
|
26
|
+
* @module model/TSSKeyShareSignDetail
|
|
27
|
+
*/
|
|
28
|
+
var TSSKeyShareSignDetail = /*#__PURE__*/function () {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>TSSKeyShareSignDetail</code>.
|
|
31
|
+
* @alias module:model/TSSKeyShareSignDetail
|
|
32
|
+
*/
|
|
33
|
+
function TSSKeyShareSignDetail() {
|
|
34
|
+
_classCallCheck(this, TSSKeyShareSignDetail);
|
|
35
|
+
TSSKeyShareSignDetail.initialize(this);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initializes the fields of this object.
|
|
40
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
41
|
+
* Only for internal use.
|
|
42
|
+
*/
|
|
43
|
+
return _createClass(TSSKeyShareSignDetail, null, [{
|
|
44
|
+
key: "initialize",
|
|
45
|
+
value: function initialize(obj) {}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>TSSKeyShareSignDetail</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
+
* @param {module:model/TSSKeyShareSignDetail} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/TSSKeyShareSignDetail} The populated <code>TSSKeyShareSignDetail</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new TSSKeyShareSignDetail();
|
|
59
|
+
if (data.hasOwnProperty('group_id')) {
|
|
60
|
+
obj['group_id'] = _ApiClient["default"].convertToType(data['group_id'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('message')) {
|
|
63
|
+
obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validates the JSON data with respect to <code>TSSKeyShareSignDetail</code>.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyShareSignDetail</code>.
|
|
73
|
+
*/
|
|
74
|
+
}, {
|
|
75
|
+
key: "validateJSON",
|
|
76
|
+
value: function validateJSON(data) {
|
|
77
|
+
// ensure the json data is a string
|
|
78
|
+
if (data['group_id'] && !(typeof data['group_id'] === 'string' || data['group_id'] instanceof String)) {
|
|
79
|
+
throw new Error("Expected the field `group_id` to be a primitive type in the JSON string but got " + data['group_id']);
|
|
80
|
+
}
|
|
81
|
+
// ensure the json data is a string
|
|
82
|
+
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
83
|
+
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
}]);
|
|
88
|
+
}();
|
|
89
|
+
/**
|
|
90
|
+
* The TSS key share group ID.
|
|
91
|
+
* @member {String} group_id
|
|
92
|
+
*/
|
|
93
|
+
TSSKeyShareSignDetail.prototype['group_id'] = undefined;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The message to sign by key share.
|
|
97
|
+
* @member {String} message
|
|
98
|
+
*/
|
|
99
|
+
TSSKeyShareSignDetail.prototype['message'] = undefined;
|
|
100
|
+
var _default = exports["default"] = TSSKeyShareSignDetail;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _TSSBaseRequestEventData = _interopRequireDefault(require("./TSSBaseRequestEventData"));
|
|
9
|
+
var _TSSEventDataType = _interopRequireDefault(require("./TSSEventDataType"));
|
|
10
|
+
var _TSSKeyShareSignRequest = _interopRequireDefault(require("./TSSKeyShareSignRequest"));
|
|
11
|
+
var _TSSKeyShareSignSignatures = _interopRequireDefault(require("./TSSKeyShareSignSignatures"));
|
|
12
|
+
var _TSSRequestTypeEenum = _interopRequireDefault(require("./TSSRequestTypeEenum"));
|
|
13
|
+
var _TSSStatus = _interopRequireDefault(require("./TSSStatus"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
17
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
20
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
21
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
24
|
+
* Cobo Wallet as a Service 2.0
|
|
25
|
+
*
|
|
26
|
+
* Contact: help@cobo.com
|
|
27
|
+
*
|
|
28
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
29
|
+
* https://openapi-generator.tech
|
|
30
|
+
* Do not edit the class manually.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* The TSSKeyShareSignEventData model module.
|
|
35
|
+
* @module model/TSSKeyShareSignEventData
|
|
36
|
+
*/
|
|
37
|
+
var TSSKeyShareSignEventData = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>TSSKeyShareSignEventData</code>.
|
|
40
|
+
* @alias module:model/TSSKeyShareSignEventData
|
|
41
|
+
* @implements module:model/TSSBaseRequestEventData
|
|
42
|
+
* @param data_type {module:model/TSSEventDataType}
|
|
43
|
+
*/
|
|
44
|
+
function TSSKeyShareSignEventData(data_type) {
|
|
45
|
+
_classCallCheck(this, TSSKeyShareSignEventData);
|
|
46
|
+
_TSSBaseRequestEventData["default"].initialize(this, data_type);
|
|
47
|
+
TSSKeyShareSignEventData.initialize(this, data_type);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the fields of this object.
|
|
52
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
53
|
+
* Only for internal use.
|
|
54
|
+
*/
|
|
55
|
+
return _createClass(TSSKeyShareSignEventData, null, [{
|
|
56
|
+
key: "initialize",
|
|
57
|
+
value: function initialize(obj, data_type) {
|
|
58
|
+
obj['data_type'] = data_type;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>TSSKeyShareSignEventData</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/TSSKeyShareSignEventData} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/TSSKeyShareSignEventData} The populated <code>TSSKeyShareSignEventData</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new TSSKeyShareSignEventData();
|
|
73
|
+
_TSSBaseRequestEventData["default"].constructFromObject(data, obj);
|
|
74
|
+
if (data.hasOwnProperty('data_type')) {
|
|
75
|
+
obj['data_type'] = _TSSEventDataType["default"].constructFromObject(data['data_type']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('request_id')) {
|
|
78
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('request_type')) {
|
|
81
|
+
obj['request_type'] = _TSSRequestTypeEenum["default"].constructFromObject(data['request_type']);
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('request_status')) {
|
|
84
|
+
obj['request_status'] = _TSSStatus["default"].constructFromObject(data['request_status']);
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('extra_info')) {
|
|
87
|
+
obj['extra_info'] = _ApiClient["default"].convertToType(data['extra_info'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('failed_reason')) {
|
|
90
|
+
obj['failed_reason'] = _ApiClient["default"].convertToType(data['failed_reason'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('request_detail')) {
|
|
93
|
+
obj['request_detail'] = _TSSKeyShareSignRequest["default"].constructFromObject(data['request_detail']);
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('result')) {
|
|
96
|
+
obj['result'] = _TSSKeyShareSignSignatures["default"].constructFromObject(data['result']);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return obj;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Validates the JSON data with respect to <code>TSSKeyShareSignEventData</code>.
|
|
104
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
105
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyShareSignEventData</code>.
|
|
106
|
+
*/
|
|
107
|
+
}, {
|
|
108
|
+
key: "validateJSON",
|
|
109
|
+
value: function validateJSON(data) {
|
|
110
|
+
// check to make sure all required properties are present in the JSON string
|
|
111
|
+
var _iterator = _createForOfIteratorHelper(TSSKeyShareSignEventData.RequiredProperties),
|
|
112
|
+
_step;
|
|
113
|
+
try {
|
|
114
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
115
|
+
var property = _step.value;
|
|
116
|
+
if (!data.hasOwnProperty(property)) {
|
|
117
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
} catch (err) {
|
|
122
|
+
_iterator.e(err);
|
|
123
|
+
} finally {
|
|
124
|
+
_iterator.f();
|
|
125
|
+
}
|
|
126
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
128
|
+
}
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
if (data['extra_info'] && !(typeof data['extra_info'] === 'string' || data['extra_info'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `extra_info` to be a primitive type in the JSON string but got " + data['extra_info']);
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['failed_reason'] && !(typeof data['failed_reason'] === 'string' || data['failed_reason'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `failed_reason` to be a primitive type in the JSON string but got " + data['failed_reason']);
|
|
136
|
+
}
|
|
137
|
+
// validate the optional field `request_detail`
|
|
138
|
+
if (data['request_detail']) {
|
|
139
|
+
// data not null
|
|
140
|
+
if (!!_TSSKeyShareSignRequest["default"].validateJSON) {
|
|
141
|
+
_TSSKeyShareSignRequest["default"].validateJSON(data['request_detail']);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// validate the optional field `result`
|
|
145
|
+
if (data['result']) {
|
|
146
|
+
// data not null
|
|
147
|
+
if (!!_TSSKeyShareSignSignatures["default"].validateJSON) {
|
|
148
|
+
_TSSKeyShareSignSignatures["default"].validateJSON(data['result']);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
}]);
|
|
154
|
+
}();
|
|
155
|
+
TSSKeyShareSignEventData.RequiredProperties = ["data_type"];
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @member {module:model/TSSEventDataType} data_type
|
|
159
|
+
*/
|
|
160
|
+
TSSKeyShareSignEventData.prototype['data_type'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The request ID.
|
|
164
|
+
* @member {String} request_id
|
|
165
|
+
*/
|
|
166
|
+
TSSKeyShareSignEventData.prototype['request_id'] = undefined;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @member {module:model/TSSRequestTypeEenum} request_type
|
|
170
|
+
*/
|
|
171
|
+
TSSKeyShareSignEventData.prototype['request_type'] = undefined;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @member {module:model/TSSStatus} request_status
|
|
175
|
+
*/
|
|
176
|
+
TSSKeyShareSignEventData.prototype['request_status'] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The extra info.
|
|
180
|
+
* @member {String} extra_info
|
|
181
|
+
*/
|
|
182
|
+
TSSKeyShareSignEventData.prototype['extra_info'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The failed reason.
|
|
186
|
+
* @member {String} failed_reason
|
|
187
|
+
*/
|
|
188
|
+
TSSKeyShareSignEventData.prototype['failed_reason'] = undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @member {module:model/TSSKeyShareSignRequest} request_detail
|
|
192
|
+
*/
|
|
193
|
+
TSSKeyShareSignEventData.prototype['request_detail'] = undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @member {module:model/TSSKeyShareSignSignatures} result
|
|
197
|
+
*/
|
|
198
|
+
TSSKeyShareSignEventData.prototype['result'] = undefined;
|
|
199
|
+
|
|
200
|
+
// Implement TSSBaseRequestEventData interface:
|
|
201
|
+
/**
|
|
202
|
+
* @member {module:model/TSSEventDataType} data_type
|
|
203
|
+
*/
|
|
204
|
+
_TSSBaseRequestEventData["default"].prototype['data_type'] = undefined;
|
|
205
|
+
/**
|
|
206
|
+
* The request ID.
|
|
207
|
+
* @member {String} request_id
|
|
208
|
+
*/
|
|
209
|
+
_TSSBaseRequestEventData["default"].prototype['request_id'] = undefined;
|
|
210
|
+
/**
|
|
211
|
+
* @member {module:model/TSSRequestTypeEenum} request_type
|
|
212
|
+
*/
|
|
213
|
+
_TSSBaseRequestEventData["default"].prototype['request_type'] = undefined;
|
|
214
|
+
/**
|
|
215
|
+
* @member {module:model/TSSStatus} request_status
|
|
216
|
+
*/
|
|
217
|
+
_TSSBaseRequestEventData["default"].prototype['request_status'] = undefined;
|
|
218
|
+
/**
|
|
219
|
+
* The extra info.
|
|
220
|
+
* @member {String} extra_info
|
|
221
|
+
*/
|
|
222
|
+
_TSSBaseRequestEventData["default"].prototype['extra_info'] = undefined;
|
|
223
|
+
/**
|
|
224
|
+
* The failed reason.
|
|
225
|
+
* @member {String} failed_reason
|
|
226
|
+
*/
|
|
227
|
+
_TSSBaseRequestEventData["default"].prototype['failed_reason'] = undefined;
|
|
228
|
+
var _default = exports["default"] = TSSKeyShareSignEventData;
|