@cobo/cobo-waas2 1.8.0 → 1.10.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 +117 -33
- package/dist/ApiClient.js +11 -1
- package/dist/api/AddressBooksApi.js +1 -1
- package/dist/api/DevelopersApi.js +7 -7
- package/dist/api/DevelopersWebhooksApi.js +8 -8
- package/dist/api/PrimeBrokerApi.js +317 -0
- package/dist/api/StakingsApi.js +412 -18
- package/dist/api/SwapsApi.js +360 -0
- package/dist/api/TransactionsApi.js +64 -20
- package/dist/api/TravelRuleApi.js +18 -18
- package/dist/api/WalletsApi.js +84 -13
- package/dist/api/WalletsExchangeWalletApi.js +1 -1
- package/dist/api/WalletsMPCWalletsApi.js +151 -39
- package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
- package/dist/index.js +276 -10
- package/dist/model/ActivityExtra.js +5 -5
- package/dist/model/AddressBalance.js +129 -0
- package/dist/model/AddressTransferDestination.js +36 -0
- package/dist/model/AddressesEventData.js +4 -4
- package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
- package/dist/model/ApprovalStatementStatus.js +81 -0
- package/dist/model/AssetBalance.js +6 -6
- package/dist/model/BTCEIP191MessageSignDestination.js +122 -0
- package/dist/model/BabylonAirdropPop.js +186 -0
- package/dist/model/BabylonAirdropRegistration.js +172 -0
- package/dist/model/BabylonEligibleAirdrop.js +157 -0
- package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
- package/dist/model/BabylonRegistrationStatus.js +66 -0
- package/dist/model/BabylonStakingActivityDetailExtra.js +1 -1
- package/dist/model/BabylonStakingRegistration.js +185 -0
- package/dist/model/{TokenBalanceBalance.js → Balance.js} +22 -22
- package/dist/model/{SwapSummary.js → ChangeGuardPubkey200Response.js} +28 -39
- package/dist/model/ContractCallParams.js +36 -0
- package/dist/model/ContractCallSource.js +6 -0
- package/dist/model/CoreStakingActivityDetailExtra.js +3 -3
- package/dist/model/CreateAddressRequest.js +28 -2
- package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
- package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
- package/dist/model/CreatePrimeBrokerAddress201Response.js +140 -0
- package/dist/model/CreatePrimeBrokerAddressRequest.js +107 -0
- package/dist/model/CreateSwapActivityRequest.js +153 -0
- package/dist/model/CreateSwapQuote201Response.js +264 -0
- package/dist/model/CreateSwapQuoteRequest.js +166 -0
- package/dist/model/DeleteGuardPubkey201Response.js +110 -0
- package/dist/model/EthStakeEstimatedFee.js +1 -1
- package/dist/model/EthStakingActivityDetailExtra.js +1 -1
- package/dist/model/GetStakingEstimationFee201Response.js +1 -1
- package/dist/model/GetTransactionLimitation200Response.js +4 -4
- package/dist/model/GuardPubkeyStatus.js +91 -0
- package/dist/model/ListAddressBalancesByToken200Response.js +123 -0
- package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
- package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
- package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
- package/dist/model/ListEnableTokenPairs200Response.js +123 -0
- package/dist/model/ListKeyShareHolders200Response.js +123 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/MessageSignDestination.js +70 -8
- package/dist/model/MessageSignDestinationType.js +12 -2
- package/dist/model/MessageSignSource.js +6 -0
- package/dist/model/MpcContractCallSource.js +16 -0
- package/dist/model/MpcMessageSignSource.js +16 -0
- package/dist/model/MpcSigningGroup.js +27 -4
- package/dist/model/MpcTransferSource.js +16 -0
- package/dist/model/OrgInfo.js +3 -3
- package/dist/model/QueryApprovalStatement200Response.js +122 -0
- package/dist/model/QueryGuardPubkey200Response.js +129 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +125 -0
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SelfCustodyWallet.js +7 -7
- package/dist/model/StakingPoolId.js +30 -0
- package/dist/model/StakingPoolType.js +15 -0
- package/dist/model/SubWalletAssetBalance.js +6 -6
- package/dist/model/SubmitDepositTravelRuleInfo201Response.js +1 -1
- package/dist/model/SwapQuote.js +203 -0
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TokenBalance.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +16 -0
- package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +83 -0
- package/dist/model/TransactionDestination.js +10 -4
- package/dist/model/TransactionRawTxInfo.js +29 -0
- package/dist/model/TransactionRbfSource.js +6 -0
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionUserApprovalDetail.js +3 -3
- package/dist/model/TransactionUtxoChange.js +101 -0
- package/dist/model/TransferDestination.js +6 -0
- package/dist/model/TransferParams.js +36 -0
- package/dist/model/TransferSource.js +6 -0
- package/dist/model/TravelRuleDepositExchangesOrVASP.js +4 -4
- package/dist/model/TravelRuleDepositExchangesOrVASPEntityInfo.js +7 -7
- package/dist/model/TravelRuleDepositLegalEntity.js +5 -5
- package/dist/model/TravelRuleDepositNaturalEntity.js +9 -9
- package/dist/model/TravelRuleDepositRequestTravelRuleInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawExchangesOrVASP.js +3 -3
- package/dist/model/TravelRuleWithdrawExchangesOrVASPEntityInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawLegalEntity.js +2 -2
- package/dist/model/TravelRuleWithdrawNaturalEntity.js +7 -7
- package/dist/model/TravelRuleWithdrawRequestTravelRuleInfo.js +4 -4
- package/dist/model/Vasp.js +7 -7
- package/dist/model/WebhookEventData.js +2 -2
- package/docs/ActivityExtra.md +5 -5
- package/docs/AddressBalance.md +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressTransferDestination.md +14 -0
- package/docs/AddressesEventData.md +1 -1
- package/docs/AddressesEventDataAllOfAddresses.md +19 -0
- package/docs/ApprovalStatementStatus.md +20 -0
- package/docs/AssetBalance.md +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +10 -0
- package/docs/BabylonAirdropPop.md +14 -0
- package/docs/BabylonAirdropRegistration.md +16 -0
- package/docs/BabylonEligibleAirdrop.md +14 -0
- package/docs/BabylonRegistrationRequestStatus.md +14 -0
- package/docs/BabylonRegistrationStatus.md +14 -0
- package/docs/BabylonStakingActivityDetailExtra.md +1 -1
- package/docs/BabylonStakingRegistration.md +17 -0
- package/docs/{TokenBalanceBalance.md → Balance.md} +1 -1
- package/docs/ChangeGuardPubkey200Response.md +9 -0
- package/docs/ContractCallParams.md +14 -0
- package/docs/ContractCallSource.md +1 -0
- package/docs/CoreStakingActivityDetailExtra.md +3 -3
- package/docs/CreateAddressRequest.md +3 -1
- package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
- package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
- package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
- package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
- package/docs/CreatePrimeBrokerAddress201Response.md +10 -0
- package/docs/CreatePrimeBrokerAddressRequest.md +9 -0
- package/docs/CreateSwapActivityRequest.md +12 -0
- package/docs/CreateSwapQuote201Response.md +17 -0
- package/docs/CreateSwapQuoteRequest.md +13 -0
- package/docs/DeleteGuardPubkey201Response.md +9 -0
- package/docs/DevelopersApi.md +5 -5
- package/docs/DevelopersWebhooksApi.md +8 -8
- package/docs/EthStakeEstimatedFee.md +1 -1
- package/docs/EthStakingActivityDetailExtra.md +1 -1
- package/docs/GetStakingEstimationFee201Response.md +1 -1
- package/docs/GetTransactionLimitation200Response.md +4 -4
- package/docs/GuardPubkeyStatus.md +24 -0
- package/docs/ListAddressBalancesByToken200Response.md +10 -0
- package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
- package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
- package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
- package/docs/ListEnableTokenPairs200Response.md +10 -0
- package/docs/ListKeyShareHolders200Response.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/MessageSignDestination.md +1 -0
- package/docs/MessageSignDestinationType.md +6 -2
- package/docs/MessageSignSource.md +1 -0
- package/docs/MpcContractCallSource.md +1 -0
- package/docs/MpcMessageSignSource.md +1 -0
- package/docs/MpcSigningGroup.md +1 -1
- package/docs/MpcTransferSource.md +1 -0
- package/docs/OrgInfo.md +1 -1
- package/docs/PrimeBrokerApi.md +318 -0
- package/docs/QueryApprovalStatement200Response.md +12 -0
- package/docs/QueryGuardPubkey200Response.md +11 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +10 -0
- package/docs/RootPubkey.md +1 -1
- package/docs/SelfCustodyWallet.md +3 -3
- package/docs/StakingPoolId.md +12 -0
- package/docs/StakingPoolType.md +6 -0
- package/docs/StakingsApi.md +460 -12
- package/docs/SubWalletAssetBalance.md +1 -1
- package/docs/SubmitDepositTravelRuleInfo201Response.md +1 -1
- package/docs/SwapQuote.md +16 -0
- package/docs/SwapsApi.md +348 -0
- package/docs/TSSGroups.md +1 -1
- package/docs/TokenBalance.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -0
- package/docs/TransactionDepositToAddressDestinationTxInfo.md +9 -0
- package/docs/TransactionDestination.md +1 -0
- package/docs/TransactionRawTxInfo.md +2 -0
- package/docs/TransactionRbfSource.md +1 -0
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionUserApprovalDetail.md +3 -3
- package/docs/TransactionUtxoChange.md +10 -0
- package/docs/TransactionsApi.md +68 -17
- package/docs/TransferDestination.md +14 -0
- package/docs/TransferParams.md +14 -0
- package/docs/TransferSource.md +1 -0
- package/docs/TravelRuleApi.md +13 -13
- package/docs/TravelRuleDepositExchangesOrVASP.md +2 -2
- package/docs/TravelRuleDepositExchangesOrVASPEntityInfo.md +7 -7
- package/docs/TravelRuleDepositLegalEntity.md +3 -3
- package/docs/TravelRuleDepositNaturalEntity.md +5 -5
- package/docs/TravelRuleDepositRequestTravelRuleInfo.md +5 -5
- package/docs/TravelRuleWithdrawExchangesOrVASP.md +1 -1
- package/docs/TravelRuleWithdrawExchangesOrVASPEntityInfo.md +5 -5
- package/docs/TravelRuleWithdrawLegalEntity.md +1 -1
- package/docs/TravelRuleWithdrawNaturalEntity.md +4 -4
- package/docs/TravelRuleWithdrawRequestTravelRuleInfo.md +4 -4
- package/docs/Vasp.md +3 -3
- package/docs/WalletsApi.md +78 -13
- package/docs/WalletsExchangeWalletApi.md +1 -1
- package/docs/WalletsMPCWalletsApi.md +141 -27
- package/docs/WalletsSmartContractWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +1 -1
- package/package.json +2 -2
- package/docs/SwapSummary.md +0 -10
|
@@ -0,0 +1,129 @@
|
|
|
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 _Balance = _interopRequireDefault(require("./Balance"));
|
|
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 AddressBalance model module.
|
|
30
|
+
* @module model/AddressBalance
|
|
31
|
+
*/
|
|
32
|
+
var AddressBalance = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>AddressBalance</code>.
|
|
35
|
+
* The token balance for a specific wallet address.
|
|
36
|
+
* @alias module:model/AddressBalance
|
|
37
|
+
* @param address {String} The wallet address.
|
|
38
|
+
* @param balance {module:model/Balance}
|
|
39
|
+
*/
|
|
40
|
+
function AddressBalance(address, balance) {
|
|
41
|
+
_classCallCheck(this, AddressBalance);
|
|
42
|
+
AddressBalance.initialize(this, address, balance);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(AddressBalance, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, address, balance) {
|
|
53
|
+
obj['address'] = address;
|
|
54
|
+
obj['balance'] = balance;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>AddressBalance</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/AddressBalance} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/AddressBalance} The populated <code>AddressBalance</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new AddressBalance();
|
|
69
|
+
if (data.hasOwnProperty('address')) {
|
|
70
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('balance')) {
|
|
73
|
+
obj['balance'] = _Balance["default"].constructFromObject(data['balance']);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>AddressBalance</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AddressBalance</code>.
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "validateJSON",
|
|
86
|
+
value: function validateJSON(data) {
|
|
87
|
+
// check to make sure all required properties are present in the JSON string
|
|
88
|
+
var _iterator = _createForOfIteratorHelper(AddressBalance.RequiredProperties),
|
|
89
|
+
_step;
|
|
90
|
+
try {
|
|
91
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
92
|
+
var property = _step.value;
|
|
93
|
+
if (!data.hasOwnProperty(property)) {
|
|
94
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// ensure the json data is a string
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_iterator.e(err);
|
|
100
|
+
} finally {
|
|
101
|
+
_iterator.f();
|
|
102
|
+
}
|
|
103
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
104
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
105
|
+
}
|
|
106
|
+
// validate the optional field `balance`
|
|
107
|
+
if (data['balance']) {
|
|
108
|
+
// data not null
|
|
109
|
+
if (!!_Balance["default"].validateJSON) {
|
|
110
|
+
_Balance["default"].validateJSON(data['balance']);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
}();
|
|
117
|
+
AddressBalance.RequiredProperties = ["address", "balance"];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The wallet address.
|
|
121
|
+
* @member {String} address
|
|
122
|
+
*/
|
|
123
|
+
AddressBalance.prototype['address'] = undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @member {module:model/Balance} balance
|
|
127
|
+
*/
|
|
128
|
+
AddressBalance.prototype['balance'] = undefined;
|
|
129
|
+
var _default = exports["default"] = AddressBalance;
|
|
@@ -78,6 +78,9 @@ var AddressTransferDestination = /*#__PURE__*/function () {
|
|
|
78
78
|
if (data.hasOwnProperty('change_address')) {
|
|
79
79
|
obj['change_address'] = _ApiClient["default"].convertToType(data['change_address'], 'String');
|
|
80
80
|
}
|
|
81
|
+
if (data.hasOwnProperty('change_output_type')) {
|
|
82
|
+
obj['change_output_type'] = _ApiClient["default"].convertToType(data['change_output_type'], 'String');
|
|
83
|
+
}
|
|
81
84
|
if (data.hasOwnProperty('force_internal')) {
|
|
82
85
|
obj['force_internal'] = _ApiClient["default"].convertToType(data['force_internal'], 'Boolean');
|
|
83
86
|
}
|
|
@@ -143,6 +146,10 @@ var AddressTransferDestination = /*#__PURE__*/function () {
|
|
|
143
146
|
if (data['change_address'] && !(typeof data['change_address'] === 'string' || data['change_address'] instanceof String)) {
|
|
144
147
|
throw new Error("Expected the field `change_address` to be a primitive type in the JSON string but got " + data['change_address']);
|
|
145
148
|
}
|
|
149
|
+
// ensure the json data is a string
|
|
150
|
+
if (data['change_output_type'] && !(typeof data['change_output_type'] === 'string' || data['change_output_type'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `change_output_type` to be a primitive type in the JSON string but got " + data['change_output_type']);
|
|
152
|
+
}
|
|
146
153
|
return true;
|
|
147
154
|
}
|
|
148
155
|
}]);
|
|
@@ -170,6 +177,12 @@ AddressTransferDestination.prototype['utxo_outputs'] = undefined;
|
|
|
170
177
|
*/
|
|
171
178
|
AddressTransferDestination.prototype['change_address'] = undefined;
|
|
172
179
|
|
|
180
|
+
/**
|
|
181
|
+
* The position of the change output in the transaction's outputs. Possible values are: - `Last`: The change output is placed at the end of the transaction's outputs. - `First`: The change output is placed at the beginning of the transaction's outputs.
|
|
182
|
+
* @member {module:model/AddressTransferDestination.ChangeOutputTypeEnum} change_output_type
|
|
183
|
+
*/
|
|
184
|
+
AddressTransferDestination.prototype['change_output_type'] = undefined;
|
|
185
|
+
|
|
173
186
|
/**
|
|
174
187
|
* Whether the transaction request must be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must be executed as a Cobo Loop transfer. - `false`: The transaction request may not be executed as a Cobo Loop transfer. Please do not set both `force_internal` and `force_external` as `true`.
|
|
175
188
|
* @member {Boolean} force_internal
|
|
@@ -181,4 +194,27 @@ AddressTransferDestination.prototype['force_internal'] = undefined;
|
|
|
181
194
|
* @member {Boolean} force_external
|
|
182
195
|
*/
|
|
183
196
|
AddressTransferDestination.prototype['force_external'] = undefined;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Allowed values for the <code>change_output_type</code> property.
|
|
200
|
+
* @enum {String}
|
|
201
|
+
* @readonly
|
|
202
|
+
*/
|
|
203
|
+
AddressTransferDestination['ChangeOutputTypeEnum'] = {
|
|
204
|
+
/**
|
|
205
|
+
* value: "Last"
|
|
206
|
+
* @const
|
|
207
|
+
*/
|
|
208
|
+
"Last": "Last",
|
|
209
|
+
/**
|
|
210
|
+
* value: "First"
|
|
211
|
+
* @const
|
|
212
|
+
*/
|
|
213
|
+
"First": "First",
|
|
214
|
+
/**
|
|
215
|
+
* value: "unknown_default_open_api"
|
|
216
|
+
* @const
|
|
217
|
+
*/
|
|
218
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
219
|
+
};
|
|
184
220
|
var _default = exports["default"] = AddressTransferDestination;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _AddressesEventDataAllOfAddresses = _interopRequireDefault(require("./AddressesEventDataAllOfAddresses"));
|
|
9
9
|
var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
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); }
|
|
@@ -71,7 +71,7 @@ var AddressesEventData = /*#__PURE__*/function () {
|
|
|
71
71
|
obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
|
|
72
72
|
}
|
|
73
73
|
if (data.hasOwnProperty('addresses')) {
|
|
74
|
-
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], [
|
|
74
|
+
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], [_AddressesEventDataAllOfAddresses["default"]]);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
return obj;
|
|
@@ -116,7 +116,7 @@ var AddressesEventData = /*#__PURE__*/function () {
|
|
|
116
116
|
try {
|
|
117
117
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
118
118
|
var item = _step2.value;
|
|
119
|
-
|
|
119
|
+
_AddressesEventDataAllOfAddresses["default"].validateJSON(item);
|
|
120
120
|
}
|
|
121
121
|
} catch (err) {
|
|
122
122
|
_iterator2.e(err);
|
|
@@ -139,7 +139,7 @@ AddressesEventData.prototype['data_type'] = undefined;
|
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* A list of addresses.
|
|
142
|
-
* @member {Array.<module:model/
|
|
142
|
+
* @member {Array.<module:model/AddressesEventDataAllOfAddresses>} addresses
|
|
143
143
|
*/
|
|
144
144
|
AddressesEventData.prototype['addresses'] = undefined;
|
|
145
145
|
|
|
@@ -0,0 +1,295 @@
|
|
|
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 _AddressEncoding = _interopRequireDefault(require("./AddressEncoding"));
|
|
9
|
+
var _AddressInfo = _interopRequireDefault(require("./AddressInfo"));
|
|
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 AddressesEventDataAllOfAddresses model module.
|
|
31
|
+
* @module model/AddressesEventDataAllOfAddresses
|
|
32
|
+
*/
|
|
33
|
+
var AddressesEventDataAllOfAddresses = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>AddressesEventDataAllOfAddresses</code>.
|
|
36
|
+
* @alias module:model/AddressesEventDataAllOfAddresses
|
|
37
|
+
* @implements module:model/AddressInfo
|
|
38
|
+
* @param address {String} The wallet address.
|
|
39
|
+
* @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
40
|
+
* @param wallet_id {String} The wallet ID.
|
|
41
|
+
*/
|
|
42
|
+
function AddressesEventDataAllOfAddresses(address, chain_id, wallet_id) {
|
|
43
|
+
_classCallCheck(this, AddressesEventDataAllOfAddresses);
|
|
44
|
+
_AddressInfo["default"].initialize(this, address, chain_id);
|
|
45
|
+
AddressesEventDataAllOfAddresses.initialize(this, address, chain_id, wallet_id);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(AddressesEventDataAllOfAddresses, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, address, chain_id, wallet_id) {
|
|
56
|
+
obj['address'] = address;
|
|
57
|
+
obj['chain_id'] = chain_id;
|
|
58
|
+
obj['wallet_id'] = wallet_id;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>AddressesEventDataAllOfAddresses</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/AddressesEventDataAllOfAddresses} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/AddressesEventDataAllOfAddresses} The populated <code>AddressesEventDataAllOfAddresses</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new AddressesEventDataAllOfAddresses();
|
|
73
|
+
_AddressInfo["default"].constructFromObject(data, obj);
|
|
74
|
+
if (data.hasOwnProperty('address')) {
|
|
75
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
78
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('memo')) {
|
|
81
|
+
obj['memo'] = _ApiClient["default"].convertToType(data['memo'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('path')) {
|
|
84
|
+
obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('encoding')) {
|
|
87
|
+
obj['encoding'] = _AddressEncoding["default"].constructFromObject(data['encoding']);
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('pubkey')) {
|
|
90
|
+
obj['pubkey'] = _ApiClient["default"].convertToType(data['pubkey'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('x_only_pubkey')) {
|
|
93
|
+
obj['x_only_pubkey'] = _ApiClient["default"].convertToType(data['x_only_pubkey'], 'String');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('root_pubkey')) {
|
|
96
|
+
obj['root_pubkey'] = _ApiClient["default"].convertToType(data['root_pubkey'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('taproot_script_tree_hash')) {
|
|
99
|
+
obj['taproot_script_tree_hash'] = _ApiClient["default"].convertToType(data['taproot_script_tree_hash'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('taproot_internal_address')) {
|
|
102
|
+
obj['taproot_internal_address'] = _ApiClient["default"].convertToType(data['taproot_internal_address'], 'String');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('wallet_id')) {
|
|
105
|
+
obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return obj;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Validates the JSON data with respect to <code>AddressesEventDataAllOfAddresses</code>.
|
|
113
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
114
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AddressesEventDataAllOfAddresses</code>.
|
|
115
|
+
*/
|
|
116
|
+
}, {
|
|
117
|
+
key: "validateJSON",
|
|
118
|
+
value: function validateJSON(data) {
|
|
119
|
+
// check to make sure all required properties are present in the JSON string
|
|
120
|
+
var _iterator = _createForOfIteratorHelper(AddressesEventDataAllOfAddresses.RequiredProperties),
|
|
121
|
+
_step;
|
|
122
|
+
try {
|
|
123
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
124
|
+
var property = _step.value;
|
|
125
|
+
if (!data.hasOwnProperty(property)) {
|
|
126
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
} catch (err) {
|
|
131
|
+
_iterator.e(err);
|
|
132
|
+
} finally {
|
|
133
|
+
_iterator.f();
|
|
134
|
+
}
|
|
135
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
136
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
137
|
+
}
|
|
138
|
+
// ensure the json data is a string
|
|
139
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
140
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is a string
|
|
143
|
+
if (data['memo'] && !(typeof data['memo'] === 'string' || data['memo'] instanceof String)) {
|
|
144
|
+
throw new Error("Expected the field `memo` to be a primitive type in the JSON string but got " + data['memo']);
|
|
145
|
+
}
|
|
146
|
+
// ensure the json data is a string
|
|
147
|
+
if (data['path'] && !(typeof data['path'] === 'string' || data['path'] instanceof String)) {
|
|
148
|
+
throw new Error("Expected the field `path` to be a primitive type in the JSON string but got " + data['path']);
|
|
149
|
+
}
|
|
150
|
+
// ensure the json data is a string
|
|
151
|
+
if (data['pubkey'] && !(typeof data['pubkey'] === 'string' || data['pubkey'] instanceof String)) {
|
|
152
|
+
throw new Error("Expected the field `pubkey` to be a primitive type in the JSON string but got " + data['pubkey']);
|
|
153
|
+
}
|
|
154
|
+
// ensure the json data is a string
|
|
155
|
+
if (data['x_only_pubkey'] && !(typeof data['x_only_pubkey'] === 'string' || data['x_only_pubkey'] instanceof String)) {
|
|
156
|
+
throw new Error("Expected the field `x_only_pubkey` to be a primitive type in the JSON string but got " + data['x_only_pubkey']);
|
|
157
|
+
}
|
|
158
|
+
// ensure the json data is a string
|
|
159
|
+
if (data['root_pubkey'] && !(typeof data['root_pubkey'] === 'string' || data['root_pubkey'] instanceof String)) {
|
|
160
|
+
throw new Error("Expected the field `root_pubkey` to be a primitive type in the JSON string but got " + data['root_pubkey']);
|
|
161
|
+
}
|
|
162
|
+
// ensure the json data is a string
|
|
163
|
+
if (data['taproot_script_tree_hash'] && !(typeof data['taproot_script_tree_hash'] === 'string' || data['taproot_script_tree_hash'] instanceof String)) {
|
|
164
|
+
throw new Error("Expected the field `taproot_script_tree_hash` to be a primitive type in the JSON string but got " + data['taproot_script_tree_hash']);
|
|
165
|
+
}
|
|
166
|
+
// ensure the json data is a string
|
|
167
|
+
if (data['taproot_internal_address'] && !(typeof data['taproot_internal_address'] === 'string' || data['taproot_internal_address'] instanceof String)) {
|
|
168
|
+
throw new Error("Expected the field `taproot_internal_address` to be a primitive type in the JSON string but got " + data['taproot_internal_address']);
|
|
169
|
+
}
|
|
170
|
+
// ensure the json data is a string
|
|
171
|
+
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
172
|
+
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
173
|
+
}
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
}]);
|
|
177
|
+
}();
|
|
178
|
+
AddressesEventDataAllOfAddresses.RequiredProperties = ["address", "chain_id", "wallet_id"];
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The wallet address.
|
|
182
|
+
* @member {String} address
|
|
183
|
+
*/
|
|
184
|
+
AddressesEventDataAllOfAddresses.prototype['address'] = undefined;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
188
|
+
* @member {String} chain_id
|
|
189
|
+
*/
|
|
190
|
+
AddressesEventDataAllOfAddresses.prototype['chain_id'] = undefined;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* The memo code.
|
|
194
|
+
* @member {String} memo
|
|
195
|
+
*/
|
|
196
|
+
AddressesEventDataAllOfAddresses.prototype['memo'] = undefined;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The derivation path of the address. This property applies to MPC Wallets only. To learn the meaning of each level in the path, see [Path levels](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels).
|
|
200
|
+
* @member {String} path
|
|
201
|
+
*/
|
|
202
|
+
AddressesEventDataAllOfAddresses.prototype['path'] = undefined;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @member {module:model/AddressEncoding} encoding
|
|
206
|
+
*/
|
|
207
|
+
AddressesEventDataAllOfAddresses.prototype['encoding'] = undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The public key of the address. This property applies to MPC Wallets only.
|
|
211
|
+
* @member {String} pubkey
|
|
212
|
+
*/
|
|
213
|
+
AddressesEventDataAllOfAddresses.prototype['pubkey'] = undefined;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The 32-byte x-only public key in hexadecimal format after tweaking.
|
|
217
|
+
* @member {String} x_only_pubkey
|
|
218
|
+
*/
|
|
219
|
+
AddressesEventDataAllOfAddresses.prototype['x_only_pubkey'] = undefined;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* The root public key of the address. This property applies to MPC Wallets only.
|
|
223
|
+
* @member {String} root_pubkey
|
|
224
|
+
*/
|
|
225
|
+
AddressesEventDataAllOfAddresses.prototype['root_pubkey'] = undefined;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The information about the new address.
|
|
229
|
+
* @member {String} taproot_script_tree_hash
|
|
230
|
+
*/
|
|
231
|
+
AddressesEventDataAllOfAddresses.prototype['taproot_script_tree_hash'] = undefined;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The Taproot address before tweaking.
|
|
235
|
+
* @member {String} taproot_internal_address
|
|
236
|
+
*/
|
|
237
|
+
AddressesEventDataAllOfAddresses.prototype['taproot_internal_address'] = undefined;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The wallet ID.
|
|
241
|
+
* @member {String} wallet_id
|
|
242
|
+
*/
|
|
243
|
+
AddressesEventDataAllOfAddresses.prototype['wallet_id'] = undefined;
|
|
244
|
+
|
|
245
|
+
// Implement AddressInfo interface:
|
|
246
|
+
/**
|
|
247
|
+
* The wallet address.
|
|
248
|
+
* @member {String} address
|
|
249
|
+
*/
|
|
250
|
+
_AddressInfo["default"].prototype['address'] = undefined;
|
|
251
|
+
/**
|
|
252
|
+
* The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
253
|
+
* @member {String} chain_id
|
|
254
|
+
*/
|
|
255
|
+
_AddressInfo["default"].prototype['chain_id'] = undefined;
|
|
256
|
+
/**
|
|
257
|
+
* The memo code.
|
|
258
|
+
* @member {String} memo
|
|
259
|
+
*/
|
|
260
|
+
_AddressInfo["default"].prototype['memo'] = undefined;
|
|
261
|
+
/**
|
|
262
|
+
* The derivation path of the address. This property applies to MPC Wallets only. To learn the meaning of each level in the path, see [Path levels](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels).
|
|
263
|
+
* @member {String} path
|
|
264
|
+
*/
|
|
265
|
+
_AddressInfo["default"].prototype['path'] = undefined;
|
|
266
|
+
/**
|
|
267
|
+
* @member {module:model/AddressEncoding} encoding
|
|
268
|
+
*/
|
|
269
|
+
_AddressInfo["default"].prototype['encoding'] = undefined;
|
|
270
|
+
/**
|
|
271
|
+
* The public key of the address. This property applies to MPC Wallets only.
|
|
272
|
+
* @member {String} pubkey
|
|
273
|
+
*/
|
|
274
|
+
_AddressInfo["default"].prototype['pubkey'] = undefined;
|
|
275
|
+
/**
|
|
276
|
+
* The 32-byte x-only public key in hexadecimal format after tweaking.
|
|
277
|
+
* @member {String} x_only_pubkey
|
|
278
|
+
*/
|
|
279
|
+
_AddressInfo["default"].prototype['x_only_pubkey'] = undefined;
|
|
280
|
+
/**
|
|
281
|
+
* The root public key of the address. This property applies to MPC Wallets only.
|
|
282
|
+
* @member {String} root_pubkey
|
|
283
|
+
*/
|
|
284
|
+
_AddressInfo["default"].prototype['root_pubkey'] = undefined;
|
|
285
|
+
/**
|
|
286
|
+
* The information about the new address.
|
|
287
|
+
* @member {String} taproot_script_tree_hash
|
|
288
|
+
*/
|
|
289
|
+
_AddressInfo["default"].prototype['taproot_script_tree_hash'] = undefined;
|
|
290
|
+
/**
|
|
291
|
+
* The Taproot address before tweaking.
|
|
292
|
+
* @member {String} taproot_internal_address
|
|
293
|
+
*/
|
|
294
|
+
_AddressInfo["default"].prototype['taproot_internal_address'] = undefined;
|
|
295
|
+
var _default = exports["default"] = AddressesEventDataAllOfAddresses;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class ApprovalStatementStatus.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var ApprovalStatementStatus = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function ApprovalStatementStatus() {
|
|
32
|
+
_classCallCheck(this, ApprovalStatementStatus);
|
|
33
|
+
/**
|
|
34
|
+
* value: "UnSend"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "UnSend", "UnSend");
|
|
38
|
+
/**
|
|
39
|
+
* value: "WaitAudit"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "WaitAudit", "WaitAudit");
|
|
43
|
+
/**
|
|
44
|
+
* value: "Approve"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "Approve", "Approve");
|
|
48
|
+
/**
|
|
49
|
+
* value: "Reject"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "Reject", "Reject");
|
|
53
|
+
/**
|
|
54
|
+
* value: "Invalid"
|
|
55
|
+
* @const
|
|
56
|
+
*/
|
|
57
|
+
_defineProperty(this, "Invalid", "Invalid");
|
|
58
|
+
/**
|
|
59
|
+
* value: "Timeout"
|
|
60
|
+
* @const
|
|
61
|
+
*/
|
|
62
|
+
_defineProperty(this, "Timeout", "Timeout");
|
|
63
|
+
/**
|
|
64
|
+
* value: "unknown_default_open_api"
|
|
65
|
+
* @const
|
|
66
|
+
*/
|
|
67
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
68
|
+
}
|
|
69
|
+
return _createClass(ApprovalStatementStatus, null, [{
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value:
|
|
72
|
+
/**
|
|
73
|
+
* Returns a <code>ApprovalStatementStatus</code> enum value from a Javascript object name.
|
|
74
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
75
|
+
* @return {module:model/ApprovalStatementStatus} The enum <code>ApprovalStatementStatus</code> value.
|
|
76
|
+
*/
|
|
77
|
+
function constructFromObject(object) {
|
|
78
|
+
return object;
|
|
79
|
+
}
|
|
80
|
+
}]);
|
|
81
|
+
}();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _Balance = _interopRequireDefault(require("./Balance"));
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
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
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; } } }; }
|
|
@@ -35,7 +35,7 @@ var AssetBalance = /*#__PURE__*/function () {
|
|
|
35
35
|
* The data for asset balance information.
|
|
36
36
|
* @alias module:model/AssetBalance
|
|
37
37
|
* @param asset_id {String} (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
|
|
38
|
-
* @param balance {module:model/
|
|
38
|
+
* @param balance {module:model/Balance}
|
|
39
39
|
*/
|
|
40
40
|
function AssetBalance(asset_id, balance) {
|
|
41
41
|
_classCallCheck(this, AssetBalance);
|
|
@@ -70,7 +70,7 @@ var AssetBalance = /*#__PURE__*/function () {
|
|
|
70
70
|
obj['asset_id'] = _ApiClient["default"].convertToType(data['asset_id'], 'String');
|
|
71
71
|
}
|
|
72
72
|
if (data.hasOwnProperty('balance')) {
|
|
73
|
-
obj['balance'] =
|
|
73
|
+
obj['balance'] = _Balance["default"].constructFromObject(data['balance']);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
return obj;
|
|
@@ -106,8 +106,8 @@ var AssetBalance = /*#__PURE__*/function () {
|
|
|
106
106
|
// validate the optional field `balance`
|
|
107
107
|
if (data['balance']) {
|
|
108
108
|
// data not null
|
|
109
|
-
if (!!
|
|
110
|
-
|
|
109
|
+
if (!!_Balance["default"].validateJSON) {
|
|
110
|
+
_Balance["default"].validateJSON(data['balance']);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return true;
|
|
@@ -123,7 +123,7 @@ AssetBalance.RequiredProperties = ["asset_id", "balance"];
|
|
|
123
123
|
AssetBalance.prototype['asset_id'] = undefined;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* @member {module:model/
|
|
126
|
+
* @member {module:model/Balance} balance
|
|
127
127
|
*/
|
|
128
128
|
AssetBalance.prototype['balance'] = undefined;
|
|
129
129
|
var _default = exports["default"] = AssetBalance;
|