@cobo/cobo-waas2 1.9.0 → 1.11.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.
Files changed (148) hide show
  1. package/README.md +47 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +1 -1
  4. package/dist/api/DevelopersApi.js +7 -7
  5. package/dist/api/DevelopersWebhooksApi.js +8 -8
  6. package/dist/api/StakingsApi.js +412 -18
  7. package/dist/api/SwapsApi.js +360 -0
  8. package/dist/api/TransactionsApi.js +18 -18
  9. package/dist/api/TravelRuleApi.js +4 -4
  10. package/dist/api/WalletsApi.js +19 -19
  11. package/dist/api/WalletsExchangeWalletApi.js +1 -1
  12. package/dist/api/WalletsMPCWalletsApi.js +19 -19
  13. package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
  14. package/dist/index.js +213 -3
  15. package/dist/model/AddressesEventData.js +4 -4
  16. package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
  17. package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
  18. package/dist/model/BabylonAirdropPop.js +186 -0
  19. package/dist/model/BabylonAirdropRegistration.js +172 -0
  20. package/dist/model/BabylonEligibleAirdrop.js +157 -0
  21. package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
  22. package/dist/model/BabylonRegistrationStatus.js +66 -0
  23. package/dist/model/BabylonStakingRegistration.js +185 -0
  24. package/dist/model/ChainInfo.js +2 -2
  25. package/dist/model/ContractCallDestination.js +42 -8
  26. package/dist/model/ContractCallDestinationType.js +5 -0
  27. package/dist/model/ContractCallSource.js +6 -0
  28. package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
  29. package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
  30. package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
  31. package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
  32. package/dist/model/CreateSwapActivityRequest.js +153 -0
  33. package/dist/model/CreateSwapQuote201Response.js +264 -0
  34. package/dist/model/CreateSwapQuoteRequest.js +166 -0
  35. package/dist/model/EstimatedEvmEip1559FeeSlow.js +23 -0
  36. package/dist/model/EstimatedEvmLegacyFeeSlow.js +23 -0
  37. package/dist/model/ExtendedTokenInfo.js +3 -3
  38. package/dist/model/FeeReserved.js +87 -0
  39. package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
  40. package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
  41. package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
  42. package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
  43. package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
  44. package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
  45. package/dist/model/ListSwapActivities200Response.js +123 -0
  46. package/dist/model/MaxFeeAmount.js +1 -1
  47. package/dist/model/MessageSignSource.js +6 -0
  48. package/dist/model/MpcContractCallSource.js +16 -0
  49. package/dist/model/MpcMessageSignSource.js +16 -0
  50. package/dist/model/MpcSigningGroup.js +27 -4
  51. package/dist/model/MpcTransferSource.js +16 -0
  52. package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
  53. package/dist/model/SolContractCallAccount.js +133 -0
  54. package/dist/model/SolContractCallDestination.js +139 -0
  55. package/dist/model/SolContractCallInstruction.js +158 -0
  56. package/dist/model/StakingPoolId.js +30 -0
  57. package/dist/model/StakingPoolType.js +15 -0
  58. package/dist/model/SwapQuote.js +203 -0
  59. package/dist/model/TokenInfo.js +2 -2
  60. package/dist/model/TransactionDestination.js +45 -11
  61. package/dist/model/TransactionDestinationType.js +5 -0
  62. package/dist/model/TransactionFee.js +1 -1
  63. package/dist/model/TransactionFixedFee.js +2 -2
  64. package/dist/model/TransactionRawTxInfo.js +16 -0
  65. package/dist/model/TransactionRbfSource.js +6 -0
  66. package/dist/model/TransactionRequestFee.js +1 -1
  67. package/dist/model/TransactionRequestFixedFee.js +2 -2
  68. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  69. package/dist/model/TransactionSolContractAccount.js +106 -0
  70. package/dist/model/TransactionSolContractDestination.js +137 -0
  71. package/dist/model/TransactionSolContractInstruction.js +134 -0
  72. package/dist/model/TransactionTokeApproval.js +3 -3
  73. package/dist/model/TransactionUtxoChange.js +101 -0
  74. package/dist/model/TransferSource.js +6 -0
  75. package/dist/model/WebhookEventData.js +2 -2
  76. package/docs/AddressBooksApi.md +1 -1
  77. package/docs/AddressesEventData.md +1 -1
  78. package/docs/AddressesEventDataAllOfAddresses.md +19 -0
  79. package/docs/BabylonAirdropPop.md +14 -0
  80. package/docs/BabylonAirdropRegistration.md +16 -0
  81. package/docs/BabylonEligibleAirdrop.md +14 -0
  82. package/docs/BabylonRegistrationRequestStatus.md +14 -0
  83. package/docs/BabylonRegistrationStatus.md +14 -0
  84. package/docs/BabylonStakingRegistration.md +17 -0
  85. package/docs/ChainInfo.md +1 -1
  86. package/docs/ContractCallDestination.md +1 -0
  87. package/docs/ContractCallDestinationType.md +2 -0
  88. package/docs/ContractCallSource.md +1 -0
  89. package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
  90. package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
  91. package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
  92. package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
  93. package/docs/CreateSwapActivityRequest.md +12 -0
  94. package/docs/CreateSwapQuote201Response.md +17 -0
  95. package/docs/CreateSwapQuoteRequest.md +13 -0
  96. package/docs/DevelopersApi.md +5 -5
  97. package/docs/DevelopersWebhooksApi.md +8 -8
  98. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -0
  99. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -0
  100. package/docs/ExtendedTokenInfo.md +1 -1
  101. package/docs/FeeReserved.md +9 -0
  102. package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
  103. package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
  104. package/docs/ListBabylonEligibleStakings200Response.md +10 -0
  105. package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
  106. package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
  107. package/docs/ListEnableTokenPairs200Response.md +10 -0
  108. package/docs/ListSwapActivities200Response.md +10 -0
  109. package/docs/MaxFeeAmount.md +1 -1
  110. package/docs/MessageSignSource.md +1 -0
  111. package/docs/MpcContractCallSource.md +1 -0
  112. package/docs/MpcMessageSignSource.md +1 -0
  113. package/docs/MpcSigningGroup.md +1 -1
  114. package/docs/MpcTransferSource.md +1 -0
  115. package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
  116. package/docs/SolContractCallAccount.md +11 -0
  117. package/docs/SolContractCallDestination.md +10 -0
  118. package/docs/SolContractCallInstruction.md +11 -0
  119. package/docs/StakingPoolId.md +12 -0
  120. package/docs/StakingPoolType.md +6 -0
  121. package/docs/StakingsApi.md +461 -13
  122. package/docs/SwapQuote.md +16 -0
  123. package/docs/SwapsApi.md +348 -0
  124. package/docs/TokenInfo.md +1 -1
  125. package/docs/TransactionDestination.md +1 -0
  126. package/docs/TransactionDestinationType.md +2 -0
  127. package/docs/TransactionFee.md +1 -1
  128. package/docs/TransactionFixedFee.md +1 -1
  129. package/docs/TransactionRawTxInfo.md +1 -0
  130. package/docs/TransactionRbfSource.md +1 -0
  131. package/docs/TransactionRequestFee.md +1 -1
  132. package/docs/TransactionRequestFixedFee.md +1 -1
  133. package/docs/TransactionRequestUtxoFee.md +1 -1
  134. package/docs/TransactionSolContractAccount.md +11 -0
  135. package/docs/TransactionSolContractDestination.md +10 -0
  136. package/docs/TransactionSolContractInstruction.md +11 -0
  137. package/docs/TransactionTokeApproval.md +1 -1
  138. package/docs/TransactionUtxoChange.md +10 -0
  139. package/docs/TransactionsApi.md +16 -16
  140. package/docs/TransferSource.md +1 -0
  141. package/docs/TravelRuleApi.md +4 -4
  142. package/docs/WalletsApi.md +16 -16
  143. package/docs/WalletsExchangeWalletApi.md +1 -1
  144. package/docs/WalletsMPCWalletsApi.md +19 -19
  145. package/docs/WalletsSmartContractWalletsApi.md +1 -1
  146. package/docs/WebhookEventData.md +1 -1
  147. package/package.json +2 -2
  148. package/docs/SwapSummary.md +0 -10
