@cobo/cobo-waas2 1.4.0 → 1.6.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.
Files changed (180) hide show
  1. package/README.md +32 -10
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/ServerDemo.js +80 -0
  4. package/dist/api/AddressBooksApi.js +105 -0
  5. package/dist/api/DevelopersApi.js +79 -0
  6. package/dist/api/DevelopersWebhooksApi.js +43 -0
  7. package/dist/api/OAuthApi.js +10 -10
  8. package/dist/api/TransactionsApi.js +12 -12
  9. package/dist/api/WalletsApi.js +60 -59
  10. package/dist/api/WalletsExchangeWalletApi.js +4 -4
  11. package/dist/api/WalletsMPCWalletsApi.js +8 -8
  12. package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
  13. package/dist/index.js +181 -34
  14. package/dist/model/AddressBook.js +25 -10
  15. package/dist/model/AddressTransferDestination.js +2 -2
  16. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
  17. package/dist/model/ApiLogDetails.js +238 -0
  18. package/dist/model/ApiLogSummary.js +161 -0
  19. package/dist/model/BabylonStakeEstimatedFee.js +118 -0
  20. package/dist/model/BabylonValidator.js +5 -0
  21. package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
  22. package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
  23. package/dist/model/CoboSafeDelegate.js +2 -2
  24. package/dist/model/CreateSmartContractWalletParams.js +1 -1
  25. package/dist/model/CreateStakeActivityExtra.js +42 -8
  26. package/dist/model/CreateUnstakeActivity.js +16 -0
  27. package/dist/model/CreateUnstakeActivityExtra.js +159 -0
  28. package/dist/model/CreateUnstakeActivityRequest.js +20 -0
  29. package/dist/model/ErrorResponse.js +2 -2
  30. package/dist/model/EstimateContractCallFeeParams.js +5 -7
  31. package/dist/model/EstimateFeeParams.js +1 -1
  32. package/dist/model/EstimateTransferFeeParams.js +5 -9
  33. package/dist/model/EstimateUnstakeFee.js +20 -0
  34. package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
  35. package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
  36. package/dist/model/EstimatedFee.js +1 -1
  37. package/dist/model/EstimatedFixedFee.js +1 -1
  38. package/dist/model/EthStakeEstimatedFee.js +112 -0
  39. package/dist/model/EthStakeExtra.js +131 -0
  40. package/dist/model/EthStakingExtra.js +131 -0
  41. package/dist/model/EthUnstakeExtra.js +131 -0
  42. package/dist/model/ExchangeId.js +10 -0
  43. package/dist/model/ExtendedTokenInfo.js +17 -4
  44. package/dist/model/FeeGasLimit.js +1 -2
  45. package/dist/model/GetApiKeyInfo200Response.js +251 -0
  46. package/dist/model/GetStakingEstimationFee201Response.js +144 -43
  47. package/dist/model/GetStakingEstimationFeeRequest.js +2 -2
  48. package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
  49. package/dist/model/GetToken4XXResponse.js +12 -10
  50. package/dist/model/ListAddressBooks200Response.js +123 -0
  51. package/dist/model/MPCDelegate.js +5 -5
  52. package/dist/model/MpcTransferSource.js +2 -2
  53. package/dist/model/{RefreshToken200Response.js → RefreshToken2XXResponse.js} +21 -21
  54. package/dist/model/{WalletBalanceSnapshot.js → RoleScopes.js} +42 -34
  55. package/dist/model/SafeWalletDelegates.js +210 -0
  56. package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
  57. package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
  58. package/dist/model/Scopes.js +142 -0
  59. package/dist/model/SmartContractWalletInfo.js +1 -1
  60. package/dist/model/StakingPoolType.js +5 -0
  61. package/dist/model/StakingsExtra.js +36 -8
  62. package/dist/model/TokenAssetModelType.js +61 -0
  63. package/dist/model/TokenBalanceBalance.js +6 -6
  64. package/dist/model/TokenInfo.js +11 -2
  65. package/dist/model/Transaction.js +1 -1
  66. package/dist/model/TransactionDestination.js +50 -10
  67. package/dist/model/TransactionDestinationType.js +5 -0
  68. package/dist/model/TransactionDetail.js +2 -2
  69. package/dist/model/TransactionDetails.js +2 -2
  70. package/dist/model/TransactionEvmCalldataInfo.js +177 -0
  71. package/dist/model/TransactionEvmContractDestination.js +16 -0
  72. package/dist/model/TransactionEvmContractMethod.js +136 -0
  73. package/dist/model/TransactionEvmEip1559Fee.js +2 -4
  74. package/dist/model/TransactionEvmLegacyFee.js +2 -4
  75. package/dist/model/TransactionFee.js +1 -2
  76. package/dist/model/TransactionRawMessageSignDestination.js +120 -0
  77. package/dist/model/TransactionRbfSource.js +1 -1
  78. package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -2
  79. package/dist/model/TransactionRequestEvmLegacyFee.js +1 -2
  80. package/dist/model/TransactionRequestFee.js +1 -2
  81. package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
  82. package/dist/model/TransactionSource.js +1 -1
  83. package/dist/model/TransactionTokeApproval.js +17 -4
  84. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  85. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
  86. package/dist/model/TransactionWebhookEventData.js +2 -2
  87. package/dist/model/TransferDestination.js +2 -2
  88. package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
  89. package/dist/model/TriggerTestWebhookEventRequest.js +115 -0
  90. package/dist/model/WebhookEventData.js +1 -1
  91. package/docs/AddressBook.md +8 -7
  92. package/docs/AddressBooksApi.md +71 -0
  93. package/docs/AddressTransferDestination.md +2 -2
  94. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
  95. package/docs/ApiLogDetails.md +18 -0
  96. package/docs/ApiLogSummary.md +13 -0
  97. package/docs/BabylonStakeEstimatedFee.md +12 -0
  98. package/docs/BabylonValidator.md +2 -0
  99. package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
  100. package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
  101. package/docs/CoboSafeDelegate.md +2 -2
  102. package/docs/CreateStakeActivityExtra.md +1 -0
  103. package/docs/CreateUnstakeActivity.md +1 -0
  104. package/docs/CreateUnstakeActivityExtra.md +10 -0
  105. package/docs/CreateUnstakeActivityRequest.md +1 -0
  106. package/docs/DevelopersApi.md +55 -0
  107. package/docs/DevelopersWebhooksApi.md +53 -0
  108. package/docs/ErrorResponse.md +1 -1
  109. package/docs/EstimateContractCallFeeParams.md +1 -1
  110. package/docs/EstimateFeeParams.md +1 -1
  111. package/docs/EstimateTransferFeeParams.md +2 -2
  112. package/docs/EstimateUnstakeFee.md +1 -0
  113. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
  114. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
  115. package/docs/EstimatedFee.md +1 -1
  116. package/docs/EstimatedFixedFee.md +1 -1
  117. package/docs/EthStakeEstimatedFee.md +11 -0
  118. package/docs/EthStakeExtra.md +10 -0
  119. package/docs/EthStakingExtra.md +10 -0
  120. package/docs/EthUnstakeExtra.md +10 -0
  121. package/docs/ExchangeId.md +4 -0
  122. package/docs/ExtendedTokenInfo.md +3 -2
  123. package/docs/FeeGasLimit.md +1 -1
  124. package/docs/GetApiKeyInfo200Response.md +30 -0
  125. package/docs/GetStakingEstimationFee201Response.md +3 -0
  126. package/docs/GetStakingEstimationFeeRequest.md +1 -1
  127. package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
  128. package/docs/GetToken4XXResponse.md +1 -1
  129. package/docs/ListAddressBooks200Response.md +10 -0
  130. package/docs/MPCDelegate.md +2 -2
  131. package/docs/MpcTransferSource.md +1 -1
  132. package/docs/OAuthApi.md +5 -5
  133. package/docs/PoolDetailsAllOfValidatorsInfo.md +2 -0
  134. package/docs/{RefreshToken200Response.md → RefreshToken2XXResponse.md} +1 -1
  135. package/docs/RoleScopes.md +10 -0
  136. package/docs/SafeWalletDelegates.md +14 -0
  137. package/docs/SafeWalletDelegatesContractCall.md +12 -0
  138. package/docs/SafeWalletDelegatesTransfer.md +12 -0
  139. package/docs/Scopes.md +13 -0
  140. package/docs/StakingPoolType.md +2 -0
  141. package/docs/TokenAssetModelType.md +12 -0
  142. package/docs/TokenBalanceBalance.md +4 -4
  143. package/docs/TokenInfo.md +3 -2
  144. package/docs/Transaction.md +1 -1
  145. package/docs/TransactionDestination.md +4 -2
  146. package/docs/TransactionDestinationType.md +2 -0
  147. package/docs/TransactionDetail.md +1 -1
  148. package/docs/TransactionDetails.md +1 -1
  149. package/docs/TransactionEvmCalldataInfo.md +16 -0
  150. package/docs/TransactionEvmContractDestination.md +1 -0
  151. package/docs/TransactionEvmContractMethod.md +13 -0
  152. package/docs/TransactionEvmEip1559Fee.md +1 -1
  153. package/docs/TransactionEvmLegacyFee.md +1 -1
  154. package/docs/TransactionFee.md +1 -1
  155. package/docs/TransactionRawMessageSignDestination.md +10 -0
  156. package/docs/TransactionRbfSource.md +1 -1
  157. package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
  158. package/docs/TransactionRequestEvmLegacyFee.md +1 -1
  159. package/docs/TransactionRequestFee.md +1 -1
  160. package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
  161. package/docs/TransactionSource.md +1 -1
  162. package/docs/TransactionTokeApproval.md +3 -2
  163. package/docs/TransactionTransferToAddressDestination.md +2 -2
  164. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
  165. package/docs/TransactionWebhookEventData.md +1 -1
  166. package/docs/TransactionsApi.md +7 -7
  167. package/docs/TransferDestination.md +2 -2
  168. package/docs/TriggerTestWebhookEvent201Response.md +9 -0
  169. package/docs/TriggerTestWebhookEventRequest.md +10 -0
  170. package/docs/WalletsApi.md +55 -55
  171. package/docs/WalletsExchangeWalletApi.md +2 -2
  172. package/docs/WalletsMPCWalletsApi.md +4 -4
  173. package/docs/WalletsSmartContractWalletsApi.md +63 -0
  174. package/docs/WebhookEventData.md +1 -1
  175. package/package.json +3 -2
  176. package/dist/model/BookkeepingRecord.js +0 -243
  177. package/docs/BookkeepingRecord.md +0 -19
  178. package/docs/BookkeepingSummary.md +0 -12
  179. package/docs/WalletBalanceSnapshot.md +0 -10
  180. package/docs/WalletBalanceSnapshotRecord.md +0 -13
