@cobo/cobo-waas2 1.25.0 → 1.26.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 +21 -5
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +2 -2
- package/dist/api/ComplianceApi.js +2 -2
- package/dist/api/FeeStationApi.js +6 -6
- package/dist/api/PaymentApi.js +48 -6
- package/dist/api/TokenizationApi.js +122 -4
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/index.js +105 -14
- package/dist/model/AutoFuelType.js +5 -0
- package/dist/model/CreateCryptoAddressRequest.js +1 -1
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +8 -8
- package/dist/model/CreateRefundLinkRequest.js +129 -0
- package/dist/model/FeeStationCheckFeeStationUsage.js +28 -10
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +33 -20
- package/dist/model/FeeStationSponsorTransactionDescription.js +125 -0
- package/dist/model/Link.js +2 -2
- package/dist/model/LinkDisplayInfo.js +2 -2
- package/dist/model/MerchantBalance.js +1 -1
- package/dist/model/Order.js +1 -1
- package/dist/model/OrderLinkBusinessInfo.js +11 -11
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/PaymentOrderEventData.js +2 -2
- package/dist/model/PspBalance.js +1 -1
- package/dist/model/RefundLinkBusinessInfo.js +162 -0
- package/dist/model/RefundStatus.js +10 -0
- package/dist/model/SubmitKytScreeningsReviewBody.js +1 -1
- package/dist/model/SwapQuote.js +18 -18
- package/dist/model/TokenizationERC20TokenParams.js +5 -5
- package/dist/model/{TokenizationTokenPermissionParams.js → TokenizationERC20TokenPermissionParams.js} +23 -23
- package/dist/model/TokenizationERC20WrappedTokenParams.js +177 -0
- package/dist/model/TokenizationERC20WrappedTokenPermissionParams.js +166 -0
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +38 -11
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +72 -10
- package/dist/model/TokenizationListPermissionsResponse.js +146 -0
- package/dist/model/TokenizationListPermissionsResponseDataInner.js +126 -0
- package/dist/model/TokenizationOperationType.js +5 -0
- package/dist/model/TokenizationPermissionAction.js +66 -0
- package/dist/model/TokenizationSOLWrappedTokenParams.js +177 -0
- package/dist/model/TokenizationSolWrappedTokenPermissionParams.js +127 -0
- package/dist/model/TokenizationTokenDetailInfo.js +51 -5
- package/dist/model/TokenizationTokenInfo.js +26 -4
- package/dist/model/TokenizationTokenPermissionType.js +5 -0
- package/dist/model/TokenizationTokenStandard.js +10 -0
- package/dist/model/{TokenizationTokenPermissionsResponse.js → TokenizationUpdateAddressPermissions.js} +51 -53
- package/dist/model/TokenizationUpdatePermissionsEstimateFeeParams.js +198 -0
- package/dist/model/TokenizationUpdatePermissionsParams.js +145 -0
- package/dist/model/TokenizationUpdatePermissionsRequest.js +213 -0
- package/dist/model/TransactionCoboCategory.js +35 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AutoFuelType.md +2 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/ComplianceApi.md +1 -1
- package/docs/CreateCryptoAddressRequest.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +5 -5
- package/docs/CreateRefundLinkRequest.md +10 -0
- package/docs/FeeStationApi.md +4 -4
- package/docs/FeeStationCheckFeeStationUsage.md +4 -2
- package/docs/FeeStationCheckFeeStationUsageResponse.md +4 -3
- package/docs/FeeStationSponsorTransactionDescription.md +10 -0
- package/docs/Link.md +1 -1
- package/docs/LinkDisplayInfo.md +2 -2
- package/docs/MerchantBalance.md +1 -1
- package/docs/Order.md +1 -1
- package/docs/OrderLinkBusinessInfo.md +7 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/PaymentApi.md +56 -3
- package/docs/PaymentOrderEventData.md +1 -1
- package/docs/PspBalance.md +1 -1
- package/docs/RefundLinkBusinessInfo.md +13 -0
- package/docs/RefundStatus.md +4 -0
- package/docs/SwapQuote.md +10 -10
- package/docs/TokenizationApi.md +120 -2
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/{TokenizationTokenPermissionParams.md → TokenizationERC20TokenPermissionParams.md} +1 -1
- package/docs/TokenizationERC20WrappedTokenParams.md +14 -0
- package/docs/TokenizationERC20WrappedTokenPermissionParams.md +15 -0
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -1
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -1
- package/docs/TokenizationListPermissionsResponse.md +10 -0
- package/docs/TokenizationListPermissionsResponseDataInner.md +10 -0
- package/docs/TokenizationOperationType.md +2 -0
- package/docs/TokenizationPermissionAction.md +14 -0
- package/docs/TokenizationSOLWrappedTokenParams.md +14 -0
- package/docs/TokenizationSolWrappedTokenPermissionParams.md +12 -0
- package/docs/TokenizationTokenDetailInfo.md +3 -0
- package/docs/TokenizationTokenInfo.md +2 -0
- package/docs/TokenizationTokenPermissionType.md +2 -0
- package/docs/TokenizationTokenStandard.md +4 -0
- package/docs/TokenizationUpdateAddressPermissions.md +11 -0
- package/docs/TokenizationUpdatePermissionsEstimateFeeParams.md +13 -0
- package/docs/TokenizationUpdatePermissionsParams.md +10 -0
- package/docs/TokenizationUpdatePermissionsRequest.md +13 -0
- package/docs/TransactionCoboCategory.md +14 -0
- package/docs/TransactionsApi.md +1 -1
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WebhookEventData.md +1 -1
- package/package.json +1 -1
- package/docs/TokenizationTokenPermissionsResponse.md +0 -10
|
@@ -30,6 +30,16 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
var RefundStatus = exports["default"] = /*#__PURE__*/function () {
|
|
31
31
|
function RefundStatus() {
|
|
32
32
|
_classCallCheck(this, RefundStatus);
|
|
33
|
+
/**
|
|
34
|
+
* value: "AddressPending"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "AddressPending", "AddressPending");
|
|
38
|
+
/**
|
|
39
|
+
* value: "AddressSubmitted"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "AddressSubmitted", "AddressSubmitted");
|
|
33
43
|
/**
|
|
34
44
|
* value: "Pending"
|
|
35
45
|
* @const
|
|
@@ -32,7 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
32
32
|
var SubmitKytScreeningsReviewBody = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>SubmitKytScreeningsReviewBody</code>.
|
|
35
|
-
*
|
|
35
|
+
* Submission of a manual KYT review result.
|
|
36
36
|
* @alias module:model/SubmitKytScreeningsReviewBody
|
|
37
37
|
* @param transaction_id {String} The UUID of the transaction that requires a manual KYT review.
|
|
38
38
|
* @param result {module:model/KytScreeningsReviewType}
|
package/dist/model/SwapQuote.js
CHANGED
|
@@ -32,14 +32,14 @@ var SwapQuote = /*#__PURE__*/function () {
|
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>SwapQuote</code>.
|
|
34
34
|
* @alias module:model/SwapQuote
|
|
35
|
-
* @param quote_id {String} The unique
|
|
36
|
-
* @param pay_token_id {String} The ID
|
|
37
|
-
* @param pay_amount {String} The amount of
|
|
38
|
-
* @param receive_token_id {String} The ID
|
|
39
|
-
* @param receive_amount {String} The amount of
|
|
40
|
-
* @param fee_token_id {String} The ID
|
|
41
|
-
* @param fee_amount {String} The amount of
|
|
42
|
-
* @param quote_expired_timestamp {Number} The time when the
|
|
35
|
+
* @param quote_id {String} The unique id of quote.
|
|
36
|
+
* @param pay_token_id {String} The token ID to pay.
|
|
37
|
+
* @param pay_amount {String} The amount of tokens to pay.
|
|
38
|
+
* @param receive_token_id {String} The token ID to receive.
|
|
39
|
+
* @param receive_amount {String} The amount of tokens to receive.
|
|
40
|
+
* @param fee_token_id {String} The token ID for the service fee.
|
|
41
|
+
* @param fee_amount {String} The amount of tokens for the service fee.
|
|
42
|
+
* @param quote_expired_timestamp {Number} The time when the quote will expire, in Unix timestamp format, measured in milliseconds.
|
|
43
43
|
*/
|
|
44
44
|
function SwapQuote(quote_id, pay_token_id, pay_amount, receive_token_id, receive_amount, fee_token_id, fee_amount, quote_expired_timestamp) {
|
|
45
45
|
_classCallCheck(this, SwapQuote);
|
|
@@ -176,61 +176,61 @@ var SwapQuote = /*#__PURE__*/function () {
|
|
|
176
176
|
SwapQuote.RequiredProperties = ["quote_id", "pay_token_id", "pay_amount", "receive_token_id", "receive_amount", "fee_token_id", "fee_amount", "quote_expired_timestamp"];
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
* The unique
|
|
179
|
+
* The unique id of quote.
|
|
180
180
|
* @member {String} quote_id
|
|
181
181
|
*/
|
|
182
182
|
SwapQuote.prototype['quote_id'] = undefined;
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
* The ID
|
|
185
|
+
* The token ID to pay.
|
|
186
186
|
* @member {String} pay_token_id
|
|
187
187
|
*/
|
|
188
188
|
SwapQuote.prototype['pay_token_id'] = undefined;
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
|
-
* The amount of
|
|
191
|
+
* The amount of tokens to pay.
|
|
192
192
|
* @member {String} pay_amount
|
|
193
193
|
*/
|
|
194
194
|
SwapQuote.prototype['pay_amount'] = undefined;
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
* The ID
|
|
197
|
+
* The token ID to receive.
|
|
198
198
|
* @member {String} receive_token_id
|
|
199
199
|
*/
|
|
200
200
|
SwapQuote.prototype['receive_token_id'] = undefined;
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
|
-
* The amount of
|
|
203
|
+
* The amount of tokens to receive.
|
|
204
204
|
* @member {String} receive_amount
|
|
205
205
|
*/
|
|
206
206
|
SwapQuote.prototype['receive_amount'] = undefined;
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* The ID
|
|
209
|
+
* The token ID for the service fee.
|
|
210
210
|
* @member {String} fee_token_id
|
|
211
211
|
*/
|
|
212
212
|
SwapQuote.prototype['fee_token_id'] = undefined;
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
* The amount of
|
|
215
|
+
* The amount of tokens for the service fee.
|
|
216
216
|
* @member {String} fee_amount
|
|
217
217
|
*/
|
|
218
218
|
SwapQuote.prototype['fee_amount'] = undefined;
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
|
-
* The minimum amount of
|
|
221
|
+
* The minimum amount of tokens to receive if the pay amount is specified.
|
|
222
222
|
* @member {String} min_receive_amount
|
|
223
223
|
*/
|
|
224
224
|
SwapQuote.prototype['min_receive_amount'] = undefined;
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
|
-
* The maximum amount of
|
|
227
|
+
* The maximum amount of tokens to pay if the receive amount is specified.
|
|
228
228
|
* @member {String} max_pay_amount
|
|
229
229
|
*/
|
|
230
230
|
SwapQuote.prototype['max_pay_amount'] = undefined;
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
|
-
* The time when the
|
|
233
|
+
* The time when the quote will expire, in Unix timestamp format, measured in milliseconds.
|
|
234
234
|
* @member {Number} quote_expired_timestamp
|
|
235
235
|
*/
|
|
236
236
|
SwapQuote.prototype['quote_expired_timestamp'] = undefined;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _TokenizationERC20TokenPermissionParams = _interopRequireDefault(require("./TokenizationERC20TokenPermissionParams"));
|
|
9
9
|
var _TokenizationTokenStandard = _interopRequireDefault(require("./TokenizationTokenStandard"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
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); }
|
|
@@ -86,7 +86,7 @@ var TokenizationERC20TokenParams = /*#__PURE__*/function () {
|
|
|
86
86
|
obj['token_access_activated'] = _ApiClient["default"].convertToType(data['token_access_activated'], 'Boolean');
|
|
87
87
|
}
|
|
88
88
|
if (data.hasOwnProperty('permissions')) {
|
|
89
|
-
obj['permissions'] =
|
|
89
|
+
obj['permissions'] = _TokenizationERC20TokenPermissionParams["default"].constructFromObject(data['permissions']);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return obj;
|
|
@@ -126,8 +126,8 @@ var TokenizationERC20TokenParams = /*#__PURE__*/function () {
|
|
|
126
126
|
// validate the optional field `permissions`
|
|
127
127
|
if (data['permissions']) {
|
|
128
128
|
// data not null
|
|
129
|
-
if (!!
|
|
130
|
-
|
|
129
|
+
if (!!_TokenizationERC20TokenPermissionParams["default"].validateJSON) {
|
|
130
|
+
_TokenizationERC20TokenPermissionParams["default"].validateJSON(data['permissions']);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
return true;
|
|
@@ -167,7 +167,7 @@ TokenizationERC20TokenParams.prototype['decimals'] = undefined;
|
|
|
167
167
|
TokenizationERC20TokenParams.prototype['token_access_activated'] = false;
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
|
-
* @member {module:model/
|
|
170
|
+
* @member {module:model/TokenizationERC20TokenPermissionParams} permissions
|
|
171
171
|
*/
|
|
172
172
|
TokenizationERC20TokenParams.prototype['permissions'] = undefined;
|
|
173
173
|
var _default = exports["default"] = TokenizationERC20TokenParams;
|
|
@@ -22,18 +22,18 @@ 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 TokenizationERC20TokenPermissionParams model module.
|
|
26
|
+
* @module model/TokenizationERC20TokenPermissionParams
|
|
27
27
|
*/
|
|
28
|
-
var
|
|
28
|
+
var TokenizationERC20TokenPermissionParams = /*#__PURE__*/function () {
|
|
29
29
|
/**
|
|
30
|
-
* Constructs a new <code>
|
|
30
|
+
* Constructs a new <code>TokenizationERC20TokenPermissionParams</code>.
|
|
31
31
|
* Role-based permission settings for token contract. If not provided, all permissions will be granted to the issuing wallet by default.
|
|
32
|
-
* @alias module:model/
|
|
32
|
+
* @alias module:model/TokenizationERC20TokenPermissionParams
|
|
33
33
|
*/
|
|
34
|
-
function
|
|
35
|
-
_classCallCheck(this,
|
|
36
|
-
|
|
34
|
+
function TokenizationERC20TokenPermissionParams() {
|
|
35
|
+
_classCallCheck(this, TokenizationERC20TokenPermissionParams);
|
|
36
|
+
TokenizationERC20TokenPermissionParams.initialize(this);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -41,22 +41,22 @@ var TokenizationTokenPermissionParams = /*#__PURE__*/function () {
|
|
|
41
41
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
42
|
* Only for internal use.
|
|
43
43
|
*/
|
|
44
|
-
return _createClass(
|
|
44
|
+
return _createClass(TokenizationERC20TokenPermissionParams, null, [{
|
|
45
45
|
key: "initialize",
|
|
46
46
|
value: function initialize(obj) {}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* Constructs a <code>
|
|
49
|
+
* Constructs a <code>TokenizationERC20TokenPermissionParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
50
50
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
51
51
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
-
* @param {module:model/
|
|
53
|
-
* @return {module:model/
|
|
52
|
+
* @param {module:model/TokenizationERC20TokenPermissionParams} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/TokenizationERC20TokenPermissionParams} The populated <code>TokenizationERC20TokenPermissionParams</code> instance.
|
|
54
54
|
*/
|
|
55
55
|
}, {
|
|
56
56
|
key: "constructFromObject",
|
|
57
57
|
value: function constructFromObject(data, obj) {
|
|
58
58
|
if (data) {
|
|
59
|
-
obj = obj || new
|
|
59
|
+
obj = obj || new TokenizationERC20TokenPermissionParams();
|
|
60
60
|
if (data.hasOwnProperty('admin')) {
|
|
61
61
|
obj['admin'] = _ApiClient["default"].convertToType(data['admin'], ['String']);
|
|
62
62
|
}
|
|
@@ -83,9 +83,9 @@ var TokenizationTokenPermissionParams = /*#__PURE__*/function () {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Validates the JSON data with respect to <code>
|
|
86
|
+
* Validates the JSON data with respect to <code>TokenizationERC20TokenPermissionParams</code>.
|
|
87
87
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
88
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
88
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationERC20TokenPermissionParams</code>.
|
|
89
89
|
*/
|
|
90
90
|
}, {
|
|
91
91
|
key: "validateJSON",
|
|
@@ -126,41 +126,41 @@ var TokenizationTokenPermissionParams = /*#__PURE__*/function () {
|
|
|
126
126
|
* List of addresses for the admin role.
|
|
127
127
|
* @member {Array.<String>} admin
|
|
128
128
|
*/
|
|
129
|
-
|
|
129
|
+
TokenizationERC20TokenPermissionParams.prototype['admin'] = undefined;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* List of addresses for the minter role.
|
|
133
133
|
* @member {Array.<String>} minter
|
|
134
134
|
*/
|
|
135
|
-
|
|
135
|
+
TokenizationERC20TokenPermissionParams.prototype['minter'] = undefined;
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* List of addresses for the burner role.
|
|
139
139
|
* @member {Array.<String>} burner
|
|
140
140
|
*/
|
|
141
|
-
|
|
141
|
+
TokenizationERC20TokenPermissionParams.prototype['burner'] = undefined;
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* List of addresses for the manager role.
|
|
145
145
|
* @member {Array.<String>} manager
|
|
146
146
|
*/
|
|
147
|
-
|
|
147
|
+
TokenizationERC20TokenPermissionParams.prototype['manager'] = undefined;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* List of addresses for the pauser role.
|
|
151
151
|
* @member {Array.<String>} pauser
|
|
152
152
|
*/
|
|
153
|
-
|
|
153
|
+
TokenizationERC20TokenPermissionParams.prototype['pauser'] = undefined;
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
156
|
* List of addresses for the salvager role.
|
|
157
157
|
* @member {Array.<String>} salvager
|
|
158
158
|
*/
|
|
159
|
-
|
|
159
|
+
TokenizationERC20TokenPermissionParams.prototype['salvager'] = undefined;
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
162
|
* List of addresses for the upgrader role.
|
|
163
163
|
* @member {Array.<String>} upgrader
|
|
164
164
|
*/
|
|
165
|
-
|
|
166
|
-
var _default = exports["default"] =
|
|
165
|
+
TokenizationERC20TokenPermissionParams.prototype['upgrader'] = undefined;
|
|
166
|
+
var _default = exports["default"] = TokenizationERC20TokenPermissionParams;
|
|
@@ -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 _TokenizationERC20WrappedTokenPermissionParams = _interopRequireDefault(require("./TokenizationERC20WrappedTokenPermissionParams"));
|
|
9
|
+
var _TokenizationTokenStandard = _interopRequireDefault(require("./TokenizationTokenStandard"));
|
|
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 TokenizationERC20WrappedTokenParams model module.
|
|
31
|
+
* @module model/TokenizationERC20WrappedTokenParams
|
|
32
|
+
*/
|
|
33
|
+
var TokenizationERC20WrappedTokenParams = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>TokenizationERC20WrappedTokenParams</code>.
|
|
36
|
+
* @alias module:model/TokenizationERC20WrappedTokenParams
|
|
37
|
+
* @param standard {module:model/TokenizationTokenStandard}
|
|
38
|
+
* @param name {String} The name of the token.
|
|
39
|
+
* @param symbol {String} The symbol of the token.
|
|
40
|
+
* @param underlying_token {String} The address of the underlying token that this tokenized asset represents.
|
|
41
|
+
*/
|
|
42
|
+
function TokenizationERC20WrappedTokenParams(standard, name, symbol, underlying_token) {
|
|
43
|
+
_classCallCheck(this, TokenizationERC20WrappedTokenParams);
|
|
44
|
+
TokenizationERC20WrappedTokenParams.initialize(this, standard, name, symbol, underlying_token);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(TokenizationERC20WrappedTokenParams, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, standard, name, symbol, underlying_token) {
|
|
55
|
+
obj['standard'] = standard;
|
|
56
|
+
obj['name'] = name;
|
|
57
|
+
obj['symbol'] = symbol;
|
|
58
|
+
obj['underlying_token'] = underlying_token;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>TokenizationERC20WrappedTokenParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/TokenizationERC20WrappedTokenParams} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/TokenizationERC20WrappedTokenParams} The populated <code>TokenizationERC20WrappedTokenParams</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new TokenizationERC20WrappedTokenParams();
|
|
73
|
+
if (data.hasOwnProperty('standard')) {
|
|
74
|
+
obj['standard'] = _TokenizationTokenStandard["default"].constructFromObject(data['standard']);
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('name')) {
|
|
77
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('symbol')) {
|
|
80
|
+
obj['symbol'] = _ApiClient["default"].convertToType(data['symbol'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('permissions')) {
|
|
83
|
+
obj['permissions'] = _TokenizationERC20WrappedTokenPermissionParams["default"].constructFromObject(data['permissions']);
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('token_access_activated')) {
|
|
86
|
+
obj['token_access_activated'] = _ApiClient["default"].convertToType(data['token_access_activated'], 'Boolean');
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('underlying_token')) {
|
|
89
|
+
obj['underlying_token'] = _ApiClient["default"].convertToType(data['underlying_token'], 'String');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return obj;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Validates the JSON data with respect to <code>TokenizationERC20WrappedTokenParams</code>.
|
|
97
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
98
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationERC20WrappedTokenParams</code>.
|
|
99
|
+
*/
|
|
100
|
+
}, {
|
|
101
|
+
key: "validateJSON",
|
|
102
|
+
value: function validateJSON(data) {
|
|
103
|
+
// check to make sure all required properties are present in the JSON string
|
|
104
|
+
var _iterator = _createForOfIteratorHelper(TokenizationERC20WrappedTokenParams.RequiredProperties),
|
|
105
|
+
_step;
|
|
106
|
+
try {
|
|
107
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
108
|
+
var property = _step.value;
|
|
109
|
+
if (!data.hasOwnProperty(property)) {
|
|
110
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// ensure the json data is a string
|
|
114
|
+
} catch (err) {
|
|
115
|
+
_iterator.e(err);
|
|
116
|
+
} finally {
|
|
117
|
+
_iterator.f();
|
|
118
|
+
}
|
|
119
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
121
|
+
}
|
|
122
|
+
// ensure the json data is a string
|
|
123
|
+
if (data['symbol'] && !(typeof data['symbol'] === 'string' || data['symbol'] instanceof String)) {
|
|
124
|
+
throw new Error("Expected the field `symbol` to be a primitive type in the JSON string but got " + data['symbol']);
|
|
125
|
+
}
|
|
126
|
+
// validate the optional field `permissions`
|
|
127
|
+
if (data['permissions']) {
|
|
128
|
+
// data not null
|
|
129
|
+
if (!!_TokenizationERC20WrappedTokenPermissionParams["default"].validateJSON) {
|
|
130
|
+
_TokenizationERC20WrappedTokenPermissionParams["default"].validateJSON(data['permissions']);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['underlying_token'] && !(typeof data['underlying_token'] === 'string' || data['underlying_token'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `underlying_token` to be a primitive type in the JSON string but got " + data['underlying_token']);
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
}]);
|
|
140
|
+
}();
|
|
141
|
+
TokenizationERC20WrappedTokenParams.RequiredProperties = ["standard", "name", "symbol", "underlying_token"];
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @member {module:model/TokenizationTokenStandard} standard
|
|
145
|
+
*/
|
|
146
|
+
TokenizationERC20WrappedTokenParams.prototype['standard'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The name of the token.
|
|
150
|
+
* @member {String} name
|
|
151
|
+
*/
|
|
152
|
+
TokenizationERC20WrappedTokenParams.prototype['name'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The symbol of the token.
|
|
156
|
+
* @member {String} symbol
|
|
157
|
+
*/
|
|
158
|
+
TokenizationERC20WrappedTokenParams.prototype['symbol'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @member {module:model/TokenizationERC20WrappedTokenPermissionParams} permissions
|
|
162
|
+
*/
|
|
163
|
+
TokenizationERC20WrappedTokenParams.prototype['permissions'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations.
|
|
167
|
+
* @member {Boolean} token_access_activated
|
|
168
|
+
* @default false
|
|
169
|
+
*/
|
|
170
|
+
TokenizationERC20WrappedTokenParams.prototype['token_access_activated'] = false;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The address of the underlying token that this tokenized asset represents.
|
|
174
|
+
* @member {String} underlying_token
|
|
175
|
+
*/
|
|
176
|
+
TokenizationERC20WrappedTokenParams.prototype['underlying_token'] = undefined;
|
|
177
|
+
var _default = exports["default"] = TokenizationERC20WrappedTokenParams;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
15
|
+
* Cobo Wallet as a Service 2.0
|
|
16
|
+
*
|
|
17
|
+
* Contact: help@cobo.com
|
|
18
|
+
*
|
|
19
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20
|
+
* https://openapi-generator.tech
|
|
21
|
+
* Do not edit the class manually.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* The TokenizationERC20WrappedTokenPermissionParams model module.
|
|
26
|
+
* @module model/TokenizationERC20WrappedTokenPermissionParams
|
|
27
|
+
*/
|
|
28
|
+
var TokenizationERC20WrappedTokenPermissionParams = /*#__PURE__*/function () {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>TokenizationERC20WrappedTokenPermissionParams</code>.
|
|
31
|
+
* Role-based permission settings for token contract. If not provided, all permissions will be granted to the issuing wallet by default.
|
|
32
|
+
* @alias module:model/TokenizationERC20WrappedTokenPermissionParams
|
|
33
|
+
*/
|
|
34
|
+
function TokenizationERC20WrappedTokenPermissionParams() {
|
|
35
|
+
_classCallCheck(this, TokenizationERC20WrappedTokenPermissionParams);
|
|
36
|
+
TokenizationERC20WrappedTokenPermissionParams.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(TokenizationERC20WrappedTokenPermissionParams, null, [{
|
|
45
|
+
key: "initialize",
|
|
46
|
+
value: function initialize(obj) {}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>TokenizationERC20WrappedTokenPermissionParams</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/TokenizationERC20WrappedTokenPermissionParams} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/TokenizationERC20WrappedTokenPermissionParams} The populated <code>TokenizationERC20WrappedTokenPermissionParams</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new TokenizationERC20WrappedTokenPermissionParams();
|
|
60
|
+
if (data.hasOwnProperty('admin')) {
|
|
61
|
+
obj['admin'] = _ApiClient["default"].convertToType(data['admin'], ['String']);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('minter')) {
|
|
64
|
+
obj['minter'] = _ApiClient["default"].convertToType(data['minter'], ['String']);
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('wrapper')) {
|
|
67
|
+
obj['wrapper'] = _ApiClient["default"].convertToType(data['wrapper'], ['String']);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('manager')) {
|
|
70
|
+
obj['manager'] = _ApiClient["default"].convertToType(data['manager'], ['String']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('pauser')) {
|
|
73
|
+
obj['pauser'] = _ApiClient["default"].convertToType(data['pauser'], ['String']);
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('salvager')) {
|
|
76
|
+
obj['salvager'] = _ApiClient["default"].convertToType(data['salvager'], ['String']);
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('upgrader')) {
|
|
79
|
+
obj['upgrader'] = _ApiClient["default"].convertToType(data['upgrader'], ['String']);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Validates the JSON data with respect to <code>TokenizationERC20WrappedTokenPermissionParams</code>.
|
|
87
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
88
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationERC20WrappedTokenPermissionParams</code>.
|
|
89
|
+
*/
|
|
90
|
+
}, {
|
|
91
|
+
key: "validateJSON",
|
|
92
|
+
value: function validateJSON(data) {
|
|
93
|
+
// ensure the json data is an array
|
|
94
|
+
if (!Array.isArray(data['admin'])) {
|
|
95
|
+
throw new Error("Expected the field `admin` to be an array in the JSON data but got " + data['admin']);
|
|
96
|
+
}
|
|
97
|
+
// ensure the json data is an array
|
|
98
|
+
if (!Array.isArray(data['minter'])) {
|
|
99
|
+
throw new Error("Expected the field `minter` to be an array in the JSON data but got " + data['minter']);
|
|
100
|
+
}
|
|
101
|
+
// ensure the json data is an array
|
|
102
|
+
if (!Array.isArray(data['wrapper'])) {
|
|
103
|
+
throw new Error("Expected the field `wrapper` to be an array in the JSON data but got " + data['wrapper']);
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is an array
|
|
106
|
+
if (!Array.isArray(data['manager'])) {
|
|
107
|
+
throw new Error("Expected the field `manager` to be an array in the JSON data but got " + data['manager']);
|
|
108
|
+
}
|
|
109
|
+
// ensure the json data is an array
|
|
110
|
+
if (!Array.isArray(data['pauser'])) {
|
|
111
|
+
throw new Error("Expected the field `pauser` to be an array in the JSON data but got " + data['pauser']);
|
|
112
|
+
}
|
|
113
|
+
// ensure the json data is an array
|
|
114
|
+
if (!Array.isArray(data['salvager'])) {
|
|
115
|
+
throw new Error("Expected the field `salvager` to be an array in the JSON data but got " + data['salvager']);
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is an array
|
|
118
|
+
if (!Array.isArray(data['upgrader'])) {
|
|
119
|
+
throw new Error("Expected the field `upgrader` to be an array in the JSON data but got " + data['upgrader']);
|
|
120
|
+
}
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
}]);
|
|
124
|
+
}();
|
|
125
|
+
/**
|
|
126
|
+
* List of addresses for the admin role.
|
|
127
|
+
* @member {Array.<String>} admin
|
|
128
|
+
*/
|
|
129
|
+
TokenizationERC20WrappedTokenPermissionParams.prototype['admin'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* List of addresses for the minter role.
|
|
133
|
+
* @member {Array.<String>} minter
|
|
134
|
+
*/
|
|
135
|
+
TokenizationERC20WrappedTokenPermissionParams.prototype['minter'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* List of addresses for the wrapper role.
|
|
139
|
+
* @member {Array.<String>} wrapper
|
|
140
|
+
*/
|
|
141
|
+
TokenizationERC20WrappedTokenPermissionParams.prototype['wrapper'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* List of addresses for the manager role.
|
|
145
|
+
* @member {Array.<String>} manager
|
|
146
|
+
*/
|
|
147
|
+
TokenizationERC20WrappedTokenPermissionParams.prototype['manager'] = undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* List of addresses for the pauser role.
|
|
151
|
+
* @member {Array.<String>} pauser
|
|
152
|
+
*/
|
|
153
|
+
TokenizationERC20WrappedTokenPermissionParams.prototype['pauser'] = undefined;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* List of addresses for the salvager role.
|
|
157
|
+
* @member {Array.<String>} salvager
|
|
158
|
+
*/
|
|
159
|
+
TokenizationERC20WrappedTokenPermissionParams.prototype['salvager'] = undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* List of addresses for the upgrader role.
|
|
163
|
+
* @member {Array.<String>} upgrader
|
|
164
|
+
*/
|
|
165
|
+
TokenizationERC20WrappedTokenPermissionParams.prototype['upgrader'] = undefined;
|
|
166
|
+
var _default = exports["default"] = TokenizationERC20WrappedTokenPermissionParams;
|