@cobo/cobo-waas2 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -10
- package/dist/ApiClient.js +1 -1
- package/dist/ServerDemo.js +80 -0
- package/dist/api/AddressBooksApi.js +105 -0
- package/dist/api/DevelopersApi.js +79 -0
- package/dist/api/DevelopersWebhooksApi.js +43 -0
- package/dist/api/OAuthApi.js +10 -10
- package/dist/api/TransactionsApi.js +12 -12
- package/dist/api/WalletsApi.js +60 -59
- package/dist/api/WalletsExchangeWalletApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
- package/dist/index.js +181 -34
- package/dist/model/AddressBook.js +25 -10
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
- package/dist/model/ApiLogDetails.js +238 -0
- package/dist/model/ApiLogSummary.js +161 -0
- package/dist/model/BabylonStakeEstimatedFee.js +118 -0
- package/dist/model/BabylonValidator.js +5 -0
- package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
- package/dist/model/CoboSafeDelegate.js +2 -2
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +42 -8
- package/dist/model/CreateUnstakeActivity.js +16 -0
- package/dist/model/CreateUnstakeActivityExtra.js +159 -0
- package/dist/model/CreateUnstakeActivityRequest.js +20 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +5 -7
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +5 -9
- package/dist/model/EstimateUnstakeFee.js +20 -0
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EthStakeEstimatedFee.js +112 -0
- package/dist/model/EthStakeExtra.js +131 -0
- package/dist/model/EthStakingExtra.js +131 -0
- package/dist/model/EthUnstakeExtra.js +131 -0
- package/dist/model/ExchangeId.js +10 -0
- package/dist/model/ExtendedTokenInfo.js +17 -4
- package/dist/model/FeeGasLimit.js +1 -2
- package/dist/model/GetApiKeyInfo200Response.js +251 -0
- package/dist/model/GetStakingEstimationFee201Response.js +144 -43
- package/dist/model/GetStakingEstimationFeeRequest.js +2 -2
- package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
- package/dist/model/GetToken4XXResponse.js +12 -10
- package/dist/model/ListAddressBooks200Response.js +123 -0
- package/dist/model/MPCDelegate.js +5 -5
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/{RefreshToken200Response.js → RefreshToken2XXResponse.js} +21 -21
- package/dist/model/{WalletBalanceSnapshot.js → RoleScopes.js} +42 -34
- 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/Scopes.js +142 -0
- package/dist/model/SmartContractWalletInfo.js +1 -1
- package/dist/model/StakingPoolType.js +5 -0
- package/dist/model/StakingsExtra.js +36 -8
- 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/TransactionEvmEip1559Fee.js +2 -4
- package/dist/model/TransactionEvmLegacyFee.js +2 -4
- package/dist/model/TransactionFee.js +1 -2
- package/dist/model/TransactionRawMessageSignDestination.js +120 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -2
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -2
- package/dist/model/TransactionRequestFee.js +1 -2
- package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
- package/dist/model/TransactionSource.js +1 -1
- package/dist/model/TransactionTokeApproval.js +17 -4
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TransferDestination.js +2 -2
- package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
- package/dist/model/TriggerTestWebhookEventRequest.js +115 -0
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AddressBook.md +8 -7
- package/docs/AddressBooksApi.md +71 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
- package/docs/ApiLogDetails.md +18 -0
- package/docs/ApiLogSummary.md +13 -0
- package/docs/BabylonStakeEstimatedFee.md +12 -0
- package/docs/BabylonValidator.md +2 -0
- package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/CoboSafeDelegate.md +2 -2
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateUnstakeActivityExtra.md +10 -0
- package/docs/CreateUnstakeActivityRequest.md +1 -0
- package/docs/DevelopersApi.md +55 -0
- 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 +2 -2
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
- package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EthStakeEstimatedFee.md +11 -0
- package/docs/EthStakeExtra.md +10 -0
- package/docs/EthStakingExtra.md +10 -0
- package/docs/EthUnstakeExtra.md +10 -0
- package/docs/ExchangeId.md +4 -0
- package/docs/ExtendedTokenInfo.md +3 -2
- package/docs/FeeGasLimit.md +1 -1
- package/docs/GetApiKeyInfo200Response.md +30 -0
- package/docs/GetStakingEstimationFee201Response.md +3 -0
- package/docs/GetStakingEstimationFeeRequest.md +1 -1
- package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
- package/docs/GetToken4XXResponse.md +1 -1
- package/docs/ListAddressBooks200Response.md +10 -0
- package/docs/MPCDelegate.md +2 -2
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +5 -5
- package/docs/PoolDetailsAllOfValidatorsInfo.md +2 -0
- package/docs/{RefreshToken200Response.md → RefreshToken2XXResponse.md} +1 -1
- package/docs/RoleScopes.md +10 -0
- package/docs/SafeWalletDelegates.md +14 -0
- package/docs/SafeWalletDelegatesContractCall.md +12 -0
- package/docs/SafeWalletDelegatesTransfer.md +12 -0
- package/docs/Scopes.md +13 -0
- package/docs/StakingPoolType.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/TransactionEvmEip1559Fee.md +1 -1
- package/docs/TransactionEvmLegacyFee.md +1 -1
- package/docs/TransactionFee.md +1 -1
- package/docs/TransactionRawMessageSignDestination.md +10 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
- package/docs/TransactionRequestEvmLegacyFee.md +1 -1
- package/docs/TransactionRequestFee.md +1 -1
- package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
- package/docs/TransactionSource.md +1 -1
- package/docs/TransactionTokeApproval.md +3 -2
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +7 -7
- package/docs/TransferDestination.md +2 -2
- package/docs/TriggerTestWebhookEvent201Response.md +9 -0
- package/docs/TriggerTestWebhookEventRequest.md +10 -0
- package/docs/WalletsApi.md +55 -55
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +4 -4
- package/docs/WalletsSmartContractWalletsApi.md +63 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +3 -2
- package/dist/model/BookkeepingRecord.js +0 -243
- package/docs/BookkeepingRecord.md +0 -19
- package/docs/BookkeepingSummary.md +0 -12
- package/docs/WalletBalanceSnapshot.md +0 -10
- package/docs/WalletBalanceSnapshotRecord.md +0 -13
|
@@ -34,10 +34,11 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
|
|
|
34
34
|
* The response of a failed request.
|
|
35
35
|
* @alias module:model/GetToken4XXResponse
|
|
36
36
|
* @param error {String} The error name.
|
|
37
|
+
* @param error_description {String} The error description.
|
|
37
38
|
*/
|
|
38
|
-
function GetToken4XXResponse(error) {
|
|
39
|
+
function GetToken4XXResponse(error, error_description) {
|
|
39
40
|
_classCallCheck(this, GetToken4XXResponse);
|
|
40
|
-
GetToken4XXResponse.initialize(this, error);
|
|
41
|
+
GetToken4XXResponse.initialize(this, error, error_description);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/**
|
|
@@ -47,8 +48,9 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
|
|
|
47
48
|
*/
|
|
48
49
|
return _createClass(GetToken4XXResponse, null, [{
|
|
49
50
|
key: "initialize",
|
|
50
|
-
value: function initialize(obj, error) {
|
|
51
|
+
value: function initialize(obj, error, error_description) {
|
|
51
52
|
obj['error'] = error;
|
|
53
|
+
obj['error_description'] = error_description;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/**
|
|
@@ -66,8 +68,8 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
|
|
|
66
68
|
if (data.hasOwnProperty('error')) {
|
|
67
69
|
obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
|
|
68
70
|
}
|
|
69
|
-
if (data.hasOwnProperty('
|
|
70
|
-
obj['
|
|
71
|
+
if (data.hasOwnProperty('error_description')) {
|
|
72
|
+
obj['error_description'] = _ApiClient["default"].convertToType(data['error_description'], 'String');
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
return obj;
|
|
@@ -101,14 +103,14 @@ var GetToken4XXResponse = /*#__PURE__*/function () {
|
|
|
101
103
|
throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
|
|
102
104
|
}
|
|
103
105
|
// ensure the json data is a string
|
|
104
|
-
if (data['
|
|
105
|
-
throw new Error("Expected the field `
|
|
106
|
+
if (data['error_description'] && !(typeof data['error_description'] === 'string' || data['error_description'] instanceof String)) {
|
|
107
|
+
throw new Error("Expected the field `error_description` to be a primitive type in the JSON string but got " + data['error_description']);
|
|
106
108
|
}
|
|
107
109
|
return true;
|
|
108
110
|
}
|
|
109
111
|
}]);
|
|
110
112
|
}();
|
|
111
|
-
GetToken4XXResponse.RequiredProperties = ["error"];
|
|
113
|
+
GetToken4XXResponse.RequiredProperties = ["error", "error_description"];
|
|
112
114
|
|
|
113
115
|
/**
|
|
114
116
|
* The error name.
|
|
@@ -118,7 +120,7 @@ GetToken4XXResponse.prototype['error'] = undefined;
|
|
|
118
120
|
|
|
119
121
|
/**
|
|
120
122
|
* The error description.
|
|
121
|
-
* @member {String}
|
|
123
|
+
* @member {String} error_description
|
|
122
124
|
*/
|
|
123
|
-
GetToken4XXResponse.prototype['
|
|
125
|
+
GetToken4XXResponse.prototype['error_description'] = undefined;
|
|
124
126
|
var _default = exports["default"] = GetToken4XXResponse;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AddressBook = _interopRequireDefault(require("./AddressBook"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The ListAddressBooks200Response model module.
|
|
31
|
+
* @module model/ListAddressBooks200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListAddressBooks200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListAddressBooks200Response</code>.
|
|
36
|
+
* @alias module:model/ListAddressBooks200Response
|
|
37
|
+
*/
|
|
38
|
+
function ListAddressBooks200Response() {
|
|
39
|
+
_classCallCheck(this, ListAddressBooks200Response);
|
|
40
|
+
ListAddressBooks200Response.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(ListAddressBooks200Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>ListAddressBooks200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/ListAddressBooks200Response} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/ListAddressBooks200Response} The populated <code>ListAddressBooks200Response</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ListAddressBooks200Response();
|
|
64
|
+
if (data.hasOwnProperty('data')) {
|
|
65
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AddressBook["default"]]);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('pagination')) {
|
|
68
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ListAddressBooks200Response</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAddressBooks200Response</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
if (data['data']) {
|
|
83
|
+
// data not null
|
|
84
|
+
// ensure the json data is an array
|
|
85
|
+
if (!Array.isArray(data['data'])) {
|
|
86
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `data` (array)
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var item = _step.value;
|
|
94
|
+
_AddressBook["default"].validateJSON(item);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
;
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `pagination`
|
|
104
|
+
if (data['pagination']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
107
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {Array.<module:model/AddressBook>} data
|
|
116
|
+
*/
|
|
117
|
+
ListAddressBooks200Response.prototype['data'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/Pagination} pagination
|
|
121
|
+
*/
|
|
122
|
+
ListAddressBooks200Response.prototype['pagination'] = undefined;
|
|
123
|
+
var _default = exports["default"] = ListAddressBooks200Response;
|
|
@@ -32,11 +32,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
32
32
|
var MPCDelegate = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>MPCDelegate</code>.
|
|
35
|
-
* The information about the MPC Wallet as the Delegate.
|
|
35
|
+
* The information about the MPC Wallet as the Delegate. You can call the [List Delegates](/v2/api-references/wallets--smart-contract-wallets/list-delegates) operation to retrieve the applicable Delegates.
|
|
36
36
|
* @alias module:model/MPCDelegate
|
|
37
37
|
* @param delegate_type {module:model/CoboSafeDelegateType}
|
|
38
|
-
* @param wallet_id {String} The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
|
|
39
|
-
* @param address {String} The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
|
|
38
|
+
* @param wallet_id {String} The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
|
|
39
|
+
* @param address {String} The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
|
|
40
40
|
*/
|
|
41
41
|
function MPCDelegate(delegate_type, wallet_id, address) {
|
|
42
42
|
_classCallCheck(this, MPCDelegate);
|
|
@@ -124,13 +124,13 @@ MPCDelegate.RequiredProperties = ["delegate_type", "wallet_id", "address"];
|
|
|
124
124
|
MPCDelegate.prototype['delegate_type'] = undefined;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
|
|
127
|
+
* The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
|
|
128
128
|
* @member {String} wallet_id
|
|
129
129
|
*/
|
|
130
130
|
MPCDelegate.prototype['wallet_id'] = undefined;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
|
|
133
|
+
* The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
|
|
134
134
|
* @member {String} address
|
|
135
135
|
*/
|
|
136
136
|
MPCDelegate.prototype['address'] = undefined;
|
|
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
33
|
var MpcTransferSource = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
35
35
|
* Constructs a new <code>MpcTransferSource</code>.
|
|
36
|
-
* The information about the transaction source types `Org-Controlled` and `User-Controlled`. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type.
|
|
36
|
+
* The information about the transaction source types `Org-Controlled` and `User-Controlled`. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. You need to provide either the `address` or `included_utxos` property. If neither property is provided, the transfer will fail. Switch between the tabs to display the properties for different transaction sources.
|
|
37
37
|
* @alias module:model/MpcTransferSource
|
|
38
38
|
* @param source_type {module:model/WalletSubtype}
|
|
39
39
|
* @param wallet_id {String} The wallet ID.
|
|
@@ -177,7 +177,7 @@ MpcTransferSource.prototype['source_type'] = undefined;
|
|
|
177
177
|
MpcTransferSource.prototype['wallet_id'] = undefined;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
* The wallet address.
|
|
180
|
+
* The wallet address. If you want to specify the UTXOs to be used, please provide the `included_utxos` property. If you specify both the `address` and `included_utxos` properties, the specified included UTXOs must belong to the address. You need to provide either the `address` or `included_utxos` property. If neither property is provided, the transfer will fail.
|
|
181
181
|
* @member {String} address
|
|
182
182
|
*/
|
|
183
183
|
MpcTransferSource.prototype['address'] = undefined;
|
|
@@ -22,17 +22,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
26
|
-
* @module model/
|
|
25
|
+
* The RefreshToken2XXResponse model module.
|
|
26
|
+
* @module model/RefreshToken2XXResponse
|
|
27
27
|
*/
|
|
28
|
-
var
|
|
28
|
+
var RefreshToken2XXResponse = /*#__PURE__*/function () {
|
|
29
29
|
/**
|
|
30
|
-
* Constructs a new <code>
|
|
31
|
-
* @alias module:model/
|
|
30
|
+
* Constructs a new <code>RefreshToken2XXResponse</code>.
|
|
31
|
+
* @alias module:model/RefreshToken2XXResponse
|
|
32
32
|
*/
|
|
33
|
-
function
|
|
34
|
-
_classCallCheck(this,
|
|
35
|
-
|
|
33
|
+
function RefreshToken2XXResponse() {
|
|
34
|
+
_classCallCheck(this, RefreshToken2XXResponse);
|
|
35
|
+
RefreshToken2XXResponse.initialize(this);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -40,22 +40,22 @@ var RefreshToken200Response = /*#__PURE__*/function () {
|
|
|
40
40
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
41
41
|
* Only for internal use.
|
|
42
42
|
*/
|
|
43
|
-
return _createClass(
|
|
43
|
+
return _createClass(RefreshToken2XXResponse, null, [{
|
|
44
44
|
key: "initialize",
|
|
45
45
|
value: function initialize(obj) {}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Constructs a <code>
|
|
48
|
+
* Constructs a <code>RefreshToken2XXResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
49
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
50
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
-
* @param {module:model/
|
|
52
|
-
* @return {module:model/
|
|
51
|
+
* @param {module:model/RefreshToken2XXResponse} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/RefreshToken2XXResponse} The populated <code>RefreshToken2XXResponse</code> instance.
|
|
53
53
|
*/
|
|
54
54
|
}, {
|
|
55
55
|
key: "constructFromObject",
|
|
56
56
|
value: function constructFromObject(data, obj) {
|
|
57
57
|
if (data) {
|
|
58
|
-
obj = obj || new
|
|
58
|
+
obj = obj || new RefreshToken2XXResponse();
|
|
59
59
|
if (data.hasOwnProperty('access_token')) {
|
|
60
60
|
obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
|
|
61
61
|
}
|
|
@@ -76,9 +76,9 @@ var RefreshToken200Response = /*#__PURE__*/function () {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* Validates the JSON data with respect to <code>
|
|
79
|
+
* Validates the JSON data with respect to <code>RefreshToken2XXResponse</code>.
|
|
80
80
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RefreshToken2XXResponse</code>.
|
|
82
82
|
*/
|
|
83
83
|
}, {
|
|
84
84
|
key: "validateJSON",
|
|
@@ -107,29 +107,29 @@ var RefreshToken200Response = /*#__PURE__*/function () {
|
|
|
107
107
|
* The new Org Access Token.
|
|
108
108
|
* @member {String} access_token
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
RefreshToken2XXResponse.prototype['access_token'] = undefined;
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
113
|
* The type of the tokens, which is Bearer.
|
|
114
114
|
* @member {String} token_type
|
|
115
115
|
*/
|
|
116
|
-
|
|
116
|
+
RefreshToken2XXResponse.prototype['token_type'] = undefined;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
119
|
* The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app.
|
|
120
120
|
* @member {String} scope
|
|
121
121
|
*/
|
|
122
|
-
|
|
122
|
+
RefreshToken2XXResponse.prototype['scope'] = undefined;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* The time in seconds in which the new Org Access Token expires.
|
|
126
126
|
* @member {Number} expires_in
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
RefreshToken2XXResponse.prototype['expires_in'] = undefined;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* The Refresh Token, used to obtain another Org Access Token when the new Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change.
|
|
132
132
|
* @member {String} refresh_token
|
|
133
133
|
*/
|
|
134
|
-
|
|
135
|
-
var _default = exports["default"] =
|
|
134
|
+
RefreshToken2XXResponse.prototype['refresh_token'] = undefined;
|
|
135
|
+
var _default = exports["default"] = RefreshToken2XXResponse;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Scopes = _interopRequireDefault(require("./Scopes"));
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
10
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
11
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -25,19 +26,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
25
26
|
*
|
|
26
27
|
*/
|
|
27
28
|
/**
|
|
28
|
-
* The
|
|
29
|
-
* @module model/
|
|
29
|
+
* The RoleScopes model module.
|
|
30
|
+
* @module model/RoleScopes
|
|
30
31
|
*/
|
|
31
|
-
var
|
|
32
|
+
var RoleScopes = /*#__PURE__*/function () {
|
|
32
33
|
/**
|
|
33
|
-
* Constructs a new <code>
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
36
|
-
* @param
|
|
34
|
+
* Constructs a new <code>RoleScopes</code>.
|
|
35
|
+
* @alias module:model/RoleScopes
|
|
36
|
+
* @param role_name {String} The user role associated with this API key.
|
|
37
|
+
* @param scopes {module:model/Scopes}
|
|
37
38
|
*/
|
|
38
|
-
function
|
|
39
|
-
_classCallCheck(this,
|
|
40
|
-
|
|
39
|
+
function RoleScopes(role_name, scopes) {
|
|
40
|
+
_classCallCheck(this, RoleScopes);
|
|
41
|
+
RoleScopes.initialize(this, role_name, scopes);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/**
|
|
@@ -45,44 +46,45 @@ var WalletBalanceSnapshot = /*#__PURE__*/function () {
|
|
|
45
46
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
47
|
* Only for internal use.
|
|
47
48
|
*/
|
|
48
|
-
return _createClass(
|
|
49
|
+
return _createClass(RoleScopes, null, [{
|
|
49
50
|
key: "initialize",
|
|
50
|
-
value: function initialize(obj,
|
|
51
|
-
obj['
|
|
51
|
+
value: function initialize(obj, role_name, scopes) {
|
|
52
|
+
obj['role_name'] = role_name;
|
|
53
|
+
obj['scopes'] = scopes;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/**
|
|
55
|
-
* Constructs a <code>
|
|
57
|
+
* Constructs a <code>RoleScopes</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
58
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
59
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
-
* @param {module:model/
|
|
59
|
-
* @return {module:model/
|
|
60
|
+
* @param {module:model/RoleScopes} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/RoleScopes} The populated <code>RoleScopes</code> instance.
|
|
60
62
|
*/
|
|
61
63
|
}, {
|
|
62
64
|
key: "constructFromObject",
|
|
63
65
|
value: function constructFromObject(data, obj) {
|
|
64
66
|
if (data) {
|
|
65
|
-
obj = obj || new
|
|
66
|
-
if (data.hasOwnProperty('
|
|
67
|
-
obj['
|
|
67
|
+
obj = obj || new RoleScopes();
|
|
68
|
+
if (data.hasOwnProperty('role_name')) {
|
|
69
|
+
obj['role_name'] = _ApiClient["default"].convertToType(data['role_name'], 'String');
|
|
68
70
|
}
|
|
69
|
-
if (data.hasOwnProperty('
|
|
70
|
-
obj['
|
|
71
|
+
if (data.hasOwnProperty('scopes')) {
|
|
72
|
+
obj['scopes'] = _Scopes["default"].constructFromObject(data['scopes']);
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
return obj;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
/**
|
|
77
|
-
* Validates the JSON data with respect to <code>
|
|
79
|
+
* Validates the JSON data with respect to <code>RoleScopes</code>.
|
|
78
80
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RoleScopes</code>.
|
|
80
82
|
*/
|
|
81
83
|
}, {
|
|
82
84
|
key: "validateJSON",
|
|
83
85
|
value: function validateJSON(data) {
|
|
84
86
|
// check to make sure all required properties are present in the JSON string
|
|
85
|
-
var _iterator = _createForOfIteratorHelper(
|
|
87
|
+
var _iterator = _createForOfIteratorHelper(RoleScopes.RequiredProperties),
|
|
86
88
|
_step;
|
|
87
89
|
try {
|
|
88
90
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -97,24 +99,30 @@ var WalletBalanceSnapshot = /*#__PURE__*/function () {
|
|
|
97
99
|
} finally {
|
|
98
100
|
_iterator.f();
|
|
99
101
|
}
|
|
100
|
-
if (data['
|
|
101
|
-
throw new Error("Expected the field `
|
|
102
|
+
if (data['role_name'] && !(typeof data['role_name'] === 'string' || data['role_name'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `role_name` to be a primitive type in the JSON string but got " + data['role_name']);
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `scopes`
|
|
106
|
+
if (data['scopes']) {
|
|
107
|
+
// data not null
|
|
108
|
+
if (!!_Scopes["default"].validateJSON) {
|
|
109
|
+
_Scopes["default"].validateJSON(data['scopes']);
|
|
110
|
+
}
|
|
102
111
|
}
|
|
103
112
|
return true;
|
|
104
113
|
}
|
|
105
114
|
}]);
|
|
106
115
|
}();
|
|
107
|
-
|
|
116
|
+
RoleScopes.RequiredProperties = ["role_name", "scopes"];
|
|
108
117
|
|
|
109
118
|
/**
|
|
110
|
-
* The
|
|
111
|
-
* @member {
|
|
119
|
+
* The user role associated with this API key.
|
|
120
|
+
* @member {String} role_name
|
|
112
121
|
*/
|
|
113
|
-
|
|
122
|
+
RoleScopes.prototype['role_name'] = undefined;
|
|
114
123
|
|
|
115
124
|
/**
|
|
116
|
-
*
|
|
117
|
-
* @member {String} snapshot_name
|
|
125
|
+
* @member {module:model/Scopes} scopes
|
|
118
126
|
*/
|
|
119
|
-
|
|
120
|
-
var _default = exports["default"] =
|
|
127
|
+
RoleScopes.prototype['scopes'] = undefined;
|
|
128
|
+
var _default = exports["default"] = RoleScopes;
|