@@ -7,6 +7,8 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _ContractCallDestinationType = _interopRequireDefault(require("./ContractCallDestinationType"));
9
9
  var _EvmContractCallDestination = _interopRequireDefault(require("./EvmContractCallDestination"));
10
+ var _SolContractCallDestination = _interopRequireDefault(require("./SolContractCallDestination"));
11
+ var _SolContractCallInstruction = _interopRequireDefault(require("./SolContractCallInstruction"));
10
12
  var _ContractCallDestination;
11
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
14
  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); }
@@ -33,7 +35,7 @@ var ContractCallDestination = /*#__PURE__*/function () {
33
35
  /**
34
36
  * Constructs a new <code>ContractCallDestination</code>.
35
37
  * @alias module:model/ContractCallDestination
36
- * @param {(module:model/EvmContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
38
+ * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
37
39
  */
38
40
  function ContractCallDestination() {
39
41
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -58,6 +60,10 @@ var ContractCallDestination = /*#__PURE__*/function () {
58
60
  this.actualInstance = _EvmContractCallDestination["default"].constructFromObject(instance);
59
61
  match++;
60
62
  break;
63
+ case "SOL_Contract":
64
+ this.actualInstance = _SolContractCallDestination["default"].constructFromObject(instance);
65
+ match++;
66
+ break;
61
67
  default:
62
68
  errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
63
69
  break;
@@ -87,13 +93,36 @@ var ContractCallDestination = /*#__PURE__*/function () {
87
93
  // json data failed to deserialize into EvmContractCallDestination
88
94
  errorMessages.push("Failed to construct EvmContractCallDestination: " + err);
89
95
  }
96
+ try {
97
+ if (instance instanceof _SolContractCallDestination["default"]) {
98
+ this.actualInstance = instance;
99
+ } else if (!!_SolContractCallDestination["default"].validateJSON && _SolContractCallDestination["default"].validateJSON(instance)) {
100
+ // plain JS object
101
+ // create SolContractCallDestination from JS object
102
+ this.actualInstance = _SolContractCallDestination["default"].constructFromObject(instance);
103
+ } else {
104
+ if (_SolContractCallDestination["default"].constructFromObject(instance)) {
105
+ if (!!_SolContractCallDestination["default"].constructFromObject(instance).toJSON) {
106
+ if (_SolContractCallDestination["default"].constructFromObject(instance).toJSON()) {
107
+ this.actualInstance = _SolContractCallDestination["default"].constructFromObject(instance);
108
+ }
109
+ } else {
110
+ this.actualInstance = _SolContractCallDestination["default"].constructFromObject(instance);
111
+ }
112
+ }
113
+ }
114
+ match++;
115
+ } catch (err) {
116
+ // json data failed to deserialize into SolContractCallDestination
117
+ errorMessages.push("Failed to construct SolContractCallDestination: " + err);
118
+ }
90
119
 
91
120
  // if (match > 1) {
92
- // throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination. Input: " + JSON.stringify(instance));
121
+ // throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination. Input: " + JSON.stringify(instance));
93
122
  // } else
94
123
  if (match === 0) {
95
124
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
96
- // throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination. Details: " +
125
+ // throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination. Details: " +
97
126
  // errorMessages.join(", "));
98
127
  return;
99
128
  } else {// only 1 match
@@ -112,16 +141,16 @@ var ContractCallDestination = /*#__PURE__*/function () {
112
141
  key: "getActualInstance",
113
142
  value:
114
143
  /**
115
- * Gets the actual instance, which can be <code>EvmContractCallDestination</code>.
116
- * @return {(module:model/EvmContractCallDestination)} The actual instance.
144
+ * Gets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>.
145
+ * @return {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} The actual instance.
117
146
  */
118
147
  function getActualInstance() {
119
148
  return this.actualInstance;
120
149
  }
121
150
 
122
151
  /**
123
- * Sets the actual instance, which can be <code>EvmContractCallDestination</code>.
124
- * @param {(module:model/EvmContractCallDestination)} obj The actual instance.
152
+ * Sets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>.
153
+ * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} obj The actual instance.
125
154
  */
126
155
  }, {
127
156
  key: "setActualInstance",
@@ -166,5 +195,10 @@ ContractCallDestination.prototype['value'] = undefined;
166
195
  * @member {String} calldata
167
196
  */
168
197
  ContractCallDestination.prototype['calldata'] = undefined;
169
- ContractCallDestination.OneOf = ["EvmContractCallDestination"];
198
+
199
+ /**
200
+ * @member {Array.<module:model/SolContractCallInstruction>} instructions
201
+ */
202
+ ContractCallDestination.prototype['instructions'] = undefined;
203
+ ContractCallDestination.OneOf = ["EvmContractCallDestination", "SolContractCallDestination"];
170
204
  var _default = exports["default"] = ContractCallDestination;
@@ -35,6 +35,11 @@ var ContractCallDestinationType = exports["default"] = /*#__PURE__*/function ()
35
35
  * @const
36
36
  */
37
37
  _defineProperty(this, "EVM_Contract", "EVM_Contract");
38
+ /**
39
+ * value: "SOL_Contract"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "SOL_Contract", "SOL_Contract");
38
43
  /**
39
44
  * value: "unknown_default_open_api"
40
45
  * @const
@@ -8,6 +8,7 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _CoboSafeDelegate = _interopRequireDefault(require("./CoboSafeDelegate"));
9
9
  var _ContractCallSourceType = _interopRequireDefault(require("./ContractCallSourceType"));
10
10
  var _MpcContractCallSource = _interopRequireDefault(require("./MpcContractCallSource"));
11
+ var _MpcSigningGroup = _interopRequireDefault(require("./MpcSigningGroup"));
11
12
  var _SafeContractCallSource = _interopRequireDefault(require("./SafeContractCallSource"));
12
13
  var _ContractCallSource;
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -194,6 +195,11 @@ ContractCallSource.prototype['wallet_id'] = undefined;
194
195
  */
195
196
  ContractCallSource.prototype['address'] = undefined;
196
197
 
198
+ /**
199
+ * @member {module:model/MpcSigningGroup} mpc_used_key_share_holder_group
200
+ */
201
+ ContractCallSource.prototype['mpc_used_key_share_holder_group'] = undefined;
202
+
197
203
  /**
198
204
  * @member {module:model/CoboSafeDelegate} delegate
199
205
  */
@@ -0,0 +1,87 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The CreateBabylonAirdropRegistration201Response model module.
26
+ * @module model/CreateBabylonAirdropRegistration201Response
27
+ */
28
+ var CreateBabylonAirdropRegistration201Response = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>CreateBabylonAirdropRegistration201Response</code>.
31
+ * @alias module:model/CreateBabylonAirdropRegistration201Response
32
+ */
33
+ function CreateBabylonAirdropRegistration201Response() {
34
+ _classCallCheck(this, CreateBabylonAirdropRegistration201Response);
35
+ CreateBabylonAirdropRegistration201Response.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(CreateBabylonAirdropRegistration201Response, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>CreateBabylonAirdropRegistration201Response</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/CreateBabylonAirdropRegistration201Response} obj Optional instance to populate.
52
+ * @return {module:model/CreateBabylonAirdropRegistration201Response} The populated <code>CreateBabylonAirdropRegistration201Response</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new CreateBabylonAirdropRegistration201Response();
59
+ if (data.hasOwnProperty('registration_id')) {
60
+ obj['registration_id'] = _ApiClient["default"].convertToType(data['registration_id'], 'String');
61
+ }
62
+ }
63
+ return obj;
64
+ }
65
+
66
+ /**
67
+ * Validates the JSON data with respect to <code>CreateBabylonAirdropRegistration201Response</code>.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateBabylonAirdropRegistration201Response</code>.
70
+ */
71
+ }, {
72
+ key: "validateJSON",
73
+ value: function validateJSON(data) {
74
+ // ensure the json data is a string
75
+ if (data['registration_id'] && !(typeof data['registration_id'] === 'string' || data['registration_id'] instanceof String)) {
76
+ throw new Error("Expected the field `registration_id` to be a primitive type in the JSON string but got " + data['registration_id']);
77
+ }
78
+ return true;
79
+ }
80
+ }]);
81
+ }();
82
+ /**
83
+ * The registration ID, a unique identifier for tracking the airdrop registration request. You can check the registration status with the [Get Babylon airdrop registration details](https://www.cobo.com/developers/v2/api-references/stakings/get-babylon-airdrop-registration-details) operation.
84
+ * @member {String} registration_id
85
+ */
86
+ CreateBabylonAirdropRegistration201Response.prototype['registration_id'] = undefined;
87
+ var _default = exports["default"] = CreateBabylonAirdropRegistration201Response;
@@ -0,0 +1,105 @@
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 _StakingSource = _interopRequireDefault(require("./StakingSource"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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
+ * The CreateBabylonAirdropRegistrationRequest model module.
27
+ * @module model/CreateBabylonAirdropRegistrationRequest
28
+ */
29
+ var CreateBabylonAirdropRegistrationRequest = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>CreateBabylonAirdropRegistrationRequest</code>.
32
+ * @alias module:model/CreateBabylonAirdropRegistrationRequest
33
+ */
34
+ function CreateBabylonAirdropRegistrationRequest() {
35
+ _classCallCheck(this, CreateBabylonAirdropRegistrationRequest);
36
+ CreateBabylonAirdropRegistrationRequest.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ return _createClass(CreateBabylonAirdropRegistrationRequest, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>CreateBabylonAirdropRegistrationRequest</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/CreateBabylonAirdropRegistrationRequest} obj Optional instance to populate.
53
+ * @return {module:model/CreateBabylonAirdropRegistrationRequest} The populated <code>CreateBabylonAirdropRegistrationRequest</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new CreateBabylonAirdropRegistrationRequest();
60
+ if (data.hasOwnProperty('btc_address')) {
61
+ obj['btc_address'] = _StakingSource["default"].constructFromObject(data['btc_address']);
62
+ }
63
+ if (data.hasOwnProperty('babylon_address')) {
64
+ obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>CreateBabylonAirdropRegistrationRequest</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateBabylonAirdropRegistrationRequest</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ // validate the optional field `btc_address`
79
+ if (data['btc_address']) {
80
+ // data not null
81
+ if (!!_StakingSource["default"].validateJSON) {
82
+ _StakingSource["default"].validateJSON(data['btc_address']);
83
+ }
84
+ }
85
+ // validate the optional field `babylon_address`
86
+ if (data['babylon_address']) {
87
+ // data not null
88
+ if (!!_StakingSource["default"].validateJSON) {
89
+ _StakingSource["default"].validateJSON(data['babylon_address']);
90
+ }
91
+ }
92
+ return true;
93
+ }
94
+ }]);
95
+ }();
96
+ /**
97
+ * @member {module:model/StakingSource} btc_address
98
+ */
99
+ CreateBabylonAirdropRegistrationRequest.prototype['btc_address'] = undefined;
100
+
101
+ /**
102
+ * @member {module:model/StakingSource} babylon_address
103
+ */
104
+ CreateBabylonAirdropRegistrationRequest.prototype['babylon_address'] = undefined;
105
+ var _default = exports["default"] = CreateBabylonAirdropRegistrationRequest;
@@ -0,0 +1,87 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The CreateBabylonStakingRegistration201Response model module.
26
+ * @module model/CreateBabylonStakingRegistration201Response
27
+ */
28
+ var CreateBabylonStakingRegistration201Response = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>CreateBabylonStakingRegistration201Response</code>.
31
+ * @alias module:model/CreateBabylonStakingRegistration201Response
32
+ */
33
+ function CreateBabylonStakingRegistration201Response() {
34
+ _classCallCheck(this, CreateBabylonStakingRegistration201Response);
35
+ CreateBabylonStakingRegistration201Response.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(CreateBabylonStakingRegistration201Response, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>CreateBabylonStakingRegistration201Response</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/CreateBabylonStakingRegistration201Response} obj Optional instance to populate.
52
+ * @return {module:model/CreateBabylonStakingRegistration201Response} The populated <code>CreateBabylonStakingRegistration201Response</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new CreateBabylonStakingRegistration201Response();
59
+ if (data.hasOwnProperty('registration_id')) {
60
+ obj['registration_id'] = _ApiClient["default"].convertToType(data['registration_id'], 'String');
61
+ }
62
+ }
63
+ return obj;
64
+ }
65
+
66
+ /**
67
+ * Validates the JSON data with respect to <code>CreateBabylonStakingRegistration201Response</code>.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateBabylonStakingRegistration201Response</code>.
70
+ */
71
+ }, {
72
+ key: "validateJSON",
73
+ value: function validateJSON(data) {
74
+ // ensure the json data is a string
75
+ if (data['registration_id'] && !(typeof data['registration_id'] === 'string' || data['registration_id'] instanceof String)) {
76
+ throw new Error("Expected the field `registration_id` to be a primitive type in the JSON string but got " + data['registration_id']);
77
+ }
78
+ return true;
79
+ }
80
+ }]);
81
+ }();
82
+ /**
83
+ * The registration ID, a unique identifier for tracking the Babylon Phase-2 registration request. You can use it with the [Get Babylon Phase-2 registration details operation](https://www.cobo.com/developers/v2/api-references/stakings/get-babylon-phase-2-registration-details) to check the registration status.
84
+ * @member {String} registration_id
85
+ */
86
+ CreateBabylonStakingRegistration201Response.prototype['registration_id'] = undefined;
87
+ var _default = exports["default"] = CreateBabylonStakingRegistration201Response;
@@ -0,0 +1,103 @@
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 _StakingSource = _interopRequireDefault(require("./StakingSource"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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
+ * The CreateBabylonStakingRegistrationRequest model module.
27
+ * @module model/CreateBabylonStakingRegistrationRequest
28
+ */
29
+ var CreateBabylonStakingRegistrationRequest = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>CreateBabylonStakingRegistrationRequest</code>.
32
+ * @alias module:model/CreateBabylonStakingRegistrationRequest
33
+ */
34
+ function CreateBabylonStakingRegistrationRequest() {
35
+ _classCallCheck(this, CreateBabylonStakingRegistrationRequest);
36
+ CreateBabylonStakingRegistrationRequest.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ return _createClass(CreateBabylonStakingRegistrationRequest, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>CreateBabylonStakingRegistrationRequest</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/CreateBabylonStakingRegistrationRequest} obj Optional instance to populate.
53
+ * @return {module:model/CreateBabylonStakingRegistrationRequest} The populated <code>CreateBabylonStakingRegistrationRequest</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new CreateBabylonStakingRegistrationRequest();
60
+ if (data.hasOwnProperty('staking_id')) {
61
+ obj['staking_id'] = _ApiClient["default"].convertToType(data['staking_id'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('babylon_address')) {
64
+ obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>CreateBabylonStakingRegistrationRequest</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateBabylonStakingRegistrationRequest</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ // ensure the json data is a string
79
+ if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
80
+ throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
81
+ }
82
+ // validate the optional field `babylon_address`
83
+ if (data['babylon_address']) {
84
+ // data not null
85
+ if (!!_StakingSource["default"].validateJSON) {
86
+ _StakingSource["default"].validateJSON(data['babylon_address']);
87
+ }
88
+ }
89
+ return true;
90
+ }
91
+ }]);
92
+ }();
93
+ /**
94
+ * The ID of the Phase-1 BTC staking position.
95
+ * @member {String} staking_id
96
+ */
97
+ CreateBabylonStakingRegistrationRequest.prototype['staking_id'] = undefined;
98
+
99
+ /**
100
+ * @member {module:model/StakingSource} babylon_address
101
+ */
102
+ CreateBabylonStakingRegistrationRequest.prototype['babylon_address'] = undefined;
103
+ var _default = exports["default"] = CreateBabylonStakingRegistrationRequest;