@cobo/cobo-waas2 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -33
- package/dist/ApiClient.js +11 -1
- package/dist/api/AddressBooksApi.js +1 -1
- package/dist/api/DevelopersApi.js +7 -7
- package/dist/api/DevelopersWebhooksApi.js +8 -8
- package/dist/api/PrimeBrokerApi.js +317 -0
- package/dist/api/StakingsApi.js +412 -18
- package/dist/api/SwapsApi.js +360 -0
- package/dist/api/TransactionsApi.js +64 -20
- package/dist/api/TravelRuleApi.js +18 -18
- package/dist/api/WalletsApi.js +84 -13
- package/dist/api/WalletsExchangeWalletApi.js +1 -1
- package/dist/api/WalletsMPCWalletsApi.js +151 -39
- package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
- package/dist/index.js +276 -10
- package/dist/model/ActivityExtra.js +5 -5
- package/dist/model/AddressBalance.js +129 -0
- package/dist/model/AddressTransferDestination.js +36 -0
- package/dist/model/AddressesEventData.js +4 -4
- package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
- package/dist/model/ApprovalStatementStatus.js +81 -0
- package/dist/model/AssetBalance.js +6 -6
- package/dist/model/BTCEIP191MessageSignDestination.js +122 -0
- package/dist/model/BabylonAirdropPop.js +186 -0
- package/dist/model/BabylonAirdropRegistration.js +172 -0
- package/dist/model/BabylonEligibleAirdrop.js +157 -0
- package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
- package/dist/model/BabylonRegistrationStatus.js +66 -0
- package/dist/model/BabylonStakingActivityDetailExtra.js +1 -1
- package/dist/model/BabylonStakingRegistration.js +185 -0
- package/dist/model/{TokenBalanceBalance.js → Balance.js} +22 -22
- package/dist/model/{SwapSummary.js → ChangeGuardPubkey200Response.js} +28 -39
- package/dist/model/ContractCallParams.js +36 -0
- package/dist/model/ContractCallSource.js +6 -0
- package/dist/model/CoreStakingActivityDetailExtra.js +3 -3
- package/dist/model/CreateAddressRequest.js +28 -2
- package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
- package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
- package/dist/model/CreatePrimeBrokerAddress201Response.js +140 -0
- package/dist/model/CreatePrimeBrokerAddressRequest.js +107 -0
- package/dist/model/CreateSwapActivityRequest.js +153 -0
- package/dist/model/CreateSwapQuote201Response.js +264 -0
- package/dist/model/CreateSwapQuoteRequest.js +166 -0
- package/dist/model/DeleteGuardPubkey201Response.js +110 -0
- package/dist/model/EthStakeEstimatedFee.js +1 -1
- package/dist/model/EthStakingActivityDetailExtra.js +1 -1
- package/dist/model/GetStakingEstimationFee201Response.js +1 -1
- package/dist/model/GetTransactionLimitation200Response.js +4 -4
- package/dist/model/GuardPubkeyStatus.js +91 -0
- package/dist/model/ListAddressBalancesByToken200Response.js +123 -0
- package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
- package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
- package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
- package/dist/model/ListEnableTokenPairs200Response.js +123 -0
- package/dist/model/ListKeyShareHolders200Response.js +123 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/MessageSignDestination.js +70 -8
- package/dist/model/MessageSignDestinationType.js +12 -2
- package/dist/model/MessageSignSource.js +6 -0
- package/dist/model/MpcContractCallSource.js +16 -0
- package/dist/model/MpcMessageSignSource.js +16 -0
- package/dist/model/MpcSigningGroup.js +27 -4
- package/dist/model/MpcTransferSource.js +16 -0
- package/dist/model/OrgInfo.js +3 -3
- package/dist/model/QueryApprovalStatement200Response.js +122 -0
- package/dist/model/QueryGuardPubkey200Response.js +129 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +125 -0
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SelfCustodyWallet.js +7 -7
- package/dist/model/StakingPoolId.js +30 -0
- package/dist/model/StakingPoolType.js +15 -0
- package/dist/model/SubWalletAssetBalance.js +6 -6
- package/dist/model/SubmitDepositTravelRuleInfo201Response.js +1 -1
- package/dist/model/SwapQuote.js +203 -0
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TokenBalance.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +16 -0
- package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +83 -0
- package/dist/model/TransactionDestination.js +10 -4
- package/dist/model/TransactionRawTxInfo.js +29 -0
- package/dist/model/TransactionRbfSource.js +6 -0
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionUserApprovalDetail.js +3 -3
- package/dist/model/TransactionUtxoChange.js +101 -0
- package/dist/model/TransferDestination.js +6 -0
- package/dist/model/TransferParams.js +36 -0
- package/dist/model/TransferSource.js +6 -0
- package/dist/model/TravelRuleDepositExchangesOrVASP.js +4 -4
- package/dist/model/TravelRuleDepositExchangesOrVASPEntityInfo.js +7 -7
- package/dist/model/TravelRuleDepositLegalEntity.js +5 -5
- package/dist/model/TravelRuleDepositNaturalEntity.js +9 -9
- package/dist/model/TravelRuleDepositRequestTravelRuleInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawExchangesOrVASP.js +3 -3
- package/dist/model/TravelRuleWithdrawExchangesOrVASPEntityInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawLegalEntity.js +2 -2
- package/dist/model/TravelRuleWithdrawNaturalEntity.js +7 -7
- package/dist/model/TravelRuleWithdrawRequestTravelRuleInfo.js +4 -4
- package/dist/model/Vasp.js +7 -7
- package/dist/model/WebhookEventData.js +2 -2
- package/docs/ActivityExtra.md +5 -5
- package/docs/AddressBalance.md +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressTransferDestination.md +14 -0
- package/docs/AddressesEventData.md +1 -1
- package/docs/AddressesEventDataAllOfAddresses.md +19 -0
- package/docs/ApprovalStatementStatus.md +20 -0
- package/docs/AssetBalance.md +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +10 -0
- package/docs/BabylonAirdropPop.md +14 -0
- package/docs/BabylonAirdropRegistration.md +16 -0
- package/docs/BabylonEligibleAirdrop.md +14 -0
- package/docs/BabylonRegistrationRequestStatus.md +14 -0
- package/docs/BabylonRegistrationStatus.md +14 -0
- package/docs/BabylonStakingActivityDetailExtra.md +1 -1
- package/docs/BabylonStakingRegistration.md +17 -0
- package/docs/{TokenBalanceBalance.md → Balance.md} +1 -1
- package/docs/ChangeGuardPubkey200Response.md +9 -0
- package/docs/ContractCallParams.md +14 -0
- package/docs/ContractCallSource.md +1 -0
- package/docs/CoreStakingActivityDetailExtra.md +3 -3
- package/docs/CreateAddressRequest.md +3 -1
- package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
- package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
- package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
- package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
- package/docs/CreatePrimeBrokerAddress201Response.md +10 -0
- package/docs/CreatePrimeBrokerAddressRequest.md +9 -0
- package/docs/CreateSwapActivityRequest.md +12 -0
- package/docs/CreateSwapQuote201Response.md +17 -0
- package/docs/CreateSwapQuoteRequest.md +13 -0
- package/docs/DeleteGuardPubkey201Response.md +9 -0
- package/docs/DevelopersApi.md +5 -5
- package/docs/DevelopersWebhooksApi.md +8 -8
- package/docs/EthStakeEstimatedFee.md +1 -1
- package/docs/EthStakingActivityDetailExtra.md +1 -1
- package/docs/GetStakingEstimationFee201Response.md +1 -1
- package/docs/GetTransactionLimitation200Response.md +4 -4
- package/docs/GuardPubkeyStatus.md +24 -0
- package/docs/ListAddressBalancesByToken200Response.md +10 -0
- package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
- package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
- package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
- package/docs/ListEnableTokenPairs200Response.md +10 -0
- package/docs/ListKeyShareHolders200Response.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/MessageSignDestination.md +1 -0
- package/docs/MessageSignDestinationType.md +6 -2
- package/docs/MessageSignSource.md +1 -0
- package/docs/MpcContractCallSource.md +1 -0
- package/docs/MpcMessageSignSource.md +1 -0
- package/docs/MpcSigningGroup.md +1 -1
- package/docs/MpcTransferSource.md +1 -0
- package/docs/OrgInfo.md +1 -1
- package/docs/PrimeBrokerApi.md +318 -0
- package/docs/QueryApprovalStatement200Response.md +12 -0
- package/docs/QueryGuardPubkey200Response.md +11 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +10 -0
- package/docs/RootPubkey.md +1 -1
- package/docs/SelfCustodyWallet.md +3 -3
- package/docs/StakingPoolId.md +12 -0
- package/docs/StakingPoolType.md +6 -0
- package/docs/StakingsApi.md +460 -12
- package/docs/SubWalletAssetBalance.md +1 -1
- package/docs/SubmitDepositTravelRuleInfo201Response.md +1 -1
- package/docs/SwapQuote.md +16 -0
- package/docs/SwapsApi.md +348 -0
- package/docs/TSSGroups.md +1 -1
- package/docs/TokenBalance.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -0
- package/docs/TransactionDepositToAddressDestinationTxInfo.md +9 -0
- package/docs/TransactionDestination.md +1 -0
- package/docs/TransactionRawTxInfo.md +2 -0
- package/docs/TransactionRbfSource.md +1 -0
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionUserApprovalDetail.md +3 -3
- package/docs/TransactionUtxoChange.md +10 -0
- package/docs/TransactionsApi.md +68 -17
- package/docs/TransferDestination.md +14 -0
- package/docs/TransferParams.md +14 -0
- package/docs/TransferSource.md +1 -0
- package/docs/TravelRuleApi.md +13 -13
- package/docs/TravelRuleDepositExchangesOrVASP.md +2 -2
- package/docs/TravelRuleDepositExchangesOrVASPEntityInfo.md +7 -7
- package/docs/TravelRuleDepositLegalEntity.md +3 -3
- package/docs/TravelRuleDepositNaturalEntity.md +5 -5
- package/docs/TravelRuleDepositRequestTravelRuleInfo.md +5 -5
- package/docs/TravelRuleWithdrawExchangesOrVASP.md +1 -1
- package/docs/TravelRuleWithdrawExchangesOrVASPEntityInfo.md +5 -5
- package/docs/TravelRuleWithdrawLegalEntity.md +1 -1
- package/docs/TravelRuleWithdrawNaturalEntity.md +4 -4
- package/docs/TravelRuleWithdrawRequestTravelRuleInfo.md +4 -4
- package/docs/Vasp.md +3 -3
- package/docs/WalletsApi.md +78 -13
- package/docs/WalletsExchangeWalletApi.md +1 -1
- package/docs/WalletsMPCWalletsApi.md +141 -27
- package/docs/WalletsSmartContractWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +1 -1
- package/package.json +2 -2
- package/docs/SwapSummary.md +0 -10
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _Balance = _interopRequireDefault(require("./Balance"));
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
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
11
|
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; } } }; }
|
|
@@ -35,7 +35,7 @@ var SubWalletAssetBalance = /*#__PURE__*/function () {
|
|
|
35
35
|
* The information about the asset balance of a trading account.
|
|
36
36
|
* @alias module:model/SubWalletAssetBalance
|
|
37
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
|
-
* @param balance {module:model/
|
|
38
|
+
* @param balance {module:model/Balance}
|
|
39
39
|
*/
|
|
40
40
|
function SubWalletAssetBalance(asset_id, balance) {
|
|
41
41
|
_classCallCheck(this, SubWalletAssetBalance);
|
|
@@ -73,7 +73,7 @@ var SubWalletAssetBalance = /*#__PURE__*/function () {
|
|
|
73
73
|
obj['asset_id'] = _ApiClient["default"].convertToType(data['asset_id'], 'String');
|
|
74
74
|
}
|
|
75
75
|
if (data.hasOwnProperty('balance')) {
|
|
76
|
-
obj['balance'] =
|
|
76
|
+
obj['balance'] = _Balance["default"].constructFromObject(data['balance']);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return obj;
|
|
@@ -113,8 +113,8 @@ var SubWalletAssetBalance = /*#__PURE__*/function () {
|
|
|
113
113
|
// validate the optional field `balance`
|
|
114
114
|
if (data['balance']) {
|
|
115
115
|
// data not null
|
|
116
|
-
if (!!
|
|
117
|
-
|
|
116
|
+
if (!!_Balance["default"].validateJSON) {
|
|
117
|
+
_Balance["default"].validateJSON(data['balance']);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
return true;
|
|
@@ -136,7 +136,7 @@ SubWalletAssetBalance.prototype['trading_account_type'] = undefined;
|
|
|
136
136
|
SubWalletAssetBalance.prototype['asset_id'] = undefined;
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* @member {module:model/
|
|
139
|
+
* @member {module:model/Balance} balance
|
|
140
140
|
*/
|
|
141
141
|
SubWalletAssetBalance.prototype['balance'] = undefined;
|
|
142
142
|
var _default = exports["default"] = SubWalletAssetBalance;
|
|
@@ -76,7 +76,7 @@ var SubmitDepositTravelRuleInfo201Response = /*#__PURE__*/function () {
|
|
|
76
76
|
}]);
|
|
77
77
|
}();
|
|
78
78
|
/**
|
|
79
|
-
* Whether the
|
|
79
|
+
* Whether the Travel Rule information has been successfully submitted. - `true`: The information has been successfully submitted. - `false`: The information has not been submitted.
|
|
80
80
|
* @member {Boolean} submitted
|
|
81
81
|
*/
|
|
82
82
|
SubmitDepositTravelRuleInfo201Response.prototype['submitted'] = undefined;
|
|
@@ -0,0 +1,203 @@
|
|
|
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 _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; } } }; }
|
|
11
|
+
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; } }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
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); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The SwapQuote model module.
|
|
29
|
+
* @module model/SwapQuote
|
|
30
|
+
*/
|
|
31
|
+
var SwapQuote = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>SwapQuote</code>.
|
|
34
|
+
* @alias module:model/SwapQuote
|
|
35
|
+
* @param pay_amount {String} The amount of tokens to pay.
|
|
36
|
+
* @param receive_amount {String} The amount of tokens to receive.
|
|
37
|
+
* @param fee_amount {String} The amount of tokens to pay for fee.
|
|
38
|
+
* @param quote_expired_timestamp {Number} The time when the quote will expire, in Unix timestamp format, measured in milliseconds.
|
|
39
|
+
*/
|
|
40
|
+
function SwapQuote(pay_amount, receive_amount, fee_amount, quote_expired_timestamp) {
|
|
41
|
+
_classCallCheck(this, SwapQuote);
|
|
42
|
+
SwapQuote.initialize(this, pay_amount, receive_amount, fee_amount, quote_expired_timestamp);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(SwapQuote, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, pay_amount, receive_amount, fee_amount, quote_expired_timestamp) {
|
|
53
|
+
obj['pay_amount'] = pay_amount;
|
|
54
|
+
obj['receive_amount'] = receive_amount;
|
|
55
|
+
obj['fee_amount'] = fee_amount;
|
|
56
|
+
obj['quote_expired_timestamp'] = quote_expired_timestamp;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>SwapQuote</code> from a plain JavaScript object, optionally creating a new instance.
|
|
61
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @param {module:model/SwapQuote} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/SwapQuote} The populated <code>SwapQuote</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new SwapQuote();
|
|
71
|
+
if (data.hasOwnProperty('pay_amount')) {
|
|
72
|
+
obj['pay_amount'] = _ApiClient["default"].convertToType(data['pay_amount'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('receive_amount')) {
|
|
75
|
+
obj['receive_amount'] = _ApiClient["default"].convertToType(data['receive_amount'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
78
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('min_pay_amount')) {
|
|
81
|
+
obj['min_pay_amount'] = _ApiClient["default"].convertToType(data['min_pay_amount'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('max_pay_amount')) {
|
|
84
|
+
obj['max_pay_amount'] = _ApiClient["default"].convertToType(data['max_pay_amount'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('min_receive_amount')) {
|
|
87
|
+
obj['min_receive_amount'] = _ApiClient["default"].convertToType(data['min_receive_amount'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('max_receive_amount')) {
|
|
90
|
+
obj['max_receive_amount'] = _ApiClient["default"].convertToType(data['max_receive_amount'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('quote_expired_timestamp')) {
|
|
93
|
+
obj['quote_expired_timestamp'] = _ApiClient["default"].convertToType(data['quote_expired_timestamp'], 'Number');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return obj;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Validates the JSON data with respect to <code>SwapQuote</code>.
|
|
101
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
102
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapQuote</code>.
|
|
103
|
+
*/
|
|
104
|
+
}, {
|
|
105
|
+
key: "validateJSON",
|
|
106
|
+
value: function validateJSON(data) {
|
|
107
|
+
// check to make sure all required properties are present in the JSON string
|
|
108
|
+
var _iterator = _createForOfIteratorHelper(SwapQuote.RequiredProperties),
|
|
109
|
+
_step;
|
|
110
|
+
try {
|
|
111
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
112
|
+
var property = _step.value;
|
|
113
|
+
if (!data.hasOwnProperty(property)) {
|
|
114
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is a string
|
|
118
|
+
} catch (err) {
|
|
119
|
+
_iterator.e(err);
|
|
120
|
+
} finally {
|
|
121
|
+
_iterator.f();
|
|
122
|
+
}
|
|
123
|
+
if (data['pay_amount'] && !(typeof data['pay_amount'] === 'string' || data['pay_amount'] instanceof String)) {
|
|
124
|
+
throw new Error("Expected the field `pay_amount` to be a primitive type in the JSON string but got " + data['pay_amount']);
|
|
125
|
+
}
|
|
126
|
+
// ensure the json data is a string
|
|
127
|
+
if (data['receive_amount'] && !(typeof data['receive_amount'] === 'string' || data['receive_amount'] instanceof String)) {
|
|
128
|
+
throw new Error("Expected the field `receive_amount` to be a primitive type in the JSON string but got " + data['receive_amount']);
|
|
129
|
+
}
|
|
130
|
+
// ensure the json data is a string
|
|
131
|
+
if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
132
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
133
|
+
}
|
|
134
|
+
// ensure the json data is a string
|
|
135
|
+
if (data['min_pay_amount'] && !(typeof data['min_pay_amount'] === 'string' || data['min_pay_amount'] instanceof String)) {
|
|
136
|
+
throw new Error("Expected the field `min_pay_amount` to be a primitive type in the JSON string but got " + data['min_pay_amount']);
|
|
137
|
+
}
|
|
138
|
+
// ensure the json data is a string
|
|
139
|
+
if (data['max_pay_amount'] && !(typeof data['max_pay_amount'] === 'string' || data['max_pay_amount'] instanceof String)) {
|
|
140
|
+
throw new Error("Expected the field `max_pay_amount` to be a primitive type in the JSON string but got " + data['max_pay_amount']);
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is a string
|
|
143
|
+
if (data['min_receive_amount'] && !(typeof data['min_receive_amount'] === 'string' || data['min_receive_amount'] instanceof String)) {
|
|
144
|
+
throw new Error("Expected the field `min_receive_amount` to be a primitive type in the JSON string but got " + data['min_receive_amount']);
|
|
145
|
+
}
|
|
146
|
+
// ensure the json data is a string
|
|
147
|
+
if (data['max_receive_amount'] && !(typeof data['max_receive_amount'] === 'string' || data['max_receive_amount'] instanceof String)) {
|
|
148
|
+
throw new Error("Expected the field `max_receive_amount` to be a primitive type in the JSON string but got " + data['max_receive_amount']);
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
}]);
|
|
153
|
+
}();
|
|
154
|
+
SwapQuote.RequiredProperties = ["pay_amount", "receive_amount", "fee_amount", "quote_expired_timestamp"];
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The amount of tokens to pay.
|
|
158
|
+
* @member {String} pay_amount
|
|
159
|
+
*/
|
|
160
|
+
SwapQuote.prototype['pay_amount'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The amount of tokens to receive.
|
|
164
|
+
* @member {String} receive_amount
|
|
165
|
+
*/
|
|
166
|
+
SwapQuote.prototype['receive_amount'] = undefined;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The amount of tokens to pay for fee.
|
|
170
|
+
* @member {String} fee_amount
|
|
171
|
+
*/
|
|
172
|
+
SwapQuote.prototype['fee_amount'] = undefined;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The minimum amount of tokens to pay.
|
|
176
|
+
* @member {String} min_pay_amount
|
|
177
|
+
*/
|
|
178
|
+
SwapQuote.prototype['min_pay_amount'] = undefined;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The maximum amount of tokens to pay.
|
|
182
|
+
* @member {String} max_pay_amount
|
|
183
|
+
*/
|
|
184
|
+
SwapQuote.prototype['max_pay_amount'] = undefined;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The minimum amount of tokens to receive.
|
|
188
|
+
* @member {String} min_receive_amount
|
|
189
|
+
*/
|
|
190
|
+
SwapQuote.prototype['min_receive_amount'] = undefined;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* The maximum amount of tokens to receive.
|
|
194
|
+
* @member {String} max_receive_amount
|
|
195
|
+
*/
|
|
196
|
+
SwapQuote.prototype['max_receive_amount'] = undefined;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The time when the quote will expire, in Unix timestamp format, measured in milliseconds.
|
|
200
|
+
* @member {Number} quote_expired_timestamp
|
|
201
|
+
*/
|
|
202
|
+
SwapQuote.prototype['quote_expired_timestamp'] = undefined;
|
|
203
|
+
var _default = exports["default"] = SwapQuote;
|
package/dist/model/TSSGroups.js
CHANGED
|
@@ -103,7 +103,7 @@ TSSGroups.prototype['tss_key_share_group_id'] = undefined;
|
|
|
103
103
|
TSSGroups.prototype['curve'] = undefined;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* The vault's [root extended public key](https://
|
|
106
|
+
* The vault's [root extended public key](https://www.cobo.com/developers/v2/guides/mpc-wallets/get-started-ocw#root-extended-public-keys).
|
|
107
107
|
* @member {String} root_pubkey
|
|
108
108
|
*/
|
|
109
109
|
TSSGroups.prototype['root_pubkey'] = undefined;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _Balance = _interopRequireDefault(require("./Balance"));
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
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
11
|
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; } } }; }
|
|
@@ -35,7 +35,7 @@ var TokenBalance = /*#__PURE__*/function () {
|
|
|
35
35
|
* The balance information.
|
|
36
36
|
* @alias module:model/TokenBalance
|
|
37
37
|
* @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
38
|
-
* @param balance {module:model/
|
|
38
|
+
* @param balance {module:model/Balance}
|
|
39
39
|
*/
|
|
40
40
|
function TokenBalance(token_id, balance) {
|
|
41
41
|
_classCallCheck(this, TokenBalance);
|
|
@@ -70,7 +70,7 @@ var TokenBalance = /*#__PURE__*/function () {
|
|
|
70
70
|
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
71
71
|
}
|
|
72
72
|
if (data.hasOwnProperty('balance')) {
|
|
73
|
-
obj['balance'] =
|
|
73
|
+
obj['balance'] = _Balance["default"].constructFromObject(data['balance']);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
return obj;
|
|
@@ -106,8 +106,8 @@ var TokenBalance = /*#__PURE__*/function () {
|
|
|
106
106
|
// validate the optional field `balance`
|
|
107
107
|
if (data['balance']) {
|
|
108
108
|
// data not null
|
|
109
|
-
if (!!
|
|
110
|
-
|
|
109
|
+
if (!!_Balance["default"].validateJSON) {
|
|
110
|
+
_Balance["default"].validateJSON(data['balance']);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return true;
|
|
@@ -123,7 +123,7 @@ TokenBalance.RequiredProperties = ["token_id", "balance"];
|
|
|
123
123
|
TokenBalance.prototype['token_id'] = undefined;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* @member {module:model/
|
|
126
|
+
* @member {module:model/Balance} balance
|
|
127
127
|
*/
|
|
128
128
|
TokenBalance.prototype['balance'] = undefined;
|
|
129
129
|
var _default = exports["default"] = TokenBalance;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _TransactionDepositToAddressDestinationTxInfo = _interopRequireDefault(require("./TransactionDepositToAddressDestinationTxInfo"));
|
|
8
9
|
var _TransactionDestinationType = _interopRequireDefault(require("./TransactionDestinationType"));
|
|
9
10
|
var _WalletSubtype = _interopRequireDefault(require("./WalletSubtype"));
|
|
10
11
|
var _WalletType = _interopRequireDefault(require("./WalletType"));
|
|
@@ -95,6 +96,9 @@ var TransactionDepositToAddressDestination = /*#__PURE__*/function () {
|
|
|
95
96
|
if (data.hasOwnProperty('amount')) {
|
|
96
97
|
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
97
98
|
}
|
|
99
|
+
if (data.hasOwnProperty('tx_info')) {
|
|
100
|
+
obj['tx_info'] = _TransactionDepositToAddressDestinationTxInfo["default"].constructFromObject(data['tx_info']);
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
return obj;
|
|
100
104
|
}
|
|
@@ -138,6 +142,13 @@ var TransactionDepositToAddressDestination = /*#__PURE__*/function () {
|
|
|
138
142
|
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
139
143
|
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
140
144
|
}
|
|
145
|
+
// validate the optional field `tx_info`
|
|
146
|
+
if (data['tx_info']) {
|
|
147
|
+
// data not null
|
|
148
|
+
if (!!_TransactionDepositToAddressDestinationTxInfo["default"].validateJSON) {
|
|
149
|
+
_TransactionDepositToAddressDestinationTxInfo["default"].validateJSON(data['tx_info']);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
141
152
|
return true;
|
|
142
153
|
}
|
|
143
154
|
}]);
|
|
@@ -182,4 +193,9 @@ TransactionDepositToAddressDestination.prototype['memo'] = undefined;
|
|
|
182
193
|
* @member {String} amount
|
|
183
194
|
*/
|
|
184
195
|
TransactionDepositToAddressDestination.prototype['amount'] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @member {module:model/TransactionDepositToAddressDestinationTxInfo} tx_info
|
|
199
|
+
*/
|
|
200
|
+
TransactionDepositToAddressDestination.prototype['tx_info'] = undefined;
|
|
185
201
|
var _default = exports["default"] = TransactionDepositToAddressDestination;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 TransactionDepositToAddressDestinationTxInfo model module.
|
|
26
|
+
* @module model/TransactionDepositToAddressDestinationTxInfo
|
|
27
|
+
*/
|
|
28
|
+
var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>TransactionDepositToAddressDestinationTxInfo</code>.
|
|
31
|
+
* @alias module:model/TransactionDepositToAddressDestinationTxInfo
|
|
32
|
+
*/
|
|
33
|
+
function TransactionDepositToAddressDestinationTxInfo() {
|
|
34
|
+
_classCallCheck(this, TransactionDepositToAddressDestinationTxInfo);
|
|
35
|
+
TransactionDepositToAddressDestinationTxInfo.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(TransactionDepositToAddressDestinationTxInfo, null, [{
|
|
44
|
+
key: "initialize",
|
|
45
|
+
value: function initialize(obj) {}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>TransactionDepositToAddressDestinationTxInfo</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/TransactionDepositToAddressDestinationTxInfo} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/TransactionDepositToAddressDestinationTxInfo} The populated <code>TransactionDepositToAddressDestinationTxInfo</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new TransactionDepositToAddressDestinationTxInfo();
|
|
59
|
+
if (data.hasOwnProperty('vout_n')) {
|
|
60
|
+
obj['vout_n'] = _ApiClient["default"].convertToType(data['vout_n'], 'Number');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Validates the JSON data with respect to <code>TransactionDepositToAddressDestinationTxInfo</code>.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TransactionDepositToAddressDestinationTxInfo</code>.
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "validateJSON",
|
|
73
|
+
value: function validateJSON(data) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
}]);
|
|
77
|
+
}();
|
|
78
|
+
/**
|
|
79
|
+
* The output index of the UTXO.
|
|
80
|
+
* @member {Number} vout_n
|
|
81
|
+
*/
|
|
82
|
+
TransactionDepositToAddressDestinationTxInfo.prototype['vout_n'] = undefined;
|
|
83
|
+
var _default = exports["default"] = TransactionDepositToAddressDestinationTxInfo;
|
|
@@ -7,6 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ExchangeId = _interopRequireDefault(require("./ExchangeId"));
|
|
9
9
|
var _TransactionDepositToAddressDestination = _interopRequireDefault(require("./TransactionDepositToAddressDestination"));
|
|
10
|
+
var _TransactionDepositToAddressDestinationTxInfo = _interopRequireDefault(require("./TransactionDepositToAddressDestinationTxInfo"));
|
|
10
11
|
var _TransactionDepositToWalletDestination = _interopRequireDefault(require("./TransactionDepositToWalletDestination"));
|
|
11
12
|
var _TransactionDestinationType = _interopRequireDefault(require("./TransactionDestinationType"));
|
|
12
13
|
var _TransactionEvmCalldataInfo = _interopRequireDefault(require("./TransactionEvmCalldataInfo"));
|
|
@@ -91,14 +92,14 @@ var TransactionDestination = /*#__PURE__*/function () {
|
|
|
91
92
|
this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
|
|
92
93
|
match++;
|
|
93
94
|
break;
|
|
94
|
-
case "EVM_Raw_Message_Signature":
|
|
95
|
-
this.actualInstance = _TransactionRawMessageSignDestination["default"].constructFromObject(instance);
|
|
96
|
-
match++;
|
|
97
|
-
break;
|
|
98
95
|
case "ExchangeWallet":
|
|
99
96
|
this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
|
|
100
97
|
match++;
|
|
101
98
|
break;
|
|
99
|
+
case "Raw_Message_Signature":
|
|
100
|
+
this.actualInstance = _TransactionRawMessageSignDestination["default"].constructFromObject(instance);
|
|
101
|
+
match++;
|
|
102
|
+
break;
|
|
102
103
|
default:
|
|
103
104
|
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
104
105
|
break;
|
|
@@ -458,5 +459,10 @@ TransactionDestination.prototype['wallet_subtype'] = undefined;
|
|
|
458
459
|
* @member {String} memo
|
|
459
460
|
*/
|
|
460
461
|
TransactionDestination.prototype['memo'] = undefined;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* @member {module:model/TransactionDepositToAddressDestinationTxInfo} tx_info
|
|
465
|
+
*/
|
|
466
|
+
TransactionDestination.prototype['tx_info'] = undefined;
|
|
461
467
|
TransactionDestination.OneOf = ["TransactionDepositToAddressDestination", "TransactionDepositToWalletDestination", "TransactionEvmContractDestination", "TransactionMessageSignEIP191Destination", "TransactionMessageSignEIP712Destination", "TransactionRawMessageSignDestination", "TransactionTransferToAddressDestination", "TransactionTransferToWalletDestination"];
|
|
462
468
|
var _default = exports["default"] = TransactionDestination;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _TransactionSelectedUtxo = _interopRequireDefault(require("./TransactionSelectedUtxo"));
|
|
9
|
+
var _TransactionUtxoChange = _interopRequireDefault(require("./TransactionUtxoChange"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
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
12
|
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; } } }; }
|
|
@@ -70,6 +71,12 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
|
|
|
70
71
|
if (data.hasOwnProperty('raw_tx')) {
|
|
71
72
|
obj['raw_tx'] = _ApiClient["default"].convertToType(data['raw_tx'], 'String');
|
|
72
73
|
}
|
|
74
|
+
if (data.hasOwnProperty('unsigned_raw_tx')) {
|
|
75
|
+
obj['unsigned_raw_tx'] = _ApiClient["default"].convertToType(data['unsigned_raw_tx'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('utxo_change')) {
|
|
78
|
+
obj['utxo_change'] = _TransactionUtxoChange["default"].constructFromObject(data['utxo_change']);
|
|
79
|
+
}
|
|
73
80
|
}
|
|
74
81
|
return obj;
|
|
75
82
|
}
|
|
@@ -107,6 +114,17 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
|
|
|
107
114
|
if (data['raw_tx'] && !(typeof data['raw_tx'] === 'string' || data['raw_tx'] instanceof String)) {
|
|
108
115
|
throw new Error("Expected the field `raw_tx` to be a primitive type in the JSON string but got " + data['raw_tx']);
|
|
109
116
|
}
|
|
117
|
+
// ensure the json data is a string
|
|
118
|
+
if (data['unsigned_raw_tx'] && !(typeof data['unsigned_raw_tx'] === 'string' || data['unsigned_raw_tx'] instanceof String)) {
|
|
119
|
+
throw new Error("Expected the field `unsigned_raw_tx` to be a primitive type in the JSON string but got " + data['unsigned_raw_tx']);
|
|
120
|
+
}
|
|
121
|
+
// validate the optional field `utxo_change`
|
|
122
|
+
if (data['utxo_change']) {
|
|
123
|
+
// data not null
|
|
124
|
+
if (!!_TransactionUtxoChange["default"].validateJSON) {
|
|
125
|
+
_TransactionUtxoChange["default"].validateJSON(data['utxo_change']);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
110
128
|
return true;
|
|
111
129
|
}
|
|
112
130
|
}]);
|
|
@@ -128,4 +146,15 @@ TransactionRawTxInfo.prototype['selected_utxos'] = undefined;
|
|
|
128
146
|
* @member {String} raw_tx
|
|
129
147
|
*/
|
|
130
148
|
TransactionRawTxInfo.prototype['raw_tx'] = undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The unsigned raw transaction data.
|
|
152
|
+
* @member {String} unsigned_raw_tx
|
|
153
|
+
*/
|
|
154
|
+
TransactionRawTxInfo.prototype['unsigned_raw_tx'] = undefined;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @member {module:model/TransactionUtxoChange} utxo_change
|
|
158
|
+
*/
|
|
159
|
+
TransactionRawTxInfo.prototype['utxo_change'] = undefined;
|
|
131
160
|
var _default = exports["default"] = TransactionRawTxInfo;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _MpcSigningGroup = _interopRequireDefault(require("./MpcSigningGroup"));
|
|
8
9
|
var _MpcTransferSource = _interopRequireDefault(require("./MpcTransferSource"));
|
|
9
10
|
var _TransactionUtxo = _interopRequireDefault(require("./TransactionUtxo"));
|
|
10
11
|
var _WalletSubtype = _interopRequireDefault(require("./WalletSubtype"));
|
|
@@ -175,5 +176,10 @@ TransactionRbfSource.prototype['included_utxos'] = undefined;
|
|
|
175
176
|
* @member {Array.<module:model/TransactionUtxo>} excluded_utxos
|
|
176
177
|
*/
|
|
177
178
|
TransactionRbfSource.prototype['excluded_utxos'] = undefined;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @member {module:model/MpcSigningGroup} mpc_used_key_share_holder_group
|
|
182
|
+
*/
|
|
183
|
+
TransactionRbfSource.prototype['mpc_used_key_share_holder_group'] = undefined;
|
|
178
184
|
TransactionRbfSource.OneOf = ["MpcTransferSource"];
|
|
179
185
|
var _default = exports["default"] = TransactionRbfSource;
|
|
@@ -90,6 +90,11 @@ var TransactionSubStatus = exports["default"] = /*#__PURE__*/function () {
|
|
|
90
90
|
* @const
|
|
91
91
|
*/
|
|
92
92
|
_defineProperty(this, "RejectedbyMobileCosigner", "RejectedbyMobileCosigner");
|
|
93
|
+
/**
|
|
94
|
+
* value: "Built"
|
|
95
|
+
* @const
|
|
96
|
+
*/
|
|
97
|
+
_defineProperty(this, "Built", "Built");
|
|
93
98
|
/**
|
|
94
99
|
* value: "PendingWaitSigner"
|
|
95
100
|
* @const
|
|
@@ -120,7 +120,7 @@ var TransactionUserApprovalDetail = /*#__PURE__*/function () {
|
|
|
120
120
|
}]);
|
|
121
121
|
}();
|
|
122
122
|
/**
|
|
123
|
-
* The
|
|
123
|
+
* The Cobo Guard public key of the user who audited this message.
|
|
124
124
|
* @member {String} pubkey
|
|
125
125
|
*/
|
|
126
126
|
TransactionUserApprovalDetail.prototype['pubkey'] = undefined;
|
|
@@ -131,7 +131,7 @@ TransactionUserApprovalDetail.prototype['pubkey'] = undefined;
|
|
|
131
131
|
TransactionUserApprovalDetail.prototype['result'] = undefined;
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
134
|
+
* The signature of the audited message.
|
|
135
135
|
* @member {String} signature
|
|
136
136
|
*/
|
|
137
137
|
TransactionUserApprovalDetail.prototype['signature'] = undefined;
|
|
@@ -143,7 +143,7 @@ TransactionUserApprovalDetail.prototype['signature'] = undefined;
|
|
|
143
143
|
TransactionUserApprovalDetail.prototype['language'] = undefined;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
*
|
|
146
|
+
* The version of the audited message.
|
|
147
147
|
* @member {String} message_version
|
|
148
148
|
*/
|
|
149
149
|
TransactionUserApprovalDetail.prototype['message_version'] = undefined;
|