@cobo/cobo-waas2 1.34.0 → 1.36.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 +28 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/PaymentApi.js +126 -91
- package/dist/api/TravelRuleApi.js +293 -6
- package/dist/index.js +133 -7
- package/dist/model/AddressVerification.js +172 -0
- package/dist/model/AddressVerificationDetail.js +204 -0
- package/dist/model/AddressVerificationDetailSatoshiTestDetail.js +299 -0
- package/dist/model/AddressVerificationDetailSignatureDetail.js +172 -0
- package/dist/model/AddressVerificationMethod.js +61 -0
- package/dist/model/AddressVerificationStatus.js +66 -0
- package/dist/model/ApprovalUserDetail.js +9 -0
- package/dist/model/{UpdateBankAccountByIdRequest.js → CancelSatoshiTestChallengeRequest.js} +31 -28
- package/dist/model/ChainInfo.js +13 -0
- package/dist/model/CreateBulkSendRequest.js +13 -0
- package/dist/model/CreateSatoshiTestChallengeRequest.js +176 -0
- package/dist/model/GetTransactionLimitation200Response.js +10 -1
- package/dist/model/ListAddressVerifications200Response.js +147 -0
- package/dist/model/ListBulkSends200Response.js +123 -0
- package/dist/model/ListPayerTransactions200Response.js +123 -0
- package/dist/model/ListTopUpPayers200ResponseDataInner.js +14 -1
- package/dist/model/OrderLinkBusinessInfo.js +2 -2
- package/dist/model/OriginalMainGroupHandling.js +61 -0
- package/dist/model/PaymentBulkSend.js +13 -0
- package/dist/model/PaymentBulkSendEvent.js +18 -0
- package/dist/model/SatoshiTestCancelResult.js +144 -0
- package/dist/model/SatoshiTestChallenge.js +239 -0
- package/dist/model/SatoshiTestChallengeAction.js +61 -0
- package/dist/model/SatoshiTestChallengeStatus.js +81 -0
- package/dist/model/SignatureChallenge.js +137 -0
- package/dist/model/SignatureDetail.js +146 -0
- package/dist/model/TransactionCoboCategory.js +20 -0
- package/dist/model/TravelRuleTransactionType.js +61 -0
- package/dist/model/UpdateKeyShareHolderGroupByIdRequest.js +9 -0
- package/dist/model/WebhookEventData.js +1 -1
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressVerification.md +14 -0
- package/docs/AddressVerificationDetail.md +16 -0
- package/docs/AddressVerificationDetailSatoshiTestDetail.md +19 -0
- package/docs/AddressVerificationDetailSignatureDetail.md +12 -0
- package/docs/AddressVerificationMethod.md +12 -0
- package/docs/AddressVerificationStatus.md +14 -0
- package/docs/ApprovalUserDetail.md +1 -0
- package/docs/CancelSatoshiTestChallengeRequest.md +9 -0
- package/docs/ChainInfo.md +1 -0
- package/docs/CreateBulkSendRequest.md +1 -0
- package/docs/CreateSatoshiTestChallengeRequest.md +14 -0
- package/docs/GetTransactionLimitation200Response.md +2 -1
- package/docs/ListAddressVerifications200Response.md +10 -0
- package/docs/ListBulkSends200Response.md +10 -0
- package/docs/ListPayerTransactions200Response.md +10 -0
- package/docs/ListTopUpPayers200ResponseDataInner.md +2 -1
- package/docs/OrderLinkBusinessInfo.md +1 -1
- package/docs/OriginalMainGroupHandling.md +12 -0
- package/docs/PaymentApi.md +107 -83
- package/docs/PaymentBulkSend.md +1 -0
- package/docs/PaymentBulkSendEvent.md +1 -0
- package/docs/SatoshiTestCancelResult.md +21 -0
- package/docs/SatoshiTestChallenge.md +19 -0
- package/docs/SatoshiTestChallengeAction.md +12 -0
- package/docs/SatoshiTestChallengeStatus.md +20 -0
- package/docs/SignatureChallenge.md +11 -0
- package/docs/SignatureDetail.md +12 -0
- package/docs/TransactionCoboCategory.md +8 -0
- package/docs/TravelRuleApi.md +325 -1
- package/docs/TravelRuleTransactionType.md +12 -0
- package/docs/UpdateKeyShareHolderGroupByIdRequest.md +1 -0
- package/docs/WebhookEventData.md +1 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/docs/UpdateBankAccountByIdRequest.md +0 -9
|
@@ -25,18 +25,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
/**
|
|
28
|
-
* The
|
|
29
|
-
* @module model/
|
|
28
|
+
* The CancelSatoshiTestChallengeRequest model module.
|
|
29
|
+
* @module model/CancelSatoshiTestChallengeRequest
|
|
30
30
|
*/
|
|
31
|
-
var
|
|
31
|
+
var CancelSatoshiTestChallengeRequest = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
|
-
* Constructs a new <code>
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
33
|
+
* Constructs a new <code>CancelSatoshiTestChallengeRequest</code>.
|
|
34
|
+
* Request body for cancelling a Satoshi Test challenge that is in `PREPARE` or `PENDING` status.
|
|
35
|
+
* @alias module:model/CancelSatoshiTestChallengeRequest
|
|
36
|
+
* @param challenge_id {String} The challenge ID to cancel.
|
|
36
37
|
*/
|
|
37
|
-
function
|
|
38
|
-
_classCallCheck(this,
|
|
39
|
-
|
|
38
|
+
function CancelSatoshiTestChallengeRequest(challenge_id) {
|
|
39
|
+
_classCallCheck(this, CancelSatoshiTestChallengeRequest);
|
|
40
|
+
CancelSatoshiTestChallengeRequest.initialize(this, challenge_id);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
/**
|
|
@@ -44,43 +45,41 @@ var UpdateBankAccountByIdRequest = /*#__PURE__*/function () {
|
|
|
44
45
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
46
|
* Only for internal use.
|
|
46
47
|
*/
|
|
47
|
-
return _createClass(
|
|
48
|
+
return _createClass(CancelSatoshiTestChallengeRequest, null, [{
|
|
48
49
|
key: "initialize",
|
|
49
|
-
value: function initialize(obj,
|
|
50
|
-
obj['
|
|
50
|
+
value: function initialize(obj, challenge_id) {
|
|
51
|
+
obj['challenge_id'] = challenge_id;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
|
-
* Constructs a <code>
|
|
55
|
+
* Constructs a <code>CancelSatoshiTestChallengeRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
55
56
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
56
57
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
57
|
-
* @param {module:model/
|
|
58
|
-
* @return {module:model/
|
|
58
|
+
* @param {module:model/CancelSatoshiTestChallengeRequest} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/CancelSatoshiTestChallengeRequest} The populated <code>CancelSatoshiTestChallengeRequest</code> instance.
|
|
59
60
|
*/
|
|
60
61
|
}, {
|
|
61
62
|
key: "constructFromObject",
|
|
62
63
|
value: function constructFromObject(data, obj) {
|
|
63
64
|
if (data) {
|
|
64
|
-
obj = obj || new
|
|
65
|
-
if (data.hasOwnProperty('
|
|
66
|
-
obj['
|
|
67
|
-
'String': Object
|
|
68
|
-
});
|
|
65
|
+
obj = obj || new CancelSatoshiTestChallengeRequest();
|
|
66
|
+
if (data.hasOwnProperty('challenge_id')) {
|
|
67
|
+
obj['challenge_id'] = _ApiClient["default"].convertToType(data['challenge_id'], 'String');
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
return obj;
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
/**
|
|
75
|
-
* Validates the JSON data with respect to <code>
|
|
74
|
+
* Validates the JSON data with respect to <code>CancelSatoshiTestChallengeRequest</code>.
|
|
76
75
|
* @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>
|
|
76
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CancelSatoshiTestChallengeRequest</code>.
|
|
78
77
|
*/
|
|
79
78
|
}, {
|
|
80
79
|
key: "validateJSON",
|
|
81
80
|
value: function validateJSON(data) {
|
|
82
81
|
// check to make sure all required properties are present in the JSON string
|
|
83
|
-
var _iterator = _createForOfIteratorHelper(
|
|
82
|
+
var _iterator = _createForOfIteratorHelper(CancelSatoshiTestChallengeRequest.RequiredProperties),
|
|
84
83
|
_step;
|
|
85
84
|
try {
|
|
86
85
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -89,20 +88,24 @@ var UpdateBankAccountByIdRequest = /*#__PURE__*/function () {
|
|
|
89
88
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
90
89
|
}
|
|
91
90
|
}
|
|
91
|
+
// ensure the json data is a string
|
|
92
92
|
} catch (err) {
|
|
93
93
|
_iterator.e(err);
|
|
94
94
|
} finally {
|
|
95
95
|
_iterator.f();
|
|
96
96
|
}
|
|
97
|
+
if (data['challenge_id'] && !(typeof data['challenge_id'] === 'string' || data['challenge_id'] instanceof String)) {
|
|
98
|
+
throw new Error("Expected the field `challenge_id` to be a primitive type in the JSON string but got " + data['challenge_id']);
|
|
99
|
+
}
|
|
97
100
|
return true;
|
|
98
101
|
}
|
|
99
102
|
}]);
|
|
100
103
|
}();
|
|
101
|
-
|
|
104
|
+
CancelSatoshiTestChallengeRequest.RequiredProperties = ["challenge_id"];
|
|
102
105
|
|
|
103
106
|
/**
|
|
104
|
-
*
|
|
105
|
-
* @member {
|
|
107
|
+
* The challenge ID to cancel.
|
|
108
|
+
* @member {String} challenge_id
|
|
106
109
|
*/
|
|
107
|
-
|
|
108
|
-
var _default = exports["default"] =
|
|
110
|
+
CancelSatoshiTestChallengeRequest.prototype['challenge_id'] = undefined;
|
|
111
|
+
var _default = exports["default"] = CancelSatoshiTestChallengeRequest;
|
package/dist/model/ChainInfo.js
CHANGED
|
@@ -90,6 +90,9 @@ var ChainInfo = /*#__PURE__*/function () {
|
|
|
90
90
|
if (data.hasOwnProperty('coinbase_maturity')) {
|
|
91
91
|
obj['coinbase_maturity'] = _ApiClient["default"].convertToType(data['coinbase_maturity'], 'Number');
|
|
92
92
|
}
|
|
93
|
+
if (data.hasOwnProperty('caip2_chain_id')) {
|
|
94
|
+
obj['caip2_chain_id'] = _ApiClient["default"].convertToType(data['caip2_chain_id'], 'String');
|
|
95
|
+
}
|
|
93
96
|
}
|
|
94
97
|
return obj;
|
|
95
98
|
}
|
|
@@ -141,6 +144,10 @@ var ChainInfo = /*#__PURE__*/function () {
|
|
|
141
144
|
if (data['explorer_address_url'] && !(typeof data['explorer_address_url'] === 'string' || data['explorer_address_url'] instanceof String)) {
|
|
142
145
|
throw new Error("Expected the field `explorer_address_url` to be a primitive type in the JSON string but got " + data['explorer_address_url']);
|
|
143
146
|
}
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['caip2_chain_id'] && !(typeof data['caip2_chain_id'] === 'string' || data['caip2_chain_id'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `caip2_chain_id` to be a primitive type in the JSON string but got " + data['caip2_chain_id']);
|
|
150
|
+
}
|
|
144
151
|
return true;
|
|
145
152
|
}
|
|
146
153
|
}]);
|
|
@@ -200,4 +207,10 @@ ChainInfo.prototype['confirming_threshold'] = undefined;
|
|
|
200
207
|
* @member {Number} coinbase_maturity
|
|
201
208
|
*/
|
|
202
209
|
ChainInfo.prototype['coinbase_maturity'] = undefined;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* A standardized, unique identifier for blockchain networks (like eip155:1 for Ethereum) that combines a namespace and a reference to ensure cross-chain compatibility.
|
|
213
|
+
* @member {String} caip2_chain_id
|
|
214
|
+
*/
|
|
215
|
+
ChainInfo.prototype['caip2_chain_id'] = undefined;
|
|
203
216
|
var _default = exports["default"] = ChainInfo;
|
|
@@ -68,6 +68,9 @@ var CreateBulkSendRequest = /*#__PURE__*/function () {
|
|
|
68
68
|
value: function constructFromObject(data, obj) {
|
|
69
69
|
if (data) {
|
|
70
70
|
obj = obj || new CreateBulkSendRequest();
|
|
71
|
+
if (data.hasOwnProperty('request_id')) {
|
|
72
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
73
|
+
}
|
|
71
74
|
if (data.hasOwnProperty('source_account')) {
|
|
72
75
|
obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
|
|
73
76
|
}
|
|
@@ -108,6 +111,10 @@ var CreateBulkSendRequest = /*#__PURE__*/function () {
|
|
|
108
111
|
} finally {
|
|
109
112
|
_iterator.f();
|
|
110
113
|
}
|
|
114
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
115
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is a string
|
|
111
118
|
if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
|
|
112
119
|
throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
|
|
113
120
|
}
|
|
@@ -142,6 +149,12 @@ var CreateBulkSendRequest = /*#__PURE__*/function () {
|
|
|
142
149
|
}();
|
|
143
150
|
CreateBulkSendRequest.RequiredProperties = ["source_account", "execution_mode", "payout_params"];
|
|
144
151
|
|
|
152
|
+
/**
|
|
153
|
+
* The request ID that is used to track a bulk send request. The request ID is provided by you and must be unique within your system.
|
|
154
|
+
* @member {String} request_id
|
|
155
|
+
*/
|
|
156
|
+
CreateBulkSendRequest.prototype['request_id'] = undefined;
|
|
157
|
+
|
|
145
158
|
/**
|
|
146
159
|
* The source account from which the bulk send will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
|
|
147
160
|
* @member {String} source_account
|
|
@@ -0,0 +1,176 @@
|
|
|
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 _SatoshiTestChallengeAction = _interopRequireDefault(require("./SatoshiTestChallengeAction"));
|
|
9
|
+
var _TravelRuleTransactionType = _interopRequireDefault(require("./TravelRuleTransactionType"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The CreateSatoshiTestChallengeRequest model module.
|
|
31
|
+
* @module model/CreateSatoshiTestChallengeRequest
|
|
32
|
+
*/
|
|
33
|
+
var CreateSatoshiTestChallengeRequest = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>CreateSatoshiTestChallengeRequest</code>.
|
|
36
|
+
* Request body for creating a Satoshi Test challenge. A single endpoint covers both the two-step flow (`PREPARE` then `SUBMIT`) and the one-shot flow (`SUBMIT` directly). Idempotent on `(chain_id, from_address)` per organization.
|
|
37
|
+
* @alias module:model/CreateSatoshiTestChallengeRequest
|
|
38
|
+
* @param action {module:model/SatoshiTestChallengeAction}
|
|
39
|
+
* @param chain_id {String} The chain ID of the counterparty address. See the operation description for supported chains.
|
|
40
|
+
* @param from_address {String} The counterparty (self-custody) wallet address that will transfer the micro-deposit.
|
|
41
|
+
* @param transaction_id {String} The Cobo transaction ID that this Satoshi Test is verifying for.
|
|
42
|
+
* @param transaction_type {module:model/TravelRuleTransactionType}
|
|
43
|
+
*/
|
|
44
|
+
function CreateSatoshiTestChallengeRequest(action, chain_id, from_address, transaction_id, transaction_type) {
|
|
45
|
+
_classCallCheck(this, CreateSatoshiTestChallengeRequest);
|
|
46
|
+
CreateSatoshiTestChallengeRequest.initialize(this, action, chain_id, from_address, transaction_id, transaction_type);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(CreateSatoshiTestChallengeRequest, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, action, chain_id, from_address, transaction_id, transaction_type) {
|
|
57
|
+
obj['action'] = action;
|
|
58
|
+
obj['chain_id'] = chain_id;
|
|
59
|
+
obj['from_address'] = from_address;
|
|
60
|
+
obj['transaction_id'] = transaction_id;
|
|
61
|
+
obj['transaction_type'] = transaction_type;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Constructs a <code>CreateSatoshiTestChallengeRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
66
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
67
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
68
|
+
* @param {module:model/CreateSatoshiTestChallengeRequest} obj Optional instance to populate.
|
|
69
|
+
* @return {module:model/CreateSatoshiTestChallengeRequest} The populated <code>CreateSatoshiTestChallengeRequest</code> instance.
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "constructFromObject",
|
|
73
|
+
value: function constructFromObject(data, obj) {
|
|
74
|
+
if (data) {
|
|
75
|
+
obj = obj || new CreateSatoshiTestChallengeRequest();
|
|
76
|
+
if (data.hasOwnProperty('action')) {
|
|
77
|
+
obj['action'] = _SatoshiTestChallengeAction["default"].constructFromObject(data['action']);
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
80
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('from_address')) {
|
|
83
|
+
obj['from_address'] = _ApiClient["default"].convertToType(data['from_address'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
86
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('transaction_type')) {
|
|
89
|
+
obj['transaction_type'] = _TravelRuleTransactionType["default"].constructFromObject(data['transaction_type']);
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('challenge_id')) {
|
|
92
|
+
obj['challenge_id'] = _ApiClient["default"].convertToType(data['challenge_id'], 'String');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return obj;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Validates the JSON data with respect to <code>CreateSatoshiTestChallengeRequest</code>.
|
|
100
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
101
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSatoshiTestChallengeRequest</code>.
|
|
102
|
+
*/
|
|
103
|
+
}, {
|
|
104
|
+
key: "validateJSON",
|
|
105
|
+
value: function validateJSON(data) {
|
|
106
|
+
// check to make sure all required properties are present in the JSON string
|
|
107
|
+
var _iterator = _createForOfIteratorHelper(CreateSatoshiTestChallengeRequest.RequiredProperties),
|
|
108
|
+
_step;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
111
|
+
var property = _step.value;
|
|
112
|
+
if (!data.hasOwnProperty(property)) {
|
|
113
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
} catch (err) {
|
|
118
|
+
_iterator.e(err);
|
|
119
|
+
} finally {
|
|
120
|
+
_iterator.f();
|
|
121
|
+
}
|
|
122
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
124
|
+
}
|
|
125
|
+
// ensure the json data is a string
|
|
126
|
+
if (data['from_address'] && !(typeof data['from_address'] === 'string' || data['from_address'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `from_address` to be a primitive type in the JSON string but got " + data['from_address']);
|
|
128
|
+
}
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['challenge_id'] && !(typeof data['challenge_id'] === 'string' || data['challenge_id'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `challenge_id` to be a primitive type in the JSON string but got " + data['challenge_id']);
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
}]);
|
|
140
|
+
}();
|
|
141
|
+
CreateSatoshiTestChallengeRequest.RequiredProperties = ["action", "chain_id", "from_address", "transaction_id", "transaction_type"];
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @member {module:model/SatoshiTestChallengeAction} action
|
|
145
|
+
*/
|
|
146
|
+
CreateSatoshiTestChallengeRequest.prototype['action'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The chain ID of the counterparty address. See the operation description for supported chains.
|
|
150
|
+
* @member {String} chain_id
|
|
151
|
+
*/
|
|
152
|
+
CreateSatoshiTestChallengeRequest.prototype['chain_id'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The counterparty (self-custody) wallet address that will transfer the micro-deposit.
|
|
156
|
+
* @member {String} from_address
|
|
157
|
+
*/
|
|
158
|
+
CreateSatoshiTestChallengeRequest.prototype['from_address'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The Cobo transaction ID that this Satoshi Test is verifying for.
|
|
162
|
+
* @member {String} transaction_id
|
|
163
|
+
*/
|
|
164
|
+
CreateSatoshiTestChallengeRequest.prototype['transaction_id'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @member {module:model/TravelRuleTransactionType} transaction_type
|
|
168
|
+
*/
|
|
169
|
+
CreateSatoshiTestChallengeRequest.prototype['transaction_type'] = undefined;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The `challenge_id` returned by a previous `PREPARE` call. - When `action=SUBMIT`: if provided, activates that specific challenge by id (recommended when you cached the id client-side after `PREPARE`). If omitted, the server activates the latest matching challenge identified by `(chain_id, from_address)`. - When `action=PREPARE`: **must be omitted**. A new challenge is always generated; passing a `challenge_id` here will cause the request to be rejected.
|
|
173
|
+
* @member {String} challenge_id
|
|
174
|
+
*/
|
|
175
|
+
CreateSatoshiTestChallengeRequest.prototype['challenge_id'] = undefined;
|
|
176
|
+
var _default = exports["default"] = CreateSatoshiTestChallengeRequest;
|
|
@@ -72,6 +72,9 @@ var GetTransactionLimitation200Response = /*#__PURE__*/function () {
|
|
|
72
72
|
if (data.hasOwnProperty('connect_wallet_list')) {
|
|
73
73
|
obj['connect_wallet_list'] = _ApiClient["default"].convertToType(data['connect_wallet_list'], ['String']);
|
|
74
74
|
}
|
|
75
|
+
if (data.hasOwnProperty('satoshi_test_supported')) {
|
|
76
|
+
obj['satoshi_test_supported'] = _ApiClient["default"].convertToType(data['satoshi_test_supported'], 'Boolean');
|
|
77
|
+
}
|
|
75
78
|
}
|
|
76
79
|
return obj;
|
|
77
80
|
}
|
|
@@ -130,7 +133,7 @@ GetTransactionLimitation200Response.prototype['vasp_list'] = undefined;
|
|
|
130
133
|
GetTransactionLimitation200Response.prototype['is_threshold_reached'] = undefined;
|
|
131
134
|
|
|
132
135
|
/**
|
|
133
|
-
* A human-readable, time-sensitive message to be signed by the wallet owner. The message contains key information including the wallet address, a unique nonce, and a timestamp. Signing this message confirms ownership of the wallet and allows the operation to proceed.
|
|
136
|
+
* **Deprecated.** Use [Get self-custody signature challenge](#operation/get_signature_challenge) instead. This field will be removed in a future release. A human-readable, time-sensitive message to be signed by the wallet owner. The message contains key information including the wallet address, a unique nonce, and a timestamp. Signing this message confirms ownership of the wallet and allows the operation to proceed.
|
|
134
137
|
* @member {String} self_custody_wallet_challenge
|
|
135
138
|
*/
|
|
136
139
|
GetTransactionLimitation200Response.prototype['self_custody_wallet_challenge'] = undefined;
|
|
@@ -140,4 +143,10 @@ GetTransactionLimitation200Response.prototype['self_custody_wallet_challenge'] =
|
|
|
140
143
|
* @member {Array.<String>} connect_wallet_list
|
|
141
144
|
*/
|
|
142
145
|
GetTransactionLimitation200Response.prototype['connect_wallet_list'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Indicates whether Satoshi Test (on-chain micro-deposit verification) is supported for the transaction's chain. - `true`: You can initiate a Satoshi Test challenge to verify the counterparty address. - `false`: The chain does not support Satoshi Test; use signature verification instead.
|
|
149
|
+
* @member {Boolean} satoshi_test_supported
|
|
150
|
+
*/
|
|
151
|
+
GetTransactionLimitation200Response.prototype['satoshi_test_supported'] = undefined;
|
|
143
152
|
var _default = exports["default"] = GetTransactionLimitation200Response;
|
|
@@ -0,0 +1,147 @@
|
|
|
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 _AddressVerification = _interopRequireDefault(require("./AddressVerification"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The ListAddressVerifications200Response model module.
|
|
31
|
+
* @module model/ListAddressVerifications200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListAddressVerifications200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListAddressVerifications200Response</code>.
|
|
36
|
+
* Paginated list of address verification records.
|
|
37
|
+
* @alias module:model/ListAddressVerifications200Response
|
|
38
|
+
* @param data {Array.<module:model/AddressVerification>} The page of address verification records.
|
|
39
|
+
* @param pagination {module:model/Pagination}
|
|
40
|
+
*/
|
|
41
|
+
function ListAddressVerifications200Response(data, pagination) {
|
|
42
|
+
_classCallCheck(this, ListAddressVerifications200Response);
|
|
43
|
+
ListAddressVerifications200Response.initialize(this, data, pagination);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(ListAddressVerifications200Response, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, data, pagination) {
|
|
54
|
+
obj['data'] = data;
|
|
55
|
+
obj['pagination'] = pagination;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>ListAddressVerifications200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
60
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
61
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
62
|
+
* @param {module:model/ListAddressVerifications200Response} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/ListAddressVerifications200Response} The populated <code>ListAddressVerifications200Response</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new ListAddressVerifications200Response();
|
|
70
|
+
if (data.hasOwnProperty('data')) {
|
|
71
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AddressVerification["default"]]);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('pagination')) {
|
|
74
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Validates the JSON data with respect to <code>ListAddressVerifications200Response</code>.
|
|
82
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
83
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAddressVerifications200Response</code>.
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "validateJSON",
|
|
87
|
+
value: function validateJSON(data) {
|
|
88
|
+
// check to make sure all required properties are present in the JSON string
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(ListAddressVerifications200Response.RequiredProperties),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var property = _step.value;
|
|
94
|
+
if (!data.hasOwnProperty(property)) {
|
|
95
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_iterator.e(err);
|
|
100
|
+
} finally {
|
|
101
|
+
_iterator.f();
|
|
102
|
+
}
|
|
103
|
+
if (data['data']) {
|
|
104
|
+
// data not null
|
|
105
|
+
// ensure the json data is an array
|
|
106
|
+
if (!Array.isArray(data['data'])) {
|
|
107
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
108
|
+
}
|
|
109
|
+
// validate the optional field `data` (array)
|
|
110
|
+
var _iterator2 = _createForOfIteratorHelper(data['data']),
|
|
111
|
+
_step2;
|
|
112
|
+
try {
|
|
113
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
114
|
+
var item = _step2.value;
|
|
115
|
+
_AddressVerification["default"].validateJSON(item);
|
|
116
|
+
}
|
|
117
|
+
} catch (err) {
|
|
118
|
+
_iterator2.e(err);
|
|
119
|
+
} finally {
|
|
120
|
+
_iterator2.f();
|
|
121
|
+
}
|
|
122
|
+
;
|
|
123
|
+
}
|
|
124
|
+
// validate the optional field `pagination`
|
|
125
|
+
if (data['pagination']) {
|
|
126
|
+
// data not null
|
|
127
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
128
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
}]);
|
|
134
|
+
}();
|
|
135
|
+
ListAddressVerifications200Response.RequiredProperties = ["data", "pagination"];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The page of address verification records.
|
|
139
|
+
* @member {Array.<module:model/AddressVerification>} data
|
|
140
|
+
*/
|
|
141
|
+
ListAddressVerifications200Response.prototype['data'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @member {module:model/Pagination} pagination
|
|
145
|
+
*/
|
|
146
|
+
ListAddressVerifications200Response.prototype['pagination'] = undefined;
|
|
147
|
+
var _default = exports["default"] = ListAddressVerifications200Response;
|