@cobo/cobo-waas2 1.16.0 → 1.18.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 +46 -6
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +27 -33
- package/dist/api/AppWorkflowsApi.js +22 -22
- package/dist/api/FeeStationApi.js +2 -2
- package/dist/api/OAuthApi.js +93 -6
- package/dist/api/OrganizationsApi.js +79 -0
- package/dist/api/PaymentApi.js +265 -55
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/api/WalletsApi.js +11 -8
- package/dist/index.js +252 -14
- package/dist/model/Account.js +174 -0
- package/dist/model/AcquiringType.js +61 -0
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AppWorkflow.js +7 -7
- package/dist/model/AppWorkflowField.js +5 -5
- package/dist/model/AppWorkflowPolicy.js +1 -1
- package/dist/model/ApprovalEntry.js +1 -1
- package/dist/model/ApprovalRequest.js +5 -3
- package/dist/model/ApprovalRequestDetail.js +2 -1
- package/dist/model/ApprovalUser.js +4 -4
- package/dist/model/BalanceUpdateInfo.js +170 -0
- package/dist/model/BalanceUpdateInfoEventData.js +297 -0
- package/dist/model/BankAccount.js +2 -2
- package/dist/model/ChainInfo.js +1 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CreateApprovalRequest201Response.js +2 -1
- package/dist/model/CreateMerchantRequest.js +13 -0
- package/dist/model/CreatePaymentOrderRequest.js +14 -5
- package/dist/model/CreateRefundRequest.js +41 -8
- package/dist/model/CreateSettlement.js +28 -12
- package/dist/model/CreateSettlementRequestRequest.js +27 -0
- package/dist/model/CryptoAddress.js +171 -0
- package/dist/model/CustodialTransferDestination.js +137 -0
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimatedFILFee.js +170 -0
- package/dist/model/EstimatedFILFeeSlow.js +186 -0
- package/dist/model/EstimatedFee.js +68 -12
- package/dist/model/EstimatedSOLFee.js +170 -0
- package/dist/model/EstimatedSOLFeeSlow.js +184 -0
- package/dist/model/ExchangePermissionToken201Response.js +122 -0
- package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
- package/dist/model/FILBase.js +88 -0
- package/dist/model/FILPrice.js +114 -0
- package/dist/model/FeeType.js +10 -0
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/GraphQLError.js +135 -0
- package/dist/model/GraphQLErrorLocationsInner.js +92 -0
- package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
- package/dist/model/GraphQLResponse.js +119 -0
- package/dist/model/ListTopUpPayers200Response.js +123 -0
- package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +15 -2
- package/dist/model/Order.js +16 -7
- package/dist/model/PayerAccount.js +189 -0
- package/dist/model/PaymentOrderEventData.js +33 -15
- package/dist/model/PaymentRefundEventData.js +66 -11
- package/dist/model/PaymentSettlementEvent.js +14 -9
- package/dist/model/PayoutChannel.js +61 -0
- package/dist/model/PolicyAction.js +1 -1
- package/dist/model/PolicyActionContent.js +6 -4
- package/dist/model/PolicyCondition.js +5 -5
- package/dist/model/RefreshPermissionTokenRequest.js +110 -0
- package/dist/model/Refund.js +39 -4
- package/dist/model/RefundStatus.js +5 -0
- package/dist/model/RequestApproval.js +9 -9
- package/dist/model/RevokeApprovalRequest201Response.js +2 -1
- package/dist/model/RevokeApprovalRequestRequest.js +2 -2
- package/dist/model/SOLBase.js +101 -0
- package/dist/model/SOLComputeUnit.js +101 -0
- package/dist/model/Settlement.js +3 -3
- package/dist/model/SettlementDetail.js +24 -6
- package/dist/model/SettlementInfo.js +11 -2
- package/dist/model/SupportedToken.js +222 -0
- package/dist/model/SwapActivityDetail.js +30 -0
- package/dist/model/SwapActivitySigners.js +110 -0
- package/dist/model/SwapQuote.js +17 -4
- package/dist/model/SwapSingingStatus.js +71 -0
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TopUpAddress.js +230 -0
- package/dist/model/TransactionCoboCategory.js +20 -0
- package/dist/model/TransactionDestination.js +14 -38
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmCalldataInfo.js +1 -1
- package/dist/model/TransactionFILFee.js +229 -0
- package/dist/model/TransactionFee.js +107 -9
- package/dist/model/TransactionRequestFILFee.js +186 -0
- package/dist/model/TransactionRequestFee.js +89 -9
- package/dist/model/TransactionRequestSOLFee.js +168 -0
- package/dist/model/TransactionSOLFee.js +229 -0
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToWalletDestination.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/TransferDestination.js +44 -16
- package/dist/model/TransferDestinationType.js +5 -0
- package/dist/model/UpdateMerchantByIdRequest.js +13 -0
- package/dist/model/UpdateRefundByIdRequest.js +110 -0
- package/dist/model/UpdateTopUpAddress.js +141 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEvent.js +2 -2
- package/dist/model/WebhookEventData.js +83 -13
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventLog.js +2 -2
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/Account.md +14 -0
- package/docs/AcquiringType.md +12 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressesEventData.md +3 -1
- package/docs/AppWorkflow.md +3 -3
- package/docs/AppWorkflowField.md +2 -2
- package/docs/AppWorkflowsApi.md +12 -12
- package/docs/ApprovalRequest.md +2 -2
- package/docs/ApprovalRequestDetail.md +1 -1
- package/docs/ApprovalUser.md +2 -2
- package/docs/BalanceUpdateInfo.md +13 -0
- package/docs/BalanceUpdateInfoEventData.md +47 -0
- package/docs/BankAccount.md +2 -2
- package/docs/ChainInfo.md +1 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/CreateApprovalRequest201Response.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -1
- package/docs/CreateRefundRequest.md +5 -2
- package/docs/CreateSettlement.md +7 -6
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CryptoAddress.md +14 -0
- package/docs/CustodialTransferDestination.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimatedFILFee.md +13 -0
- package/docs/EstimatedFILFeeSlow.md +12 -0
- package/docs/EstimatedFee.md +3 -3
- package/docs/EstimatedSOLFee.md +13 -0
- package/docs/EstimatedSOLFeeSlow.md +12 -0
- package/docs/ExchangePermissionToken201Response.md +12 -0
- package/docs/ExchangePermissionTokenRequest.md +9 -0
- package/docs/FILBase.md +9 -0
- package/docs/FILPrice.md +11 -0
- package/docs/FeeStationApi.md +1 -1
- package/docs/FeeType.md +4 -0
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/GraphQLError.md +11 -0
- package/docs/GraphQLErrorLocationsInner.md +10 -0
- package/docs/GraphQLRequest.md +11 -0
- package/docs/GraphQLResponse.md +10 -0
- package/docs/ListTopUpPayers200Response.md +10 -0
- package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +3 -2
- package/docs/OAuthApi.md +102 -0
- package/docs/Order.md +6 -5
- package/docs/OrganizationsApi.md +55 -0
- package/docs/PayerAccount.md +14 -0
- package/docs/PaymentApi.md +247 -29
- package/docs/PaymentOrderEventData.md +9 -6
- package/docs/PaymentRefundEventData.md +10 -5
- package/docs/PaymentSettlementEvent.md +6 -4
- package/docs/PayoutChannel.md +12 -0
- package/docs/PolicyActionContent.md +4 -4
- package/docs/PolicyCondition.md +2 -2
- package/docs/RefreshPermissionTokenRequest.md +9 -0
- package/docs/Refund.md +7 -4
- package/docs/RefundStatus.md +2 -0
- package/docs/RequestApproval.md +4 -4
- package/docs/RevokeApprovalRequest201Response.md +1 -1
- package/docs/RevokeApprovalRequestRequest.md +1 -1
- package/docs/SOLBase.md +10 -0
- package/docs/SOLComputeUnit.md +10 -0
- package/docs/Settlement.md +3 -3
- package/docs/SettlementDetail.md +8 -6
- package/docs/SettlementInfo.md +3 -2
- package/docs/SupportedToken.md +17 -0
- package/docs/SwapActivityDetail.md +1 -0
- package/docs/SwapActivitySigners.md +11 -0
- package/docs/SwapQuote.md +3 -2
- package/docs/SwapSingingStatus.md +16 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TopUpAddress.md +18 -0
- package/docs/TransactionCoboCategory.md +8 -0
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionEvmCalldataInfo.md +1 -1
- package/docs/TransactionFILFee.md +16 -0
- package/docs/TransactionFee.md +8 -1
- package/docs/TransactionRequestFILFee.md +13 -0
- package/docs/TransactionRequestFee.md +5 -1
- package/docs/TransactionRequestSOLFee.md +12 -0
- package/docs/TransactionSOLFee.md +16 -0
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +1 -1
- package/docs/TransferDestination.md +3 -3
- package/docs/TransferDestinationType.md +2 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -0
- package/docs/UpdateRefundByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +11 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +6 -4
- package/docs/WebhookEvent.md +1 -1
- package/docs/WebhookEventData.md +14 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventLog.md +1 -1
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/docs/CreateBankAccountRequest.md +0 -9
- package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
|
@@ -0,0 +1,222 @@
|
|
|
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 _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; } } }; }
|
|
11
|
+
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; } }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
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); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The SupportedToken model module.
|
|
29
|
+
* @module model/SupportedToken
|
|
30
|
+
*/
|
|
31
|
+
var SupportedToken = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>SupportedToken</code>.
|
|
34
|
+
* @alias module:model/SupportedToken
|
|
35
|
+
* @param token_id {String} Unique identifier of the token
|
|
36
|
+
* @param name {String} Full name of the token
|
|
37
|
+
* @param symbol {String} Symbol representation of the token
|
|
38
|
+
* @param decimal {Number} Number of decimal places for the token
|
|
39
|
+
* @param token_address {String} Contract address of the token (may be null for native coins)
|
|
40
|
+
* @param chain_id {String} Identifier of the blockchain where the token exists
|
|
41
|
+
* @param chain_symbol {String} Symbol of the underlying blockchain
|
|
42
|
+
*/
|
|
43
|
+
function SupportedToken(token_id, name, symbol, decimal, token_address, chain_id, chain_symbol) {
|
|
44
|
+
_classCallCheck(this, SupportedToken);
|
|
45
|
+
SupportedToken.initialize(this, token_id, name, symbol, decimal, token_address, chain_id, chain_symbol);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(SupportedToken, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, token_id, name, symbol, decimal, token_address, chain_id, chain_symbol) {
|
|
56
|
+
obj['token_id'] = token_id;
|
|
57
|
+
obj['name'] = name;
|
|
58
|
+
obj['symbol'] = symbol;
|
|
59
|
+
obj['decimal'] = decimal;
|
|
60
|
+
obj['token_address'] = token_address;
|
|
61
|
+
obj['chain_id'] = chain_id;
|
|
62
|
+
obj['chain_symbol'] = chain_symbol;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Constructs a <code>SupportedToken</code> from a plain JavaScript object, optionally creating a new instance.
|
|
67
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @param {module:model/SupportedToken} obj Optional instance to populate.
|
|
70
|
+
* @return {module:model/SupportedToken} The populated <code>SupportedToken</code> instance.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "constructFromObject",
|
|
74
|
+
value: function constructFromObject(data, obj) {
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new SupportedToken();
|
|
77
|
+
if (data.hasOwnProperty('token_id')) {
|
|
78
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('name')) {
|
|
81
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('symbol')) {
|
|
84
|
+
obj['symbol'] = _ApiClient["default"].convertToType(data['symbol'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('decimal')) {
|
|
87
|
+
obj['decimal'] = _ApiClient["default"].convertToType(data['decimal'], 'Number');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('token_address')) {
|
|
90
|
+
obj['token_address'] = _ApiClient["default"].convertToType(data['token_address'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
93
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('chain_symbol')) {
|
|
96
|
+
obj['chain_symbol'] = _ApiClient["default"].convertToType(data['chain_symbol'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('chain_icon_url')) {
|
|
99
|
+
obj['chain_icon_url'] = _ApiClient["default"].convertToType(data['chain_icon_url'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('token_icon_url')) {
|
|
102
|
+
obj['token_icon_url'] = _ApiClient["default"].convertToType(data['token_icon_url'], 'String');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return obj;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Validates the JSON data with respect to <code>SupportedToken</code>.
|
|
110
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
111
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SupportedToken</code>.
|
|
112
|
+
*/
|
|
113
|
+
}, {
|
|
114
|
+
key: "validateJSON",
|
|
115
|
+
value: function validateJSON(data) {
|
|
116
|
+
// check to make sure all required properties are present in the JSON string
|
|
117
|
+
var _iterator = _createForOfIteratorHelper(SupportedToken.RequiredProperties),
|
|
118
|
+
_step;
|
|
119
|
+
try {
|
|
120
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
121
|
+
var property = _step.value;
|
|
122
|
+
if (!data.hasOwnProperty(property)) {
|
|
123
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// ensure the json data is a string
|
|
127
|
+
} catch (err) {
|
|
128
|
+
_iterator.e(err);
|
|
129
|
+
} finally {
|
|
130
|
+
_iterator.f();
|
|
131
|
+
}
|
|
132
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
134
|
+
}
|
|
135
|
+
// ensure the json data is a string
|
|
136
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
137
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
138
|
+
}
|
|
139
|
+
// ensure the json data is a string
|
|
140
|
+
if (data['symbol'] && !(typeof data['symbol'] === 'string' || data['symbol'] instanceof String)) {
|
|
141
|
+
throw new Error("Expected the field `symbol` to be a primitive type in the JSON string but got " + data['symbol']);
|
|
142
|
+
}
|
|
143
|
+
// ensure the json data is a string
|
|
144
|
+
if (data['token_address'] && !(typeof data['token_address'] === 'string' || data['token_address'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `token_address` to be a primitive type in the JSON string but got " + data['token_address']);
|
|
146
|
+
}
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
150
|
+
}
|
|
151
|
+
// ensure the json data is a string
|
|
152
|
+
if (data['chain_symbol'] && !(typeof data['chain_symbol'] === 'string' || data['chain_symbol'] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `chain_symbol` to be a primitive type in the JSON string but got " + data['chain_symbol']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['chain_icon_url'] && !(typeof data['chain_icon_url'] === 'string' || data['chain_icon_url'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `chain_icon_url` to be a primitive type in the JSON string but got " + data['chain_icon_url']);
|
|
158
|
+
}
|
|
159
|
+
// ensure the json data is a string
|
|
160
|
+
if (data['token_icon_url'] && !(typeof data['token_icon_url'] === 'string' || data['token_icon_url'] instanceof String)) {
|
|
161
|
+
throw new Error("Expected the field `token_icon_url` to be a primitive type in the JSON string but got " + data['token_icon_url']);
|
|
162
|
+
}
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
}]);
|
|
166
|
+
}();
|
|
167
|
+
SupportedToken.RequiredProperties = ["token_id", "name", "symbol", "decimal", "token_address", "chain_id", "chain_symbol"];
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Unique identifier of the token
|
|
171
|
+
* @member {String} token_id
|
|
172
|
+
*/
|
|
173
|
+
SupportedToken.prototype['token_id'] = undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Full name of the token
|
|
177
|
+
* @member {String} name
|
|
178
|
+
*/
|
|
179
|
+
SupportedToken.prototype['name'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Symbol representation of the token
|
|
183
|
+
* @member {String} symbol
|
|
184
|
+
*/
|
|
185
|
+
SupportedToken.prototype['symbol'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Number of decimal places for the token
|
|
189
|
+
* @member {Number} decimal
|
|
190
|
+
*/
|
|
191
|
+
SupportedToken.prototype['decimal'] = undefined;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Contract address of the token (may be null for native coins)
|
|
195
|
+
* @member {String} token_address
|
|
196
|
+
*/
|
|
197
|
+
SupportedToken.prototype['token_address'] = undefined;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Identifier of the blockchain where the token exists
|
|
201
|
+
* @member {String} chain_id
|
|
202
|
+
*/
|
|
203
|
+
SupportedToken.prototype['chain_id'] = undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Symbol of the underlying blockchain
|
|
207
|
+
* @member {String} chain_symbol
|
|
208
|
+
*/
|
|
209
|
+
SupportedToken.prototype['chain_symbol'] = undefined;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* URL to the blockchain's icon image
|
|
213
|
+
* @member {String} chain_icon_url
|
|
214
|
+
*/
|
|
215
|
+
SupportedToken.prototype['chain_icon_url'] = undefined;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* URL to the token's icon image
|
|
219
|
+
* @member {String} token_icon_url
|
|
220
|
+
*/
|
|
221
|
+
SupportedToken.prototype['token_icon_url'] = undefined;
|
|
222
|
+
var _default = exports["default"] = SupportedToken;
|
|
@@ -7,6 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _SwapActivity = _interopRequireDefault(require("./SwapActivity"));
|
|
9
9
|
var _SwapActivityApprovers = _interopRequireDefault(require("./SwapActivityApprovers"));
|
|
10
|
+
var _SwapActivitySigners = _interopRequireDefault(require("./SwapActivitySigners"));
|
|
10
11
|
var _SwapActivityStatus = _interopRequireDefault(require("./SwapActivityStatus"));
|
|
11
12
|
var _SwapActivityTimeline = _interopRequireDefault(require("./SwapActivityTimeline"));
|
|
12
13
|
var _SwapType = _interopRequireDefault(require("./SwapType"));
|
|
@@ -122,6 +123,9 @@ var SwapActivityDetail = /*#__PURE__*/function () {
|
|
|
122
123
|
if (data.hasOwnProperty('approvers')) {
|
|
123
124
|
obj['approvers'] = _ApiClient["default"].convertToType(data['approvers'], [_SwapActivityApprovers["default"]]);
|
|
124
125
|
}
|
|
126
|
+
if (data.hasOwnProperty('signers')) {
|
|
127
|
+
obj['signers'] = _ApiClient["default"].convertToType(data['signers'], [_SwapActivitySigners["default"]]);
|
|
128
|
+
}
|
|
125
129
|
}
|
|
126
130
|
return obj;
|
|
127
131
|
}
|
|
@@ -220,6 +224,27 @@ var SwapActivityDetail = /*#__PURE__*/function () {
|
|
|
220
224
|
}
|
|
221
225
|
;
|
|
222
226
|
}
|
|
227
|
+
if (data['signers']) {
|
|
228
|
+
// data not null
|
|
229
|
+
// ensure the json data is an array
|
|
230
|
+
if (!Array.isArray(data['signers'])) {
|
|
231
|
+
throw new Error("Expected the field `signers` to be an array in the JSON data but got " + data['signers']);
|
|
232
|
+
}
|
|
233
|
+
// validate the optional field `signers` (array)
|
|
234
|
+
var _iterator3 = _createForOfIteratorHelper(data['signers']),
|
|
235
|
+
_step3;
|
|
236
|
+
try {
|
|
237
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
238
|
+
var _item2 = _step3.value;
|
|
239
|
+
_SwapActivitySigners["default"].validateJSON(_item2);
|
|
240
|
+
}
|
|
241
|
+
} catch (err) {
|
|
242
|
+
_iterator3.e(err);
|
|
243
|
+
} finally {
|
|
244
|
+
_iterator3.f();
|
|
245
|
+
}
|
|
246
|
+
;
|
|
247
|
+
}
|
|
223
248
|
return true;
|
|
224
249
|
}
|
|
225
250
|
}]);
|
|
@@ -327,6 +352,11 @@ SwapActivityDetail.prototype['timeline'] = undefined;
|
|
|
327
352
|
*/
|
|
328
353
|
SwapActivityDetail.prototype['approvers'] = undefined;
|
|
329
354
|
|
|
355
|
+
/**
|
|
356
|
+
* @member {Array.<module:model/SwapActivitySigners>} signers
|
|
357
|
+
*/
|
|
358
|
+
SwapActivityDetail.prototype['signers'] = undefined;
|
|
359
|
+
|
|
330
360
|
// Implement SwapActivity interface:
|
|
331
361
|
/**
|
|
332
362
|
* The unique identifier of the swap activity.
|
|
@@ -0,0 +1,110 @@
|
|
|
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 _SwapSingingStatus = _interopRequireDefault(require("./SwapSingingStatus"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The SwapActivitySigners model module.
|
|
27
|
+
* @module model/SwapActivitySigners
|
|
28
|
+
*/
|
|
29
|
+
var SwapActivitySigners = /*#__PURE__*/function () {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new <code>SwapActivitySigners</code>.
|
|
32
|
+
* The signer data for swap activity.
|
|
33
|
+
* @alias module:model/SwapActivitySigners
|
|
34
|
+
*/
|
|
35
|
+
function SwapActivitySigners() {
|
|
36
|
+
_classCallCheck(this, SwapActivitySigners);
|
|
37
|
+
SwapActivitySigners.initialize(this);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initializes the fields of this object.
|
|
42
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
43
|
+
* Only for internal use.
|
|
44
|
+
*/
|
|
45
|
+
return _createClass(SwapActivitySigners, null, [{
|
|
46
|
+
key: "initialize",
|
|
47
|
+
value: function initialize(obj) {}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>SwapActivitySigners</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/SwapActivitySigners} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/SwapActivitySigners} The populated <code>SwapActivitySigners</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "constructFromObject",
|
|
58
|
+
value: function constructFromObject(data, obj) {
|
|
59
|
+
if (data) {
|
|
60
|
+
obj = obj || new SwapActivitySigners();
|
|
61
|
+
if (data.hasOwnProperty('signer')) {
|
|
62
|
+
obj['signer'] = _ApiClient["default"].convertToType(data['signer'], 'String');
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('status')) {
|
|
65
|
+
obj['status'] = _SwapSingingStatus["default"].constructFromObject(data['status']);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('failed_reason')) {
|
|
68
|
+
obj['failed_reason'] = _ApiClient["default"].convertToType(data['failed_reason'], 'String');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>SwapActivitySigners</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapActivitySigners</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
// ensure the json data is a string
|
|
83
|
+
if (data['signer'] && !(typeof data['signer'] === 'string' || data['signer'] instanceof String)) {
|
|
84
|
+
throw new Error("Expected the field `signer` to be a primitive type in the JSON string but got " + data['signer']);
|
|
85
|
+
}
|
|
86
|
+
// ensure the json data is a string
|
|
87
|
+
if (data['failed_reason'] && !(typeof data['failed_reason'] === 'string' || data['failed_reason'] instanceof String)) {
|
|
88
|
+
throw new Error("Expected the field `failed_reason` to be a primitive type in the JSON string but got " + data['failed_reason']);
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
}]);
|
|
93
|
+
}();
|
|
94
|
+
/**
|
|
95
|
+
* The signer name.
|
|
96
|
+
* @member {String} signer
|
|
97
|
+
*/
|
|
98
|
+
SwapActivitySigners.prototype['signer'] = undefined;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @member {module:model/SwapSingingStatus} status
|
|
102
|
+
*/
|
|
103
|
+
SwapActivitySigners.prototype['status'] = undefined;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Failed reason of signing process.
|
|
107
|
+
* @member {String} failed_reason
|
|
108
|
+
*/
|
|
109
|
+
SwapActivitySigners.prototype['failed_reason'] = undefined;
|
|
110
|
+
var _default = exports["default"] = SwapActivitySigners;
|
package/dist/model/SwapQuote.js
CHANGED
|
@@ -37,8 +37,8 @@ var SwapQuote = /*#__PURE__*/function () {
|
|
|
37
37
|
* @param pay_amount {String} The amount of tokens to pay.
|
|
38
38
|
* @param receive_token_id {String} The token ID to receive.
|
|
39
39
|
* @param receive_amount {String} The amount of tokens to receive.
|
|
40
|
-
* @param fee_token_id {String} The
|
|
41
|
-
* @param fee_amount {String} The amount of tokens
|
|
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
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) {
|
|
@@ -97,6 +97,9 @@ var SwapQuote = /*#__PURE__*/function () {
|
|
|
97
97
|
if (data.hasOwnProperty('fee_amount')) {
|
|
98
98
|
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
99
99
|
}
|
|
100
|
+
if (data.hasOwnProperty('estimated_network_fee_amount')) {
|
|
101
|
+
obj['estimated_network_fee_amount'] = _ApiClient["default"].convertToType(data['estimated_network_fee_amount'], 'String');
|
|
102
|
+
}
|
|
100
103
|
if (data.hasOwnProperty('min_receive_amount')) {
|
|
101
104
|
obj['min_receive_amount'] = _ApiClient["default"].convertToType(data['min_receive_amount'], 'String');
|
|
102
105
|
}
|
|
@@ -162,6 +165,10 @@ var SwapQuote = /*#__PURE__*/function () {
|
|
|
162
165
|
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
163
166
|
}
|
|
164
167
|
// ensure the json data is a string
|
|
168
|
+
if (data['estimated_network_fee_amount'] && !(typeof data['estimated_network_fee_amount'] === 'string' || data['estimated_network_fee_amount'] instanceof String)) {
|
|
169
|
+
throw new Error("Expected the field `estimated_network_fee_amount` to be a primitive type in the JSON string but got " + data['estimated_network_fee_amount']);
|
|
170
|
+
}
|
|
171
|
+
// ensure the json data is a string
|
|
165
172
|
if (data['min_receive_amount'] && !(typeof data['min_receive_amount'] === 'string' || data['min_receive_amount'] instanceof String)) {
|
|
166
173
|
throw new Error("Expected the field `min_receive_amount` to be a primitive type in the JSON string but got " + data['min_receive_amount']);
|
|
167
174
|
}
|
|
@@ -206,17 +213,23 @@ SwapQuote.prototype['receive_token_id'] = undefined;
|
|
|
206
213
|
SwapQuote.prototype['receive_amount'] = undefined;
|
|
207
214
|
|
|
208
215
|
/**
|
|
209
|
-
* The
|
|
216
|
+
* The token ID for the service fee.
|
|
210
217
|
* @member {String} fee_token_id
|
|
211
218
|
*/
|
|
212
219
|
SwapQuote.prototype['fee_token_id'] = undefined;
|
|
213
220
|
|
|
214
221
|
/**
|
|
215
|
-
* The amount of tokens
|
|
222
|
+
* The amount of tokens for the service fee.
|
|
216
223
|
* @member {String} fee_amount
|
|
217
224
|
*/
|
|
218
225
|
SwapQuote.prototype['fee_amount'] = undefined;
|
|
219
226
|
|
|
227
|
+
/**
|
|
228
|
+
* The estimated amount of tokens for the network fee.
|
|
229
|
+
* @member {String} estimated_network_fee_amount
|
|
230
|
+
*/
|
|
231
|
+
SwapQuote.prototype['estimated_network_fee_amount'] = undefined;
|
|
232
|
+
|
|
220
233
|
/**
|
|
221
234
|
* The minimum amount of tokens to receive if the pay amount is specified.
|
|
222
235
|
* @member {String} min_receive_amount
|
|
@@ -0,0 +1,71 @@
|
|
|
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 SwapSingingStatus.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var SwapSingingStatus = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function SwapSingingStatus() {
|
|
32
|
+
_classCallCheck(this, SwapSingingStatus);
|
|
33
|
+
/**
|
|
34
|
+
* value: "Pending"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "Pending", "Pending");
|
|
38
|
+
/**
|
|
39
|
+
* value: "Signed"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "Signed", "Signed");
|
|
43
|
+
/**
|
|
44
|
+
* value: "Timeout"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "Timeout", "Timeout");
|
|
48
|
+
/**
|
|
49
|
+
* value: "Rejected"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "Rejected", "Rejected");
|
|
53
|
+
/**
|
|
54
|
+
* value: "unknown_default_open_api"
|
|
55
|
+
* @const
|
|
56
|
+
*/
|
|
57
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
58
|
+
}
|
|
59
|
+
return _createClass(SwapSingingStatus, null, [{
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value:
|
|
62
|
+
/**
|
|
63
|
+
* Returns a <code>SwapSingingStatus</code> enum value from a Javascript object name.
|
|
64
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
65
|
+
* @return {module:model/SwapSingingStatus} The enum <code>SwapSingingStatus</code> value.
|
|
66
|
+
*/
|
|
67
|
+
function constructFromObject(object) {
|
|
68
|
+
return object;
|
|
69
|
+
}
|
|
70
|
+
}]);
|
|
71
|
+
}();
|
|
@@ -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.
|
|
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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement 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.
|
|
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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement 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.
|
|
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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
204
204
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
205
205
|
*/
|
|
206
206
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -284,6 +284,11 @@ TSSRequestWebhookEventData['DataTypeEnum'] = {
|
|
|
284
284
|
* @const
|
|
285
285
|
*/
|
|
286
286
|
"TokenListing": "TokenListing",
|
|
287
|
+
/**
|
|
288
|
+
* value: "BalanceUpdateInfo"
|
|
289
|
+
* @const
|
|
290
|
+
*/
|
|
291
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
287
292
|
/**
|
|
288
293
|
* value: "PaymentOrder"
|
|
289
294
|
* @const
|
|
@@ -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.
|
|
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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement 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.
|
|
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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement 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.
|
|
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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
256
256
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
257
257
|
*/
|
|
258
258
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -354,6 +354,11 @@ TokenListingEventData['DataTypeEnum'] = {
|
|
|
354
354
|
* @const
|
|
355
355
|
*/
|
|
356
356
|
"TokenListing": "TokenListing",
|
|
357
|
+
/**
|
|
358
|
+
* value: "BalanceUpdateInfo"
|
|
359
|
+
* @const
|
|
360
|
+
*/
|
|
361
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
357
362
|
/**
|
|
358
363
|
* value: "PaymentOrder"
|
|
359
364
|
* @const
|
|
@@ -37,7 +37,7 @@ var TokensEventData = /*#__PURE__*/function () {
|
|
|
37
37
|
* Constructs a new <code>TokensEventData</code>.
|
|
38
38
|
* @alias module:model/TokensEventData
|
|
39
39
|
* @implements module:model/WebhookEventDataType
|
|
40
|
-
* @param data_type {module:model/TokensEventData.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.
|
|
40
|
+
* @param data_type {module:model/TokensEventData.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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
41
41
|
* @param tokens {Array.<module:model/TokenInfo>} The enabled tokens.
|
|
42
42
|
*/
|
|
43
43
|
function TokensEventData(data_type, tokens) {
|
|
@@ -146,7 +146,7 @@ var TokensEventData = /*#__PURE__*/function () {
|
|
|
146
146
|
TokensEventData.RequiredProperties = ["data_type", "tokens"];
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* 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.
|
|
149
|
+
* 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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
150
150
|
* @member {module:model/TokensEventData.DataTypeEnum} data_type
|
|
151
151
|
*/
|
|
152
152
|
TokensEventData.prototype['data_type'] = undefined;
|
|
@@ -169,7 +169,7 @@ TokensEventData.prototype['wallet_subtypes'] = undefined;
|
|
|
169
169
|
|
|
170
170
|
// Implement WebhookEventDataType interface:
|
|
171
171
|
/**
|
|
172
|
-
* 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.
|
|
172
|
+
* 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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
173
173
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
174
174
|
*/
|
|
175
175
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -220,6 +220,11 @@ TokensEventData['DataTypeEnum'] = {
|
|
|
220
220
|
* @const
|
|
221
221
|
*/
|
|
222
222
|
"TokenListing": "TokenListing",
|
|
223
|
+
/**
|
|
224
|
+
* value: "BalanceUpdateInfo"
|
|
225
|
+
* @const
|
|
226
|
+
*/
|
|
227
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
223
228
|
/**
|
|
224
229
|
* value: "PaymentOrder"
|
|
225
230
|
* @const
|