@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,154 @@
|
|
|
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 TSSKeyGenExtra model module.
|
|
31
|
+
* @module model/TSSKeyGenExtra
|
|
32
|
+
*/
|
|
33
|
+
var TSSKeyGenExtra = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>TSSKeyGenExtra</code>.
|
|
36
|
+
* @alias module:model/TSSKeyGenExtra
|
|
37
|
+
*/
|
|
38
|
+
function TSSKeyGenExtra() {
|
|
39
|
+
_classCallCheck(this, TSSKeyGenExtra);
|
|
40
|
+
TSSKeyGenExtra.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(TSSKeyGenExtra, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>TSSKeyGenExtra</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/TSSKeyGenExtra} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/TSSKeyGenExtra} The populated <code>TSSKeyGenExtra</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new TSSKeyGenExtra();
|
|
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('target_key_share_holder_group')) {
|
|
74
|
+
obj['target_key_share_holder_group'] = _KeyShareHolderGroup["default"].constructFromObject(data['target_key_share_holder_group']);
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('tss_request')) {
|
|
77
|
+
obj['tss_request'] = _TSSRequest["default"].constructFromObject(data['tss_request']);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Validates the JSON data with respect to <code>TSSKeyGenExtra</code>.
|
|
85
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
86
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyGenExtra</code>.
|
|
87
|
+
*/
|
|
88
|
+
}, {
|
|
89
|
+
key: "validateJSON",
|
|
90
|
+
value: function validateJSON(data) {
|
|
91
|
+
// validate the optional field `org`
|
|
92
|
+
if (data['org']) {
|
|
93
|
+
// data not null
|
|
94
|
+
if (!!_OrgInfo["default"].validateJSON) {
|
|
95
|
+
_OrgInfo["default"].validateJSON(data['org']);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// validate the optional field `project`
|
|
99
|
+
if (data['project']) {
|
|
100
|
+
// data not null
|
|
101
|
+
if (!!_MPCProject["default"].validateJSON) {
|
|
102
|
+
_MPCProject["default"].validateJSON(data['project']);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `vault`
|
|
106
|
+
if (data['vault']) {
|
|
107
|
+
// data not null
|
|
108
|
+
if (!!_MPCVault["default"].validateJSON) {
|
|
109
|
+
_MPCVault["default"].validateJSON(data['vault']);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
// validate the optional field `target_key_share_holder_group`
|
|
113
|
+
if (data['target_key_share_holder_group']) {
|
|
114
|
+
// data not null
|
|
115
|
+
if (!!_KeyShareHolderGroup["default"].validateJSON) {
|
|
116
|
+
_KeyShareHolderGroup["default"].validateJSON(data['target_key_share_holder_group']);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// validate the optional field `tss_request`
|
|
120
|
+
if (data['tss_request']) {
|
|
121
|
+
// data not null
|
|
122
|
+
if (!!_TSSRequest["default"].validateJSON) {
|
|
123
|
+
_TSSRequest["default"].validateJSON(data['tss_request']);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}]);
|
|
129
|
+
}();
|
|
130
|
+
/**
|
|
131
|
+
* @member {module:model/OrgInfo} org
|
|
132
|
+
*/
|
|
133
|
+
TSSKeyGenExtra.prototype['org'] = undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @member {module:model/MPCProject} project
|
|
137
|
+
*/
|
|
138
|
+
TSSKeyGenExtra.prototype['project'] = undefined;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @member {module:model/MPCVault} vault
|
|
142
|
+
*/
|
|
143
|
+
TSSKeyGenExtra.prototype['vault'] = undefined;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @member {module:model/KeyShareHolderGroup} target_key_share_holder_group
|
|
147
|
+
*/
|
|
148
|
+
TSSKeyGenExtra.prototype['target_key_share_holder_group'] = undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @member {module:model/TSSRequest} tss_request
|
|
152
|
+
*/
|
|
153
|
+
TSSKeyGenExtra.prototype['tss_request'] = undefined;
|
|
154
|
+
var _default = exports["default"] = TSSKeyGenExtra;
|
|
@@ -0,0 +1,130 @@
|
|
|
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 TSSKeyGenRequest model module.
|
|
27
|
+
* @module model/TSSKeyGenRequest
|
|
28
|
+
*/
|
|
29
|
+
var TSSKeyGenRequest = /*#__PURE__*/function () {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new <code>TSSKeyGenRequest</code>.
|
|
32
|
+
* @alias module:model/TSSKeyGenRequest
|
|
33
|
+
*/
|
|
34
|
+
function TSSKeyGenRequest() {
|
|
35
|
+
_classCallCheck(this, TSSKeyGenRequest);
|
|
36
|
+
TSSKeyGenRequest.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(TSSKeyGenRequest, null, [{
|
|
45
|
+
key: "initialize",
|
|
46
|
+
value: function initialize(obj) {}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>TSSKeyGenRequest</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/TSSKeyGenRequest} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/TSSKeyGenRequest} The populated <code>TSSKeyGenRequest</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new TSSKeyGenRequest();
|
|
60
|
+
if (data.hasOwnProperty('threshold')) {
|
|
61
|
+
obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number');
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('node_ids')) {
|
|
64
|
+
obj['node_ids'] = _ApiClient["default"].convertToType(data['node_ids'], ['String']);
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('curve')) {
|
|
67
|
+
obj['curve'] = _TSSCurve["default"].constructFromObject(data['curve']);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('task_id')) {
|
|
70
|
+
obj['task_id'] = _ApiClient["default"].convertToType(data['task_id'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('biz_task_id')) {
|
|
73
|
+
obj['biz_task_id'] = _ApiClient["default"].convertToType(data['biz_task_id'], 'String');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>TSSKeyGenRequest</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSKeyGenRequest</code>.
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "validateJSON",
|
|
86
|
+
value: function validateJSON(data) {
|
|
87
|
+
// ensure the json data is an array
|
|
88
|
+
if (!Array.isArray(data['node_ids'])) {
|
|
89
|
+
throw new Error("Expected the field `node_ids` to be an array in the JSON data but got " + data['node_ids']);
|
|
90
|
+
}
|
|
91
|
+
// ensure the json data is a string
|
|
92
|
+
if (data['task_id'] && !(typeof data['task_id'] === 'string' || data['task_id'] instanceof String)) {
|
|
93
|
+
throw new Error("Expected the field `task_id` to be a primitive type in the JSON string but got " + data['task_id']);
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
if (data['biz_task_id'] && !(typeof data['biz_task_id'] === 'string' || data['biz_task_id'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `biz_task_id` to be a primitive type in the JSON string but got " + data['biz_task_id']);
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
}();
|
|
103
|
+
/**
|
|
104
|
+
* The number of key share holders required to approve each operation in TSS key share group.
|
|
105
|
+
* @member {Number} threshold
|
|
106
|
+
*/
|
|
107
|
+
TSSKeyGenRequest.prototype['threshold'] = undefined;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @member {Array.<String>} node_ids
|
|
111
|
+
*/
|
|
112
|
+
TSSKeyGenRequest.prototype['node_ids'] = undefined;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @member {module:model/TSSCurve} curve
|
|
116
|
+
*/
|
|
117
|
+
TSSKeyGenRequest.prototype['curve'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The task ID.
|
|
121
|
+
* @member {String} task_id
|
|
122
|
+
*/
|
|
123
|
+
TSSKeyGenRequest.prototype['task_id'] = undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The business task ID. This field contains the TSS request ID.
|
|
127
|
+
* @member {String} biz_task_id
|
|
128
|
+
*/
|
|
129
|
+
TSSKeyGenRequest.prototype['biz_task_id'] = undefined;
|
|
130
|
+
var _default = exports["default"] = TSSKeyGenRequest;
|
|
@@ -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 _TSSGroup = _interopRequireDefault(require("./TSSGroup"));
|
|
11
|
+
var _TSSKeyReshareRequest = _interopRequireDefault(require("./TSSKeyReshareRequest"));
|
|
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 TSSKeyReshareEventData model module.
|
|
35
|
+
* @module model/TSSKeyReshareEventData
|
|
36
|
+
*/
|
|
37
|
+
var TSSKeyReshareEventData = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>TSSKeyReshareEventData</code>.
|
|
40
|
+
* @alias module:model/TSSKeyReshareEventData
|
|
41
|
+
* @implements module:model/TSSBaseRequestEventData
|
|
42
|
+
* @param data_type {module:model/TSSEventDataType}
|
|
43
|
+
*/
|
|
44
|
+
function TSSKeyReshareEventData(data_type) {
|
|
45
|
+
_classCallCheck(this, TSSKeyReshareEventData);
|
|
46
|
+
_TSSBaseRequestEventData["default"].initialize(this, data_type);
|
|
47
|
+
TSSKeyReshareEventData.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(TSSKeyReshareEventData, null, [{
|
|
56
|
+
key: "initialize",
|
|
57
|
+
value: function initialize(obj, data_type) {
|
|
58
|
+
obj['data_type'] = data_type;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>TSSKeyReshareEventData</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/TSSKeyReshareEventData} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/TSSKeyReshareEventData} The populated <code>TSSKeyReshareEventData</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new TSSKeyReshareEventData();
|
|
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'] = _TSSKeyReshareRequest["default"].constructFromObject(data['request_detail']);
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('result')) {
|
|
96
|
+
obj['result'] = _TSSGroup["default"].constructFromObject(data['result']);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return obj;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Validates the JSON data with respect to <code>TSSKeyReshareEventData</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>TSSKeyReshareEventData</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(TSSKeyReshareEventData.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 (!!_TSSKeyReshareRequest["default"].validateJSON) {
|
|
141
|
+
_TSSKeyReshareRequest["default"].validateJSON(data['request_detail']);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// validate the optional field `result`
|
|
145
|
+
if (data['result']) {
|
|
146
|
+
// data not null
|
|
147
|
+
if (!!_TSSGroup["default"].validateJSON) {
|
|
148
|
+
_TSSGroup["default"].validateJSON(data['result']);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
}]);
|
|
154
|
+
}();
|
|
155
|
+
TSSKeyReshareEventData.RequiredProperties = ["data_type"];
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @member {module:model/TSSEventDataType} data_type
|
|
159
|
+
*/
|
|
160
|
+
TSSKeyReshareEventData.prototype['data_type'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The request ID.
|
|
164
|
+
* @member {String} request_id
|
|
165
|
+
*/
|
|
166
|
+
TSSKeyReshareEventData.prototype['request_id'] = undefined;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @member {module:model/TSSRequestTypeEenum} request_type
|
|
170
|
+
*/
|
|
171
|
+
TSSKeyReshareEventData.prototype['request_type'] = undefined;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @member {module:model/TSSStatus} request_status
|
|
175
|
+
*/
|
|
176
|
+
TSSKeyReshareEventData.prototype['request_status'] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The extra info.
|
|
180
|
+
* @member {String} extra_info
|
|
181
|
+
*/
|
|
182
|
+
TSSKeyReshareEventData.prototype['extra_info'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The failed reason.
|
|
186
|
+
* @member {String} failed_reason
|
|
187
|
+
*/
|
|
188
|
+
TSSKeyReshareEventData.prototype['failed_reason'] = undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @member {module:model/TSSKeyReshareRequest} request_detail
|
|
192
|
+
*/
|
|
193
|
+
TSSKeyReshareEventData.prototype['request_detail'] = undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @member {module:model/TSSGroup} result
|
|
197
|
+
*/
|
|
198
|
+
TSSKeyReshareEventData.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"] = TSSKeyReshareEventData;
|