@cobo/cobo-waas2 1.30.0 → 1.31.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 +5 -36
- package/dist/ApiClient.js +1 -1
- package/dist/api/PaymentApi.js +39 -931
- package/dist/index.js +21 -105
- package/dist/model/Balance.js +14 -0
- package/dist/model/BridgingFee.js +9 -0
- package/dist/model/ContractCallParams.js +16 -0
- package/dist/model/CreatePaymentOrderRequest.js +4 -3
- package/dist/model/CreateTopUpAddresses.js +2 -2
- package/dist/model/CreateWalletAddress.js +2 -2
- package/dist/model/PaymentBridgeStatus.js +61 -0
- package/dist/model/PaymentBulkSendItem.js +9 -9
- package/dist/model/PaymentPayout.js +35 -4
- package/dist/model/PaymentPayoutDetail.js +49 -13
- package/dist/model/PaymentPayoutEvent.js +49 -13
- package/dist/model/PreCheck.js +89 -0
- package/dist/model/SkipCheckType.js +56 -0
- package/dist/model/SupportedToken.js +17 -17
- package/dist/model/TransferParams.js +16 -0
- package/dist/model/WebhookEventData.js +6 -0
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/Balance.md +1 -0
- package/docs/BridgingFee.md +1 -0
- package/docs/ContractCallParams.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateTopUpAddresses.md +1 -1
- package/docs/CreateWalletAddress.md +1 -1
- package/docs/PaymentApi.md +117 -1138
- package/docs/PaymentBridgeStatus.md +12 -0
- package/docs/PaymentBulkSendItem.md +5 -5
- package/docs/PaymentPayout.md +2 -1
- package/docs/PaymentPayoutDetail.md +2 -1
- package/docs/PaymentPayoutEvent.md +2 -1
- package/docs/PreCheck.md +9 -0
- package/docs/SkipCheckType.md +10 -0
- package/docs/SupportedToken.md +10 -10
- package/docs/TransferParams.md +1 -0
- package/docs/WebhookEventData.md +1 -0
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +0 -140
- package/dist/model/CreateDestinationBankAccountRequest.js +0 -272
- package/dist/model/CreateDestinationWalletAddressRequest.js +0 -140
- package/dist/model/DeleteCounterparty200Response.js +0 -110
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +0 -110
- package/dist/model/DeleteDestination200Response.js +0 -110
- package/dist/model/DeleteDestinationBankAccount200Response.js +0 -110
- package/dist/model/DeleteDestinationWalletAddress200Response.js +0 -110
- package/dist/model/EnableDestinationWhitelistRequest.js +0 -106
- package/dist/model/ListCounterpartyWalletAddress200Response.js +0 -123
- package/dist/model/ListDestinationBankAccounts200Response.js +0 -123
- package/dist/model/ListDestinationWalletAddresses200Response.js +0 -123
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +0 -106
- package/dist/model/UpdateCounterpartyByIdRequest.js +0 -160
- package/dist/model/UpdateDestinationByIdRequest.js +0 -173
- package/docs/CreateCounterpartyWalletAddressRequest.md +0 -11
- package/docs/CreateDestinationBankAccountRequest.md +0 -20
- package/docs/CreateDestinationWalletAddressRequest.md +0 -11
- package/docs/DeleteCounterparty200Response.md +0 -9
- package/docs/DeleteCounterpartyWalletAddress200Response.md +0 -9
- package/docs/DeleteDestination200Response.md +0 -9
- package/docs/DeleteDestinationBankAccount200Response.md +0 -9
- package/docs/DeleteDestinationWalletAddress200Response.md +0 -9
- package/docs/EnableDestinationWhitelistRequest.md +0 -9
- package/docs/ListCounterpartyWalletAddress200Response.md +0 -10
- package/docs/ListDestinationBankAccounts200Response.md +0 -10
- package/docs/ListDestinationWalletAddresses200Response.md +0 -10
- package/docs/QueryDestinationWhitelistEnabled200Response.md +0 -9
- package/docs/UpdateCounterpartyByIdRequest.md +0 -13
- package/docs/UpdateDestinationByIdRequest.md +0 -14
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**bulk_send_item_id** | **String** | The
|
|
8
|
-
**token_id** | **String** | The token ID of the
|
|
9
|
-
**receiving_address** | **String** | The receiving address
|
|
10
|
-
**amount** | **String** | The amount of the
|
|
11
|
-
**description** | **String** |
|
|
7
|
+
**bulk_send_item_id** | **String** | The bulk send item ID. |
|
|
8
|
+
**token_id** | **String** | The token ID of the cryptocurrency to be sent to the recipient. |
|
|
9
|
+
**receiving_address** | **String** | The receiving address. |
|
|
10
|
+
**amount** | **String** | The amount of the cryptocurrency to be sent to the recipient. |
|
|
11
|
+
**description** | **String** | A note or comment about the bulk send item. | [optional]
|
|
12
12
|
**status** | [**PaymentBulkSendItemStatus**](PaymentBulkSendItemStatus.md) | |
|
|
13
13
|
**validation_status** | [**PaymentBulkSendItemValidationStatus**](PaymentBulkSendItemValidationStatus.md) | |
|
|
14
14
|
|
package/docs/PaymentPayout.md
CHANGED
|
@@ -12,8 +12,9 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
13
13
|
**initiator** | **String** | The initiator of this payout, usually the user's API key. | [optional]
|
|
14
14
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
15
|
-
**
|
|
15
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
16
16
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
17
|
+
**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | |
|
|
17
18
|
**created_timestamp** | **Number** | The created time of the payout, represented as a UNIX timestamp in seconds. |
|
|
18
19
|
**updated_timestamp** | **Number** | The updated time of the payout, represented as a UNIX timestamp in seconds. |
|
|
19
20
|
|
|
@@ -12,8 +12,9 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
13
13
|
**initiator** | **String** | The initiator of this payout, usually the user's API key. | [optional]
|
|
14
14
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
15
|
-
**
|
|
15
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
16
16
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
17
|
+
**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | |
|
|
17
18
|
**created_timestamp** | **Number** | The created time of the payout, represented as a UNIX timestamp in seconds. |
|
|
18
19
|
**updated_timestamp** | **Number** | The updated time of the payout, represented as a UNIX timestamp in seconds. |
|
|
19
20
|
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of payout transactions. | [optional]
|
|
@@ -13,8 +13,9 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
14
14
|
**initiator** | **String** | The initiator of this payout, usually the user's API key. | [optional]
|
|
15
15
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
16
|
-
**
|
|
16
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
17
17
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
18
|
+
**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | |
|
|
18
19
|
**created_timestamp** | **Number** | The created time of the payout, represented as a UNIX timestamp in seconds. |
|
|
19
20
|
**updated_timestamp** | **Number** | The updated time of the payout, represented as a UNIX timestamp in seconds. |
|
|
20
21
|
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of payout transactions. | [optional]
|
package/docs/PreCheck.md
ADDED
package/docs/SupportedToken.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**token_id** | **String** |
|
|
8
|
-
**name** | **String** |
|
|
9
|
-
**symbol** | **String** |
|
|
10
|
-
**decimal** | **Number** |
|
|
11
|
-
**token_address** | **String** |
|
|
12
|
-
**chain_id** | **String** |
|
|
13
|
-
**chain_symbol** | **String** |
|
|
14
|
-
**chain_icon_url** | **String** | URL
|
|
15
|
-
**token_icon_url** | **String** | URL
|
|
16
|
-
**can_off_ramp** | **Boolean** | Whether the token
|
|
7
|
+
**token_id** | **String** | The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`. |
|
|
8
|
+
**name** | **String** | The full name of the token. |
|
|
9
|
+
**symbol** | **String** | The symbol of the token. |
|
|
10
|
+
**decimal** | **Number** | The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value. |
|
|
11
|
+
**token_address** | **String** | The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum). |
|
|
12
|
+
**chain_id** | **String** | The ID of the chain on which the token exists. |
|
|
13
|
+
**chain_symbol** | **String** | The symbol of the chain on which the token exists. |
|
|
14
|
+
**chain_icon_url** | **String** | The URL of the chain icon image. | [optional]
|
|
15
|
+
**token_icon_url** | **String** | The URL of the token icon image. | [optional]
|
|
16
|
+
**can_off_ramp** | **Boolean** | Whether the token supports fiat off-ramp. - `true`: The token can be used for fiat off-ramp. - `false`: The token cannot be used for fiat off-ramp. | [optional]
|
|
17
17
|
|
|
18
18
|
|
package/docs/TransferParams.md
CHANGED
|
@@ -13,5 +13,6 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional]
|
|
14
14
|
**transaction_process_type** | [**TransactionProcessType**](TransactionProcessType.md) | | [optional]
|
|
15
15
|
**auto_fuel** | [**AutoFuelType**](AutoFuelType.md) | | [optional]
|
|
16
|
+
**pre_check** | [**PreCheck**](PreCheck.md) | | [optional]
|
|
16
17
|
|
|
17
18
|
|
package/docs/WebhookEventData.md
CHANGED
|
@@ -101,6 +101,7 @@ Name | Type | Description | Notes
|
|
|
101
101
|
**payout_items** | [**[PaymentPayoutItem]**](PaymentPayoutItem.md) | required | [optional]
|
|
102
102
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
103
103
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
104
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
104
105
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
105
106
|
**bulk_send_id** | **String** | The bulk send ID. |
|
|
106
107
|
**execution_mode** | [**PaymentBulkSendExecutionMode**](PaymentBulkSendExecutionMode.md) | |
|
package/docs/WebhookEventType.md
CHANGED
|
@@ -65,6 +65,8 @@
|
|
|
65
65
|
|
|
66
66
|
* `payment.status.updated` (value: `"payment.status.updated"`)
|
|
67
67
|
|
|
68
|
+
* `payment.order.status.updated` (value: `"payment.order.status.updated"`)
|
|
69
|
+
|
|
68
70
|
* `payment.refund.status.updated` (value: `"payment.refund.status.updated"`)
|
|
69
71
|
|
|
70
72
|
* `payment.settlement.status.updated` (value: `"payment.settlement.status.updated"`)
|
|
@@ -79,6 +81,10 @@
|
|
|
79
81
|
|
|
80
82
|
* `payment.bulk_send.status.updated` (value: `"payment.bulk_send.status.updated"`)
|
|
81
83
|
|
|
84
|
+
* `payment.transaction.external.created` (value: `"payment.transaction.external.created"`)
|
|
85
|
+
|
|
86
|
+
* `payment.transaction.external.completed` (value: `"payment.transaction.external.completed"`)
|
|
87
|
+
|
|
82
88
|
* `compliance.disposition.status.updated` (value: `"compliance.disposition.status.updated"`)
|
|
83
89
|
|
|
84
90
|
* `compliance.kyt.screenings.status.updated` (value: `"compliance.kyt.screenings.status.updated"`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobo/cobo-waas2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo's WaaS API offering. It enables you to access Cobo's full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features: - A unified API for Cobo's [all four wallet types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform) - Support for 80+ chains and 3000+ tokens - A comprehensive selection of webhook events - Flexible usage models for MPC Wallets, including [Organization-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction) and [User-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction) - Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls - Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction). ",
|
|
5
5
|
"license": "GPL 2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
-
* Cobo Wallet as a Service 2.0
|
|
19
|
-
*
|
|
20
|
-
* Contact: help@cobo.com
|
|
21
|
-
*
|
|
22
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
-
* https://openapi-generator.tech
|
|
24
|
-
* Do not edit the class manually.
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* The CreateCounterpartyWalletAddressRequest model module.
|
|
29
|
-
* @module model/CreateCounterpartyWalletAddressRequest
|
|
30
|
-
*/
|
|
31
|
-
var CreateCounterpartyWalletAddressRequest = /*#__PURE__*/function () {
|
|
32
|
-
/**
|
|
33
|
-
* Constructs a new <code>CreateCounterpartyWalletAddressRequest</code>.
|
|
34
|
-
* @alias module:model/CreateCounterpartyWalletAddressRequest
|
|
35
|
-
* @param counterparty_id {String} The counterparty ID.
|
|
36
|
-
* @param address {String} The wallet address.
|
|
37
|
-
* @param chain_id {String} The chain ID of the cryptocurrency.
|
|
38
|
-
*/
|
|
39
|
-
function CreateCounterpartyWalletAddressRequest(counterparty_id, address, chain_id) {
|
|
40
|
-
_classCallCheck(this, CreateCounterpartyWalletAddressRequest);
|
|
41
|
-
CreateCounterpartyWalletAddressRequest.initialize(this, counterparty_id, address, chain_id);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Initializes the fields of this object.
|
|
46
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
-
* Only for internal use.
|
|
48
|
-
*/
|
|
49
|
-
return _createClass(CreateCounterpartyWalletAddressRequest, null, [{
|
|
50
|
-
key: "initialize",
|
|
51
|
-
value: function initialize(obj, counterparty_id, address, chain_id) {
|
|
52
|
-
obj['counterparty_id'] = counterparty_id;
|
|
53
|
-
obj['address'] = address;
|
|
54
|
-
obj['chain_id'] = chain_id;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Constructs a <code>CreateCounterpartyWalletAddressRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
-
* @param {module:model/CreateCounterpartyWalletAddressRequest} obj Optional instance to populate.
|
|
62
|
-
* @return {module:model/CreateCounterpartyWalletAddressRequest} The populated <code>CreateCounterpartyWalletAddressRequest</code> instance.
|
|
63
|
-
*/
|
|
64
|
-
}, {
|
|
65
|
-
key: "constructFromObject",
|
|
66
|
-
value: function constructFromObject(data, obj) {
|
|
67
|
-
if (data) {
|
|
68
|
-
obj = obj || new CreateCounterpartyWalletAddressRequest();
|
|
69
|
-
if (data.hasOwnProperty('counterparty_id')) {
|
|
70
|
-
obj['counterparty_id'] = _ApiClient["default"].convertToType(data['counterparty_id'], 'String');
|
|
71
|
-
}
|
|
72
|
-
if (data.hasOwnProperty('address')) {
|
|
73
|
-
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
74
|
-
}
|
|
75
|
-
if (data.hasOwnProperty('chain_id')) {
|
|
76
|
-
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return obj;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Validates the JSON data with respect to <code>CreateCounterpartyWalletAddressRequest</code>.
|
|
84
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
85
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateCounterpartyWalletAddressRequest</code>.
|
|
86
|
-
*/
|
|
87
|
-
}, {
|
|
88
|
-
key: "validateJSON",
|
|
89
|
-
value: function validateJSON(data) {
|
|
90
|
-
// check to make sure all required properties are present in the JSON string
|
|
91
|
-
var _iterator = _createForOfIteratorHelper(CreateCounterpartyWalletAddressRequest.RequiredProperties),
|
|
92
|
-
_step;
|
|
93
|
-
try {
|
|
94
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
95
|
-
var property = _step.value;
|
|
96
|
-
if (!data.hasOwnProperty(property)) {
|
|
97
|
-
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
// ensure the json data is a string
|
|
101
|
-
} catch (err) {
|
|
102
|
-
_iterator.e(err);
|
|
103
|
-
} finally {
|
|
104
|
-
_iterator.f();
|
|
105
|
-
}
|
|
106
|
-
if (data['counterparty_id'] && !(typeof data['counterparty_id'] === 'string' || data['counterparty_id'] instanceof String)) {
|
|
107
|
-
throw new Error("Expected the field `counterparty_id` to be a primitive type in the JSON string but got " + data['counterparty_id']);
|
|
108
|
-
}
|
|
109
|
-
// ensure the json data is a string
|
|
110
|
-
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
111
|
-
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
112
|
-
}
|
|
113
|
-
// ensure the json data is a string
|
|
114
|
-
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
115
|
-
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
116
|
-
}
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
}]);
|
|
120
|
-
}();
|
|
121
|
-
CreateCounterpartyWalletAddressRequest.RequiredProperties = ["counterparty_id", "address", "chain_id"];
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The counterparty ID.
|
|
125
|
-
* @member {String} counterparty_id
|
|
126
|
-
*/
|
|
127
|
-
CreateCounterpartyWalletAddressRequest.prototype['counterparty_id'] = undefined;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* The wallet address.
|
|
131
|
-
* @member {String} address
|
|
132
|
-
*/
|
|
133
|
-
CreateCounterpartyWalletAddressRequest.prototype['address'] = undefined;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* The chain ID of the cryptocurrency.
|
|
137
|
-
* @member {String} chain_id
|
|
138
|
-
*/
|
|
139
|
-
CreateCounterpartyWalletAddressRequest.prototype['chain_id'] = undefined;
|
|
140
|
-
var _default = exports["default"] = CreateCounterpartyWalletAddressRequest;
|
|
@@ -1,272 +0,0 @@
|
|
|
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 _IntermediaryBankInfo = _interopRequireDefault(require("./IntermediaryBankInfo"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
-
* Cobo Wallet as a Service 2.0
|
|
20
|
-
*
|
|
21
|
-
* Contact: help@cobo.com
|
|
22
|
-
*
|
|
23
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
-
* https://openapi-generator.tech
|
|
25
|
-
* Do not edit the class manually.
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* The CreateDestinationBankAccountRequest model module.
|
|
30
|
-
* @module model/CreateDestinationBankAccountRequest
|
|
31
|
-
*/
|
|
32
|
-
var CreateDestinationBankAccountRequest = /*#__PURE__*/function () {
|
|
33
|
-
/**
|
|
34
|
-
* Constructs a new <code>CreateDestinationBankAccountRequest</code>.
|
|
35
|
-
* @alias module:model/CreateDestinationBankAccountRequest
|
|
36
|
-
* @param destination_id {String} The destination ID.
|
|
37
|
-
* @param account_alias {String} The alias of the bank account.
|
|
38
|
-
* @param account_number {String} The bank account number.
|
|
39
|
-
* @param swift_code {String} The SWIFT or BIC code of the bank.
|
|
40
|
-
* @param currency {String} The currency of the bank account.
|
|
41
|
-
* @param beneficiary_name {String} The name of the account holder.
|
|
42
|
-
* @param beneficiary_address {String} The address of the account holder.
|
|
43
|
-
* @param bank_name {String} The name of the bank.
|
|
44
|
-
* @param bank_address {String} The address of the bank.
|
|
45
|
-
*/
|
|
46
|
-
function CreateDestinationBankAccountRequest(destination_id, account_alias, account_number, swift_code, currency, beneficiary_name, beneficiary_address, bank_name, bank_address) {
|
|
47
|
-
_classCallCheck(this, CreateDestinationBankAccountRequest);
|
|
48
|
-
CreateDestinationBankAccountRequest.initialize(this, destination_id, account_alias, account_number, swift_code, currency, beneficiary_name, beneficiary_address, bank_name, bank_address);
|
|
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(CreateDestinationBankAccountRequest, null, [{
|
|
57
|
-
key: "initialize",
|
|
58
|
-
value: function initialize(obj, destination_id, account_alias, account_number, swift_code, currency, beneficiary_name, beneficiary_address, bank_name, bank_address) {
|
|
59
|
-
obj['destination_id'] = destination_id;
|
|
60
|
-
obj['account_alias'] = account_alias;
|
|
61
|
-
obj['account_number'] = account_number;
|
|
62
|
-
obj['swift_code'] = swift_code;
|
|
63
|
-
obj['currency'] = currency;
|
|
64
|
-
obj['beneficiary_name'] = beneficiary_name;
|
|
65
|
-
obj['beneficiary_address'] = beneficiary_address;
|
|
66
|
-
obj['bank_name'] = bank_name;
|
|
67
|
-
obj['bank_address'] = bank_address;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Constructs a <code>CreateDestinationBankAccountRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
72
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
73
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
74
|
-
* @param {module:model/CreateDestinationBankAccountRequest} obj Optional instance to populate.
|
|
75
|
-
* @return {module:model/CreateDestinationBankAccountRequest} The populated <code>CreateDestinationBankAccountRequest</code> instance.
|
|
76
|
-
*/
|
|
77
|
-
}, {
|
|
78
|
-
key: "constructFromObject",
|
|
79
|
-
value: function constructFromObject(data, obj) {
|
|
80
|
-
if (data) {
|
|
81
|
-
obj = obj || new CreateDestinationBankAccountRequest();
|
|
82
|
-
if (data.hasOwnProperty('destination_id')) {
|
|
83
|
-
obj['destination_id'] = _ApiClient["default"].convertToType(data['destination_id'], 'String');
|
|
84
|
-
}
|
|
85
|
-
if (data.hasOwnProperty('account_alias')) {
|
|
86
|
-
obj['account_alias'] = _ApiClient["default"].convertToType(data['account_alias'], 'String');
|
|
87
|
-
}
|
|
88
|
-
if (data.hasOwnProperty('account_number')) {
|
|
89
|
-
obj['account_number'] = _ApiClient["default"].convertToType(data['account_number'], 'String');
|
|
90
|
-
}
|
|
91
|
-
if (data.hasOwnProperty('swift_code')) {
|
|
92
|
-
obj['swift_code'] = _ApiClient["default"].convertToType(data['swift_code'], 'String');
|
|
93
|
-
}
|
|
94
|
-
if (data.hasOwnProperty('currency')) {
|
|
95
|
-
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
96
|
-
}
|
|
97
|
-
if (data.hasOwnProperty('beneficiary_name')) {
|
|
98
|
-
obj['beneficiary_name'] = _ApiClient["default"].convertToType(data['beneficiary_name'], 'String');
|
|
99
|
-
}
|
|
100
|
-
if (data.hasOwnProperty('beneficiary_address')) {
|
|
101
|
-
obj['beneficiary_address'] = _ApiClient["default"].convertToType(data['beneficiary_address'], 'String');
|
|
102
|
-
}
|
|
103
|
-
if (data.hasOwnProperty('bank_name')) {
|
|
104
|
-
obj['bank_name'] = _ApiClient["default"].convertToType(data['bank_name'], 'String');
|
|
105
|
-
}
|
|
106
|
-
if (data.hasOwnProperty('bank_address')) {
|
|
107
|
-
obj['bank_address'] = _ApiClient["default"].convertToType(data['bank_address'], 'String');
|
|
108
|
-
}
|
|
109
|
-
if (data.hasOwnProperty('iban_code')) {
|
|
110
|
-
obj['iban_code'] = _ApiClient["default"].convertToType(data['iban_code'], 'String');
|
|
111
|
-
}
|
|
112
|
-
if (data.hasOwnProperty('further_credit')) {
|
|
113
|
-
obj['further_credit'] = _ApiClient["default"].convertToType(data['further_credit'], 'String');
|
|
114
|
-
}
|
|
115
|
-
if (data.hasOwnProperty('intermediary_bank_info')) {
|
|
116
|
-
obj['intermediary_bank_info'] = _IntermediaryBankInfo["default"].constructFromObject(data['intermediary_bank_info']);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return obj;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Validates the JSON data with respect to <code>CreateDestinationBankAccountRequest</code>.
|
|
124
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
125
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateDestinationBankAccountRequest</code>.
|
|
126
|
-
*/
|
|
127
|
-
}, {
|
|
128
|
-
key: "validateJSON",
|
|
129
|
-
value: function validateJSON(data) {
|
|
130
|
-
// check to make sure all required properties are present in the JSON string
|
|
131
|
-
var _iterator = _createForOfIteratorHelper(CreateDestinationBankAccountRequest.RequiredProperties),
|
|
132
|
-
_step;
|
|
133
|
-
try {
|
|
134
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
135
|
-
var property = _step.value;
|
|
136
|
-
if (!data.hasOwnProperty(property)) {
|
|
137
|
-
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// ensure the json data is a string
|
|
141
|
-
} catch (err) {
|
|
142
|
-
_iterator.e(err);
|
|
143
|
-
} finally {
|
|
144
|
-
_iterator.f();
|
|
145
|
-
}
|
|
146
|
-
if (data['destination_id'] && !(typeof data['destination_id'] === 'string' || data['destination_id'] instanceof String)) {
|
|
147
|
-
throw new Error("Expected the field `destination_id` to be a primitive type in the JSON string but got " + data['destination_id']);
|
|
148
|
-
}
|
|
149
|
-
// ensure the json data is a string
|
|
150
|
-
if (data['account_alias'] && !(typeof data['account_alias'] === 'string' || data['account_alias'] instanceof String)) {
|
|
151
|
-
throw new Error("Expected the field `account_alias` to be a primitive type in the JSON string but got " + data['account_alias']);
|
|
152
|
-
}
|
|
153
|
-
// ensure the json data is a string
|
|
154
|
-
if (data['account_number'] && !(typeof data['account_number'] === 'string' || data['account_number'] instanceof String)) {
|
|
155
|
-
throw new Error("Expected the field `account_number` to be a primitive type in the JSON string but got " + data['account_number']);
|
|
156
|
-
}
|
|
157
|
-
// ensure the json data is a string
|
|
158
|
-
if (data['swift_code'] && !(typeof data['swift_code'] === 'string' || data['swift_code'] instanceof String)) {
|
|
159
|
-
throw new Error("Expected the field `swift_code` to be a primitive type in the JSON string but got " + data['swift_code']);
|
|
160
|
-
}
|
|
161
|
-
// ensure the json data is a string
|
|
162
|
-
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
163
|
-
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
164
|
-
}
|
|
165
|
-
// ensure the json data is a string
|
|
166
|
-
if (data['beneficiary_name'] && !(typeof data['beneficiary_name'] === 'string' || data['beneficiary_name'] instanceof String)) {
|
|
167
|
-
throw new Error("Expected the field `beneficiary_name` to be a primitive type in the JSON string but got " + data['beneficiary_name']);
|
|
168
|
-
}
|
|
169
|
-
// ensure the json data is a string
|
|
170
|
-
if (data['beneficiary_address'] && !(typeof data['beneficiary_address'] === 'string' || data['beneficiary_address'] instanceof String)) {
|
|
171
|
-
throw new Error("Expected the field `beneficiary_address` to be a primitive type in the JSON string but got " + data['beneficiary_address']);
|
|
172
|
-
}
|
|
173
|
-
// ensure the json data is a string
|
|
174
|
-
if (data['bank_name'] && !(typeof data['bank_name'] === 'string' || data['bank_name'] instanceof String)) {
|
|
175
|
-
throw new Error("Expected the field `bank_name` to be a primitive type in the JSON string but got " + data['bank_name']);
|
|
176
|
-
}
|
|
177
|
-
// ensure the json data is a string
|
|
178
|
-
if (data['bank_address'] && !(typeof data['bank_address'] === 'string' || data['bank_address'] instanceof String)) {
|
|
179
|
-
throw new Error("Expected the field `bank_address` to be a primitive type in the JSON string but got " + data['bank_address']);
|
|
180
|
-
}
|
|
181
|
-
// ensure the json data is a string
|
|
182
|
-
if (data['iban_code'] && !(typeof data['iban_code'] === 'string' || data['iban_code'] instanceof String)) {
|
|
183
|
-
throw new Error("Expected the field `iban_code` to be a primitive type in the JSON string but got " + data['iban_code']);
|
|
184
|
-
}
|
|
185
|
-
// ensure the json data is a string
|
|
186
|
-
if (data['further_credit'] && !(typeof data['further_credit'] === 'string' || data['further_credit'] instanceof String)) {
|
|
187
|
-
throw new Error("Expected the field `further_credit` to be a primitive type in the JSON string but got " + data['further_credit']);
|
|
188
|
-
}
|
|
189
|
-
// validate the optional field `intermediary_bank_info`
|
|
190
|
-
if (data['intermediary_bank_info']) {
|
|
191
|
-
// data not null
|
|
192
|
-
if (!!_IntermediaryBankInfo["default"].validateJSON) {
|
|
193
|
-
_IntermediaryBankInfo["default"].validateJSON(data['intermediary_bank_info']);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
}]);
|
|
199
|
-
}();
|
|
200
|
-
CreateDestinationBankAccountRequest.RequiredProperties = ["destination_id", "account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address"];
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* The destination ID.
|
|
204
|
-
* @member {String} destination_id
|
|
205
|
-
*/
|
|
206
|
-
CreateDestinationBankAccountRequest.prototype['destination_id'] = undefined;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* The alias of the bank account.
|
|
210
|
-
* @member {String} account_alias
|
|
211
|
-
*/
|
|
212
|
-
CreateDestinationBankAccountRequest.prototype['account_alias'] = undefined;
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* The bank account number.
|
|
216
|
-
* @member {String} account_number
|
|
217
|
-
*/
|
|
218
|
-
CreateDestinationBankAccountRequest.prototype['account_number'] = undefined;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* The SWIFT or BIC code of the bank.
|
|
222
|
-
* @member {String} swift_code
|
|
223
|
-
*/
|
|
224
|
-
CreateDestinationBankAccountRequest.prototype['swift_code'] = undefined;
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* The currency of the bank account.
|
|
228
|
-
* @member {String} currency
|
|
229
|
-
*/
|
|
230
|
-
CreateDestinationBankAccountRequest.prototype['currency'] = undefined;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* The name of the account holder.
|
|
234
|
-
* @member {String} beneficiary_name
|
|
235
|
-
*/
|
|
236
|
-
CreateDestinationBankAccountRequest.prototype['beneficiary_name'] = undefined;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* The address of the account holder.
|
|
240
|
-
* @member {String} beneficiary_address
|
|
241
|
-
*/
|
|
242
|
-
CreateDestinationBankAccountRequest.prototype['beneficiary_address'] = undefined;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* The name of the bank.
|
|
246
|
-
* @member {String} bank_name
|
|
247
|
-
*/
|
|
248
|
-
CreateDestinationBankAccountRequest.prototype['bank_name'] = undefined;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* The address of the bank.
|
|
252
|
-
* @member {String} bank_address
|
|
253
|
-
*/
|
|
254
|
-
CreateDestinationBankAccountRequest.prototype['bank_address'] = undefined;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* The IBAN code of the bank account.
|
|
258
|
-
* @member {String} iban_code
|
|
259
|
-
*/
|
|
260
|
-
CreateDestinationBankAccountRequest.prototype['iban_code'] = undefined;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* The further credit of the bank account.
|
|
264
|
-
* @member {String} further_credit
|
|
265
|
-
*/
|
|
266
|
-
CreateDestinationBankAccountRequest.prototype['further_credit'] = undefined;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* @member {module:model/IntermediaryBankInfo} intermediary_bank_info
|
|
270
|
-
*/
|
|
271
|
-
CreateDestinationBankAccountRequest.prototype['intermediary_bank_info'] = undefined;
|
|
272
|
-
var _default = exports["default"] = CreateDestinationBankAccountRequest;
|