@cobo/cobo-waas2 1.1.2 → 1.2.1
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 +16 -3
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +640 -0
- package/dist/api/OAuthApi.js +16 -15
- package/dist/api/TransactionsApi.js +18 -18
- package/dist/api/WalletsApi.js +123 -12
- package/dist/api/WalletsExchangeWalletApi.js +254 -0
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/index.js +56 -0
- package/dist/model/AddressInfo.js +1 -1
- package/dist/model/AddressTransferDestination.js +3 -3
- package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/AssetInfo.js +2 -2
- package/dist/model/BabylonStakeExtra.js +9 -0
- package/dist/model/CheckAddressValidity200Response.js +2 -2
- package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
- package/dist/model/CoboSafeDelegate.js +27 -2
- package/dist/model/ContractCallDestination.js +24 -3
- package/dist/model/ContractCallSource.js +41 -4
- package/dist/model/CreateSmartContractWalletParams.js +23 -2
- package/dist/model/CreateStakeActivity.js +14 -1
- package/dist/model/CreateStakeActivityExtra.js +57 -6
- package/dist/model/CreateTssRequestRequest.js +13 -0
- package/dist/model/CreateUnstakeActivity.js +13 -0
- package/dist/model/CreateWalletParams.js +51 -6
- package/dist/model/CreateWithdrawActivity.js +13 -0
- package/dist/model/CreatedWalletInfo.js +63 -6
- package/dist/model/EstimateFeeParams.js +37 -4
- package/dist/model/EstimateStakeFee.js +19 -1
- package/dist/model/EstimateUnstakeFee.js +18 -0
- package/dist/model/EstimateWithdrawFee.js +18 -0
- package/dist/model/EstimatedFee.js +65 -8
- package/dist/model/EvmContractCallDestination.js +1 -1
- package/dist/model/ExchangeId.js +5 -0
- package/dist/model/ExchangeTransferDestination.js +16 -16
- package/dist/model/ExchangeTransferSource.js +14 -14
- package/dist/model/FeeRate.js +65 -8
- package/dist/model/GetToken200Response.js +4 -4
- package/dist/model/KeyShareHolder.js +13 -0
- package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
- package/dist/model/ListExchanges200ResponseInner.js +122 -0
- package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
- package/dist/model/MPCWalletInfo.js +26 -0
- package/dist/model/MessageSignDestination.js +37 -4
- package/dist/model/MessageSignSource.js +27 -2
- package/dist/model/PoolDetailsAllOfValidatorsInfo.js +20 -4
- package/dist/model/RefreshToken200Response.js +135 -0
- package/dist/model/RefreshTokenRequest.js +2 -2
- package/dist/model/SmartContractWalletInfo.js +23 -2
- package/dist/model/SmartContractWalletType.js +2 -2
- package/dist/model/StakingSource.js +41 -4
- package/dist/model/SubWalletAssetBalance.js +10 -10
- package/dist/model/TSSRequest.js +23 -1
- package/dist/model/TSSRequestWebhookEventData.js +263 -0
- package/dist/model/TransactionDepositFromWalletSource.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +2 -2
- package/dist/model/TransactionDepositToWalletDestination.js +9 -9
- package/dist/model/TransactionDestination.js +112 -19
- package/dist/model/TransactionEvmContractDestination.js +1 -1
- package/dist/model/TransactionExchangeWalletSource.js +6 -6
- package/dist/model/TransactionFee.js +65 -8
- package/dist/model/TransactionMPCWalletSource.js +13 -0
- package/dist/model/TransactionRbfSource.js +27 -2
- package/dist/model/TransactionRequestFee.js +65 -8
- package/dist/model/TransactionResult.js +23 -2
- package/dist/model/TransactionSource.js +123 -16
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/TransactionTransferToWalletDestination.js +9 -9
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/TransferDestination.js +43 -10
- package/dist/model/TransferParams.js +2 -2
- package/dist/model/TransferSource.js +76 -11
- package/dist/model/UpdateWalletParams.js +65 -8
- package/dist/model/WalletInfo.js +77 -8
- package/dist/model/WebhookEventData.js +84 -17
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +24 -4
- package/docs/AddressInfo.md +1 -1
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationAccountOutput.md +1 -1
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
- package/docs/AssetInfo.md +1 -1
- package/docs/BabylonStakeExtra.md +1 -0
- package/docs/CheckAddressValidity200Response.md +1 -1
- package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreateStakeActivity.md +1 -0
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateTssRequestRequest.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateWithdrawActivity.md +1 -0
- package/docs/CreatedWalletInfo.md +2 -0
- package/docs/DevelopersWebhooksApi.md +78 -69
- package/docs/EstimateStakeFee.md +1 -0
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimateWithdrawFee.md +1 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeId.md +2 -0
- package/docs/ExchangeTransferDestination.md +2 -2
- package/docs/ExchangeTransferSource.md +1 -1
- package/docs/GetToken200Response.md +4 -4
- package/docs/KeyShareHolder.md +1 -0
- package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
- package/docs/ListExchanges200ResponseInner.md +10 -0
- package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
- package/docs/MPCWalletInfo.md +2 -0
- package/docs/OAuthApi.md +26 -24
- package/docs/RefreshToken200Response.md +13 -0
- package/docs/RefreshTokenRequest.md +2 -2
- package/docs/SmartContractWalletType.md +1 -1
- package/docs/SubWalletAssetBalance.md +2 -2
- package/docs/TSSRequest.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +29 -0
- package/docs/TransactionDepositFromWalletSource.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -1
- package/docs/TransactionDepositToWalletDestination.md +2 -2
- package/docs/TransactionDestination.md +3 -3
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionExchangeWalletSource.md +1 -1
- package/docs/TransactionMPCWalletSource.md +1 -0
- package/docs/TransactionSource.md +2 -1
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
- package/docs/TransactionTransferToWalletDestination.md +2 -2
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +98 -88
- package/docs/TransferDestination.md +4 -4
- package/docs/TransferParams.md +1 -1
- package/docs/TransferSource.md +1 -1
- package/docs/WalletInfo.md +2 -0
- package/docs/WalletsApi.md +316 -187
- package/docs/WalletsExchangeWalletApi.md +230 -0
- package/docs/WalletsMPCWalletsApi.md +153 -135
- package/docs/WebhookEventData.md +10 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +12 -4
- package/package.json +1 -1
|
@@ -96,9 +96,15 @@ var MPCWalletInfo = /*#__PURE__*/function () {
|
|
|
96
96
|
if (data.hasOwnProperty('project_id')) {
|
|
97
97
|
obj['project_id'] = _ApiClient["default"].convertToType(data['project_id'], 'String');
|
|
98
98
|
}
|
|
99
|
+
if (data.hasOwnProperty('project_name')) {
|
|
100
|
+
obj['project_name'] = _ApiClient["default"].convertToType(data['project_name'], 'String');
|
|
101
|
+
}
|
|
99
102
|
if (data.hasOwnProperty('vault_id')) {
|
|
100
103
|
obj['vault_id'] = _ApiClient["default"].convertToType(data['vault_id'], 'String');
|
|
101
104
|
}
|
|
105
|
+
if (data.hasOwnProperty('vault_name')) {
|
|
106
|
+
obj['vault_name'] = _ApiClient["default"].convertToType(data['vault_name'], 'String');
|
|
107
|
+
}
|
|
102
108
|
}
|
|
103
109
|
return obj;
|
|
104
110
|
}
|
|
@@ -143,9 +149,17 @@ var MPCWalletInfo = /*#__PURE__*/function () {
|
|
|
143
149
|
throw new Error("Expected the field `project_id` to be a primitive type in the JSON string but got " + data['project_id']);
|
|
144
150
|
}
|
|
145
151
|
// ensure the json data is a string
|
|
152
|
+
if (data['project_name'] && !(typeof data['project_name'] === 'string' || data['project_name'] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `project_name` to be a primitive type in the JSON string but got " + data['project_name']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
146
156
|
if (data['vault_id'] && !(typeof data['vault_id'] === 'string' || data['vault_id'] instanceof String)) {
|
|
147
157
|
throw new Error("Expected the field `vault_id` to be a primitive type in the JSON string but got " + data['vault_id']);
|
|
148
158
|
}
|
|
159
|
+
// ensure the json data is a string
|
|
160
|
+
if (data['vault_name'] && !(typeof data['vault_name'] === 'string' || data['vault_name'] instanceof String)) {
|
|
161
|
+
throw new Error("Expected the field `vault_name` to be a primitive type in the JSON string but got " + data['vault_name']);
|
|
162
|
+
}
|
|
149
163
|
return true;
|
|
150
164
|
}
|
|
151
165
|
}]);
|
|
@@ -186,12 +200,24 @@ MPCWalletInfo.prototype['org_id'] = undefined;
|
|
|
186
200
|
*/
|
|
187
201
|
MPCWalletInfo.prototype['project_id'] = undefined;
|
|
188
202
|
|
|
203
|
+
/**
|
|
204
|
+
* The project name.
|
|
205
|
+
* @member {String} project_name
|
|
206
|
+
*/
|
|
207
|
+
MPCWalletInfo.prototype['project_name'] = undefined;
|
|
208
|
+
|
|
189
209
|
/**
|
|
190
210
|
* The ID of the owning vault.
|
|
191
211
|
* @member {String} vault_id
|
|
192
212
|
*/
|
|
193
213
|
MPCWalletInfo.prototype['vault_id'] = undefined;
|
|
194
214
|
|
|
215
|
+
/**
|
|
216
|
+
* The vault name.
|
|
217
|
+
* @member {String} vault_name
|
|
218
|
+
*/
|
|
219
|
+
MPCWalletInfo.prototype['vault_name'] = undefined;
|
|
220
|
+
|
|
195
221
|
// Implement CustodialWalletInfo interface:
|
|
196
222
|
/**
|
|
197
223
|
* The wallet ID.
|
|
@@ -52,6 +52,23 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
52
52
|
}
|
|
53
53
|
var match = 0;
|
|
54
54
|
var errorMessages = [];
|
|
55
|
+
var discriminatorValue = instance["destination_type"];
|
|
56
|
+
if (discriminatorValue) {
|
|
57
|
+
switch (discriminatorValue) {
|
|
58
|
+
case "EVM_EIP_191":
|
|
59
|
+
this.actualInstance = _EvmEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
60
|
+
match++;
|
|
61
|
+
break;
|
|
62
|
+
case "EVM_EIP_712":
|
|
63
|
+
this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
|
|
64
|
+
match++;
|
|
65
|
+
break;
|
|
66
|
+
default:
|
|
67
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
55
72
|
try {
|
|
56
73
|
if (instance instanceof _EvmEIP191MessageSignDestination["default"]) {
|
|
57
74
|
this.actualInstance = instance;
|
|
@@ -59,8 +76,16 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
59
76
|
// plain JS object
|
|
60
77
|
// create EvmEIP191MessageSignDestination from JS object
|
|
61
78
|
this.actualInstance = _EvmEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
62
|
-
} else
|
|
63
|
-
|
|
79
|
+
} else {
|
|
80
|
+
if (_EvmEIP191MessageSignDestination["default"].constructFromObject(instance)) {
|
|
81
|
+
if (!!_EvmEIP191MessageSignDestination["default"].constructFromObject(instance).toJSON) {
|
|
82
|
+
if (_EvmEIP191MessageSignDestination["default"].constructFromObject(instance).toJSON()) {
|
|
83
|
+
this.actualInstance = _EvmEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
this.actualInstance = _EvmEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
64
89
|
}
|
|
65
90
|
match++;
|
|
66
91
|
} catch (err) {
|
|
@@ -74,8 +99,16 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
74
99
|
// plain JS object
|
|
75
100
|
// create EvmEIP712MessageSignDestination from JS object
|
|
76
101
|
this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
|
|
77
|
-
} else
|
|
78
|
-
|
|
102
|
+
} else {
|
|
103
|
+
if (_EvmEIP712MessageSignDestination["default"].constructFromObject(instance)) {
|
|
104
|
+
if (!!_EvmEIP712MessageSignDestination["default"].constructFromObject(instance).toJSON) {
|
|
105
|
+
if (_EvmEIP712MessageSignDestination["default"].constructFromObject(instance).toJSON()) {
|
|
106
|
+
this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
79
112
|
}
|
|
80
113
|
match++;
|
|
81
114
|
} catch (err) {
|
|
@@ -51,6 +51,23 @@ var MessageSignSource = /*#__PURE__*/function () {
|
|
|
51
51
|
}
|
|
52
52
|
var match = 0;
|
|
53
53
|
var errorMessages = [];
|
|
54
|
+
var discriminatorValue = instance["source_type"];
|
|
55
|
+
if (discriminatorValue) {
|
|
56
|
+
switch (discriminatorValue) {
|
|
57
|
+
case "Org-Controlled":
|
|
58
|
+
this.actualInstance = _MpcMessageSignSource["default"].constructFromObject(instance);
|
|
59
|
+
match++;
|
|
60
|
+
break;
|
|
61
|
+
case "User-Controlled":
|
|
62
|
+
this.actualInstance = _MpcMessageSignSource["default"].constructFromObject(instance);
|
|
63
|
+
match++;
|
|
64
|
+
break;
|
|
65
|
+
default:
|
|
66
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
54
71
|
try {
|
|
55
72
|
if (instance instanceof _MpcMessageSignSource["default"]) {
|
|
56
73
|
this.actualInstance = instance;
|
|
@@ -58,8 +75,16 @@ var MessageSignSource = /*#__PURE__*/function () {
|
|
|
58
75
|
// plain JS object
|
|
59
76
|
// create MpcMessageSignSource from JS object
|
|
60
77
|
this.actualInstance = _MpcMessageSignSource["default"].constructFromObject(instance);
|
|
61
|
-
} else
|
|
62
|
-
|
|
78
|
+
} else {
|
|
79
|
+
if (_MpcMessageSignSource["default"].constructFromObject(instance)) {
|
|
80
|
+
if (!!_MpcMessageSignSource["default"].constructFromObject(instance).toJSON) {
|
|
81
|
+
if (_MpcMessageSignSource["default"].constructFromObject(instance).toJSON()) {
|
|
82
|
+
this.actualInstance = _MpcMessageSignSource["default"].constructFromObject(instance);
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
this.actualInstance = _MpcMessageSignSource["default"].constructFromObject(instance);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
63
88
|
}
|
|
64
89
|
match++;
|
|
65
90
|
} catch (err) {
|
|
@@ -58,8 +58,16 @@ var PoolDetailsAllOfValidatorsInfo = /*#__PURE__*/function () {
|
|
|
58
58
|
// plain JS object
|
|
59
59
|
// create BabylonValidator from JS object
|
|
60
60
|
this.actualInstance = _BabylonValidator["default"].constructFromObject(instance);
|
|
61
|
-
} else
|
|
62
|
-
|
|
61
|
+
} else {
|
|
62
|
+
if (_BabylonValidator["default"].constructFromObject(instance)) {
|
|
63
|
+
if (!!_BabylonValidator["default"].constructFromObject(instance).toJSON) {
|
|
64
|
+
if (_BabylonValidator["default"].constructFromObject(instance).toJSON()) {
|
|
65
|
+
this.actualInstance = _BabylonValidator["default"].constructFromObject(instance);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
this.actualInstance = _BabylonValidator["default"].constructFromObject(instance);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
63
71
|
}
|
|
64
72
|
match++;
|
|
65
73
|
} catch (err) {
|
|
@@ -73,8 +81,16 @@ var PoolDetailsAllOfValidatorsInfo = /*#__PURE__*/function () {
|
|
|
73
81
|
// plain JS object
|
|
74
82
|
// create EigenlayerValidator from JS object
|
|
75
83
|
this.actualInstance = _EigenlayerValidator["default"].constructFromObject(instance);
|
|
76
|
-
} else
|
|
77
|
-
|
|
84
|
+
} else {
|
|
85
|
+
if (_EigenlayerValidator["default"].constructFromObject(instance)) {
|
|
86
|
+
if (!!_EigenlayerValidator["default"].constructFromObject(instance).toJSON) {
|
|
87
|
+
if (_EigenlayerValidator["default"].constructFromObject(instance).toJSON()) {
|
|
88
|
+
this.actualInstance = _EigenlayerValidator["default"].constructFromObject(instance);
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
this.actualInstance = _EigenlayerValidator["default"].constructFromObject(instance);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
78
94
|
}
|
|
79
95
|
match++;
|
|
80
96
|
} catch (err) {
|
|
@@ -0,0 +1,135 @@
|
|
|
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: support@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 RefreshToken200Response model module.
|
|
26
|
+
* @module model/RefreshToken200Response
|
|
27
|
+
*/
|
|
28
|
+
var RefreshToken200Response = /*#__PURE__*/function () {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>RefreshToken200Response</code>.
|
|
31
|
+
* @alias module:model/RefreshToken200Response
|
|
32
|
+
*/
|
|
33
|
+
function RefreshToken200Response() {
|
|
34
|
+
_classCallCheck(this, RefreshToken200Response);
|
|
35
|
+
RefreshToken200Response.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(RefreshToken200Response, null, [{
|
|
44
|
+
key: "initialize",
|
|
45
|
+
value: function initialize(obj) {}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>RefreshToken200Response</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/RefreshToken200Response} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/RefreshToken200Response} The populated <code>RefreshToken200Response</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new RefreshToken200Response();
|
|
59
|
+
if (data.hasOwnProperty('access_token')) {
|
|
60
|
+
obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('token_type')) {
|
|
63
|
+
obj['token_type'] = _ApiClient["default"].convertToType(data['token_type'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('scope')) {
|
|
66
|
+
obj['scope'] = _ApiClient["default"].convertToType(data['scope'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('expires_in')) {
|
|
69
|
+
obj['expires_in'] = _ApiClient["default"].convertToType(data['expires_in'], 'Number');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('refresh_token')) {
|
|
72
|
+
obj['refresh_token'] = _ApiClient["default"].convertToType(data['refresh_token'], 'String');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>RefreshToken200Response</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RefreshToken200Response</code>.
|
|
82
|
+
*/
|
|
83
|
+
}, {
|
|
84
|
+
key: "validateJSON",
|
|
85
|
+
value: function validateJSON(data) {
|
|
86
|
+
// ensure the json data is a string
|
|
87
|
+
if (data['access_token'] && !(typeof data['access_token'] === 'string' || data['access_token'] instanceof String)) {
|
|
88
|
+
throw new Error("Expected the field `access_token` to be a primitive type in the JSON string but got " + data['access_token']);
|
|
89
|
+
}
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
if (data['token_type'] && !(typeof data['token_type'] === 'string' || data['token_type'] instanceof String)) {
|
|
92
|
+
throw new Error("Expected the field `token_type` to be a primitive type in the JSON string but got " + data['token_type']);
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is a string
|
|
95
|
+
if (data['scope'] && !(typeof data['scope'] === 'string' || data['scope'] instanceof String)) {
|
|
96
|
+
throw new Error("Expected the field `scope` to be a primitive type in the JSON string but got " + data['scope']);
|
|
97
|
+
}
|
|
98
|
+
// ensure the json data is a string
|
|
99
|
+
if (data['refresh_token'] && !(typeof data['refresh_token'] === 'string' || data['refresh_token'] instanceof String)) {
|
|
100
|
+
throw new Error("Expected the field `refresh_token` to be a primitive type in the JSON string but got " + data['refresh_token']);
|
|
101
|
+
}
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
}]);
|
|
105
|
+
}();
|
|
106
|
+
/**
|
|
107
|
+
* The new access token.
|
|
108
|
+
* @member {String} access_token
|
|
109
|
+
*/
|
|
110
|
+
RefreshToken200Response.prototype['access_token'] = undefined;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The type of the tokens, which is Bearer.
|
|
114
|
+
* @member {String} token_type
|
|
115
|
+
*/
|
|
116
|
+
RefreshToken200Response.prototype['token_type'] = undefined;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app.
|
|
120
|
+
* @member {String} scope
|
|
121
|
+
*/
|
|
122
|
+
RefreshToken200Response.prototype['scope'] = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The time in seconds in which the new access token expires.
|
|
126
|
+
* @member {Number} expires_in
|
|
127
|
+
*/
|
|
128
|
+
RefreshToken200Response.prototype['expires_in'] = undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The refresh token, used to obtain another access token when the new access token expires.
|
|
132
|
+
* @member {String} refresh_token
|
|
133
|
+
*/
|
|
134
|
+
RefreshToken200Response.prototype['refresh_token'] = undefined;
|
|
135
|
+
var _default = exports["default"] = RefreshToken200Response;
|
|
@@ -100,13 +100,13 @@ var RefreshTokenRequest = /*#__PURE__*/function () {
|
|
|
100
100
|
RefreshTokenRequest.prototype['client_id'] = undefined;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* The
|
|
103
|
+
* The OAuth grant type. Set the value as `refresh_token`.
|
|
104
104
|
* @member {String} grant_type
|
|
105
105
|
*/
|
|
106
106
|
RefreshTokenRequest.prototype['grant_type'] = undefined;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* The refresh token of the
|
|
109
|
+
* The refresh token of the current access token.
|
|
110
110
|
* @member {String} refresh_token
|
|
111
111
|
*/
|
|
112
112
|
RefreshTokenRequest.prototype['refresh_token'] = undefined;
|
|
@@ -54,6 +54,19 @@ var SmartContractWalletInfo = /*#__PURE__*/function () {
|
|
|
54
54
|
}
|
|
55
55
|
var match = 0;
|
|
56
56
|
var errorMessages = [];
|
|
57
|
+
var discriminatorValue = instance["smart_contract_wallet_type"];
|
|
58
|
+
if (discriminatorValue) {
|
|
59
|
+
switch (discriminatorValue) {
|
|
60
|
+
case "Safe":
|
|
61
|
+
this.actualInstance = _SafeWallet["default"].constructFromObject(instance);
|
|
62
|
+
match++;
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
57
70
|
try {
|
|
58
71
|
if (instance instanceof _SafeWallet["default"]) {
|
|
59
72
|
this.actualInstance = instance;
|
|
@@ -61,8 +74,16 @@ var SmartContractWalletInfo = /*#__PURE__*/function () {
|
|
|
61
74
|
// plain JS object
|
|
62
75
|
// create SafeWallet from JS object
|
|
63
76
|
this.actualInstance = _SafeWallet["default"].constructFromObject(instance);
|
|
64
|
-
} else
|
|
65
|
-
|
|
77
|
+
} else {
|
|
78
|
+
if (_SafeWallet["default"].constructFromObject(instance)) {
|
|
79
|
+
if (!!_SafeWallet["default"].constructFromObject(instance).toJSON) {
|
|
80
|
+
if (_SafeWallet["default"].constructFromObject(instance).toJSON()) {
|
|
81
|
+
this.actualInstance = _SafeWallet["default"].constructFromObject(instance);
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
this.actualInstance = _SafeWallet["default"].constructFromObject(instance);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
66
87
|
}
|
|
67
88
|
match++;
|
|
68
89
|
} catch (err) {
|
|
@@ -31,10 +31,10 @@ var SmartContractWalletType = exports["default"] = /*#__PURE__*/function () {
|
|
|
31
31
|
function SmartContractWalletType() {
|
|
32
32
|
_classCallCheck(this, SmartContractWalletType);
|
|
33
33
|
/**
|
|
34
|
-
* value: "
|
|
34
|
+
* value: "Safe{Wallet}"
|
|
35
35
|
* @const
|
|
36
36
|
*/
|
|
37
|
-
_defineProperty(this, "
|
|
37
|
+
_defineProperty(this, "Safe{Wallet}", "Safe{Wallet}");
|
|
38
38
|
/**
|
|
39
39
|
* value: "unknown_default_open_api"
|
|
40
40
|
* @const
|
|
@@ -53,6 +53,27 @@ var StakingSource = /*#__PURE__*/function () {
|
|
|
53
53
|
}
|
|
54
54
|
var match = 0;
|
|
55
55
|
var errorMessages = [];
|
|
56
|
+
var discriminatorValue = instance["source_type"];
|
|
57
|
+
if (discriminatorValue) {
|
|
58
|
+
switch (discriminatorValue) {
|
|
59
|
+
case "Org-Controlled":
|
|
60
|
+
this.actualInstance = _MpcContractCallSource["default"].constructFromObject(instance);
|
|
61
|
+
match++;
|
|
62
|
+
break;
|
|
63
|
+
case "Safe{Wallet}":
|
|
64
|
+
this.actualInstance = _SafeContractCallSource["default"].constructFromObject(instance);
|
|
65
|
+
match++;
|
|
66
|
+
break;
|
|
67
|
+
case "User-Controlled":
|
|
68
|
+
this.actualInstance = _MpcContractCallSource["default"].constructFromObject(instance);
|
|
69
|
+
match++;
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
56
77
|
try {
|
|
57
78
|
if (instance instanceof _MpcContractCallSource["default"]) {
|
|
58
79
|
this.actualInstance = instance;
|
|
@@ -60,8 +81,16 @@ var StakingSource = /*#__PURE__*/function () {
|
|
|
60
81
|
// plain JS object
|
|
61
82
|
// create MpcContractCallSource from JS object
|
|
62
83
|
this.actualInstance = _MpcContractCallSource["default"].constructFromObject(instance);
|
|
63
|
-
} else
|
|
64
|
-
|
|
84
|
+
} else {
|
|
85
|
+
if (_MpcContractCallSource["default"].constructFromObject(instance)) {
|
|
86
|
+
if (!!_MpcContractCallSource["default"].constructFromObject(instance).toJSON) {
|
|
87
|
+
if (_MpcContractCallSource["default"].constructFromObject(instance).toJSON()) {
|
|
88
|
+
this.actualInstance = _MpcContractCallSource["default"].constructFromObject(instance);
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
this.actualInstance = _MpcContractCallSource["default"].constructFromObject(instance);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
65
94
|
}
|
|
66
95
|
match++;
|
|
67
96
|
} catch (err) {
|
|
@@ -75,8 +104,16 @@ var StakingSource = /*#__PURE__*/function () {
|
|
|
75
104
|
// plain JS object
|
|
76
105
|
// create SafeContractCallSource from JS object
|
|
77
106
|
this.actualInstance = _SafeContractCallSource["default"].constructFromObject(instance);
|
|
78
|
-
} else
|
|
79
|
-
|
|
107
|
+
} else {
|
|
108
|
+
if (_SafeContractCallSource["default"].constructFromObject(instance)) {
|
|
109
|
+
if (!!_SafeContractCallSource["default"].constructFromObject(instance).toJSON) {
|
|
110
|
+
if (_SafeContractCallSource["default"].constructFromObject(instance).toJSON()) {
|
|
111
|
+
this.actualInstance = _SafeContractCallSource["default"].constructFromObject(instance);
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
this.actualInstance = _SafeContractCallSource["default"].constructFromObject(instance);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
80
117
|
}
|
|
81
118
|
match++;
|
|
82
119
|
} catch (err) {
|
|
@@ -32,9 +32,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
32
32
|
var SubWalletAssetBalance = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>SubWalletAssetBalance</code>.
|
|
35
|
-
* The
|
|
35
|
+
* The information about the asset balance of a trading account.
|
|
36
36
|
* @alias module:model/SubWalletAssetBalance
|
|
37
|
-
* @param asset_id {String}
|
|
37
|
+
* @param asset_id {String} The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
|
|
38
38
|
* @param balance {module:model/TokenBalanceBalance}
|
|
39
39
|
*/
|
|
40
40
|
function SubWalletAssetBalance(asset_id, balance) {
|
|
@@ -66,8 +66,8 @@ var SubWalletAssetBalance = /*#__PURE__*/function () {
|
|
|
66
66
|
value: function constructFromObject(data, obj) {
|
|
67
67
|
if (data) {
|
|
68
68
|
obj = obj || new SubWalletAssetBalance();
|
|
69
|
-
if (data.hasOwnProperty('
|
|
70
|
-
obj['
|
|
69
|
+
if (data.hasOwnProperty('trading_account_type')) {
|
|
70
|
+
obj['trading_account_type'] = _ApiClient["default"].convertToType(data['trading_account_type'], 'String');
|
|
71
71
|
}
|
|
72
72
|
if (data.hasOwnProperty('asset_id')) {
|
|
73
73
|
obj['asset_id'] = _ApiClient["default"].convertToType(data['asset_id'], 'String');
|
|
@@ -103,8 +103,8 @@ var SubWalletAssetBalance = /*#__PURE__*/function () {
|
|
|
103
103
|
} finally {
|
|
104
104
|
_iterator.f();
|
|
105
105
|
}
|
|
106
|
-
if (data['
|
|
107
|
-
throw new Error("Expected the field `
|
|
106
|
+
if (data['trading_account_type'] && !(typeof data['trading_account_type'] === 'string' || data['trading_account_type'] instanceof String)) {
|
|
107
|
+
throw new Error("Expected the field `trading_account_type` to be a primitive type in the JSON string but got " + data['trading_account_type']);
|
|
108
108
|
}
|
|
109
109
|
// ensure the json data is a string
|
|
110
110
|
if (data['asset_id'] && !(typeof data['asset_id'] === 'string' || data['asset_id'] instanceof String)) {
|
|
@@ -124,13 +124,13 @@ var SubWalletAssetBalance = /*#__PURE__*/function () {
|
|
|
124
124
|
SubWalletAssetBalance.RequiredProperties = ["asset_id", "balance"];
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* The
|
|
128
|
-
* @member {String}
|
|
127
|
+
* The trading account type.
|
|
128
|
+
* @member {String} trading_account_type
|
|
129
129
|
*/
|
|
130
|
-
SubWalletAssetBalance.prototype['
|
|
130
|
+
SubWalletAssetBalance.prototype['trading_account_type'] = undefined;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
*
|
|
133
|
+
* The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
|
|
134
134
|
* @member {String} asset_id
|
|
135
135
|
*/
|
|
136
136
|
SubWalletAssetBalance.prototype['asset_id'] = undefined;
|
package/dist/model/TSSRequest.js
CHANGED
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
var TSSRequest = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>TSSRequest</code>.
|
|
34
|
-
* The
|
|
34
|
+
* The information about the TSS request.
|
|
35
35
|
* @alias module:model/TSSRequest
|
|
36
36
|
*/
|
|
37
37
|
function TSSRequest() {
|
|
@@ -75,6 +75,12 @@ var TSSRequest = /*#__PURE__*/function () {
|
|
|
75
75
|
if (data.hasOwnProperty('status')) {
|
|
76
76
|
obj['status'] = _TSSRequestStatus["default"].constructFromObject(data['status']);
|
|
77
77
|
}
|
|
78
|
+
if (data.hasOwnProperty('description')) {
|
|
79
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
82
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
83
|
+
}
|
|
78
84
|
}
|
|
79
85
|
return obj;
|
|
80
86
|
}
|
|
@@ -102,6 +108,10 @@ var TSSRequest = /*#__PURE__*/function () {
|
|
|
102
108
|
if (data['target_key_share_holder_group_id'] && !(typeof data['target_key_share_holder_group_id'] === 'string' || data['target_key_share_holder_group_id'] instanceof String)) {
|
|
103
109
|
throw new Error("Expected the field `target_key_share_holder_group_id` to be a primitive type in the JSON string but got " + data['target_key_share_holder_group_id']);
|
|
104
110
|
}
|
|
111
|
+
// ensure the json data is a string
|
|
112
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
113
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
114
|
+
}
|
|
105
115
|
return true;
|
|
106
116
|
}
|
|
107
117
|
}]);
|
|
@@ -132,4 +142,16 @@ TSSRequest.prototype['type'] = undefined;
|
|
|
132
142
|
* @member {module:model/TSSRequestStatus} status
|
|
133
143
|
*/
|
|
134
144
|
TSSRequest.prototype['status'] = undefined;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The description of the TSS request.
|
|
148
|
+
* @member {String} description
|
|
149
|
+
*/
|
|
150
|
+
TSSRequest.prototype['description'] = undefined;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The TSS request's creation time in Unix timestamp format, measured in milliseconds.
|
|
154
|
+
* @member {Number} created_timestamp
|
|
155
|
+
*/
|
|
156
|
+
TSSRequest.prototype['created_timestamp'] = undefined;
|
|
135
157
|
var _default = exports["default"] = TSSRequest;
|