@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
|
@@ -0,0 +1,172 @@
|
|
|
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 _AddressVerificationMethod = _interopRequireDefault(require("./AddressVerificationMethod"));
|
|
9
|
+
var _AddressVerificationStatus = _interopRequireDefault(require("./AddressVerificationStatus"));
|
|
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 AddressVerification model module.
|
|
31
|
+
* @module model/AddressVerification
|
|
32
|
+
*/
|
|
33
|
+
var AddressVerification = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>AddressVerification</code>.
|
|
36
|
+
* Summary of a self-custody address verification record. Returned as items in [List address verifications](#operation/list_address_verifications). Call [Get address verification](#operation/get_address_verification) with `verification_id` to retrieve method-specific provenance (`satoshi_test_detail` / `signature_detail`).
|
|
37
|
+
* @alias module:model/AddressVerification
|
|
38
|
+
* @param verification_id {String} The unique identifier of this verification record.
|
|
39
|
+
* @param address {String} The counterparty (self-custody) wallet address being verified.
|
|
40
|
+
* @param chain_id {String} The chain on which this address is verified.
|
|
41
|
+
* @param status {module:model/AddressVerificationStatus}
|
|
42
|
+
* @param verification_method {module:model/AddressVerificationMethod}
|
|
43
|
+
*/
|
|
44
|
+
function AddressVerification(verification_id, address, chain_id, status, verification_method) {
|
|
45
|
+
_classCallCheck(this, AddressVerification);
|
|
46
|
+
AddressVerification.initialize(this, verification_id, address, chain_id, status, verification_method);
|
|
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(AddressVerification, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, verification_id, address, chain_id, status, verification_method) {
|
|
57
|
+
obj['verification_id'] = verification_id;
|
|
58
|
+
obj['address'] = address;
|
|
59
|
+
obj['chain_id'] = chain_id;
|
|
60
|
+
obj['status'] = status;
|
|
61
|
+
obj['verification_method'] = verification_method;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Constructs a <code>AddressVerification</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/AddressVerification} obj Optional instance to populate.
|
|
69
|
+
* @return {module:model/AddressVerification} The populated <code>AddressVerification</code> instance.
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "constructFromObject",
|
|
73
|
+
value: function constructFromObject(data, obj) {
|
|
74
|
+
if (data) {
|
|
75
|
+
obj = obj || new AddressVerification();
|
|
76
|
+
if (data.hasOwnProperty('verification_id')) {
|
|
77
|
+
obj['verification_id'] = _ApiClient["default"].convertToType(data['verification_id'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('address')) {
|
|
80
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
83
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('status')) {
|
|
86
|
+
obj['status'] = _AddressVerificationStatus["default"].constructFromObject(data['status']);
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('verification_method')) {
|
|
89
|
+
obj['verification_method'] = _AddressVerificationMethod["default"].constructFromObject(data['verification_method']);
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('verified_at')) {
|
|
92
|
+
obj['verified_at'] = _ApiClient["default"].convertToType(data['verified_at'], 'Number');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return obj;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Validates the JSON data with respect to <code>AddressVerification</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>AddressVerification</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(AddressVerification.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['verification_id'] && !(typeof data['verification_id'] === 'string' || data['verification_id'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `verification_id` to be a primitive type in the JSON string but got " + data['verification_id']);
|
|
124
|
+
}
|
|
125
|
+
// ensure the json data is a string
|
|
126
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
128
|
+
}
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
132
|
+
}
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
}]);
|
|
136
|
+
}();
|
|
137
|
+
AddressVerification.RequiredProperties = ["verification_id", "address", "chain_id", "status", "verification_method"];
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The unique identifier of this verification record.
|
|
141
|
+
* @member {String} verification_id
|
|
142
|
+
*/
|
|
143
|
+
AddressVerification.prototype['verification_id'] = undefined;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The counterparty (self-custody) wallet address being verified.
|
|
147
|
+
* @member {String} address
|
|
148
|
+
*/
|
|
149
|
+
AddressVerification.prototype['address'] = undefined;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The chain on which this address is verified.
|
|
153
|
+
* @member {String} chain_id
|
|
154
|
+
*/
|
|
155
|
+
AddressVerification.prototype['chain_id'] = undefined;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @member {module:model/AddressVerificationStatus} status
|
|
159
|
+
*/
|
|
160
|
+
AddressVerification.prototype['status'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @member {module:model/AddressVerificationMethod} verification_method
|
|
164
|
+
*/
|
|
165
|
+
AddressVerification.prototype['verification_method'] = undefined;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Timestamp (milliseconds) when verification completed. `null` while `status=PENDING` or `FAILED`.
|
|
169
|
+
* @member {Number} verified_at
|
|
170
|
+
*/
|
|
171
|
+
AddressVerification.prototype['verified_at'] = undefined;
|
|
172
|
+
var _default = exports["default"] = AddressVerification;
|
|
@@ -0,0 +1,204 @@
|
|
|
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 _AddressVerificationDetailSatoshiTestDetail = _interopRequireDefault(require("./AddressVerificationDetailSatoshiTestDetail"));
|
|
9
|
+
var _AddressVerificationDetailSignatureDetail = _interopRequireDefault(require("./AddressVerificationDetailSignatureDetail"));
|
|
10
|
+
var _AddressVerificationMethod = _interopRequireDefault(require("./AddressVerificationMethod"));
|
|
11
|
+
var _AddressVerificationStatus = _interopRequireDefault(require("./AddressVerificationStatus"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; } } }; }
|
|
15
|
+
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; } }
|
|
16
|
+
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; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
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); } /**
|
|
22
|
+
* Cobo Wallet as a Service 2.0
|
|
23
|
+
*
|
|
24
|
+
* Contact: help@cobo.com
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The AddressVerificationDetail model module.
|
|
33
|
+
* @module model/AddressVerificationDetail
|
|
34
|
+
*/
|
|
35
|
+
var AddressVerificationDetail = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>AddressVerificationDetail</code>.
|
|
38
|
+
* Full detail of a single address verification record, including method-specific provenance. - `verification_method=SIGNATURE` → `signature_detail` is populated, `satoshi_test_detail` is `null`. - `verification_method=SATOSHI_TEST` → `satoshi_test_detail` carries the latest challenge state (`status`, `remaining_seconds`, `matched_txid`); `signature_detail` is `null`.
|
|
39
|
+
* @alias module:model/AddressVerificationDetail
|
|
40
|
+
* @param verification_id {String} The unique identifier of this verification record.
|
|
41
|
+
* @param address {String} The counterparty (self-custody) wallet address being verified.
|
|
42
|
+
* @param chain_id {String} The chain on which this address is verified.
|
|
43
|
+
* @param status {module:model/AddressVerificationStatus}
|
|
44
|
+
* @param verification_method {module:model/AddressVerificationMethod}
|
|
45
|
+
*/
|
|
46
|
+
function AddressVerificationDetail(verification_id, address, chain_id, status, verification_method) {
|
|
47
|
+
_classCallCheck(this, AddressVerificationDetail);
|
|
48
|
+
AddressVerificationDetail.initialize(this, verification_id, address, chain_id, status, verification_method);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Initializes the fields of this object.
|
|
53
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
54
|
+
* Only for internal use.
|
|
55
|
+
*/
|
|
56
|
+
return _createClass(AddressVerificationDetail, null, [{
|
|
57
|
+
key: "initialize",
|
|
58
|
+
value: function initialize(obj, verification_id, address, chain_id, status, verification_method) {
|
|
59
|
+
obj['verification_id'] = verification_id;
|
|
60
|
+
obj['address'] = address;
|
|
61
|
+
obj['chain_id'] = chain_id;
|
|
62
|
+
obj['status'] = status;
|
|
63
|
+
obj['verification_method'] = verification_method;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Constructs a <code>AddressVerificationDetail</code> from a plain JavaScript object, optionally creating a new instance.
|
|
68
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
69
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
70
|
+
* @param {module:model/AddressVerificationDetail} obj Optional instance to populate.
|
|
71
|
+
* @return {module:model/AddressVerificationDetail} The populated <code>AddressVerificationDetail</code> instance.
|
|
72
|
+
*/
|
|
73
|
+
}, {
|
|
74
|
+
key: "constructFromObject",
|
|
75
|
+
value: function constructFromObject(data, obj) {
|
|
76
|
+
if (data) {
|
|
77
|
+
obj = obj || new AddressVerificationDetail();
|
|
78
|
+
if (data.hasOwnProperty('verification_id')) {
|
|
79
|
+
obj['verification_id'] = _ApiClient["default"].convertToType(data['verification_id'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('address')) {
|
|
82
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
85
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('status')) {
|
|
88
|
+
obj['status'] = _AddressVerificationStatus["default"].constructFromObject(data['status']);
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('verification_method')) {
|
|
91
|
+
obj['verification_method'] = _AddressVerificationMethod["default"].constructFromObject(data['verification_method']);
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('verified_at')) {
|
|
94
|
+
obj['verified_at'] = _ApiClient["default"].convertToType(data['verified_at'], 'Number');
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('satoshi_test_detail')) {
|
|
97
|
+
obj['satoshi_test_detail'] = _AddressVerificationDetailSatoshiTestDetail["default"].constructFromObject(data['satoshi_test_detail']);
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('signature_detail')) {
|
|
100
|
+
obj['signature_detail'] = _AddressVerificationDetailSignatureDetail["default"].constructFromObject(data['signature_detail']);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return obj;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Validates the JSON data with respect to <code>AddressVerificationDetail</code>.
|
|
108
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
109
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AddressVerificationDetail</code>.
|
|
110
|
+
*/
|
|
111
|
+
}, {
|
|
112
|
+
key: "validateJSON",
|
|
113
|
+
value: function validateJSON(data) {
|
|
114
|
+
// check to make sure all required properties are present in the JSON string
|
|
115
|
+
var _iterator = _createForOfIteratorHelper(AddressVerificationDetail.RequiredProperties),
|
|
116
|
+
_step;
|
|
117
|
+
try {
|
|
118
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
119
|
+
var property = _step.value;
|
|
120
|
+
if (!data.hasOwnProperty(property)) {
|
|
121
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is a string
|
|
125
|
+
} catch (err) {
|
|
126
|
+
_iterator.e(err);
|
|
127
|
+
} finally {
|
|
128
|
+
_iterator.f();
|
|
129
|
+
}
|
|
130
|
+
if (data['verification_id'] && !(typeof data['verification_id'] === 'string' || data['verification_id'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `verification_id` to be a primitive type in the JSON string but got " + data['verification_id']);
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
136
|
+
}
|
|
137
|
+
// ensure the json data is a string
|
|
138
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
140
|
+
}
|
|
141
|
+
// validate the optional field `satoshi_test_detail`
|
|
142
|
+
if (data['satoshi_test_detail']) {
|
|
143
|
+
// data not null
|
|
144
|
+
if (!!_AddressVerificationDetailSatoshiTestDetail["default"].validateJSON) {
|
|
145
|
+
_AddressVerificationDetailSatoshiTestDetail["default"].validateJSON(data['satoshi_test_detail']);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
// validate the optional field `signature_detail`
|
|
149
|
+
if (data['signature_detail']) {
|
|
150
|
+
// data not null
|
|
151
|
+
if (!!_AddressVerificationDetailSignatureDetail["default"].validateJSON) {
|
|
152
|
+
_AddressVerificationDetailSignatureDetail["default"].validateJSON(data['signature_detail']);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
}]);
|
|
158
|
+
}();
|
|
159
|
+
AddressVerificationDetail.RequiredProperties = ["verification_id", "address", "chain_id", "status", "verification_method"];
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The unique identifier of this verification record.
|
|
163
|
+
* @member {String} verification_id
|
|
164
|
+
*/
|
|
165
|
+
AddressVerificationDetail.prototype['verification_id'] = undefined;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The counterparty (self-custody) wallet address being verified.
|
|
169
|
+
* @member {String} address
|
|
170
|
+
*/
|
|
171
|
+
AddressVerificationDetail.prototype['address'] = undefined;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The chain on which this address is verified.
|
|
175
|
+
* @member {String} chain_id
|
|
176
|
+
*/
|
|
177
|
+
AddressVerificationDetail.prototype['chain_id'] = undefined;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @member {module:model/AddressVerificationStatus} status
|
|
181
|
+
*/
|
|
182
|
+
AddressVerificationDetail.prototype['status'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @member {module:model/AddressVerificationMethod} verification_method
|
|
186
|
+
*/
|
|
187
|
+
AddressVerificationDetail.prototype['verification_method'] = undefined;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Timestamp (milliseconds) when verification completed. `null` while `status=PENDING` or `FAILED`.
|
|
191
|
+
* @member {Number} verified_at
|
|
192
|
+
*/
|
|
193
|
+
AddressVerificationDetail.prototype['verified_at'] = undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @member {module:model/AddressVerificationDetailSatoshiTestDetail} satoshi_test_detail
|
|
197
|
+
*/
|
|
198
|
+
AddressVerificationDetail.prototype['satoshi_test_detail'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @member {module:model/AddressVerificationDetailSignatureDetail} signature_detail
|
|
202
|
+
*/
|
|
203
|
+
AddressVerificationDetail.prototype['signature_detail'] = undefined;
|
|
204
|
+
var _default = exports["default"] = AddressVerificationDetail;
|