@@ -34,10 +34,11 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
34
34
  * The response of a failed request.
35
35
  * @alias module:model/GetToken4XXResponse
36
36
  * @param error {String} The error name.
37
+ * @param error_description {String} The error description.
37
38
  */
38
- function GetToken4XXResponse(error) {
39
+ function GetToken4XXResponse(error, error_description) {
39
40
  _classCallCheck(this, GetToken4XXResponse);
40
- GetToken4XXResponse.initialize(this, error);
41
+ GetToken4XXResponse.initialize(this, error, error_description);
41
42
  }
42
43
 
43
44
  /**
@@ -47,8 +48,9 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
47
48
  */
48
49
  return _createClass(GetToken4XXResponse, null, [{
49
50
  key: "initialize",
50
- value: function initialize(obj, error) {
51
+ value: function initialize(obj, error, error_description) {
51
52
  obj['error'] = error;
53
+ obj['error_description'] = error_description;
52
54
  }
53
55
 
54
56
  /**
@@ -66,8 +68,8 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
66
68
  if (data.hasOwnProperty('error')) {
67
69
  obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
68
70
  }
69
- if (data.hasOwnProperty('error_message')) {
70
- obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
71
+ if (data.hasOwnProperty('error_description')) {
72
+ obj['error_description'] = _ApiClient["default"].convertToType(data['error_description'], 'String');
71
73
  }
72
74
  }
73
75
  return obj;
@@ -101,14 +103,14 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
101
103
  throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
102
104
  }
103
105
  // ensure the json data is a string
104
- if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
105
- throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
106
+ if (data['error_description'] && !(typeof data['error_description'] === 'string' || data['error_description'] instanceof String)) {
107
+ throw new Error("Expected the field `error_description` to be a primitive type in the JSON string but got " + data['error_description']);
106
108
  }
107
109
  return true;
108
110
  }
109
111
  }]);
110
112
  }();
111
- GetToken4XXResponse.RequiredProperties = ["error"];
113
+ GetToken4XXResponse.RequiredProperties = ["error", "error_description"];
112
114
 
113
115
  /**
114
116
  * The error name.
@@ -118,7 +120,7 @@ GetToken4XXResponse.prototype['error'] = undefined;
118
120
 
119
121
  /**
120
122
  * The error description.
121
- * @member {String} error_message
123
+ * @member {String} error_description
122
124
  */
123
- GetToken4XXResponse.prototype['error_message'] = undefined;
125
+ GetToken4XXResponse.prototype['error_description'] = undefined;
124
126
  var _default = exports["default"] = GetToken4XXResponse;
@@ -0,0 +1,123 @@
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 _AddressBook = _interopRequireDefault(require("./AddressBook"));
9
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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); }
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; } } }; }
13
+ 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; } }
14
+ 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; }
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 ListAddressBooks200Response model module.
31
+ * @module model/ListAddressBooks200Response
32
+ */
33
+ var ListAddressBooks200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListAddressBooks200Response</code>.
36
+ * @alias module:model/ListAddressBooks200Response
37
+ */
38
+ function ListAddressBooks200Response() {
39
+ _classCallCheck(this, ListAddressBooks200Response);
40
+ ListAddressBooks200Response.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(ListAddressBooks200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListAddressBooks200Response</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/ListAddressBooks200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListAddressBooks200Response} The populated <code>ListAddressBooks200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListAddressBooks200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AddressBook["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListAddressBooks200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAddressBooks200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _AddressBook["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/AddressBook>} data
116
+ */
117
+ ListAddressBooks200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListAddressBooks200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListAddressBooks200Response;
@@ -32,11 +32,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
32
  var MPCDelegate = /*#__PURE__*/function () {
33
33
  /**
34
34
  * Constructs a new <code>MPCDelegate</code>.
35
- * The information about the MPC Wallet as the Delegate.
35
+ * The information about the MPC Wallet as the Delegate. You can call the [List Delegates](/v2/api-references/wallets--smart-contract-wallets/list-delegates) operation to retrieve the applicable Delegates.
36
36
  * @alias module:model/MPCDelegate
37
37
  * @param delegate_type {module:model/CoboSafeDelegateType}
38
- * @param wallet_id {String} The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
39
- * @param address {String} The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
38
+ * @param wallet_id {String} The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
39
+ * @param address {String} The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
40
40
  */
41
41
  function MPCDelegate(delegate_type, wallet_id, address) {
42
42
  _classCallCheck(this, MPCDelegate);
@@ -124,13 +124,13 @@ MPCDelegate.RequiredProperties = ["delegate_type", "wallet_id", "address"];
124
124
  MPCDelegate.prototype['delegate_type'] = undefined;
125
125
 
126
126
  /**
127
- * The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
127
+ * The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
128
128
  * @member {String} wallet_id
129
129
  */
130
130
  MPCDelegate.prototype['wallet_id'] = undefined;
131
131
 
132
132
  /**
133
- * The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
133
+ * The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
134
134
  * @member {String} address
135
135
  */
136
136
  MPCDelegate.prototype['address'] = undefined;
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
33
33
  var MpcTransferSource = /*#__PURE__*/function () {
34
34
  /**
35
35
  * Constructs a new <code>MpcTransferSource</code>.
36
- * The information about the transaction source types &#x60;Org-Controlled&#x60; and &#x60;User-Controlled&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. If you specify both the &#x60;address&#x60; or &#x60;included_utxos&#x60; properties, the specified included UTXOs must belong to the address. Switch between the tabs to display the properties for different transaction sources.
36
+ * The information about the transaction source types &#x60;Org-Controlled&#x60; and &#x60;User-Controlled&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. You need to provide either the &#x60;address&#x60; or &#x60;included_utxos&#x60; property. If neither property is provided, the transfer will fail. Switch between the tabs to display the properties for different transaction sources.
37
37
  * @alias module:model/MpcTransferSource
38
38
  * @param source_type {module:model/WalletSubtype}
39
39
  * @param wallet_id {String} The wallet ID.
@@ -177,7 +177,7 @@ MpcTransferSource.prototype['source_type'] = undefined;
177
177
  MpcTransferSource.prototype['wallet_id'] = undefined;
178
178
 
179
179
  /**
180
- * The wallet address.
180
+ * The wallet address. If you want to specify the UTXOs to be used, please provide the `included_utxos` property. If you specify both the `address` and `included_utxos` properties, the specified included UTXOs must belong to the address. You need to provide either the `address` or `included_utxos` property. If neither property is provided, the transfer will fail.
181
181
  * @member {String} address
182
182
  */
183
183
  MpcTransferSource.prototype['address'] = undefined;
@@ -22,17 +22,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
22
22
  *
23
23
  */
24
24
  /**
25
- * The RefreshToken200Response model module.
26
- * @module model/RefreshToken200Response
25
+ * The RefreshToken2XXResponse model module.
26
+ * @module model/RefreshToken2XXResponse
27
27
  */
28
- var RefreshToken200Response = /*#__PURE__*/function () {
28
+ var RefreshToken2XXResponse = /*#__PURE__*/function () {
29
29
  /**
30
- * Constructs a new <code>RefreshToken200Response</code>.
31
- * @alias module:model/RefreshToken200Response
30
+ * Constructs a new <code>RefreshToken2XXResponse</code>.
31
+ * @alias module:model/RefreshToken2XXResponse
32
32
  */
33
- function RefreshToken200Response() {
34
- _classCallCheck(this, RefreshToken200Response);
35
- RefreshToken200Response.initialize(this);
33
+ function RefreshToken2XXResponse() {
34
+ _classCallCheck(this, RefreshToken2XXResponse);
35
+ RefreshToken2XXResponse.initialize(this);
36
36
  }
37
37
 
38
38
  /**
@@ -40,22 +40,22 @@ var RefreshToken200Response = /*#__PURE__*/function () {
40
40
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
41
  * Only for internal use.
42
42
  */
43
- return _createClass(RefreshToken200Response, null, [{
43
+ return _createClass(RefreshToken2XXResponse, null, [{
44
44
  key: "initialize",
45
45
  value: function initialize(obj) {}
46
46
 
47
47
  /**
48
- * Constructs a <code>RefreshToken200Response</code> from a plain JavaScript object, optionally creating a new instance.
48
+ * Constructs a <code>RefreshToken2XXResponse</code> from a plain JavaScript object, optionally creating a new instance.
49
49
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
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.
51
+ * @param {module:model/RefreshToken2XXResponse} obj Optional instance to populate.
52
+ * @return {module:model/RefreshToken2XXResponse} The populated <code>RefreshToken2XXResponse</code> instance.
53
53
  */
54
54
  }, {
55
55
  key: "constructFromObject",
56
56
  value: function constructFromObject(data, obj) {
57
57
  if (data) {
58
- obj = obj || new RefreshToken200Response();
58
+ obj = obj || new RefreshToken2XXResponse();
59
59
  if (data.hasOwnProperty('access_token')) {
60
60
  obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
61
61
  }
@@ -76,9 +76,9 @@ var RefreshToken200Response = /*#__PURE__*/function () {
76
76
  }
77
77
 
78
78
  /**
79
- * Validates the JSON data with respect to <code>RefreshToken200Response</code>.
79
+ * Validates the JSON data with respect to <code>RefreshToken2XXResponse</code>.
80
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>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RefreshToken2XXResponse</code>.
82
82
  */
83
83
  }, {
84
84
  key: "validateJSON",
@@ -107,29 +107,29 @@ var RefreshToken200Response = /*#__PURE__*/function () {
107
107
  * The new Org Access Token.
108
108
  * @member {String} access_token
109
109
  */
110
- RefreshToken200Response.prototype['access_token'] = undefined;
110
+ RefreshToken2XXResponse.prototype['access_token'] = undefined;
111
111
 
112
112
  /**
113
113
  * The type of the tokens, which is Bearer.
114
114
  * @member {String} token_type
115
115
  */
116
- RefreshToken200Response.prototype['token_type'] = undefined;
116
+ RefreshToken2XXResponse.prototype['token_type'] = undefined;
117
117
 
118
118
  /**
119
119
  * The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app.
120
120
  * @member {String} scope
121
121
  */
122
- RefreshToken200Response.prototype['scope'] = undefined;
122
+ RefreshToken2XXResponse.prototype['scope'] = undefined;
123
123
 
124
124
  /**
125
125
  * The time in seconds in which the new Org Access Token expires.
126
126
  * @member {Number} expires_in
127
127
  */
128
- RefreshToken200Response.prototype['expires_in'] = undefined;
128
+ RefreshToken2XXResponse.prototype['expires_in'] = undefined;
129
129
 
130
130
  /**
131
131
  * The Refresh Token, used to obtain another Org Access Token when the new Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change.
132
132
  * @member {String} refresh_token
133
133
  */
134
- RefreshToken200Response.prototype['refresh_token'] = undefined;
135
- var _default = exports["default"] = RefreshToken200Response;
134
+ RefreshToken2XXResponse.prototype['refresh_token'] = undefined;
135
+ var _default = exports["default"] = RefreshToken2XXResponse;
@@ -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 _Scopes = _interopRequireDefault(require("./Scopes"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
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); }
10
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; } } }; }
@@ -25,19 +26,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
25
26
  *
26
27
  */
27
28
  /**
28
- * The WalletBalanceSnapshot model module.
29
- * @module model/WalletBalanceSnapshot
29
+ * The RoleScopes model module.
30
+ * @module model/RoleScopes
30
31
  */
31
- var WalletBalanceSnapshot = /*#__PURE__*/function () {
32
+ var RoleScopes = /*#__PURE__*/function () {
32
33
  /**
33
- * Constructs a new <code>WalletBalanceSnapshot</code>.
34
- * The snapshot information.
35
- * @alias module:model/WalletBalanceSnapshot
36
- * @param snapshot_id {Number} The snapshot ID.
34
+ * Constructs a new <code>RoleScopes</code>.
35
+ * @alias module:model/RoleScopes
36
+ * @param role_name {String} The user role associated with this API key.
37
+ * @param scopes {module:model/Scopes}
37
38
  */
38
- function WalletBalanceSnapshot(snapshot_id) {
39
- _classCallCheck(this, WalletBalanceSnapshot);
40
- WalletBalanceSnapshot.initialize(this, snapshot_id);
39
+ function RoleScopes(role_name, scopes) {
40
+ _classCallCheck(this, RoleScopes);
41
+ RoleScopes.initialize(this, role_name, scopes);
41
42
  }
42
43
 
43
44
  /**
@@ -45,44 +46,45 @@ var WalletBalanceSnapshot = /*#__PURE__*/function () {
45
46
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
47
  * Only for internal use.
47
48
  */
48
- return _createClass(WalletBalanceSnapshot, null, [{
49
+ return _createClass(RoleScopes, null, [{
49
50
  key: "initialize",
50
- value: function initialize(obj, snapshot_id) {
51
- obj['snapshot_id'] = snapshot_id;
51
+ value: function initialize(obj, role_name, scopes) {
52
+ obj['role_name'] = role_name;
53
+ obj['scopes'] = scopes;
52
54
  }
53
55
 
54
56
  /**
55
- * Constructs a <code>WalletBalanceSnapshot</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Constructs a <code>RoleScopes</code> from a plain JavaScript object, optionally creating a new instance.
56
58
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
59
  * @param {Object} data The plain JavaScript object bearing properties of interest.
58
- * @param {module:model/WalletBalanceSnapshot} obj Optional instance to populate.
59
- * @return {module:model/WalletBalanceSnapshot} The populated <code>WalletBalanceSnapshot</code> instance.
60
+ * @param {module:model/RoleScopes} obj Optional instance to populate.
61
+ * @return {module:model/RoleScopes} The populated <code>RoleScopes</code> instance.
60
62
  */
61
63
  }, {
62
64
  key: "constructFromObject",
63
65
  value: function constructFromObject(data, obj) {
64
66
  if (data) {
65
- obj = obj || new WalletBalanceSnapshot();
66
- if (data.hasOwnProperty('snapshot_id')) {
67
- obj['snapshot_id'] = _ApiClient["default"].convertToType(data['snapshot_id'], 'Number');
67
+ obj = obj || new RoleScopes();
68
+ if (data.hasOwnProperty('role_name')) {
69
+ obj['role_name'] = _ApiClient["default"].convertToType(data['role_name'], 'String');
68
70
  }
69
- if (data.hasOwnProperty('snapshot_name')) {
70
- obj['snapshot_name'] = _ApiClient["default"].convertToType(data['snapshot_name'], 'String');
71
+ if (data.hasOwnProperty('scopes')) {
72
+ obj['scopes'] = _Scopes["default"].constructFromObject(data['scopes']);
71
73
  }
72
74
  }
73
75
  return obj;
74
76
  }
75
77
 
76
78
  /**
77
- * Validates the JSON data with respect to <code>WalletBalanceSnapshot</code>.
79
+ * Validates the JSON data with respect to <code>RoleScopes</code>.
78
80
  * @param {Object} data The plain JavaScript object bearing properties of interest.
79
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>WalletBalanceSnapshot</code>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RoleScopes</code>.
80
82
  */
81
83
  }, {
82
84
  key: "validateJSON",
83
85
  value: function validateJSON(data) {
84
86
  // check to make sure all required properties are present in the JSON string
85
- var _iterator = _createForOfIteratorHelper(WalletBalanceSnapshot.RequiredProperties),
87
+ var _iterator = _createForOfIteratorHelper(RoleScopes.RequiredProperties),
86
88
  _step;
87
89
  try {
88
90
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -97,24 +99,30 @@ var WalletBalanceSnapshot = /*#__PURE__*/function () {
97
99
  } finally {
98
100
  _iterator.f();
99
101
  }
100
- if (data['snapshot_name'] && !(typeof data['snapshot_name'] === 'string' || data['snapshot_name'] instanceof String)) {
101
- throw new Error("Expected the field `snapshot_name` to be a primitive type in the JSON string but got " + data['snapshot_name']);
102
+ if (data['role_name'] && !(typeof data['role_name'] === 'string' || data['role_name'] instanceof String)) {
103
+ throw new Error("Expected the field `role_name` to be a primitive type in the JSON string but got " + data['role_name']);
104
+ }
105
+ // validate the optional field `scopes`
106
+ if (data['scopes']) {
107
+ // data not null
108
+ if (!!_Scopes["default"].validateJSON) {
109
+ _Scopes["default"].validateJSON(data['scopes']);
110
+ }
102
111
  }
103
112
  return true;
104
113
  }
105
114
  }]);
106
115
  }();
107
- WalletBalanceSnapshot.RequiredProperties = ["snapshot_id"];
116
+ RoleScopes.RequiredProperties = ["role_name", "scopes"];
108
117
 
109
118
  /**
110
- * The snapshot ID.
111
- * @member {Number} snapshot_id
119
+ * The user role associated with this API key.
120
+ * @member {String} role_name
112
121
  */
113
- WalletBalanceSnapshot.prototype['snapshot_id'] = undefined;
122
+ RoleScopes.prototype['role_name'] = undefined;
114
123
 
115
124
  /**
116
- * The snapshot name.
117
- * @member {String} snapshot_name
125
+ * @member {module:model/Scopes} scopes
118
126
  */
119
- WalletBalanceSnapshot.prototype['snapshot_name'] = undefined;
120
- var _default = exports["default"] = WalletBalanceSnapshot;
127
+ RoleScopes.prototype['scopes'] = undefined;
128
+ var _default = exports["default"] = RoleScopes;