@cobo/cobo-waas2 1.3.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.
- package/README.md +22 -10
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +105 -0
- package/dist/api/DevelopersWebhooksApi.js +43 -0
- package/dist/api/OAuthApi.js +18 -18
- package/dist/api/TransactionsApi.js +14 -14
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsExchangeWalletApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +10 -10
- package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
- package/dist/index.js +108 -31
- package/dist/model/AddressBook.js +217 -0
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/ApiLogDetails.js +238 -0
- package/dist/model/ApiLogSummary.js +161 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
- package/dist/model/CoboSafeDelegate.js +2 -2
- package/dist/model/ContractCallSource.js +0 -6
- package/dist/model/CreateKeyShareHolder.js +2 -2
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +2 -2
- package/dist/model/EstimateTransferFeeParams.js +2 -2
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/ExchangeId.js +10 -0
- package/dist/model/ExtendedTokenInfo.js +17 -4
- package/dist/model/GetToken200Response.js +4 -4
- package/dist/model/KeyShareHolder.js +1 -1
- package/dist/model/ListAddressBooks200Response.js +123 -0
- package/dist/model/MPCDelegate.js +4 -4
- package/dist/model/MessageSignParams.js +1 -1
- package/dist/model/MpcContractCallSource.js +0 -9
- package/dist/model/{RefreshToken200Response.js → RefreshToken201Response.js} +25 -25
- package/dist/model/RefreshTokenRequest.js +2 -2
- package/dist/model/SafeWalletDelegates.js +210 -0
- package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
- package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
- package/dist/model/TSSRequestStatus.js +5 -0
- package/dist/model/TokenAssetModelType.js +61 -0
- package/dist/model/TokenBalanceBalance.js +6 -6
- package/dist/model/TokenInfo.js +11 -2
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionDestination.js +50 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionEvmCalldataInfo.js +177 -0
- package/dist/model/TransactionEvmContractDestination.js +16 -0
- package/dist/model/TransactionEvmContractMethod.js +136 -0
- package/dist/model/TransactionRawMessageSignDestination.js +120 -0
- package/dist/model/TransactionSignatureResult.js +1 -1
- package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
- package/dist/model/TransactionStatus.js +0 -5
- package/dist/model/TransactionSubStatus.js +40 -5
- package/dist/model/TransactionTokeApproval.js +17 -4
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TransferDestination.js +2 -2
- package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
- package/dist/model/{WalletBalanceSnapshot.js → TriggerTestWebhookEventRequest.js} +31 -36
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AddressBook.md +17 -0
- package/docs/AddressBooksApi.md +71 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/ApiLogDetails.md +18 -0
- package/docs/ApiLogSummary.md +13 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/CoboSafeDelegate.md +2 -2
- package/docs/ContractCallSource.md +0 -1
- package/docs/CreateKeyShareHolder.md +2 -2
- package/docs/DevelopersWebhooksApi.md +53 -0
- package/docs/ErrorResponse.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/ExchangeId.md +4 -0
- package/docs/ExtendedTokenInfo.md +3 -2
- package/docs/GetToken200Response.md +4 -4
- package/docs/KeyShareHolder.md +1 -1
- package/docs/ListAddressBooks200Response.md +10 -0
- package/docs/MPCDelegate.md +2 -2
- package/docs/MessageSignParams.md +1 -1
- package/docs/MpcContractCallSource.md +0 -1
- package/docs/OAuthApi.md +11 -11
- package/docs/RefreshToken201Response.md +13 -0
- package/docs/RefreshTokenRequest.md +2 -2
- package/docs/SafeWalletDelegates.md +14 -0
- package/docs/SafeWalletDelegatesContractCall.md +12 -0
- package/docs/SafeWalletDelegatesTransfer.md +12 -0
- package/docs/TSSRequestStatus.md +2 -0
- package/docs/TokenAssetModelType.md +12 -0
- package/docs/TokenBalanceBalance.md +4 -4
- package/docs/TokenInfo.md +3 -2
- package/docs/Transaction.md +1 -1
- package/docs/TransactionDestination.md +4 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionEvmCalldataInfo.md +16 -0
- package/docs/TransactionEvmContractDestination.md +1 -0
- package/docs/TransactionEvmContractMethod.md +13 -0
- package/docs/TransactionRawMessageSignDestination.md +10 -0
- package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
- package/docs/TransactionSource.md +1 -1
- package/docs/TransactionStatus.md +0 -2
- package/docs/TransactionSubStatus.md +16 -2
- package/docs/TransactionTokeApproval.md +3 -2
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +8 -8
- package/docs/TransferDestination.md +2 -2
- package/docs/TriggerTestWebhookEvent201Response.md +9 -0
- package/docs/TriggerTestWebhookEventRequest.md +10 -0
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +5 -5
- package/docs/WalletsSmartContractWalletsApi.md +63 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +2 -2
- package/dist/model/BookkeepingRecord.js +0 -243
- package/docs/BookkeepingRecord.md +0 -19
- package/docs/BookkeepingSummary.md +0 -12
- package/docs/RefreshToken200Response.md +0 -13
- package/docs/WalletBalanceSnapshot.md +0 -10
- package/docs/WalletBalanceSnapshotRecord.md +0 -13
|
@@ -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
|
|
37
|
-
* @param available {String} The
|
|
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
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
*/
|
package/dist/model/TokenInfo.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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;
|
|
@@ -0,0 +1,177 @@
|
|
|
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 _TransactionEvmContractMethod = _interopRequireDefault(require("./TransactionEvmContractMethod"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The TransactionEvmCalldataInfo model module.
|
|
27
|
+
* @module model/TransactionEvmCalldataInfo
|
|
28
|
+
*/
|
|
29
|
+
var TransactionEvmCalldataInfo = /*#__PURE__*/function () {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new <code>TransactionEvmCalldataInfo</code>.
|
|
32
|
+
* @alias module:model/TransactionEvmCalldataInfo
|
|
33
|
+
*/
|
|
34
|
+
function TransactionEvmCalldataInfo() {
|
|
35
|
+
_classCallCheck(this, TransactionEvmCalldataInfo);
|
|
36
|
+
TransactionEvmCalldataInfo.initialize(this);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializes the fields of this object.
|
|
41
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
|
+
* Only for internal use.
|
|
43
|
+
*/
|
|
44
|
+
return _createClass(TransactionEvmCalldataInfo, null, [{
|
|
45
|
+
key: "initialize",
|
|
46
|
+
value: function initialize(obj) {}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>TransactionEvmCalldataInfo</code> from a plain JavaScript object, optionally creating a new instance.
|
|
50
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
51
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
+
* @param {module:model/TransactionEvmCalldataInfo} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/TransactionEvmCalldataInfo} The populated <code>TransactionEvmCalldataInfo</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new TransactionEvmCalldataInfo();
|
|
60
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
61
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('address')) {
|
|
64
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('name')) {
|
|
67
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('impl_address')) {
|
|
70
|
+
obj['impl_address'] = _ApiClient["default"].convertToType(data['impl_address'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('impl_name')) {
|
|
73
|
+
obj['impl_name'] = _ApiClient["default"].convertToType(data['impl_name'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('proxy')) {
|
|
76
|
+
obj['proxy'] = _ApiClient["default"].convertToType(data['proxy'], 'Boolean');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('method')) {
|
|
79
|
+
obj['method'] = _TransactionEvmContractMethod["default"].constructFromObject(data['method']);
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('params')) {
|
|
82
|
+
obj['params'] = _ApiClient["default"].convertToType(data['params'], 'String');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return obj;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Validates the JSON data with respect to <code>TransactionEvmCalldataInfo</code>.
|
|
90
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
91
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TransactionEvmCalldataInfo</code>.
|
|
92
|
+
*/
|
|
93
|
+
}, {
|
|
94
|
+
key: "validateJSON",
|
|
95
|
+
value: function validateJSON(data) {
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
98
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
99
|
+
}
|
|
100
|
+
// ensure the json data is a string
|
|
101
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
103
|
+
}
|
|
104
|
+
// ensure the json data is a string
|
|
105
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
106
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
107
|
+
}
|
|
108
|
+
// ensure the json data is a string
|
|
109
|
+
if (data['impl_address'] && !(typeof data['impl_address'] === 'string' || data['impl_address'] instanceof String)) {
|
|
110
|
+
throw new Error("Expected the field `impl_address` to be a primitive type in the JSON string but got " + data['impl_address']);
|
|
111
|
+
}
|
|
112
|
+
// ensure the json data is a string
|
|
113
|
+
if (data['impl_name'] && !(typeof data['impl_name'] === 'string' || data['impl_name'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `impl_name` to be a primitive type in the JSON string but got " + data['impl_name']);
|
|
115
|
+
}
|
|
116
|
+
// validate the optional field `method`
|
|
117
|
+
if (data['method']) {
|
|
118
|
+
// data not null
|
|
119
|
+
if (!!_TransactionEvmContractMethod["default"].validateJSON) {
|
|
120
|
+
_TransactionEvmContractMethod["default"].validateJSON(data['method']);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// ensure the json data is a string
|
|
124
|
+
if (data['params'] && !(typeof data['params'] === 'string' || data['params'] instanceof String)) {
|
|
125
|
+
throw new Error("Expected the field `params` to be a primitive type in the JSON string but got " + data['params']);
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}]);
|
|
130
|
+
}();
|
|
131
|
+
/**
|
|
132
|
+
* The ID of the chain on which the smart contract is deployed.
|
|
133
|
+
* @member {String} chain_id
|
|
134
|
+
*/
|
|
135
|
+
TransactionEvmCalldataInfo.prototype['chain_id'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The address of the smart contract.
|
|
139
|
+
* @member {String} address
|
|
140
|
+
*/
|
|
141
|
+
TransactionEvmCalldataInfo.prototype['address'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The name of the smart contract.
|
|
145
|
+
* @member {String} name
|
|
146
|
+
*/
|
|
147
|
+
TransactionEvmCalldataInfo.prototype['name'] = undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* The address of the implementation smart contract. This property is applicable only when the specified smart contract is a proxy contract.
|
|
151
|
+
* @member {String} impl_address
|
|
152
|
+
*/
|
|
153
|
+
TransactionEvmCalldataInfo.prototype['impl_address'] = undefined;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The name of the implementation smart contract. This property is applicable only when the specified smart contract is a proxy contract.
|
|
157
|
+
* @member {String} impl_name
|
|
158
|
+
*/
|
|
159
|
+
TransactionEvmCalldataInfo.prototype['impl_name'] = undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Whether the specified smart contract address is a proxy contract. - `true`: The specified smart contract address is a proxy contract. - `false`: The specified smart contract address is not a proxy contract.
|
|
163
|
+
* @member {Boolean} proxy
|
|
164
|
+
*/
|
|
165
|
+
TransactionEvmCalldataInfo.prototype['proxy'] = undefined;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @member {module:model/TransactionEvmContractMethod} method
|
|
169
|
+
*/
|
|
170
|
+
TransactionEvmCalldataInfo.prototype['method'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The parameters of the contract method are represented as a JSON array of arrays. Each element in the outer array is itself an array containing three elements that provide detailed information about a specific parameter: - Parameter name: The unique identifier of the parameter, such as `kind`, `swaps`, and `to`. - Parameter type: The Solidity data type of the parameter, such as `uint8`, `tuple[]`, `address[]`, and `int256[]`. - Parameter value: The actual value of the parameter. If the parameter type is a basic type such as `uint256` or `address`, this value is a single element. If the parameter type is a complex type such as `tuple[]` or `address[]`, the value is a nested array, with each inner array containing parameter names, types, and values.
|
|
174
|
+
* @member {String} params
|
|
175
|
+
*/
|
|
176
|
+
TransactionEvmCalldataInfo.prototype['params'] = undefined;
|
|
177
|
+
var _default = exports["default"] = TransactionEvmCalldataInfo;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _TransactionDestinationType = _interopRequireDefault(require("./TransactionDestinationType"));
|
|
9
|
+
var _TransactionEvmCalldataInfo = _interopRequireDefault(require("./TransactionEvmCalldataInfo"));
|
|
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; } } }; }
|
|
@@ -80,6 +81,9 @@ var TransactionEvmContractDestination = /*#__PURE__*/function () {
|
|
|
80
81
|
if (data.hasOwnProperty('calldata')) {
|
|
81
82
|
obj['calldata'] = _ApiClient["default"].convertToType(data['calldata'], 'String');
|
|
82
83
|
}
|
|
84
|
+
if (data.hasOwnProperty('calldata_info')) {
|
|
85
|
+
obj['calldata_info'] = _TransactionEvmCalldataInfo["default"].constructFromObject(data['calldata_info']);
|
|
86
|
+
}
|
|
83
87
|
}
|
|
84
88
|
return obj;
|
|
85
89
|
}
|
|
@@ -119,6 +123,13 @@ var TransactionEvmContractDestination = /*#__PURE__*/function () {
|
|
|
119
123
|
if (data['calldata'] && !(typeof data['calldata'] === 'string' || data['calldata'] instanceof String)) {
|
|
120
124
|
throw new Error("Expected the field `calldata` to be a primitive type in the JSON string but got " + data['calldata']);
|
|
121
125
|
}
|
|
126
|
+
// validate the optional field `calldata_info`
|
|
127
|
+
if (data['calldata_info']) {
|
|
128
|
+
// data not null
|
|
129
|
+
if (!!_TransactionEvmCalldataInfo["default"].validateJSON) {
|
|
130
|
+
_TransactionEvmCalldataInfo["default"].validateJSON(data['calldata_info']);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
122
133
|
return true;
|
|
123
134
|
}
|
|
124
135
|
}]);
|
|
@@ -147,4 +158,9 @@ TransactionEvmContractDestination.prototype['value'] = undefined;
|
|
|
147
158
|
* @member {String} calldata
|
|
148
159
|
*/
|
|
149
160
|
TransactionEvmContractDestination.prototype['calldata'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @member {module:model/TransactionEvmCalldataInfo} calldata_info
|
|
164
|
+
*/
|
|
165
|
+
TransactionEvmContractDestination.prototype['calldata_info'] = undefined;
|
|
150
166
|
var _default = exports["default"] = TransactionEvmContractDestination;
|