@cobo/cobo-waas2 1.19.0 → 1.20.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 +13 -1
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +1 -1
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +144 -6
- package/dist/api/TransactionsApi.js +94 -2
- package/dist/index.js +49 -0
- package/dist/model/AddressesEventData.js +13 -3
- package/dist/model/BalanceUpdateInfoEventData.js +13 -3
- package/dist/model/ChainsEventData.js +13 -3
- package/dist/model/ContractCallDestination.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +4 -4
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSettlement.js +1 -1
- package/dist/model/CustodialWeb3TransferSource.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +4 -6
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/FILBase.js +0 -1
- package/dist/model/ForcedSweep.js +193 -0
- package/dist/model/ForcedSweepRequest.js +156 -0
- package/dist/model/ForcedSweepStatus.js +66 -0
- package/dist/model/ListForcedSweepRequests200Response.js +123 -0
- package/dist/model/ListTransactionApprovalDetails200Response.js +107 -0
- package/dist/model/MPCVaultEventData.js +13 -3
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/Order.js +2 -2
- package/dist/model/PaymentAddressUpdateEventData.js +284 -0
- package/dist/model/PaymentOrderEventData.js +16 -6
- package/dist/model/PaymentRefundEventData.js +13 -3
- package/dist/model/PaymentSettlementEvent.js +13 -3
- package/dist/model/PaymentTransactionEventData.js +827 -0
- package/dist/model/SOLBase.js +0 -1
- package/dist/model/SafeWalletDelegates.js +1 -1
- package/dist/model/SafeWalletDelegatesContractCall.js +1 -1
- package/dist/model/SettlementInfo.js +26 -0
- package/dist/model/SuspendedTokenEventData.js +13 -3
- package/dist/model/TSSRequestWebhookEventData.js +13 -3
- package/dist/model/TokenListingEventData.js +13 -3
- package/dist/model/TokenizationContractCallParamsData.js +1 -1
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokensEventData.js +13 -3
- package/dist/model/TransactionDestination.js +1 -1
- package/dist/model/TransactionEvmContractDestination.js +2 -2
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionWebhookEventData.js +13 -3
- package/dist/model/UpdateTopUpAddress.js +2 -2
- package/dist/model/WalletInfoEventData.js +13 -3
- package/dist/model/WebhookEventData.js +115 -23
- package/dist/model/WebhookEventDataType.js +12 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressesEventData.md +5 -1
- package/docs/BalanceUpdateInfoEventData.md +5 -1
- package/docs/ChainsEventData.md +5 -1
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateSettlement.md +1 -1
- package/docs/CustodialWeb3TransferSource.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ForcedSweep.md +16 -0
- package/docs/ForcedSweepRequest.md +12 -0
- package/docs/ForcedSweepStatus.md +14 -0
- package/docs/ListForcedSweepRequests200Response.md +10 -0
- package/docs/ListTransactionApprovalDetails200Response.md +9 -0
- package/docs/MPCVaultEventData.md +5 -1
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +1 -1
- package/docs/PaymentAddressUpdateEventData.md +53 -0
- package/docs/PaymentApi.md +168 -3
- package/docs/PaymentOrderEventData.md +6 -2
- package/docs/PaymentRefundEventData.md +5 -1
- package/docs/PaymentSettlementEvent.md +5 -1
- package/docs/PaymentTransactionEventData.md +84 -0
- package/docs/SafeWalletDelegates.md +1 -1
- package/docs/SafeWalletDelegatesContractCall.md +1 -1
- package/docs/SettlementInfo.md +2 -0
- package/docs/SuspendedTokenEventData.md +5 -1
- package/docs/TSSRequestWebhookEventData.md +5 -1
- package/docs/TokenListingEventData.md +5 -1
- package/docs/TokenizationContractCallParamsData.md +1 -1
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokensEventData.md +5 -1
- package/docs/TransactionDestination.md +1 -1
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionWebhookEventData.md +5 -1
- package/docs/TransactionsApi.md +107 -1
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletInfoEventData.md +5 -1
- package/docs/WebhookEventData.md +22 -12
- package/docs/WebhookEventDataType.md +5 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,827 @@
|
|
|
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 _AcquiringType = _interopRequireDefault(require("./AcquiringType"));
|
|
9
|
+
var _Transaction = _interopRequireDefault(require("./Transaction"));
|
|
10
|
+
var _TransactionBlockInfo = _interopRequireDefault(require("./TransactionBlockInfo"));
|
|
11
|
+
var _TransactionDestination = _interopRequireDefault(require("./TransactionDestination"));
|
|
12
|
+
var _TransactionFee = _interopRequireDefault(require("./TransactionFee"));
|
|
13
|
+
var _TransactionFuelingInfo = _interopRequireDefault(require("./TransactionFuelingInfo"));
|
|
14
|
+
var _TransactionInitiatorType = _interopRequireDefault(require("./TransactionInitiatorType"));
|
|
15
|
+
var _TransactionRawTxInfo = _interopRequireDefault(require("./TransactionRawTxInfo"));
|
|
16
|
+
var _TransactionReplacement = _interopRequireDefault(require("./TransactionReplacement"));
|
|
17
|
+
var _TransactionResult = _interopRequireDefault(require("./TransactionResult"));
|
|
18
|
+
var _TransactionSource = _interopRequireDefault(require("./TransactionSource"));
|
|
19
|
+
var _TransactionStatus = _interopRequireDefault(require("./TransactionStatus"));
|
|
20
|
+
var _TransactionSubStatus = _interopRequireDefault(require("./TransactionSubStatus"));
|
|
21
|
+
var _TransactionType = _interopRequireDefault(require("./TransactionType"));
|
|
22
|
+
var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
|
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
24
|
+
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); }
|
|
25
|
+
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; } } }; }
|
|
26
|
+
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; } }
|
|
27
|
+
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; }
|
|
28
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
29
|
+
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); } }
|
|
30
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
31
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
32
|
+
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); } /**
|
|
33
|
+
* Cobo Wallet as a Service 2.0
|
|
34
|
+
*
|
|
35
|
+
* Contact: help@cobo.com
|
|
36
|
+
*
|
|
37
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
38
|
+
* https://openapi-generator.tech
|
|
39
|
+
* Do not edit the class manually.
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* The PaymentTransactionEventData model module.
|
|
44
|
+
* @module model/PaymentTransactionEventData
|
|
45
|
+
*/
|
|
46
|
+
var PaymentTransactionEventData = /*#__PURE__*/function () {
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a new <code>PaymentTransactionEventData</code>.
|
|
49
|
+
* @alias module:model/PaymentTransactionEventData
|
|
50
|
+
* @implements module:model/WebhookEventDataType
|
|
51
|
+
* @implements module:model/Transaction
|
|
52
|
+
* @param data_type {module:model/PaymentTransactionEventData.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 payment address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
53
|
+
* @param transaction_id {String} The transaction ID.
|
|
54
|
+
* @param wallet_id {String} For deposit transactions, this property represents the wallet ID of the transaction destination. For transactions of other types, this property represents the wallet ID of the transaction source.
|
|
55
|
+
* @param status {module:model/TransactionStatus}
|
|
56
|
+
* @param source {module:model/TransactionSource}
|
|
57
|
+
* @param destination {module:model/TransactionDestination}
|
|
58
|
+
* @param initiator_type {module:model/TransactionInitiatorType}
|
|
59
|
+
* @param created_timestamp {Number} The time when the transaction was created, in Unix timestamp format, measured in milliseconds.
|
|
60
|
+
* @param updated_timestamp {Number} The time when the transaction was updated, in Unix timestamp format, measured in milliseconds.
|
|
61
|
+
* @param acquiring_type {module:model/AcquiringType}
|
|
62
|
+
*/
|
|
63
|
+
function PaymentTransactionEventData(data_type, transaction_id, wallet_id, status, source, destination, initiator_type, created_timestamp, updated_timestamp, acquiring_type) {
|
|
64
|
+
_classCallCheck(this, PaymentTransactionEventData);
|
|
65
|
+
_WebhookEventDataType["default"].initialize(this, data_type);
|
|
66
|
+
_Transaction["default"].initialize(this, transaction_id, wallet_id, status, source, destination, initiator_type, created_timestamp, updated_timestamp);
|
|
67
|
+
PaymentTransactionEventData.initialize(this, data_type, transaction_id, wallet_id, status, source, destination, initiator_type, created_timestamp, updated_timestamp, acquiring_type);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Initializes the fields of this object.
|
|
72
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
73
|
+
* Only for internal use.
|
|
74
|
+
*/
|
|
75
|
+
return _createClass(PaymentTransactionEventData, null, [{
|
|
76
|
+
key: "initialize",
|
|
77
|
+
value: function initialize(obj, data_type, transaction_id, wallet_id, status, source, destination, initiator_type, created_timestamp, updated_timestamp, acquiring_type) {
|
|
78
|
+
obj['data_type'] = data_type;
|
|
79
|
+
obj['transaction_id'] = transaction_id;
|
|
80
|
+
obj['wallet_id'] = wallet_id;
|
|
81
|
+
obj['status'] = status;
|
|
82
|
+
obj['source'] = source;
|
|
83
|
+
obj['destination'] = destination;
|
|
84
|
+
obj['initiator_type'] = initiator_type;
|
|
85
|
+
obj['created_timestamp'] = created_timestamp;
|
|
86
|
+
obj['updated_timestamp'] = updated_timestamp;
|
|
87
|
+
obj['acquiring_type'] = acquiring_type;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Constructs a <code>PaymentTransactionEventData</code> from a plain JavaScript object, optionally creating a new instance.
|
|
92
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
93
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
94
|
+
* @param {module:model/PaymentTransactionEventData} obj Optional instance to populate.
|
|
95
|
+
* @return {module:model/PaymentTransactionEventData} The populated <code>PaymentTransactionEventData</code> instance.
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "constructFromObject",
|
|
99
|
+
value: function constructFromObject(data, obj) {
|
|
100
|
+
if (data) {
|
|
101
|
+
obj = obj || new PaymentTransactionEventData();
|
|
102
|
+
_WebhookEventDataType["default"].constructFromObject(data, obj);
|
|
103
|
+
_Transaction["default"].constructFromObject(data, obj);
|
|
104
|
+
if (data.hasOwnProperty('data_type')) {
|
|
105
|
+
obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
108
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('cobo_id')) {
|
|
111
|
+
obj['cobo_id'] = _ApiClient["default"].convertToType(data['cobo_id'], 'String');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('request_id')) {
|
|
114
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('wallet_id')) {
|
|
117
|
+
obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
|
|
118
|
+
}
|
|
119
|
+
if (data.hasOwnProperty('type')) {
|
|
120
|
+
obj['type'] = _TransactionType["default"].constructFromObject(data['type']);
|
|
121
|
+
}
|
|
122
|
+
if (data.hasOwnProperty('status')) {
|
|
123
|
+
obj['status'] = _TransactionStatus["default"].constructFromObject(data['status']);
|
|
124
|
+
}
|
|
125
|
+
if (data.hasOwnProperty('sub_status')) {
|
|
126
|
+
obj['sub_status'] = _TransactionSubStatus["default"].constructFromObject(data['sub_status']);
|
|
127
|
+
}
|
|
128
|
+
if (data.hasOwnProperty('failed_reason')) {
|
|
129
|
+
obj['failed_reason'] = _ApiClient["default"].convertToType(data['failed_reason'], 'String');
|
|
130
|
+
}
|
|
131
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
132
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
133
|
+
}
|
|
134
|
+
if (data.hasOwnProperty('token_id')) {
|
|
135
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
136
|
+
}
|
|
137
|
+
if (data.hasOwnProperty('asset_id')) {
|
|
138
|
+
obj['asset_id'] = _ApiClient["default"].convertToType(data['asset_id'], 'String');
|
|
139
|
+
}
|
|
140
|
+
if (data.hasOwnProperty('source')) {
|
|
141
|
+
obj['source'] = _TransactionSource["default"].constructFromObject(data['source']);
|
|
142
|
+
}
|
|
143
|
+
if (data.hasOwnProperty('destination')) {
|
|
144
|
+
obj['destination'] = _TransactionDestination["default"].constructFromObject(data['destination']);
|
|
145
|
+
}
|
|
146
|
+
if (data.hasOwnProperty('result')) {
|
|
147
|
+
obj['result'] = _TransactionResult["default"].constructFromObject(data['result']);
|
|
148
|
+
}
|
|
149
|
+
if (data.hasOwnProperty('fee')) {
|
|
150
|
+
obj['fee'] = _TransactionFee["default"].constructFromObject(data['fee']);
|
|
151
|
+
}
|
|
152
|
+
if (data.hasOwnProperty('initiator')) {
|
|
153
|
+
obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
|
|
154
|
+
}
|
|
155
|
+
if (data.hasOwnProperty('initiator_type')) {
|
|
156
|
+
obj['initiator_type'] = _TransactionInitiatorType["default"].constructFromObject(data['initiator_type']);
|
|
157
|
+
}
|
|
158
|
+
if (data.hasOwnProperty('confirmed_num')) {
|
|
159
|
+
obj['confirmed_num'] = _ApiClient["default"].convertToType(data['confirmed_num'], 'Number');
|
|
160
|
+
}
|
|
161
|
+
if (data.hasOwnProperty('confirming_threshold')) {
|
|
162
|
+
obj['confirming_threshold'] = _ApiClient["default"].convertToType(data['confirming_threshold'], 'Number');
|
|
163
|
+
}
|
|
164
|
+
if (data.hasOwnProperty('transaction_hash')) {
|
|
165
|
+
obj['transaction_hash'] = _ApiClient["default"].convertToType(data['transaction_hash'], 'String');
|
|
166
|
+
}
|
|
167
|
+
if (data.hasOwnProperty('block_info')) {
|
|
168
|
+
obj['block_info'] = _TransactionBlockInfo["default"].constructFromObject(data['block_info']);
|
|
169
|
+
}
|
|
170
|
+
if (data.hasOwnProperty('raw_tx_info')) {
|
|
171
|
+
obj['raw_tx_info'] = _TransactionRawTxInfo["default"].constructFromObject(data['raw_tx_info']);
|
|
172
|
+
}
|
|
173
|
+
if (data.hasOwnProperty('replacement')) {
|
|
174
|
+
obj['replacement'] = _TransactionReplacement["default"].constructFromObject(data['replacement']);
|
|
175
|
+
}
|
|
176
|
+
if (data.hasOwnProperty('category')) {
|
|
177
|
+
obj['category'] = _ApiClient["default"].convertToType(data['category'], ['String']);
|
|
178
|
+
}
|
|
179
|
+
if (data.hasOwnProperty('description')) {
|
|
180
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
181
|
+
}
|
|
182
|
+
if (data.hasOwnProperty('is_loop')) {
|
|
183
|
+
obj['is_loop'] = _ApiClient["default"].convertToType(data['is_loop'], 'Boolean');
|
|
184
|
+
}
|
|
185
|
+
if (data.hasOwnProperty('cobo_category')) {
|
|
186
|
+
obj['cobo_category'] = _ApiClient["default"].convertToType(data['cobo_category'], ['String']);
|
|
187
|
+
}
|
|
188
|
+
if (data.hasOwnProperty('extra')) {
|
|
189
|
+
obj['extra'] = _ApiClient["default"].convertToType(data['extra'], ['String']);
|
|
190
|
+
}
|
|
191
|
+
if (data.hasOwnProperty('fueling_info')) {
|
|
192
|
+
obj['fueling_info'] = _TransactionFuelingInfo["default"].constructFromObject(data['fueling_info']);
|
|
193
|
+
}
|
|
194
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
195
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
196
|
+
}
|
|
197
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
198
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
199
|
+
}
|
|
200
|
+
if (data.hasOwnProperty('acquiring_type')) {
|
|
201
|
+
obj['acquiring_type'] = _AcquiringType["default"].constructFromObject(data['acquiring_type']);
|
|
202
|
+
}
|
|
203
|
+
if (data.hasOwnProperty('order_id')) {
|
|
204
|
+
obj['order_id'] = _ApiClient["default"].convertToType(data['order_id'], 'String');
|
|
205
|
+
}
|
|
206
|
+
if (data.hasOwnProperty('psp_order_code')) {
|
|
207
|
+
obj['psp_order_code'] = _ApiClient["default"].convertToType(data['psp_order_code'], 'String');
|
|
208
|
+
}
|
|
209
|
+
if (data.hasOwnProperty('payer_id')) {
|
|
210
|
+
obj['payer_id'] = _ApiClient["default"].convertToType(data['payer_id'], 'String');
|
|
211
|
+
}
|
|
212
|
+
if (data.hasOwnProperty('custom_payer_id')) {
|
|
213
|
+
obj['custom_payer_id'] = _ApiClient["default"].convertToType(data['custom_payer_id'], 'String');
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return obj;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Validates the JSON data with respect to <code>PaymentTransactionEventData</code>.
|
|
221
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
222
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentTransactionEventData</code>.
|
|
223
|
+
*/
|
|
224
|
+
}, {
|
|
225
|
+
key: "validateJSON",
|
|
226
|
+
value: function validateJSON(data) {
|
|
227
|
+
// check to make sure all required properties are present in the JSON string
|
|
228
|
+
var _iterator = _createForOfIteratorHelper(PaymentTransactionEventData.RequiredProperties),
|
|
229
|
+
_step;
|
|
230
|
+
try {
|
|
231
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
232
|
+
var property = _step.value;
|
|
233
|
+
if (!data.hasOwnProperty(property)) {
|
|
234
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
// ensure the json data is a string
|
|
238
|
+
} catch (err) {
|
|
239
|
+
_iterator.e(err);
|
|
240
|
+
} finally {
|
|
241
|
+
_iterator.f();
|
|
242
|
+
}
|
|
243
|
+
if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
|
|
244
|
+
throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
|
|
245
|
+
}
|
|
246
|
+
// ensure the json data is a string
|
|
247
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
248
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
249
|
+
}
|
|
250
|
+
// ensure the json data is a string
|
|
251
|
+
if (data['cobo_id'] && !(typeof data['cobo_id'] === 'string' || data['cobo_id'] instanceof String)) {
|
|
252
|
+
throw new Error("Expected the field `cobo_id` to be a primitive type in the JSON string but got " + data['cobo_id']);
|
|
253
|
+
}
|
|
254
|
+
// ensure the json data is a string
|
|
255
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
256
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
257
|
+
}
|
|
258
|
+
// ensure the json data is a string
|
|
259
|
+
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
260
|
+
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
261
|
+
}
|
|
262
|
+
// ensure the json data is a string
|
|
263
|
+
if (data['failed_reason'] && !(typeof data['failed_reason'] === 'string' || data['failed_reason'] instanceof String)) {
|
|
264
|
+
throw new Error("Expected the field `failed_reason` to be a primitive type in the JSON string but got " + data['failed_reason']);
|
|
265
|
+
}
|
|
266
|
+
// ensure the json data is a string
|
|
267
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
268
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
269
|
+
}
|
|
270
|
+
// ensure the json data is a string
|
|
271
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
272
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
273
|
+
}
|
|
274
|
+
// ensure the json data is a string
|
|
275
|
+
if (data['asset_id'] && !(typeof data['asset_id'] === 'string' || data['asset_id'] instanceof String)) {
|
|
276
|
+
throw new Error("Expected the field `asset_id` to be a primitive type in the JSON string but got " + data['asset_id']);
|
|
277
|
+
}
|
|
278
|
+
// validate the optional field `source`
|
|
279
|
+
if (data['source']) {
|
|
280
|
+
// data not null
|
|
281
|
+
if (!!_TransactionSource["default"].validateJSON) {
|
|
282
|
+
_TransactionSource["default"].validateJSON(data['source']);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
// validate the optional field `destination`
|
|
286
|
+
if (data['destination']) {
|
|
287
|
+
// data not null
|
|
288
|
+
if (!!_TransactionDestination["default"].validateJSON) {
|
|
289
|
+
_TransactionDestination["default"].validateJSON(data['destination']);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
// validate the optional field `result`
|
|
293
|
+
if (data['result']) {
|
|
294
|
+
// data not null
|
|
295
|
+
if (!!_TransactionResult["default"].validateJSON) {
|
|
296
|
+
_TransactionResult["default"].validateJSON(data['result']);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
// validate the optional field `fee`
|
|
300
|
+
if (data['fee']) {
|
|
301
|
+
// data not null
|
|
302
|
+
if (!!_TransactionFee["default"].validateJSON) {
|
|
303
|
+
_TransactionFee["default"].validateJSON(data['fee']);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// ensure the json data is a string
|
|
307
|
+
if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
|
|
308
|
+
throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
|
|
309
|
+
}
|
|
310
|
+
// ensure the json data is a string
|
|
311
|
+
if (data['transaction_hash'] && !(typeof data['transaction_hash'] === 'string' || data['transaction_hash'] instanceof String)) {
|
|
312
|
+
throw new Error("Expected the field `transaction_hash` to be a primitive type in the JSON string but got " + data['transaction_hash']);
|
|
313
|
+
}
|
|
314
|
+
// validate the optional field `block_info`
|
|
315
|
+
if (data['block_info']) {
|
|
316
|
+
// data not null
|
|
317
|
+
if (!!_TransactionBlockInfo["default"].validateJSON) {
|
|
318
|
+
_TransactionBlockInfo["default"].validateJSON(data['block_info']);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// validate the optional field `raw_tx_info`
|
|
322
|
+
if (data['raw_tx_info']) {
|
|
323
|
+
// data not null
|
|
324
|
+
if (!!_TransactionRawTxInfo["default"].validateJSON) {
|
|
325
|
+
_TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
// validate the optional field `replacement`
|
|
329
|
+
if (data['replacement']) {
|
|
330
|
+
// data not null
|
|
331
|
+
if (!!_TransactionReplacement["default"].validateJSON) {
|
|
332
|
+
_TransactionReplacement["default"].validateJSON(data['replacement']);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
// ensure the json data is an array
|
|
336
|
+
if (!Array.isArray(data['category'])) {
|
|
337
|
+
throw new Error("Expected the field `category` to be an array in the JSON data but got " + data['category']);
|
|
338
|
+
}
|
|
339
|
+
// ensure the json data is a string
|
|
340
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
341
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
342
|
+
}
|
|
343
|
+
// ensure the json data is an array
|
|
344
|
+
if (!Array.isArray(data['cobo_category'])) {
|
|
345
|
+
throw new Error("Expected the field `cobo_category` to be an array in the JSON data but got " + data['cobo_category']);
|
|
346
|
+
}
|
|
347
|
+
// ensure the json data is an array
|
|
348
|
+
if (!Array.isArray(data['extra'])) {
|
|
349
|
+
throw new Error("Expected the field `extra` to be an array in the JSON data but got " + data['extra']);
|
|
350
|
+
}
|
|
351
|
+
// validate the optional field `fueling_info`
|
|
352
|
+
if (data['fueling_info']) {
|
|
353
|
+
// data not null
|
|
354
|
+
if (!!_TransactionFuelingInfo["default"].validateJSON) {
|
|
355
|
+
_TransactionFuelingInfo["default"].validateJSON(data['fueling_info']);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
// ensure the json data is a string
|
|
359
|
+
if (data['order_id'] && !(typeof data['order_id'] === 'string' || data['order_id'] instanceof String)) {
|
|
360
|
+
throw new Error("Expected the field `order_id` to be a primitive type in the JSON string but got " + data['order_id']);
|
|
361
|
+
}
|
|
362
|
+
// ensure the json data is a string
|
|
363
|
+
if (data['psp_order_code'] && !(typeof data['psp_order_code'] === 'string' || data['psp_order_code'] instanceof String)) {
|
|
364
|
+
throw new Error("Expected the field `psp_order_code` to be a primitive type in the JSON string but got " + data['psp_order_code']);
|
|
365
|
+
}
|
|
366
|
+
// ensure the json data is a string
|
|
367
|
+
if (data['payer_id'] && !(typeof data['payer_id'] === 'string' || data['payer_id'] instanceof String)) {
|
|
368
|
+
throw new Error("Expected the field `payer_id` to be a primitive type in the JSON string but got " + data['payer_id']);
|
|
369
|
+
}
|
|
370
|
+
// ensure the json data is a string
|
|
371
|
+
if (data['custom_payer_id'] && !(typeof data['custom_payer_id'] === 'string' || data['custom_payer_id'] instanceof String)) {
|
|
372
|
+
throw new Error("Expected the field `custom_payer_id` to be a primitive type in the JSON string but got " + data['custom_payer_id']);
|
|
373
|
+
}
|
|
374
|
+
return true;
|
|
375
|
+
}
|
|
376
|
+
}]);
|
|
377
|
+
}();
|
|
378
|
+
PaymentTransactionEventData.RequiredProperties = ["data_type", "transaction_id", "wallet_id", "status", "source", "destination", "initiator_type", "created_timestamp", "updated_timestamp", "acquiring_type"];
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* 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 payment address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
382
|
+
* @member {module:model/PaymentTransactionEventData.DataTypeEnum} data_type
|
|
383
|
+
*/
|
|
384
|
+
PaymentTransactionEventData.prototype['data_type'] = undefined;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* The transaction ID.
|
|
388
|
+
* @member {String} transaction_id
|
|
389
|
+
*/
|
|
390
|
+
PaymentTransactionEventData.prototype['transaction_id'] = undefined;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* The Cobo ID, which can be used to track a transaction.
|
|
394
|
+
* @member {String} cobo_id
|
|
395
|
+
*/
|
|
396
|
+
PaymentTransactionEventData.prototype['cobo_id'] = undefined;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* 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.
|
|
400
|
+
* @member {String} request_id
|
|
401
|
+
*/
|
|
402
|
+
PaymentTransactionEventData.prototype['request_id'] = undefined;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* For deposit transactions, this property represents the wallet ID of the transaction destination. For transactions of other types, this property represents the wallet ID of the transaction source.
|
|
406
|
+
* @member {String} wallet_id
|
|
407
|
+
*/
|
|
408
|
+
PaymentTransactionEventData.prototype['wallet_id'] = undefined;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @member {module:model/TransactionType} type
|
|
412
|
+
*/
|
|
413
|
+
PaymentTransactionEventData.prototype['type'] = undefined;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @member {module:model/TransactionStatus} status
|
|
417
|
+
*/
|
|
418
|
+
PaymentTransactionEventData.prototype['status'] = undefined;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* @member {module:model/TransactionSubStatus} sub_status
|
|
422
|
+
*/
|
|
423
|
+
PaymentTransactionEventData.prototype['sub_status'] = undefined;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* (This property is applicable to approval failures and signature failures only) The reason why the transaction failed.
|
|
427
|
+
* @member {String} failed_reason
|
|
428
|
+
*/
|
|
429
|
+
PaymentTransactionEventData.prototype['failed_reason'] = undefined;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* 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).
|
|
433
|
+
* @member {String} chain_id
|
|
434
|
+
*/
|
|
435
|
+
PaymentTransactionEventData.prototype['chain_id'] = undefined;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
439
|
+
* @member {String} token_id
|
|
440
|
+
*/
|
|
441
|
+
PaymentTransactionEventData.prototype['token_id'] = undefined;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
|
|
445
|
+
* @member {String} asset_id
|
|
446
|
+
*/
|
|
447
|
+
PaymentTransactionEventData.prototype['asset_id'] = undefined;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @member {module:model/TransactionSource} source
|
|
451
|
+
*/
|
|
452
|
+
PaymentTransactionEventData.prototype['source'] = undefined;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @member {module:model/TransactionDestination} destination
|
|
456
|
+
*/
|
|
457
|
+
PaymentTransactionEventData.prototype['destination'] = undefined;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* @member {module:model/TransactionResult} result
|
|
461
|
+
*/
|
|
462
|
+
PaymentTransactionEventData.prototype['result'] = undefined;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @member {module:model/TransactionFee} fee
|
|
466
|
+
*/
|
|
467
|
+
PaymentTransactionEventData.prototype['fee'] = undefined;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* The transaction initiator.
|
|
471
|
+
* @member {String} initiator
|
|
472
|
+
*/
|
|
473
|
+
PaymentTransactionEventData.prototype['initiator'] = undefined;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @member {module:model/TransactionInitiatorType} initiator_type
|
|
477
|
+
*/
|
|
478
|
+
PaymentTransactionEventData.prototype['initiator_type'] = undefined;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* The number of confirmations this transaction has received.
|
|
482
|
+
* @member {Number} confirmed_num
|
|
483
|
+
*/
|
|
484
|
+
PaymentTransactionEventData.prototype['confirmed_num'] = undefined;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* The minimum number of confirmations required to deem a transaction secure. The common threshold is 6 for a Bitcoin transaction.
|
|
488
|
+
* @member {Number} confirming_threshold
|
|
489
|
+
*/
|
|
490
|
+
PaymentTransactionEventData.prototype['confirming_threshold'] = undefined;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* The transaction hash.
|
|
494
|
+
* @member {String} transaction_hash
|
|
495
|
+
*/
|
|
496
|
+
PaymentTransactionEventData.prototype['transaction_hash'] = undefined;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* @member {module:model/TransactionBlockInfo} block_info
|
|
500
|
+
*/
|
|
501
|
+
PaymentTransactionEventData.prototype['block_info'] = undefined;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* @member {module:model/TransactionRawTxInfo} raw_tx_info
|
|
505
|
+
*/
|
|
506
|
+
PaymentTransactionEventData.prototype['raw_tx_info'] = undefined;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* @member {module:model/TransactionReplacement} replacement
|
|
510
|
+
*/
|
|
511
|
+
PaymentTransactionEventData.prototype['replacement'] = undefined;
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* A custom transaction category for you to identify your transfers more easily.
|
|
515
|
+
* @member {Array.<String>} category
|
|
516
|
+
*/
|
|
517
|
+
PaymentTransactionEventData.prototype['category'] = undefined;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* The description for your transaction.
|
|
521
|
+
* @member {String} description
|
|
522
|
+
*/
|
|
523
|
+
PaymentTransactionEventData.prototype['description'] = undefined;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
|
|
527
|
+
* @member {Boolean} is_loop
|
|
528
|
+
*/
|
|
529
|
+
PaymentTransactionEventData.prototype['is_loop'] = undefined;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* The transaction category defined by Cobo. Possible values include: - `AutoSweep`: An auto-sweep transaction. - `AutoFueling`: A transaction where Fee Station pays transaction fees to an address within your wallet. - `AutoFuelingRefund`: A refund for an auto-fueling transaction. - `SafeTxMessage`: A message signing transaction to authorize a Smart Contract Wallet (Safe\\{Wallet\\}) transaction. - `BillPayment`: A transaction to pay Cobo bills through Fee Station. - `BillRefund`: A refund for a previously made bill payment. - `CommissionFeeCharge`: A transaction to charge commission fees via Fee Station. - `CommissionFeeRefund`: A refund of previously charged commission fees.
|
|
533
|
+
* @member {Array.<String>} cobo_category
|
|
534
|
+
*/
|
|
535
|
+
PaymentTransactionEventData.prototype['cobo_category'] = undefined;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* A list of JSON-encoded strings containing structured, business-specific extra information for the transaction. Each item corresponds to a specific data type, indicated by the `extra_type` field in the JSON object (for example, \"BabylonBusinessInfo\", \"BtcAddressInfo\").
|
|
539
|
+
* @member {Array.<String>} extra
|
|
540
|
+
*/
|
|
541
|
+
PaymentTransactionEventData.prototype['extra'] = undefined;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* @member {module:model/TransactionFuelingInfo} fueling_info
|
|
545
|
+
*/
|
|
546
|
+
PaymentTransactionEventData.prototype['fueling_info'] = undefined;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* The time when the transaction was created, in Unix timestamp format, measured in milliseconds.
|
|
550
|
+
* @member {Number} created_timestamp
|
|
551
|
+
*/
|
|
552
|
+
PaymentTransactionEventData.prototype['created_timestamp'] = undefined;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* The time when the transaction was updated, in Unix timestamp format, measured in milliseconds.
|
|
556
|
+
* @member {Number} updated_timestamp
|
|
557
|
+
*/
|
|
558
|
+
PaymentTransactionEventData.prototype['updated_timestamp'] = undefined;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* @member {module:model/AcquiringType} acquiring_type
|
|
562
|
+
*/
|
|
563
|
+
PaymentTransactionEventData.prototype['acquiring_type'] = undefined;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Unique identifier of a single order
|
|
567
|
+
* @member {String} order_id
|
|
568
|
+
*/
|
|
569
|
+
PaymentTransactionEventData.prototype['order_id'] = undefined;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* A unique reference code assigned by the developer to identify this order in their system.
|
|
573
|
+
* @member {String} psp_order_code
|
|
574
|
+
*/
|
|
575
|
+
PaymentTransactionEventData.prototype['psp_order_code'] = undefined;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
579
|
+
* @member {String} payer_id
|
|
580
|
+
*/
|
|
581
|
+
PaymentTransactionEventData.prototype['payer_id'] = undefined;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Unique user identifier on the merchant side, used to assign a dedicated deposit address.
|
|
585
|
+
* @member {String} custom_payer_id
|
|
586
|
+
*/
|
|
587
|
+
PaymentTransactionEventData.prototype['custom_payer_id'] = undefined;
|
|
588
|
+
|
|
589
|
+
// Implement WebhookEventDataType interface:
|
|
590
|
+
/**
|
|
591
|
+
* 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 payment address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
592
|
+
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
593
|
+
*/
|
|
594
|
+
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
595
|
+
// Implement Transaction interface:
|
|
596
|
+
/**
|
|
597
|
+
* The transaction ID.
|
|
598
|
+
* @member {String} transaction_id
|
|
599
|
+
*/
|
|
600
|
+
_Transaction["default"].prototype['transaction_id'] = undefined;
|
|
601
|
+
/**
|
|
602
|
+
* The Cobo ID, which can be used to track a transaction.
|
|
603
|
+
* @member {String} cobo_id
|
|
604
|
+
*/
|
|
605
|
+
_Transaction["default"].prototype['cobo_id'] = undefined;
|
|
606
|
+
/**
|
|
607
|
+
* 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.
|
|
608
|
+
* @member {String} request_id
|
|
609
|
+
*/
|
|
610
|
+
_Transaction["default"].prototype['request_id'] = undefined;
|
|
611
|
+
/**
|
|
612
|
+
* For deposit transactions, this property represents the wallet ID of the transaction destination. For transactions of other types, this property represents the wallet ID of the transaction source.
|
|
613
|
+
* @member {String} wallet_id
|
|
614
|
+
*/
|
|
615
|
+
_Transaction["default"].prototype['wallet_id'] = undefined;
|
|
616
|
+
/**
|
|
617
|
+
* @member {module:model/TransactionType} type
|
|
618
|
+
*/
|
|
619
|
+
_Transaction["default"].prototype['type'] = undefined;
|
|
620
|
+
/**
|
|
621
|
+
* @member {module:model/TransactionStatus} status
|
|
622
|
+
*/
|
|
623
|
+
_Transaction["default"].prototype['status'] = undefined;
|
|
624
|
+
/**
|
|
625
|
+
* @member {module:model/TransactionSubStatus} sub_status
|
|
626
|
+
*/
|
|
627
|
+
_Transaction["default"].prototype['sub_status'] = undefined;
|
|
628
|
+
/**
|
|
629
|
+
* (This property is applicable to approval failures and signature failures only) The reason why the transaction failed.
|
|
630
|
+
* @member {String} failed_reason
|
|
631
|
+
*/
|
|
632
|
+
_Transaction["default"].prototype['failed_reason'] = undefined;
|
|
633
|
+
/**
|
|
634
|
+
* 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).
|
|
635
|
+
* @member {String} chain_id
|
|
636
|
+
*/
|
|
637
|
+
_Transaction["default"].prototype['chain_id'] = undefined;
|
|
638
|
+
/**
|
|
639
|
+
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
640
|
+
* @member {String} token_id
|
|
641
|
+
*/
|
|
642
|
+
_Transaction["default"].prototype['token_id'] = undefined;
|
|
643
|
+
/**
|
|
644
|
+
* (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
|
|
645
|
+
* @member {String} asset_id
|
|
646
|
+
*/
|
|
647
|
+
_Transaction["default"].prototype['asset_id'] = undefined;
|
|
648
|
+
/**
|
|
649
|
+
* @member {module:model/TransactionSource} source
|
|
650
|
+
*/
|
|
651
|
+
_Transaction["default"].prototype['source'] = undefined;
|
|
652
|
+
/**
|
|
653
|
+
* @member {module:model/TransactionDestination} destination
|
|
654
|
+
*/
|
|
655
|
+
_Transaction["default"].prototype['destination'] = undefined;
|
|
656
|
+
/**
|
|
657
|
+
* @member {module:model/TransactionResult} result
|
|
658
|
+
*/
|
|
659
|
+
_Transaction["default"].prototype['result'] = undefined;
|
|
660
|
+
/**
|
|
661
|
+
* @member {module:model/TransactionFee} fee
|
|
662
|
+
*/
|
|
663
|
+
_Transaction["default"].prototype['fee'] = undefined;
|
|
664
|
+
/**
|
|
665
|
+
* The transaction initiator.
|
|
666
|
+
* @member {String} initiator
|
|
667
|
+
*/
|
|
668
|
+
_Transaction["default"].prototype['initiator'] = undefined;
|
|
669
|
+
/**
|
|
670
|
+
* @member {module:model/TransactionInitiatorType} initiator_type
|
|
671
|
+
*/
|
|
672
|
+
_Transaction["default"].prototype['initiator_type'] = undefined;
|
|
673
|
+
/**
|
|
674
|
+
* The number of confirmations this transaction has received.
|
|
675
|
+
* @member {Number} confirmed_num
|
|
676
|
+
*/
|
|
677
|
+
_Transaction["default"].prototype['confirmed_num'] = undefined;
|
|
678
|
+
/**
|
|
679
|
+
* The minimum number of confirmations required to deem a transaction secure. The common threshold is 6 for a Bitcoin transaction.
|
|
680
|
+
* @member {Number} confirming_threshold
|
|
681
|
+
*/
|
|
682
|
+
_Transaction["default"].prototype['confirming_threshold'] = undefined;
|
|
683
|
+
/**
|
|
684
|
+
* The transaction hash.
|
|
685
|
+
* @member {String} transaction_hash
|
|
686
|
+
*/
|
|
687
|
+
_Transaction["default"].prototype['transaction_hash'] = undefined;
|
|
688
|
+
/**
|
|
689
|
+
* @member {module:model/TransactionBlockInfo} block_info
|
|
690
|
+
*/
|
|
691
|
+
_Transaction["default"].prototype['block_info'] = undefined;
|
|
692
|
+
/**
|
|
693
|
+
* @member {module:model/TransactionRawTxInfo} raw_tx_info
|
|
694
|
+
*/
|
|
695
|
+
_Transaction["default"].prototype['raw_tx_info'] = undefined;
|
|
696
|
+
/**
|
|
697
|
+
* @member {module:model/TransactionReplacement} replacement
|
|
698
|
+
*/
|
|
699
|
+
_Transaction["default"].prototype['replacement'] = undefined;
|
|
700
|
+
/**
|
|
701
|
+
* A custom transaction category for you to identify your transfers more easily.
|
|
702
|
+
* @member {Array.<String>} category
|
|
703
|
+
*/
|
|
704
|
+
_Transaction["default"].prototype['category'] = undefined;
|
|
705
|
+
/**
|
|
706
|
+
* The description for your transaction.
|
|
707
|
+
* @member {String} description
|
|
708
|
+
*/
|
|
709
|
+
_Transaction["default"].prototype['description'] = undefined;
|
|
710
|
+
/**
|
|
711
|
+
* Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
|
|
712
|
+
* @member {Boolean} is_loop
|
|
713
|
+
*/
|
|
714
|
+
_Transaction["default"].prototype['is_loop'] = undefined;
|
|
715
|
+
/**
|
|
716
|
+
* The transaction category defined by Cobo. Possible values include: - `AutoSweep`: An auto-sweep transaction. - `AutoFueling`: A transaction where Fee Station pays transaction fees to an address within your wallet. - `AutoFuelingRefund`: A refund for an auto-fueling transaction. - `SafeTxMessage`: A message signing transaction to authorize a Smart Contract Wallet (Safe\\{Wallet\\}) transaction. - `BillPayment`: A transaction to pay Cobo bills through Fee Station. - `BillRefund`: A refund for a previously made bill payment. - `CommissionFeeCharge`: A transaction to charge commission fees via Fee Station. - `CommissionFeeRefund`: A refund of previously charged commission fees.
|
|
717
|
+
* @member {Array.<String>} cobo_category
|
|
718
|
+
*/
|
|
719
|
+
_Transaction["default"].prototype['cobo_category'] = undefined;
|
|
720
|
+
/**
|
|
721
|
+
* A list of JSON-encoded strings containing structured, business-specific extra information for the transaction. Each item corresponds to a specific data type, indicated by the `extra_type` field in the JSON object (for example, \"BabylonBusinessInfo\", \"BtcAddressInfo\").
|
|
722
|
+
* @member {Array.<String>} extra
|
|
723
|
+
*/
|
|
724
|
+
_Transaction["default"].prototype['extra'] = undefined;
|
|
725
|
+
/**
|
|
726
|
+
* @member {module:model/TransactionFuelingInfo} fueling_info
|
|
727
|
+
*/
|
|
728
|
+
_Transaction["default"].prototype['fueling_info'] = undefined;
|
|
729
|
+
/**
|
|
730
|
+
* The time when the transaction was created, in Unix timestamp format, measured in milliseconds.
|
|
731
|
+
* @member {Number} created_timestamp
|
|
732
|
+
*/
|
|
733
|
+
_Transaction["default"].prototype['created_timestamp'] = undefined;
|
|
734
|
+
/**
|
|
735
|
+
* The time when the transaction was updated, in Unix timestamp format, measured in milliseconds.
|
|
736
|
+
* @member {Number} updated_timestamp
|
|
737
|
+
*/
|
|
738
|
+
_Transaction["default"].prototype['updated_timestamp'] = undefined;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Allowed values for the <code>data_type</code> property.
|
|
742
|
+
* @enum {String}
|
|
743
|
+
* @readonly
|
|
744
|
+
*/
|
|
745
|
+
PaymentTransactionEventData['DataTypeEnum'] = {
|
|
746
|
+
/**
|
|
747
|
+
* value: "Transaction"
|
|
748
|
+
* @const
|
|
749
|
+
*/
|
|
750
|
+
"Transaction": "Transaction",
|
|
751
|
+
/**
|
|
752
|
+
* value: "TSSRequest"
|
|
753
|
+
* @const
|
|
754
|
+
*/
|
|
755
|
+
"TSSRequest": "TSSRequest",
|
|
756
|
+
/**
|
|
757
|
+
* value: "Addresses"
|
|
758
|
+
* @const
|
|
759
|
+
*/
|
|
760
|
+
"Addresses": "Addresses",
|
|
761
|
+
/**
|
|
762
|
+
* value: "WalletInfo"
|
|
763
|
+
* @const
|
|
764
|
+
*/
|
|
765
|
+
"WalletInfo": "WalletInfo",
|
|
766
|
+
/**
|
|
767
|
+
* value: "MPCVault"
|
|
768
|
+
* @const
|
|
769
|
+
*/
|
|
770
|
+
"MPCVault": "MPCVault",
|
|
771
|
+
/**
|
|
772
|
+
* value: "Chains"
|
|
773
|
+
* @const
|
|
774
|
+
*/
|
|
775
|
+
"Chains": "Chains",
|
|
776
|
+
/**
|
|
777
|
+
* value: "Tokens"
|
|
778
|
+
* @const
|
|
779
|
+
*/
|
|
780
|
+
"Tokens": "Tokens",
|
|
781
|
+
/**
|
|
782
|
+
* value: "TokenListing"
|
|
783
|
+
* @const
|
|
784
|
+
*/
|
|
785
|
+
"TokenListing": "TokenListing",
|
|
786
|
+
/**
|
|
787
|
+
* value: "PaymentOrder"
|
|
788
|
+
* @const
|
|
789
|
+
*/
|
|
790
|
+
"PaymentOrder": "PaymentOrder",
|
|
791
|
+
/**
|
|
792
|
+
* value: "PaymentRefund"
|
|
793
|
+
* @const
|
|
794
|
+
*/
|
|
795
|
+
"PaymentRefund": "PaymentRefund",
|
|
796
|
+
/**
|
|
797
|
+
* value: "PaymentSettlement"
|
|
798
|
+
* @const
|
|
799
|
+
*/
|
|
800
|
+
"PaymentSettlement": "PaymentSettlement",
|
|
801
|
+
/**
|
|
802
|
+
* value: "PaymentTransaction"
|
|
803
|
+
* @const
|
|
804
|
+
*/
|
|
805
|
+
"PaymentTransaction": "PaymentTransaction",
|
|
806
|
+
/**
|
|
807
|
+
* value: "PaymentAddressUpdate"
|
|
808
|
+
* @const
|
|
809
|
+
*/
|
|
810
|
+
"PaymentAddressUpdate": "PaymentAddressUpdate",
|
|
811
|
+
/**
|
|
812
|
+
* value: "BalanceUpdateInfo"
|
|
813
|
+
* @const
|
|
814
|
+
*/
|
|
815
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
816
|
+
/**
|
|
817
|
+
* value: "SuspendedToken"
|
|
818
|
+
* @const
|
|
819
|
+
*/
|
|
820
|
+
"SuspendedToken": "SuspendedToken",
|
|
821
|
+
/**
|
|
822
|
+
* value: "unknown_default_open_api"
|
|
823
|
+
* @const
|
|
824
|
+
*/
|
|
825
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
826
|
+
};
|
|
827
|
+
var _default = exports["default"] = PaymentTransactionEventData;
|