@cobo/cobo-waas2 1.4.0 → 1.5.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 (106) hide show
  1. package/README.md +19 -8
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +105 -0
  4. package/dist/api/DevelopersWebhooksApi.js +43 -0
  5. package/dist/api/OAuthApi.js +6 -6
  6. package/dist/api/TransactionsApi.js +12 -12
  7. package/dist/api/WalletsApi.js +2 -2
  8. package/dist/api/WalletsExchangeWalletApi.js +4 -4
  9. package/dist/api/WalletsMPCWalletsApi.js +8 -8
  10. package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
  11. package/dist/index.js +101 -31
  12. package/dist/model/AddressBook.js +25 -10
  13. package/dist/model/AddressTransferDestination.js +2 -2
  14. package/dist/model/ApiLogDetails.js +238 -0
  15. package/dist/model/ApiLogSummary.js +161 -0
  16. package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
  17. package/dist/model/CoboSafeDelegate.js +2 -2
  18. package/dist/model/ErrorResponse.js +2 -2
  19. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  20. package/dist/model/EstimateFeeParams.js +1 -1
  21. package/dist/model/EstimateTransferFeeParams.js +2 -2
  22. package/dist/model/EstimatedFee.js +1 -1
  23. package/dist/model/EstimatedFixedFee.js +1 -1
  24. package/dist/model/ExchangeId.js +10 -0
  25. package/dist/model/ExtendedTokenInfo.js +17 -4
  26. package/dist/model/ListAddressBooks200Response.js +123 -0
  27. package/dist/model/MPCDelegate.js +4 -4
  28. package/dist/model/{RefreshToken200Response.js → RefreshToken201Response.js} +21 -21
  29. package/dist/model/SafeWalletDelegates.js +210 -0
  30. package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
  31. package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
  32. package/dist/model/TokenAssetModelType.js +61 -0
  33. package/dist/model/TokenBalanceBalance.js +6 -6
  34. package/dist/model/TokenInfo.js +11 -2
  35. package/dist/model/Transaction.js +1 -1
  36. package/dist/model/TransactionDestination.js +50 -10
  37. package/dist/model/TransactionDestinationType.js +5 -0
  38. package/dist/model/TransactionDetail.js +2 -2
  39. package/dist/model/TransactionDetails.js +2 -2
  40. package/dist/model/TransactionEvmCalldataInfo.js +177 -0
  41. package/dist/model/TransactionEvmContractDestination.js +16 -0
  42. package/dist/model/TransactionEvmContractMethod.js +136 -0
  43. package/dist/model/TransactionRawMessageSignDestination.js +120 -0
  44. package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
  45. package/dist/model/TransactionTokeApproval.js +17 -4
  46. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  47. package/dist/model/TransactionWebhookEventData.js +2 -2
  48. package/dist/model/TransferDestination.js +2 -2
  49. package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
  50. package/dist/model/{WalletBalanceSnapshot.js → TriggerTestWebhookEventRequest.js} +31 -36
  51. package/dist/model/WebhookEventData.js +1 -1
  52. package/docs/AddressBook.md +8 -7
  53. package/docs/AddressBooksApi.md +71 -0
  54. package/docs/AddressTransferDestination.md +2 -2
  55. package/docs/ApiLogDetails.md +18 -0
  56. package/docs/ApiLogSummary.md +13 -0
  57. package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
  58. package/docs/CoboSafeDelegate.md +2 -2
  59. package/docs/DevelopersWebhooksApi.md +53 -0
  60. package/docs/ErrorResponse.md +1 -1
  61. package/docs/EstimateContractCallFeeParams.md +1 -1
  62. package/docs/EstimateFeeParams.md +1 -1
  63. package/docs/EstimateTransferFeeParams.md +1 -1
  64. package/docs/EstimatedFee.md +1 -1
  65. package/docs/EstimatedFixedFee.md +1 -1
  66. package/docs/ExchangeId.md +4 -0
  67. package/docs/ExtendedTokenInfo.md +3 -2
  68. package/docs/ListAddressBooks200Response.md +10 -0
  69. package/docs/MPCDelegate.md +2 -2
  70. package/docs/OAuthApi.md +3 -3
  71. package/docs/{RefreshToken200Response.md → RefreshToken201Response.md} +1 -1
  72. package/docs/SafeWalletDelegates.md +14 -0
  73. package/docs/SafeWalletDelegatesContractCall.md +12 -0
  74. package/docs/SafeWalletDelegatesTransfer.md +12 -0
  75. package/docs/TokenAssetModelType.md +12 -0
  76. package/docs/TokenBalanceBalance.md +4 -4
  77. package/docs/TokenInfo.md +3 -2
  78. package/docs/Transaction.md +1 -1
  79. package/docs/TransactionDestination.md +4 -2
  80. package/docs/TransactionDestinationType.md +2 -0
  81. package/docs/TransactionDetail.md +1 -1
  82. package/docs/TransactionDetails.md +1 -1
  83. package/docs/TransactionEvmCalldataInfo.md +16 -0
  84. package/docs/TransactionEvmContractDestination.md +1 -0
  85. package/docs/TransactionEvmContractMethod.md +13 -0
  86. package/docs/TransactionRawMessageSignDestination.md +10 -0
  87. package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
  88. package/docs/TransactionSource.md +1 -1
  89. package/docs/TransactionTokeApproval.md +3 -2
  90. package/docs/TransactionTransferToAddressDestination.md +2 -2
  91. package/docs/TransactionWebhookEventData.md +1 -1
  92. package/docs/TransactionsApi.md +7 -7
  93. package/docs/TransferDestination.md +2 -2
  94. package/docs/TriggerTestWebhookEvent201Response.md +9 -0
  95. package/docs/TriggerTestWebhookEventRequest.md +10 -0
  96. package/docs/WalletsApi.md +1 -1
  97. package/docs/WalletsExchangeWalletApi.md +2 -2
  98. package/docs/WalletsMPCWalletsApi.md +4 -4
  99. package/docs/WalletsSmartContractWalletsApi.md +63 -0
  100. package/docs/WebhookEventData.md +1 -1
  101. package/package.json +2 -2
  102. package/dist/model/BookkeepingRecord.js +0 -243
  103. package/docs/BookkeepingRecord.md +0 -19
  104. package/docs/BookkeepingSummary.md +0 -12
  105. package/docs/WalletBalanceSnapshot.md +0 -10
  106. package/docs/WalletBalanceSnapshotRecord.md +0 -13
