@cobo/cobo-waas2 1.20.0 → 1.22.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 +60 -4
- package/dist/ApiClient.js +11 -2
- package/dist/PreRequestScript.js +2 -4
- package/dist/api/AutoSweepApi.js +289 -0
- package/dist/api/PaymentApi.js +386 -24
- package/dist/api/TokenizationApi.js +1024 -0
- package/dist/api/TransactionsApi.js +103 -2
- package/dist/api/WalletsApi.js +2 -2
- package/dist/crypto/ApiSigner.js +5 -1
- package/dist/index.js +175 -0
- package/dist/model/AddressesEventData.js +3 -3
- package/dist/model/ApprovalDetail.js +7 -7
- package/dist/model/AutoSweepTask.js +198 -0
- package/dist/model/AutoSweepTaskStatus.js +61 -0
- package/dist/model/BalanceUpdateInfoEventData.js +3 -3
- package/dist/model/ChainsEventData.js +3 -3
- package/dist/model/CreateAutoSweepTask.js +126 -0
- package/dist/model/CreateCryptoAddressRequest.js +138 -0
- package/dist/model/CreateCustodialWalletParams.js +9 -0
- package/dist/model/CreateExchangeWalletParams.js +14 -0
- package/dist/model/CreateMpcWalletParams.js +14 -0
- package/dist/model/CreatePaymentOrderRequest.js +5 -5
- package/dist/model/CreateSafeWalletParams.js +9 -0
- package/dist/model/CreateSettlement.js +27 -4
- package/dist/model/CreateSmartContractWalletParams.js +6 -0
- package/dist/model/CreateSweepToAddress.js +126 -0
- package/dist/model/CreateWalletParams.js +6 -0
- package/dist/model/CreatedWalletInfo.js +6 -0
- package/dist/model/CryptoAddress.js +12 -12
- package/dist/model/CustodialWalletInfo.js +9 -0
- package/dist/model/DeleteCryptoAddress201Response.js +110 -0
- package/dist/model/ExchangeWalletInfo.js +14 -0
- package/dist/model/ForcedSweep.js +9 -9
- package/dist/model/ForcedSweepRequest.js +8 -9
- package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
- package/dist/model/ListAutoSweepTask200Response.js +123 -0
- package/dist/model/ListMerchantBalances200Response.js +107 -0
- package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
- package/dist/model/ListSettlementDetails200Response.js +123 -0
- package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
- package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
- package/dist/model/MPCVaultEventData.js +3 -3
- package/dist/model/MPCWalletInfo.js +14 -0
- package/dist/model/MerchantBalance.js +201 -0
- package/dist/model/PaymentAddressUpdateEventData.js +13 -13
- package/dist/model/PaymentOrderEventData.js +3 -3
- package/dist/model/PaymentRefundEventData.js +3 -3
- package/dist/model/PaymentSettlementEvent.js +42 -3
- package/dist/model/PaymentTransactionEventData.js +6 -6
- package/dist/model/PaymentWalletBalance.js +177 -0
- package/dist/model/PspBalance.js +175 -0
- package/dist/model/ReceivedAmountPerAddress.js +126 -0
- package/dist/model/SafeWallet.js +9 -0
- package/dist/model/Settlement.js +27 -0
- package/dist/model/SettlementDetail.js +26 -0
- package/dist/model/SettlementInfo.js +7 -7
- package/dist/model/SmartContractWalletInfo.js +6 -0
- package/dist/model/SuspendedTokenEventData.js +3 -3
- package/dist/model/SweepToAddress.js +135 -0
- package/dist/model/SweepToAddressStatus.js +61 -0
- package/dist/model/TSSRequestWebhookEventData.js +3 -3
- package/dist/model/TokenListingEventData.js +3 -3
- package/dist/model/TokenizationActivityInfo.js +8 -4
- package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
- package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
- package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
- package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
- package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
- package/dist/model/TokenizationBurnTokenRequest.js +13 -0
- package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationContractCallParamsData.js +43 -9
- package/dist/model/TokenizationContractCallRequest.js +13 -0
- package/dist/model/TokenizationContractCallType.js +5 -0
- package/dist/model/TokenizationERC20TokenParams.js +4 -4
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
- package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
- package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationMintTokenRequest.js +13 -0
- package/dist/model/TokenizationMpcOperationSource.js +2 -2
- package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationPauseTokenRequest.js +13 -0
- package/dist/model/TokenizationSOLTokenParams.js +173 -0
- package/dist/model/TokenizationSolContractCallParams.js +137 -0
- package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
- package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationTokenDetailInfo.js +6 -6
- package/dist/model/TokenizationTokenInfo.js +4 -4
- package/dist/model/TokenizationTokenOperationSource.js +1 -1
- package/dist/model/TokenizationTokenPermissionParams.js +1 -1
- package/dist/model/TokenizationTokenPermissionType.js +15 -0
- package/dist/model/TokenizationTokenStandard.js +5 -0
- package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
- package/dist/model/TokenizationWeb3OperationSource.js +2 -2
- package/dist/model/TokensEventData.js +3 -3
- package/dist/model/TopUpAddress.js +0 -1
- package/dist/model/TransactionWebhookEventData.js +3 -3
- package/dist/model/UpdateCustodialWalletParams.js +13 -6
- package/dist/model/UpdateMpcWalletParams.js +13 -6
- package/dist/model/UpdateTopUpAddress.js +3 -3
- package/dist/model/UpdateWalletParams.js +6 -0
- package/dist/model/WalletInfo.js +6 -0
- package/dist/model/WalletInfoEventData.js +3 -3
- package/dist/model/WebhookEventData.js +19 -7
- package/dist/model/WebhookEventDataType.js +2 -2
- package/docs/AddressesEventData.md +1 -1
- package/docs/ApprovalDetail.md +1 -1
- package/docs/AutoSweepApi.md +285 -0
- package/docs/AutoSweepTask.md +16 -0
- package/docs/AutoSweepTaskStatus.md +12 -0
- package/docs/BalanceUpdateInfoEventData.md +1 -1
- package/docs/ChainsEventData.md +1 -1
- package/docs/CreateAutoSweepTask.md +10 -0
- package/docs/CreateCryptoAddressRequest.md +11 -0
- package/docs/CreateCustodialWalletParams.md +1 -0
- package/docs/CreateExchangeWalletParams.md +1 -0
- package/docs/CreateMpcWalletParams.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +3 -3
- package/docs/CreateSafeWalletParams.md +1 -0
- package/docs/CreateSettlement.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -0
- package/docs/CreateSweepToAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -0
- package/docs/CreatedWalletInfo.md +1 -0
- package/docs/CryptoAddress.md +1 -1
- package/docs/CustodialWalletInfo.md +1 -0
- package/docs/DeleteCryptoAddress201Response.md +9 -0
- package/docs/ExchangeWalletInfo.md +1 -0
- package/docs/ForcedSweep.md +7 -7
- package/docs/ForcedSweepRequest.md +4 -4
- package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
- package/docs/ListAutoSweepTask200Response.md +10 -0
- package/docs/ListMerchantBalances200Response.md +9 -0
- package/docs/ListPaymentWalletBalances200Response.md +9 -0
- package/docs/ListSettlementDetails200Response.md +10 -0
- package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
- package/docs/ListWalletSweepToAddresses200Response.md +9 -0
- package/docs/MPCVaultEventData.md +1 -1
- package/docs/MPCWalletInfo.md +1 -0
- package/docs/MerchantBalance.md +16 -0
- package/docs/PaymentAddressUpdateEventData.md +6 -6
- package/docs/PaymentApi.md +403 -16
- package/docs/PaymentOrderEventData.md +1 -1
- package/docs/PaymentRefundEventData.md +1 -1
- package/docs/PaymentSettlementEvent.md +4 -1
- package/docs/PaymentTransactionEventData.md +4 -4
- package/docs/PaymentWalletBalance.md +14 -0
- package/docs/PspBalance.md +14 -0
- package/docs/ReceivedAmountPerAddress.md +10 -0
- package/docs/SafeWallet.md +1 -0
- package/docs/Settlement.md +3 -0
- package/docs/SettlementDetail.md +2 -0
- package/docs/SettlementInfo.md +6 -6
- package/docs/SmartContractWalletInfo.md +1 -0
- package/docs/SuspendedTokenEventData.md +1 -1
- package/docs/SweepToAddress.md +11 -0
- package/docs/SweepToAddressStatus.md +12 -0
- package/docs/TSSRequestWebhookEventData.md +1 -1
- package/docs/TokenListingEventData.md +1 -1
- package/docs/TokenizationActivityInfo.md +2 -2
- package/docs/TokenizationAllowlistActivationRequest.md +1 -0
- package/docs/TokenizationAllowlistAddressNote.md +3 -3
- package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
- package/docs/TokenizationApi.md +1069 -0
- package/docs/TokenizationBlocklistAddressNote.md +3 -3
- package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
- package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
- package/docs/TokenizationBurnTokenRequest.md +1 -0
- package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
- package/docs/TokenizationContractCallParamsData.md +2 -1
- package/docs/TokenizationContractCallRequest.md +1 -0
- package/docs/TokenizationContractCallType.md +2 -0
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
- package/docs/TokenizationIssuedTokenRequest.md +2 -1
- package/docs/TokenizationMintEstimateFeeParams.md +1 -0
- package/docs/TokenizationMintTokenRequest.md +1 -0
- package/docs/TokenizationMpcOperationSource.md +1 -1
- package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationPauseTokenRequest.md +1 -0
- package/docs/TokenizationSOLTokenParams.md +14 -0
- package/docs/TokenizationSolContractCallParams.md +10 -0
- package/docs/TokenizationSolTokenPermissionParams.md +13 -0
- package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
- package/docs/TokenizationTokenDetailInfo.md +1 -1
- package/docs/TokenizationTokenInfo.md +1 -1
- package/docs/TokenizationTokenOperationSource.md +1 -1
- package/docs/TokenizationTokenPermissionType.md +6 -0
- package/docs/TokenizationTokenStandard.md +2 -0
- package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationUnpauseTokenRequest.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
- package/docs/TokenizationWeb3OperationSource.md +1 -1
- package/docs/TokensEventData.md +1 -1
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +113 -1
- package/docs/UpdateCustodialWalletParams.md +2 -1
- package/docs/UpdateMpcWalletParams.md +2 -1
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/UpdateWalletParams.md +1 -0
- package/docs/WalletInfo.md +1 -0
- package/docs/WalletInfoEventData.md +1 -1
- package/docs/WalletsApi.md +1 -1
- package/docs/WebhookEventData.md +9 -7
- package/docs/WebhookEventDataType.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,135 @@
|
|
|
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 _SweepToAddressStatus = _interopRequireDefault(require("./SweepToAddressStatus"));
|
|
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 _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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
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); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The SweepToAddress model module.
|
|
30
|
+
* @module model/SweepToAddress
|
|
31
|
+
*/
|
|
32
|
+
var SweepToAddress = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>SweepToAddress</code>.
|
|
35
|
+
* The sweep to address information.
|
|
36
|
+
* @alias module:model/SweepToAddress
|
|
37
|
+
* @param address {String} The wallet address.
|
|
38
|
+
* @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
39
|
+
*/
|
|
40
|
+
function SweepToAddress(address, chain_id) {
|
|
41
|
+
_classCallCheck(this, SweepToAddress);
|
|
42
|
+
SweepToAddress.initialize(this, address, chain_id);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(SweepToAddress, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, address, chain_id) {
|
|
53
|
+
obj['address'] = address;
|
|
54
|
+
obj['chain_id'] = chain_id;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>SweepToAddress</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/SweepToAddress} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/SweepToAddress} The populated <code>SweepToAddress</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new SweepToAddress();
|
|
69
|
+
if (data.hasOwnProperty('address')) {
|
|
70
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
73
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('status')) {
|
|
76
|
+
obj['status'] = _SweepToAddressStatus["default"].constructFromObject(data['status']);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return obj;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Validates the JSON data with respect to <code>SweepToAddress</code>.
|
|
84
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
85
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SweepToAddress</code>.
|
|
86
|
+
*/
|
|
87
|
+
}, {
|
|
88
|
+
key: "validateJSON",
|
|
89
|
+
value: function validateJSON(data) {
|
|
90
|
+
// check to make sure all required properties are present in the JSON string
|
|
91
|
+
var _iterator = _createForOfIteratorHelper(SweepToAddress.RequiredProperties),
|
|
92
|
+
_step;
|
|
93
|
+
try {
|
|
94
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
95
|
+
var property = _step.value;
|
|
96
|
+
if (!data.hasOwnProperty(property)) {
|
|
97
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// ensure the json data is a string
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_iterator.e(err);
|
|
103
|
+
} finally {
|
|
104
|
+
_iterator.f();
|
|
105
|
+
}
|
|
106
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
107
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
108
|
+
}
|
|
109
|
+
// ensure the json data is a string
|
|
110
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
111
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
}();
|
|
117
|
+
SweepToAddress.RequiredProperties = ["address", "chain_id"];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The wallet address.
|
|
121
|
+
* @member {String} address
|
|
122
|
+
*/
|
|
123
|
+
SweepToAddress.prototype['address'] = undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
127
|
+
* @member {String} chain_id
|
|
128
|
+
*/
|
|
129
|
+
SweepToAddress.prototype['chain_id'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @member {module:model/SweepToAddressStatus} status
|
|
133
|
+
*/
|
|
134
|
+
SweepToAddress.prototype['status'] = undefined;
|
|
135
|
+
var _default = exports["default"] = SweepToAddress;
|
|
@@ -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 SweepToAddressStatus.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var SweepToAddressStatus = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function SweepToAddressStatus() {
|
|
32
|
+
_classCallCheck(this, SweepToAddressStatus);
|
|
33
|
+
/**
|
|
34
|
+
* value: "Valid"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "Valid", "Valid");
|
|
38
|
+
/**
|
|
39
|
+
* value: "Invalid"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "Invalid", "Invalid");
|
|
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(SweepToAddressStatus, null, [{
|
|
50
|
+
key: "constructFromObject",
|
|
51
|
+
value:
|
|
52
|
+
/**
|
|
53
|
+
* Returns a <code>SweepToAddressStatus</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/SweepToAddressStatus} The enum <code>SweepToAddressStatus</code> value.
|
|
56
|
+
*/
|
|
57
|
+
function constructFromObject(object) {
|
|
58
|
+
return object;
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
}();
|
|
@@ -39,7 +39,7 @@ var TSSRequestWebhookEventData = /*#__PURE__*/function () {
|
|
|
39
39
|
* @alias module:model/TSSRequestWebhookEventData
|
|
40
40
|
* @implements module:model/WebhookEventDataType
|
|
41
41
|
* @implements module:model/TSSRequest
|
|
42
|
-
* @param data_type {module:model/TSSRequestWebhookEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The
|
|
42
|
+
* @param data_type {module:model/TSSRequestWebhookEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
43
43
|
*/
|
|
44
44
|
function TSSRequestWebhookEventData(data_type) {
|
|
45
45
|
_classCallCheck(this, TSSRequestWebhookEventData);
|
|
@@ -154,7 +154,7 @@ var TSSRequestWebhookEventData = /*#__PURE__*/function () {
|
|
|
154
154
|
TSSRequestWebhookEventData.RequiredProperties = ["data_type"];
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The
|
|
157
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
158
158
|
* @member {module:model/TSSRequestWebhookEventData.DataTypeEnum} data_type
|
|
159
159
|
*/
|
|
160
160
|
TSSRequestWebhookEventData.prototype['data_type'] = undefined;
|
|
@@ -200,7 +200,7 @@ TSSRequestWebhookEventData.prototype['created_timestamp'] = undefined;
|
|
|
200
200
|
|
|
201
201
|
// Implement WebhookEventDataType interface:
|
|
202
202
|
/**
|
|
203
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The
|
|
203
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
204
204
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
205
205
|
*/
|
|
206
206
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -41,7 +41,7 @@ var TokenListingEventData = /*#__PURE__*/function () {
|
|
|
41
41
|
* @alias module:model/TokenListingEventData
|
|
42
42
|
* @implements module:model/WebhookEventDataType
|
|
43
43
|
* @implements module:model/TokenListing
|
|
44
|
-
* @param data_type {module:model/TokenListingEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The
|
|
44
|
+
* @param data_type {module:model/TokenListingEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
45
45
|
* @param request_id {String} The unique identifier of the token listing request.
|
|
46
46
|
* @param chain_id {String} The ID of the blockchain where the token is deployed.
|
|
47
47
|
* @param contract_address {String} The token's contract address on the specified blockchain.
|
|
@@ -184,7 +184,7 @@ var TokenListingEventData = /*#__PURE__*/function () {
|
|
|
184
184
|
TokenListingEventData.RequiredProperties = ["data_type", "request_id", "chain_id", "contract_address", "wallet_type", "wallet_subtype", "status"];
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The
|
|
187
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
188
188
|
* @member {module:model/TokenListingEventData.DataTypeEnum} data_type
|
|
189
189
|
*/
|
|
190
190
|
TokenListingEventData.prototype['data_type'] = undefined;
|
|
@@ -252,7 +252,7 @@ TokenListingEventData.prototype['updated_timestamp'] = undefined;
|
|
|
252
252
|
|
|
253
253
|
// Implement WebhookEventDataType interface:
|
|
254
254
|
/**
|
|
255
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The
|
|
255
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
256
256
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
257
257
|
*/
|
|
258
258
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -43,11 +43,13 @@ var TokenizationActivityInfo = /*#__PURE__*/function () {
|
|
|
43
43
|
* @param source {module:model/TokenizationTokenOperationSource}
|
|
44
44
|
* @param initiator {String} The initiator of the activity.
|
|
45
45
|
* @param initiator_type {module:model/TransactionInitiatorType}
|
|
46
|
+
* @param transaction_ids {Array.<String>} The IDs of the corresponding transactions of the activity.
|
|
47
|
+
* @param created_timestamp {Number} The creation timestamp of the activity in milliseconds since the Unix epoch.
|
|
46
48
|
* @param updated_timestamp {Number} The last update timestamp of the activity in milliseconds since the Unix epoch.
|
|
47
49
|
*/
|
|
48
|
-
function TokenizationActivityInfo(activity_id, token_id, type, status, source, initiator, initiator_type, updated_timestamp) {
|
|
50
|
+
function TokenizationActivityInfo(activity_id, token_id, type, status, source, initiator, initiator_type, transaction_ids, created_timestamp, updated_timestamp) {
|
|
49
51
|
_classCallCheck(this, TokenizationActivityInfo);
|
|
50
|
-
TokenizationActivityInfo.initialize(this, activity_id, token_id, type, status, source, initiator, initiator_type, updated_timestamp);
|
|
52
|
+
TokenizationActivityInfo.initialize(this, activity_id, token_id, type, status, source, initiator, initiator_type, transaction_ids, created_timestamp, updated_timestamp);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
/**
|
|
@@ -57,7 +59,7 @@ var TokenizationActivityInfo = /*#__PURE__*/function () {
|
|
|
57
59
|
*/
|
|
58
60
|
return _createClass(TokenizationActivityInfo, null, [{
|
|
59
61
|
key: "initialize",
|
|
60
|
-
value: function initialize(obj, activity_id, token_id, type, status, source, initiator, initiator_type, updated_timestamp) {
|
|
62
|
+
value: function initialize(obj, activity_id, token_id, type, status, source, initiator, initiator_type, transaction_ids, created_timestamp, updated_timestamp) {
|
|
61
63
|
obj['activity_id'] = activity_id;
|
|
62
64
|
obj['token_id'] = token_id;
|
|
63
65
|
obj['type'] = type;
|
|
@@ -65,6 +67,8 @@ var TokenizationActivityInfo = /*#__PURE__*/function () {
|
|
|
65
67
|
obj['source'] = source;
|
|
66
68
|
obj['initiator'] = initiator;
|
|
67
69
|
obj['initiator_type'] = initiator_type;
|
|
70
|
+
obj['transaction_ids'] = transaction_ids;
|
|
71
|
+
obj['created_timestamp'] = created_timestamp;
|
|
68
72
|
obj['updated_timestamp'] = updated_timestamp;
|
|
69
73
|
}
|
|
70
74
|
|
|
@@ -164,7 +168,7 @@ var TokenizationActivityInfo = /*#__PURE__*/function () {
|
|
|
164
168
|
}
|
|
165
169
|
}]);
|
|
166
170
|
}();
|
|
167
|
-
TokenizationActivityInfo.RequiredProperties = ["activity_id", "token_id", "type", "status", "source", "initiator", "initiator_type", "updated_timestamp"];
|
|
171
|
+
TokenizationActivityInfo.RequiredProperties = ["activity_id", "token_id", "type", "status", "source", "initiator", "initiator_type", "transaction_ids", "created_timestamp", "updated_timestamp"];
|
|
168
172
|
|
|
169
173
|
/**
|
|
170
174
|
* The ID of the activity.
|
|
@@ -88,6 +88,9 @@ var TokenizationAllowlistActivationRequest = /*#__PURE__*/function () {
|
|
|
88
88
|
if (data.hasOwnProperty('fee')) {
|
|
89
89
|
obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
|
|
90
90
|
}
|
|
91
|
+
if (data.hasOwnProperty('request_id')) {
|
|
92
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
93
|
+
}
|
|
91
94
|
}
|
|
92
95
|
return obj;
|
|
93
96
|
}
|
|
@@ -133,6 +136,10 @@ var TokenizationAllowlistActivationRequest = /*#__PURE__*/function () {
|
|
|
133
136
|
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
134
137
|
}
|
|
135
138
|
}
|
|
139
|
+
// ensure the json data is a string
|
|
140
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
141
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
142
|
+
}
|
|
136
143
|
return true;
|
|
137
144
|
}
|
|
138
145
|
}]);
|
|
@@ -161,6 +168,12 @@ TokenizationAllowlistActivationRequest.prototype['app_initiator'] = undefined;
|
|
|
161
168
|
*/
|
|
162
169
|
TokenizationAllowlistActivationRequest.prototype['fee'] = undefined;
|
|
163
170
|
|
|
171
|
+
/**
|
|
172
|
+
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
173
|
+
* @member {String} request_id
|
|
174
|
+
*/
|
|
175
|
+
TokenizationAllowlistActivationRequest.prototype['request_id'] = undefined;
|
|
176
|
+
|
|
164
177
|
// Implement TokenizationAllowlistActivationParams interface:
|
|
165
178
|
/**
|
|
166
179
|
* @member {module:model/TokenizationTokenOperationSource} source
|
|
@@ -32,7 +32,7 @@ var TokenizationAllowlistAddressNote = /*#__PURE__*/function () {
|
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>TokenizationAllowlistAddressNote</code>.
|
|
34
34
|
* @alias module:model/TokenizationAllowlistAddressNote
|
|
35
|
-
* @param address {String} The
|
|
35
|
+
* @param address {String} The address on the allowlist.
|
|
36
36
|
*/
|
|
37
37
|
function TokenizationAllowlistAddressNote(address) {
|
|
38
38
|
_classCallCheck(this, TokenizationAllowlistAddressNote);
|
|
@@ -113,19 +113,19 @@ var TokenizationAllowlistAddressNote = /*#__PURE__*/function () {
|
|
|
113
113
|
TokenizationAllowlistAddressNote.RequiredProperties = ["address"];
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* The
|
|
116
|
+
* The address on the allowlist.
|
|
117
117
|
* @member {String} address
|
|
118
118
|
*/
|
|
119
119
|
TokenizationAllowlistAddressNote.prototype['address'] = undefined;
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* The note for the
|
|
122
|
+
* The note for the address on the allowlist.
|
|
123
123
|
* @member {String} note
|
|
124
124
|
*/
|
|
125
125
|
TokenizationAllowlistAddressNote.prototype['note'] = undefined;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* The time when the
|
|
128
|
+
* The time when the address was added to the allowlist, in Unix timestamp format, measured in milliseconds.
|
|
129
129
|
* @member {Number} created_timestamp
|
|
130
130
|
*/
|
|
131
131
|
TokenizationAllowlistAddressNote.prototype['created_timestamp'] = undefined;
|
|
@@ -0,0 +1,145 @@
|
|
|
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 _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
9
|
+
var _TokenizationAllowlistAddressNote = _interopRequireDefault(require("./TokenizationAllowlistAddressNote"));
|
|
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 TokenizationAllowlistAddressesResponse model module.
|
|
31
|
+
* @module model/TokenizationAllowlistAddressesResponse
|
|
32
|
+
*/
|
|
33
|
+
var TokenizationAllowlistAddressesResponse = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>TokenizationAllowlistAddressesResponse</code>.
|
|
36
|
+
* @alias module:model/TokenizationAllowlistAddressesResponse
|
|
37
|
+
* @param data {Array.<module:model/TokenizationAllowlistAddressNote>}
|
|
38
|
+
* @param pagination {module:model/Pagination}
|
|
39
|
+
*/
|
|
40
|
+
function TokenizationAllowlistAddressesResponse(data, pagination) {
|
|
41
|
+
_classCallCheck(this, TokenizationAllowlistAddressesResponse);
|
|
42
|
+
TokenizationAllowlistAddressesResponse.initialize(this, data, pagination);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(TokenizationAllowlistAddressesResponse, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, data, pagination) {
|
|
53
|
+
obj['data'] = data;
|
|
54
|
+
obj['pagination'] = pagination;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>TokenizationAllowlistAddressesResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/TokenizationAllowlistAddressesResponse} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/TokenizationAllowlistAddressesResponse} The populated <code>TokenizationAllowlistAddressesResponse</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new TokenizationAllowlistAddressesResponse();
|
|
69
|
+
if (data.hasOwnProperty('data')) {
|
|
70
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_TokenizationAllowlistAddressNote["default"]]);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('pagination')) {
|
|
73
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>TokenizationAllowlistAddressesResponse</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationAllowlistAddressesResponse</code>.
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "validateJSON",
|
|
86
|
+
value: function validateJSON(data) {
|
|
87
|
+
// check to make sure all required properties are present in the JSON string
|
|
88
|
+
var _iterator = _createForOfIteratorHelper(TokenizationAllowlistAddressesResponse.RequiredProperties),
|
|
89
|
+
_step;
|
|
90
|
+
try {
|
|
91
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
92
|
+
var property = _step.value;
|
|
93
|
+
if (!data.hasOwnProperty(property)) {
|
|
94
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
} catch (err) {
|
|
98
|
+
_iterator.e(err);
|
|
99
|
+
} finally {
|
|
100
|
+
_iterator.f();
|
|
101
|
+
}
|
|
102
|
+
if (data['data']) {
|
|
103
|
+
// data not null
|
|
104
|
+
// ensure the json data is an array
|
|
105
|
+
if (!Array.isArray(data['data'])) {
|
|
106
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
107
|
+
}
|
|
108
|
+
// validate the optional field `data` (array)
|
|
109
|
+
var _iterator2 = _createForOfIteratorHelper(data['data']),
|
|
110
|
+
_step2;
|
|
111
|
+
try {
|
|
112
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
113
|
+
var item = _step2.value;
|
|
114
|
+
_TokenizationAllowlistAddressNote["default"].validateJSON(item);
|
|
115
|
+
}
|
|
116
|
+
} catch (err) {
|
|
117
|
+
_iterator2.e(err);
|
|
118
|
+
} finally {
|
|
119
|
+
_iterator2.f();
|
|
120
|
+
}
|
|
121
|
+
;
|
|
122
|
+
}
|
|
123
|
+
// validate the optional field `pagination`
|
|
124
|
+
if (data['pagination']) {
|
|
125
|
+
// data not null
|
|
126
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
127
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
}]);
|
|
133
|
+
}();
|
|
134
|
+
TokenizationAllowlistAddressesResponse.RequiredProperties = ["data", "pagination"];
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @member {Array.<module:model/TokenizationAllowlistAddressNote>} data
|
|
138
|
+
*/
|
|
139
|
+
TokenizationAllowlistAddressesResponse.prototype['data'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @member {module:model/Pagination} pagination
|
|
143
|
+
*/
|
|
144
|
+
TokenizationAllowlistAddressesResponse.prototype['pagination'] = undefined;
|
|
145
|
+
var _default = exports["default"] = TokenizationAllowlistAddressesResponse;
|
|
@@ -32,7 +32,7 @@ var TokenizationBlocklistAddressNote = /*#__PURE__*/function () {
|
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>TokenizationBlocklistAddressNote</code>.
|
|
34
34
|
* @alias module:model/TokenizationBlocklistAddressNote
|
|
35
|
-
* @param address {String} The
|
|
35
|
+
* @param address {String} The address on the blocklist.
|
|
36
36
|
*/
|
|
37
37
|
function TokenizationBlocklistAddressNote(address) {
|
|
38
38
|
_classCallCheck(this, TokenizationBlocklistAddressNote);
|
|
@@ -113,19 +113,19 @@ var TokenizationBlocklistAddressNote = /*#__PURE__*/function () {
|
|
|
113
113
|
TokenizationBlocklistAddressNote.RequiredProperties = ["address"];
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* The
|
|
116
|
+
* The address on the blocklist.
|
|
117
117
|
* @member {String} address
|
|
118
118
|
*/
|
|
119
119
|
TokenizationBlocklistAddressNote.prototype['address'] = undefined;
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* The note for the
|
|
122
|
+
* The note for the address on the blocklist.
|
|
123
123
|
* @member {String} note
|
|
124
124
|
*/
|
|
125
125
|
TokenizationBlocklistAddressNote.prototype['note'] = undefined;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* The time when the
|
|
128
|
+
* The time when the address was added to the blocklist, in Unix timestamp format, measured in milliseconds.
|
|
129
129
|
* @member {Number} created_timestamp
|
|
130
130
|
*/
|
|
131
131
|
TokenizationBlocklistAddressNote.prototype['created_timestamp'] = undefined;
|
|
@@ -87,6 +87,9 @@ var TokenizationBurnEstimateFeeParams = /*#__PURE__*/function () {
|
|
|
87
87
|
if (data.hasOwnProperty('token_id')) {
|
|
88
88
|
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
89
89
|
}
|
|
90
|
+
if (data.hasOwnProperty('request_id')) {
|
|
91
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
92
|
+
}
|
|
90
93
|
}
|
|
91
94
|
return obj;
|
|
92
95
|
}
|
|
@@ -146,6 +149,10 @@ var TokenizationBurnEstimateFeeParams = /*#__PURE__*/function () {
|
|
|
146
149
|
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
147
150
|
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
148
151
|
}
|
|
152
|
+
// ensure the json data is a string
|
|
153
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
154
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
155
|
+
}
|
|
149
156
|
return true;
|
|
150
157
|
}
|
|
151
158
|
}]);
|
|
@@ -174,6 +181,12 @@ TokenizationBurnEstimateFeeParams.prototype['operation_type'] = undefined;
|
|
|
174
181
|
*/
|
|
175
182
|
TokenizationBurnEstimateFeeParams.prototype['token_id'] = undefined;
|
|
176
183
|
|
|
184
|
+
/**
|
|
185
|
+
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
186
|
+
* @member {String} request_id
|
|
187
|
+
*/
|
|
188
|
+
TokenizationBurnEstimateFeeParams.prototype['request_id'] = undefined;
|
|
189
|
+
|
|
177
190
|
// Implement TokenizationBurnTokenParams interface:
|
|
178
191
|
/**
|
|
179
192
|
* @member {module:model/TokenizationTokenOperationSource} source
|
|
@@ -32,8 +32,8 @@ var TokenizationBurnTokenParamsBurnsInner = /*#__PURE__*/function () {
|
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>TokenizationBurnTokenParamsBurnsInner</code>.
|
|
34
34
|
* @alias module:model/TokenizationBurnTokenParamsBurnsInner
|
|
35
|
-
* @param amount {String} The amount of tokens to burn
|
|
36
|
-
* @param from_address {String} The address to burn tokens from
|
|
35
|
+
* @param amount {String} The amount of tokens to burn.
|
|
36
|
+
* @param from_address {String} The address to burn tokens from.
|
|
37
37
|
*/
|
|
38
38
|
function TokenizationBurnTokenParamsBurnsInner(amount, from_address) {
|
|
39
39
|
_classCallCheck(this, TokenizationBurnTokenParamsBurnsInner);
|
|
@@ -112,13 +112,13 @@ var TokenizationBurnTokenParamsBurnsInner = /*#__PURE__*/function () {
|
|
|
112
112
|
TokenizationBurnTokenParamsBurnsInner.RequiredProperties = ["amount", "from_address"];
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* The amount of tokens to burn
|
|
115
|
+
* The amount of tokens to burn.
|
|
116
116
|
* @member {String} amount
|
|
117
117
|
*/
|
|
118
118
|
TokenizationBurnTokenParamsBurnsInner.prototype['amount'] = undefined;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* The address to burn tokens from
|
|
121
|
+
* The address to burn tokens from.
|
|
122
122
|
* @member {String} from_address
|
|
123
123
|
*/
|
|
124
124
|
TokenizationBurnTokenParamsBurnsInner.prototype['from_address'] = undefined;
|