@@ -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 _WalletType = _interopRequireDefault(require("./WalletType"));
8
+ var _EstimateFeeRequestType = _interopRequireDefault(require("./EstimateFeeRequestType"));
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; } } }; }
@@ -26,21 +26,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  *
27
27
  */
28
28
  /**
29
- * The WalletBalanceSnapshotRecord model module.
30
- * @module model/WalletBalanceSnapshotRecord
29
+ * The SafeWalletDelegatesTransfer model module.
30
+ * @module model/SafeWalletDelegatesTransfer
31
31
  */
32
- var WalletBalanceSnapshotRecord = /*#__PURE__*/function () {
32
+ var SafeWalletDelegatesTransfer = /*#__PURE__*/function () {
33
33
  /**
34
- * Constructs a new <code>WalletBalanceSnapshotRecord</code>.
35
- * The token snapshot detail information.
36
- * @alias module:model/WalletBalanceSnapshotRecord
37
- * @param wallet_id {String} The wallet ID.
38
- * @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](/v2/api-references/wallets/list-enabled-tokens).
39
- * @param balance {String} The balance of the token.
34
+ * Constructs a new <code>SafeWalletDelegatesTransfer</code>.
35
+ * @alias module:model/SafeWalletDelegatesTransfer
36
+ * @param request_type {module:model/EstimateFeeRequestType}
37
+ * @param token_id {String} The token ID.
40
38
  */
41
- function WalletBalanceSnapshotRecord(wallet_id, token_id, balance) {
42
- _classCallCheck(this, WalletBalanceSnapshotRecord);
43
- WalletBalanceSnapshotRecord.initialize(this, wallet_id, token_id, balance);
39
+ function SafeWalletDelegatesTransfer(request_type, token_id) {
40
+ _classCallCheck(this, SafeWalletDelegatesTransfer);
41
+ SafeWalletDelegatesTransfer.initialize(this, request_type, token_id);
44
42
  }
45
43
 
46
44
  /**
@@ -48,55 +46,51 @@ var WalletBalanceSnapshotRecord = /*#__PURE__*/function () {
48
46
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
47
  * Only for internal use.
50
48
  */
51
- return _createClass(WalletBalanceSnapshotRecord, null, [{
49
+ return _createClass(SafeWalletDelegatesTransfer, null, [{
52
50
  key: "initialize",
53
- value: function initialize(obj, wallet_id, token_id, balance) {
54
- obj['wallet_id'] = wallet_id;
51
+ value: function initialize(obj, request_type, token_id) {
52
+ obj['request_type'] = request_type;
55
53
  obj['token_id'] = token_id;
56
- obj['balance'] = balance;
57
54
  }
58
55
 
59
56
  /**
60
- * Constructs a <code>WalletBalanceSnapshotRecord</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Constructs a <code>SafeWalletDelegatesTransfer</code> from a plain JavaScript object, optionally creating a new instance.
61
58
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
59
  * @param {Object} data The plain JavaScript object bearing properties of interest.
63
- * @param {module:model/WalletBalanceSnapshotRecord} obj Optional instance to populate.
64
- * @return {module:model/WalletBalanceSnapshotRecord} The populated <code>WalletBalanceSnapshotRecord</code> instance.
60
+ * @param {module:model/SafeWalletDelegatesTransfer} obj Optional instance to populate.
61
+ * @return {module:model/SafeWalletDelegatesTransfer} The populated <code>SafeWalletDelegatesTransfer</code> instance.
65
62
  */
66
63
  }, {
67
64
  key: "constructFromObject",
68
65
  value: function constructFromObject(data, obj) {
69
66
  if (data) {
70
- obj = obj || new WalletBalanceSnapshotRecord();
71
- if (data.hasOwnProperty('wallet_id')) {
72
- obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
73
- }
74
- if (data.hasOwnProperty('wallet_type')) {
75
- obj['wallet_type'] = _WalletType["default"].constructFromObject(data['wallet_type']);
76
- }
77
- if (data.hasOwnProperty('wallet_name')) {
78
- obj['wallet_name'] = _ApiClient["default"].convertToType(data['wallet_name'], 'String');
67
+ obj = obj || new SafeWalletDelegatesTransfer();
68
+ if (data.hasOwnProperty('request_type')) {
69
+ obj['request_type'] = _EstimateFeeRequestType["default"].constructFromObject(data['request_type']);
79
70
  }
80
71
  if (data.hasOwnProperty('token_id')) {
81
72
  obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
82
73
  }
83
- if (data.hasOwnProperty('balance')) {
84
- obj['balance'] = _ApiClient["default"].convertToType(data['balance'], 'String');
74
+ if (data.hasOwnProperty('amount')) {
75
+ obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('address')) {
78
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
85
79
  }
86
80
  }
87
81
  return obj;
88
82
  }
89
83
 
90
84
  /**
91
- * Validates the JSON data with respect to <code>WalletBalanceSnapshotRecord</code>.
85
+ * Validates the JSON data with respect to <code>SafeWalletDelegatesTransfer</code>.
92
86
  * @param {Object} data The plain JavaScript object bearing properties of interest.
93
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>WalletBalanceSnapshotRecord</code>.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SafeWalletDelegatesTransfer</code>.
94
88
  */
95
89
  }, {
96
90
  key: "validateJSON",
97
91
  value: function validateJSON(data) {
98
92
  // check to make sure all required properties are present in the JSON string
99
- var _iterator = _createForOfIteratorHelper(WalletBalanceSnapshotRecord.RequiredProperties),
93
+ var _iterator = _createForOfIteratorHelper(SafeWalletDelegatesTransfer.RequiredProperties),
100
94
  _step;
101
95
  try {
102
96
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -111,53 +105,43 @@ var WalletBalanceSnapshotRecord = /*#__PURE__*/function () {
111
105
  } finally {
112
106
  _iterator.f();
113
107
  }
114
- if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
115
- throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
116
- }
117
- // ensure the json data is a string
118
- if (data['wallet_name'] && !(typeof data['wallet_name'] === 'string' || data['wallet_name'] instanceof String)) {
119
- throw new Error("Expected the field `wallet_name` to be a primitive type in the JSON string but got " + data['wallet_name']);
120
- }
121
- // ensure the json data is a string
122
108
  if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
123
109
  throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
124
110
  }
125
111
  // ensure the json data is a string
126
- if (data['balance'] && !(typeof data['balance'] === 'string' || data['balance'] instanceof String)) {
127
- throw new Error("Expected the field `balance` to be a primitive type in the JSON string but got " + data['balance']);
112
+ if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
113
+ throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
114
+ }
115
+ // ensure the json data is a string
116
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
117
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
128
118
  }
129
119
  return true;
130
120
  }
131
121
  }]);
132
122
  }();
133
- WalletBalanceSnapshotRecord.RequiredProperties = ["wallet_id", "token_id", "balance"];
123
+ SafeWalletDelegatesTransfer.RequiredProperties = ["request_type", "token_id"];
134
124
 
135
125
  /**
136
- * The wallet ID.
137
- * @member {String} wallet_id
126
+ * @member {module:model/EstimateFeeRequestType} request_type
138
127
  */
139
- WalletBalanceSnapshotRecord.prototype['wallet_id'] = undefined;
128
+ SafeWalletDelegatesTransfer.prototype['request_type'] = undefined;
140
129
 
141
130
  /**
142
- * @member {module:model/WalletType} wallet_type
143
- */
144
- WalletBalanceSnapshotRecord.prototype['wallet_type'] = undefined;
145
-
146
- /**
147
- * The wallet name.
148
- * @member {String} wallet_name
131
+ * The token ID.
132
+ * @member {String} token_id
149
133
  */
150
- WalletBalanceSnapshotRecord.prototype['wallet_name'] = undefined;
134
+ SafeWalletDelegatesTransfer.prototype['token_id'] = undefined;
151
135
 
152
136
  /**
153
- * 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](/v2/api-references/wallets/list-enabled-tokens).
154
- * @member {String} token_id
137
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
138
+ * @member {String} amount
155
139
  */
156
- WalletBalanceSnapshotRecord.prototype['token_id'] = undefined;
140
+ SafeWalletDelegatesTransfer.prototype['amount'] = undefined;
157
141
 
158
142
  /**
159
- * The balance of the token.
160
- * @member {String} balance
143
+ * The address of the recipient.
144
+ * @member {String} address
161
145
  */
162
- WalletBalanceSnapshotRecord.prototype['balance'] = undefined;
163
- var _default = exports["default"] = WalletBalanceSnapshotRecord;
146
+ SafeWalletDelegatesTransfer.prototype['address'] = undefined;
147
+ var _default = exports["default"] = SafeWalletDelegatesTransfer;
@@ -0,0 +1,61 @@
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 _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class TokenAssetModelType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var TokenAssetModelType = exports["default"] = /*#__PURE__*/function () {
31
+ function TokenAssetModelType() {
32
+ _classCallCheck(this, TokenAssetModelType);
33
+ /**
34
+ * value: "Account"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Account", "Account");
38
+ /**
39
+ * value: "UTXO"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "UTXO", "UTXO");
43
+ /**
44
+ * value: "unknown_default_open_api"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
48
+ }
49
+ return _createClass(TokenAssetModelType, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>TokenAssetModelType</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/TokenAssetModelType} The enum <code>TokenAssetModelType</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();
@@ -33,8 +33,8 @@ var TokenBalanceBalance = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>TokenBalanceBalance</code>.
34
34
  * The balance details.
35
35
  * @alias module:model/TokenBalanceBalance
36
- * @param total {String} The total balance, which is the sum of the available, pending, and locked balances.
37
- * @param available {String} The balance free to use.
36
+ * @param total {String} The current amount of tokens in an address, which is retrieved directly from the network. To learn more, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts) for more details.
37
+ * @param available {String} The amount of tokens ready to be spent. To learn more, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts) for more details.
38
38
  */
39
39
  function TokenBalanceBalance(total, available) {
40
40
  _classCallCheck(this, TokenBalanceBalance);
@@ -127,26 +127,26 @@ var TokenBalanceBalance = /*#__PURE__*/function () {
127
127
  TokenBalanceBalance.RequiredProperties = ["total", "available"];
128
128
 
129
129
  /**
130
- * The total balance, which is the sum of the available, pending, and locked balances.
130
+ * The current amount of tokens in an address, which is retrieved directly from the network. To learn more, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts) for more details.
131
131
  * @member {String} total
132
132
  */
133
133
  TokenBalanceBalance.prototype['total'] = undefined;
134
134
 
135
135
  /**
136
- * The balance free to use.
136
+ * The amount of tokens ready to be spent. To learn more, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts) for more details.
137
137
  * @member {String} available
138
138
  */
139
139
  TokenBalanceBalance.prototype['available'] = undefined;
140
140
 
141
141
  /**
142
- * The balance that is currently pending confirmation.
142
+ * The total amount being sent in a transaction, which is calculated as the withdrawal amount plus the transaction fee. To learn more, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts) for more details.
143
143
  * @member {String} pending
144
144
  * @default '0'
145
145
  */
146
146
  TokenBalanceBalance.prototype['pending'] = '0';
147
147
 
148
148
  /**
149
- * The balance that is currently not accessible to transactions.
149
+ * For UTXO chains, this is the combined value of the selected UTXOs for the transaction. For other chains, it is equal to the Pending amount. To learn more, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts) for more details.
150
150
  * @member {String} locked
151
151
  * @default '0'
152
152
  */
@@ -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 _TokenAssetModelType = _interopRequireDefault(require("./TokenAssetModelType"));
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; } } }; }
@@ -104,6 +105,9 @@ var TokenInfo = /*#__PURE__*/function () {
104
105
  if (data.hasOwnProperty('custodial_minimum_deposit_threshold')) {
105
106
  obj['custodial_minimum_deposit_threshold'] = _ApiClient["default"].convertToType(data['custodial_minimum_deposit_threshold'], 'String');
106
107
  }
108
+ if (data.hasOwnProperty('asset_model_type')) {
109
+ obj['asset_model_type'] = _TokenAssetModelType["default"].constructFromObject(data['asset_model_type']);
110
+ }
107
111
  }
108
112
  return obj;
109
113
  }
@@ -244,14 +248,19 @@ TokenInfo.prototype['can_deposit'] = undefined;
244
248
  TokenInfo.prototype['can_withdraw'] = undefined;
245
249
 
246
250
  /**
247
- * The minimum withdrawal amount for Custodial Wallets. If your withdrawal amount is smaller than this threshold, the withdrawal request will receive an error. Note: [Loop transfers](https://loop.top/) do not have this limitation.
251
+ * The minimum withdrawal amount for Custodial Wallets. If your withdrawal amount is smaller than this threshold, the withdrawal request will receive an error. Note: [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfers do not have this limitation.
248
252
  * @member {String} dust_threshold
249
253
  */
250
254
  TokenInfo.prototype['dust_threshold'] = undefined;
251
255
 
252
256
  /**
253
- * The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events. Note: [Loop transfers](https://loop.top/) do not have this limitation.
257
+ * The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events. Note: [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop)transfers do not have this limitation.
254
258
  * @member {String} custodial_minimum_deposit_threshold
255
259
  */
256
260
  TokenInfo.prototype['custodial_minimum_deposit_threshold'] = undefined;
261
+
262
+ /**
263
+ * @member {module:model/TokenAssetModelType} asset_model_type
264
+ */
265
+ TokenInfo.prototype['asset_model_type'] = undefined;
257
266
  var _default = exports["default"] = TokenInfo;
@@ -438,7 +438,7 @@ Transaction.prototype['category'] = undefined;
438
438
  Transaction.prototype['description'] = undefined;
439
439
 
440
440
  /**
441
- * Whether the transaction is a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction is a Loop transfer. - `false`: The transaction is not a Loop transfer.
441
+ * Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
442
442
  * @member {Boolean} is_loop
443
443
  */
444
444
  Transaction.prototype['is_loop'] = undefined;
@@ -9,9 +9,11 @@ var _ExchangeId = _interopRequireDefault(require("./ExchangeId"));
9
9
  var _TransactionDepositToAddressDestination = _interopRequireDefault(require("./TransactionDepositToAddressDestination"));
10
10
  var _TransactionDepositToWalletDestination = _interopRequireDefault(require("./TransactionDepositToWalletDestination"));
11
11
  var _TransactionDestinationType = _interopRequireDefault(require("./TransactionDestinationType"));
12
+ var _TransactionEvmCalldataInfo = _interopRequireDefault(require("./TransactionEvmCalldataInfo"));
12
13
  var _TransactionEvmContractDestination = _interopRequireDefault(require("./TransactionEvmContractDestination"));
13
14
  var _TransactionMessageSignEIP191Destination = _interopRequireDefault(require("./TransactionMessageSignEIP191Destination"));
14
15
  var _TransactionMessageSignEIP712Destination = _interopRequireDefault(require("./TransactionMessageSignEIP712Destination"));
16
+ var _TransactionRawMessageSignDestination = _interopRequireDefault(require("./TransactionRawMessageSignDestination"));
15
17
  var _TransactionTransferToAddressDestination = _interopRequireDefault(require("./TransactionTransferToAddressDestination"));
16
18
  var _TransactionTransferToAddressDestinationAccountOutput = _interopRequireDefault(require("./TransactionTransferToAddressDestinationAccountOutput"));
17
19
  var _TransactionTransferToAddressDestinationUtxoOutputsInner = _interopRequireDefault(require("./TransactionTransferToAddressDestinationUtxoOutputsInner"));
@@ -44,7 +46,7 @@ var TransactionDestination = /*#__PURE__*/function () {
44
46
  /**
45
47
  * Constructs a new <code>TransactionDestination</code>.
46
48
  * @alias module:model/TransactionDestination
47
- * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} instance The actual instance to initialize TransactionDestination.
49
+ * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} instance The actual instance to initialize TransactionDestination.
48
50
  */
49
51
  function TransactionDestination() {
50
52
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -89,6 +91,10 @@ var TransactionDestination = /*#__PURE__*/function () {
89
91
  this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
90
92
  match++;
91
93
  break;
94
+ case "EVM_Raw_Message_Signature":
95
+ this.actualInstance = _TransactionRawMessageSignDestination["default"].constructFromObject(instance);
96
+ match++;
97
+ break;
92
98
  case "ExchangeWallet":
93
99
  this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
94
100
  match++;
@@ -214,6 +220,29 @@ var TransactionDestination = /*#__PURE__*/function () {
214
220
  // json data failed to deserialize into TransactionMessageSignEIP712Destination
215
221
  errorMessages.push("Failed to construct TransactionMessageSignEIP712Destination: " + err);
216
222
  }
223
+ try {
224
+ if (instance instanceof _TransactionRawMessageSignDestination["default"]) {
225
+ this.actualInstance = instance;
226
+ } else if (!!_TransactionRawMessageSignDestination["default"].validateJSON && _TransactionRawMessageSignDestination["default"].validateJSON(instance)) {
227
+ // plain JS object
228
+ // create TransactionRawMessageSignDestination from JS object
229
+ this.actualInstance = _TransactionRawMessageSignDestination["default"].constructFromObject(instance);
230
+ } else {
231
+ if (_TransactionRawMessageSignDestination["default"].constructFromObject(instance)) {
232
+ if (!!_TransactionRawMessageSignDestination["default"].constructFromObject(instance).toJSON) {
233
+ if (_TransactionRawMessageSignDestination["default"].constructFromObject(instance).toJSON()) {
234
+ this.actualInstance = _TransactionRawMessageSignDestination["default"].constructFromObject(instance);
235
+ }
236
+ } else {
237
+ this.actualInstance = _TransactionRawMessageSignDestination["default"].constructFromObject(instance);
238
+ }
239
+ }
240
+ }
241
+ match++;
242
+ } catch (err) {
243
+ // json data failed to deserialize into TransactionRawMessageSignDestination
244
+ errorMessages.push("Failed to construct TransactionRawMessageSignDestination: " + err);
245
+ }
217
246
  try {
218
247
  if (instance instanceof _TransactionDepositToAddressDestination["default"]) {
219
248
  this.actualInstance = instance;
@@ -262,11 +291,11 @@ var TransactionDestination = /*#__PURE__*/function () {
262
291
  }
263
292
 
264
293
  // if (match > 1) {
265
- // throw new Error("Multiple matches found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Input: " + JSON.stringify(instance));
294
+ // throw new Error("Multiple matches found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionRawMessageSignDestination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Input: " + JSON.stringify(instance));
266
295
  // } else
267
296
  if (match === 0) {
268
297
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
269
- // throw new Error("No match found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Details: " +
298
+ // throw new Error("No match found constructing `TransactionDestination` with oneOf schemas TransactionDepositToAddressDestination, TransactionDepositToWalletDestination, TransactionEvmContractDestination, TransactionMessageSignEIP191Destination, TransactionMessageSignEIP712Destination, TransactionRawMessageSignDestination, TransactionTransferToAddressDestination, TransactionTransferToWalletDestination. Details: " +
270
299
  // errorMessages.join(", "));
271
300
  return;
272
301
  } else {// only 1 match
@@ -285,16 +314,16 @@ var TransactionDestination = /*#__PURE__*/function () {
285
314
  key: "getActualInstance",
286
315
  value:
287
316
  /**
288
- * Gets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
289
- * @return {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} The actual instance.
317
+ * Gets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionRawMessageSignDestination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
318
+ * @return {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} The actual instance.
290
319
  */
291
320
  function getActualInstance() {
292
321
  return this.actualInstance;
293
322
  }
294
323
 
295
324
  /**
296
- * Sets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
297
- * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} obj The actual instance.
325
+ * Sets the actual instance, which can be <code>TransactionDepositToAddressDestination</code>, <code>TransactionDepositToWalletDestination</code>, <code>TransactionEvmContractDestination</code>, <code>TransactionMessageSignEIP191Destination</code>, <code>TransactionMessageSignEIP712Destination</code>, <code>TransactionRawMessageSignDestination</code>, <code>TransactionTransferToAddressDestination</code>, <code>TransactionTransferToWalletDestination</code>.
326
+ * @param {(module:model/TransactionDepositToAddressDestination|module:model/TransactionDepositToWalletDestination|module:model/TransactionEvmContractDestination|module:model/TransactionMessageSignEIP191Destination|module:model/TransactionMessageSignEIP712Destination|module:model/TransactionRawMessageSignDestination|module:model/TransactionTransferToAddressDestination|module:model/TransactionTransferToWalletDestination)} obj The actual instance.
298
327
  */
299
328
  }, {
300
329
  key: "setActualInstance",
@@ -339,13 +368,13 @@ TransactionDestination.prototype['utxo_outputs'] = undefined;
339
368
  TransactionDestination.prototype['change_address'] = undefined;
340
369
 
341
370
  /**
342
- * Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer.
371
+ * Whether the transaction request must be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must be executed as a Cobo Loop transfer. - `false`: The transaction request may not be executed as a Cobo Loop transfer.
343
372
  * @member {Boolean} force_internal
344
373
  */
345
374
  TransactionDestination.prototype['force_internal'] = undefined;
346
375
 
347
376
  /**
348
- * Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer.
377
+ * Whether the transaction request must not be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must not be executed as a Cobo Loop transfer. - `false`: The transaction request can be executed as a Cobo Loop transfer.
349
378
  * @member {Boolean} force_external
350
379
  */
351
380
  TransactionDestination.prototype['force_external'] = undefined;
@@ -391,6 +420,11 @@ TransactionDestination.prototype['value'] = undefined;
391
420
  */
392
421
  TransactionDestination.prototype['calldata'] = undefined;
393
422
 
423
+ /**
424
+ * @member {module:model/TransactionEvmCalldataInfo} calldata_info
425
+ */
426
+ TransactionDestination.prototype['calldata_info'] = undefined;
427
+
394
428
  /**
395
429
  * The raw data of the message to be signed, encoded in Base64 format.
396
430
  * @member {String} message
@@ -403,6 +437,12 @@ TransactionDestination.prototype['message'] = undefined;
403
437
  */
404
438
  TransactionDestination.prototype['structured_data'] = undefined;
405
439
 
440
+ /**
441
+ * Message hash to be signed, in hexadecimal format.
442
+ * @member {String} msg_hash
443
+ */
444
+ TransactionDestination.prototype['msg_hash'] = undefined;
445
+
406
446
  /**
407
447
  * @member {module:model/WalletType} wallet_type
408
448
  */
@@ -418,5 +458,5 @@ TransactionDestination.prototype['wallet_subtype'] = undefined;
418
458
  * @member {String} memo
419
459
  */
420
460
  TransactionDestination.prototype['memo'] = undefined;
421
- TransactionDestination.OneOf = ["TransactionDepositToAddressDestination", "TransactionDepositToWalletDestination", "TransactionEvmContractDestination", "TransactionMessageSignEIP191Destination", "TransactionMessageSignEIP712Destination", "TransactionTransferToAddressDestination", "TransactionTransferToWalletDestination"];
461
+ TransactionDestination.OneOf = ["TransactionDepositToAddressDestination", "TransactionDepositToWalletDestination", "TransactionEvmContractDestination", "TransactionMessageSignEIP191Destination", "TransactionMessageSignEIP712Destination", "TransactionRawMessageSignDestination", "TransactionTransferToAddressDestination", "TransactionTransferToWalletDestination"];
422
462
  var _default = exports["default"] = TransactionDestination;
@@ -55,6 +55,11 @@ var TransactionDestinationType = exports["default"] = /*#__PURE__*/function () {
55
55
  * @const
56
56
  */
57
57
  _defineProperty(this, "EVM_EIP_712_Signature", "EVM_EIP_712_Signature");
58
+ /**
59
+ * value: "Raw_Message_Signature"
60
+ * @const
61
+ */
62
+ _defineProperty(this, "Raw_Message_Signature", "Raw_Message_Signature");
58
63
  /**
59
64
  * value: "DepositToAddress"
60
65
  * @const
@@ -466,7 +466,7 @@ TransactionDetail.prototype['category'] = undefined;
466
466
  TransactionDetail.prototype['description'] = undefined;
467
467
 
468
468
  /**
469
- * Whether the transaction is a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction is a Loop transfer. - `false`: The transaction is not a Loop transfer.
469
+ * Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
470
470
  * @member {Boolean} is_loop
471
471
  */
472
472
  TransactionDetail.prototype['is_loop'] = undefined;
@@ -604,7 +604,7 @@ _Transaction["default"].prototype['category'] = undefined;
604
604
  */
605
605
  _Transaction["default"].prototype['description'] = undefined;
606
606
  /**
607
- * Whether the transaction is a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction is a Loop transfer. - `false`: The transaction is not a Loop transfer.
607
+ * Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
608
608
  * @member {Boolean} is_loop
609
609
  */
610
610
  _Transaction["default"].prototype['is_loop'] = undefined;
@@ -558,7 +558,7 @@ TransactionDetails.prototype['category'] = undefined;
558
558
  TransactionDetails.prototype['description'] = undefined;
559
559
 
560
560
  /**
561
- * Whether the transaction is a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction is a Loop transfer. - `false`: The transaction is not a Loop transfer.
561
+ * Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
562
562
  * @member {Boolean} is_loop
563
563
  */
564
564
  TransactionDetails.prototype['is_loop'] = undefined;
@@ -741,7 +741,7 @@ _Transaction["default"].prototype['category'] = undefined;
741
741
  */
742
742
  _Transaction["default"].prototype['description'] = undefined;
743
743
  /**
744
- * Whether the transaction is a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction is a Loop transfer. - `false`: The transaction is not a Loop transfer.
744
+ * Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
745
745
  * @member {Boolean} is_loop
746
746
  */
747
747
  _Transaction["default"].prototype['is_loop'] = undefined;