@cobo/cobo-waas2 1.12.0 → 1.13.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 (159) hide show
  1. package/README.md +54 -18
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/FeeStationApi.js +18 -18
  4. package/dist/api/TransactionsApi.js +2 -2
  5. package/dist/api/WalletsApi.js +8 -8
  6. package/dist/index.js +260 -43
  7. package/dist/model/ActivityExtra.js +0 -23
  8. package/dist/model/AddressEncoding.js +15 -0
  9. package/dist/model/AddressesEventData.js +8 -3
  10. package/dist/model/BTCBIP137MessageSignDestination.js +122 -0
  11. package/dist/model/BTCBIP322MessageSignDestination.js +122 -0
  12. package/dist/model/BabylonStakingActivityDetailExtra.js +0 -39
  13. package/dist/model/{ListSwapActivities200Response.js → BankAccount.js} +51 -51
  14. package/dist/model/ChainsEventData.js +8 -3
  15. package/dist/model/CosmosAdr36MessageSignDestination.js +122 -0
  16. package/dist/model/CosmosContractCallDestination.js +152 -0
  17. package/dist/model/CosmosContractCallMessage.js +126 -0
  18. package/dist/model/CreateSettlement.js +174 -0
  19. package/dist/model/MPCVaultEventData.js +8 -3
  20. package/dist/model/{CreateSwapActivityRequest.js → Merchant.js} +45 -58
  21. package/dist/model/MessageSignDestination.js +111 -9
  22. package/dist/model/MessageSignDestinationType.js +15 -0
  23. package/dist/model/Order.js +306 -0
  24. package/dist/model/OrderStatus.js +76 -0
  25. package/dist/model/PaymentTransaction.js +201 -0
  26. package/dist/model/RefreshAddressBalancesByTokenRequest.js +2 -3
  27. package/dist/model/Refund.js +237 -0
  28. package/dist/model/RefundStatus.js +76 -0
  29. package/dist/model/RefundType.js +61 -0
  30. package/dist/model/SettleRequestStatus.js +76 -0
  31. package/dist/model/SettleStatus.js +76 -0
  32. package/dist/model/Settlement.js +168 -0
  33. package/dist/model/SettlementDetail.js +184 -0
  34. package/dist/model/SettlementInfo.js +175 -0
  35. package/dist/model/SettlementType.js +61 -0
  36. package/dist/model/SwapActivity.js +36 -5
  37. package/dist/model/SwapActivityStatus.js +66 -0
  38. package/dist/model/SwapActivityType.js +61 -0
  39. package/dist/model/SwapQuote.js +21 -34
  40. package/dist/model/{CreateSwapQuoteRequest.js → SwapToken.js} +73 -60
  41. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  42. package/dist/model/TokenListing.js +230 -0
  43. package/dist/model/TokenListingEventData.js +363 -0
  44. package/dist/model/TokenListingRequestSource.js +61 -0
  45. package/dist/model/TokenListingRequestStatus.js +66 -0
  46. package/dist/model/TokensEventData.js +8 -3
  47. package/dist/model/Transaction.js +22 -5
  48. package/dist/model/TransactionBIP137Destination.js +122 -0
  49. package/dist/model/TransactionBIP322Destination.js +122 -0
  50. package/dist/model/TransactionBabylonBusinessInfo.js +138 -0
  51. package/dist/model/TransactionBabylonTxParameters.js +168 -0
  52. package/dist/model/TransactionCoreStakeInfo.js +168 -0
  53. package/dist/model/TransactionCosmosAdr36Destination.js +122 -0
  54. package/dist/model/TransactionCosmosContractDestination.js +152 -0
  55. package/dist/model/{ListEnableTokenPairs200Response.js → TransactionCosmosMessage.js} +54 -51
  56. package/dist/model/TransactionDestination.js +172 -8
  57. package/dist/model/TransactionDestinationType.js +20 -0
  58. package/dist/model/TransactionDetail.js +29 -7
  59. package/dist/model/TransactionDetails.js +29 -7
  60. package/dist/model/TransactionExtra.js +278 -0
  61. package/dist/model/TransactionExtraType.js +66 -0
  62. package/dist/model/TransactionFuelingInfo.js +3 -3
  63. package/dist/model/TransactionMessageSignBTCEIP191Destination.js +122 -0
  64. package/dist/model/TransactionRbfSource.js +37 -9
  65. package/dist/model/TransactionSelectedUtxo.js +2 -2
  66. package/dist/model/TransactionSubStatus.js +45 -0
  67. package/dist/model/TransactionWebhookEventData.js +37 -10
  68. package/dist/model/UpdateCustodialWalletParams.js +6 -4
  69. package/dist/model/UpdateExchangeWalletParams.js +6 -4
  70. package/dist/model/UpdateMpcWalletParams.js +6 -4
  71. package/dist/model/UpdateSmartContractWalletParams.js +6 -4
  72. package/dist/model/WalletInfoEventData.js +8 -3
  73. package/dist/model/WebhookEventData.js +81 -18
  74. package/dist/model/WebhookEventDataType.js +7 -2
  75. package/dist/model/WebhookEventType.js +10 -0
  76. package/docs/ActivityExtra.md +0 -4
  77. package/docs/AddressEncoding.md +6 -0
  78. package/docs/AddressesEventData.md +3 -1
  79. package/docs/BTCBIP137MessageSignDestination.md +10 -0
  80. package/docs/BTCBIP322MessageSignDestination.md +10 -0
  81. package/docs/BabylonStakingActivityDetailExtra.md +0 -4
  82. package/docs/BankAccount.md +10 -0
  83. package/docs/ChainsEventData.md +3 -1
  84. package/docs/CosmosAdr36MessageSignDestination.md +10 -0
  85. package/docs/CosmosContractCallDestination.md +11 -0
  86. package/docs/CosmosContractCallMessage.md +10 -0
  87. package/docs/CreateSettlement.md +14 -0
  88. package/docs/FeeStationApi.md +13 -13
  89. package/docs/MPCVaultEventData.md +3 -1
  90. package/docs/Merchant.md +11 -0
  91. package/docs/MessageSignDestination.md +3 -0
  92. package/docs/MessageSignDestinationType.md +6 -0
  93. package/docs/Order.md +23 -0
  94. package/docs/OrderStatus.md +18 -0
  95. package/docs/PaymentTransaction.md +16 -0
  96. package/docs/RefreshAddressBalancesByTokenRequest.md +1 -1
  97. package/docs/Refund.md +17 -0
  98. package/docs/RefundStatus.md +18 -0
  99. package/docs/RefundType.md +12 -0
  100. package/docs/SettleRequestStatus.md +18 -0
  101. package/docs/SettleStatus.md +18 -0
  102. package/docs/Settlement.md +12 -0
  103. package/docs/SettlementDetail.md +15 -0
  104. package/docs/SettlementInfo.md +14 -0
  105. package/docs/SettlementType.md +12 -0
  106. package/docs/SwapActivity.md +4 -1
  107. package/docs/SwapActivityStatus.md +14 -0
  108. package/docs/SwapActivityType.md +12 -0
  109. package/docs/SwapQuote.md +3 -4
  110. package/docs/SwapToken.md +14 -0
  111. package/docs/TSSRequestWebhookEventData.md +3 -1
  112. package/docs/TokenListing.md +19 -0
  113. package/docs/TokenListingEventData.md +45 -0
  114. package/docs/TokenListingRequestSource.md +12 -0
  115. package/docs/TokenListingRequestStatus.md +14 -0
  116. package/docs/TokensEventData.md +3 -1
  117. package/docs/Transaction.md +4 -3
  118. package/docs/TransactionBIP137Destination.md +10 -0
  119. package/docs/TransactionBIP322Destination.md +10 -0
  120. package/docs/TransactionBabylonBusinessInfo.md +11 -0
  121. package/docs/TransactionBabylonTxParameters.md +15 -0
  122. package/docs/TransactionCoreStakeInfo.md +14 -0
  123. package/docs/TransactionCosmosAdr36Destination.md +10 -0
  124. package/docs/TransactionCosmosContractDestination.md +11 -0
  125. package/docs/TransactionCosmosMessage.md +10 -0
  126. package/docs/TransactionDestination.md +4 -0
  127. package/docs/TransactionDestinationType.md +8 -0
  128. package/docs/TransactionDetail.md +4 -3
  129. package/docs/TransactionDetails.md +4 -3
  130. package/docs/TransactionExtra.md +21 -0
  131. package/docs/TransactionExtraType.md +14 -0
  132. package/docs/TransactionFuelingInfo.md +2 -2
  133. package/docs/TransactionMessageSignBTCEIP191Destination.md +10 -0
  134. package/docs/TransactionRbfSource.md +1 -1
  135. package/docs/TransactionSelectedUtxo.md +2 -2
  136. package/docs/TransactionSubStatus.md +18 -0
  137. package/docs/TransactionWebhookEventData.md +7 -4
  138. package/docs/TransactionsApi.md +1 -1
  139. package/docs/UpdateCustodialWalletParams.md +1 -1
  140. package/docs/UpdateExchangeWalletParams.md +1 -1
  141. package/docs/UpdateMpcWalletParams.md +1 -1
  142. package/docs/UpdateSmartContractWalletParams.md +1 -1
  143. package/docs/UpdateWalletParams.md +1 -1
  144. package/docs/WalletInfoEventData.md +3 -1
  145. package/docs/WalletsApi.md +5 -5
  146. package/docs/WebhookEventData.md +16 -8
  147. package/docs/WebhookEventDataType.md +3 -1
  148. package/docs/WebhookEventType.md +4 -0
  149. package/package.json +1 -1
  150. package/dist/api/SwapsApi.js +0 -360
  151. package/dist/model/CreateSwapQuote201Response.js +0 -264
  152. package/dist/model/SwapTokenPair.js +0 -100
  153. package/docs/CreateSwapActivityRequest.md +0 -12
  154. package/docs/CreateSwapQuote201Response.md +0 -17
  155. package/docs/CreateSwapQuoteRequest.md +0 -13
  156. package/docs/ListEnableTokenPairs200Response.md +0 -10
  157. package/docs/ListSwapActivities200Response.md +0 -10
  158. package/docs/SwapTokenPair.md +0 -10
  159. package/docs/SwapsApi.md +0 -348
@@ -25,20 +25,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
25
25
  *
26
26
  */
27
27
  /**
28
- * The CreateSwapActivityRequest model module.
29
- * @module model/CreateSwapActivityRequest
28
+ * The Merchant model module.
29
+ * @module model/Merchant
30
30
  */
31
- var CreateSwapActivityRequest = /*#__PURE__*/function () {
31
+ var Merchant = /*#__PURE__*/function () {
32
32
  /**
33
- * Constructs a new <code>CreateSwapActivityRequest</code>.
34
- * @alias module:model/CreateSwapActivityRequest
35
- * @param wallet_id {String} The unique identifier of the wallet.
36
- * @param quote_id {String} The unique identifier of the quote.
37
- * @param slippage_tolerance {String} The slippage tolerance for the swap.
33
+ * Constructs a new <code>Merchant</code>.
34
+ * @alias module:model/Merchant
35
+ * @param merchant_id {String} The merchant ID.
36
+ * @param name {String} The merchant name.
37
+ * @param wallet_id {String} The ID of the associated wallet.
38
38
  */
39
- function CreateSwapActivityRequest(wallet_id, quote_id, slippage_tolerance) {
40
- _classCallCheck(this, CreateSwapActivityRequest);
41
- CreateSwapActivityRequest.initialize(this, wallet_id, quote_id, slippage_tolerance);
39
+ function Merchant(merchant_id, name, wallet_id) {
40
+ _classCallCheck(this, Merchant);
41
+ Merchant.initialize(this, merchant_id, name, wallet_id);
42
42
  }
43
43
 
44
44
  /**
@@ -46,52 +46,49 @@ var CreateSwapActivityRequest = /*#__PURE__*/function () {
46
46
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
47
  * Only for internal use.
48
48
  */
49
- return _createClass(CreateSwapActivityRequest, null, [{
49
+ return _createClass(Merchant, null, [{
50
50
  key: "initialize",
51
- value: function initialize(obj, wallet_id, quote_id, slippage_tolerance) {
51
+ value: function initialize(obj, merchant_id, name, wallet_id) {
52
+ obj['merchant_id'] = merchant_id;
53
+ obj['name'] = name;
52
54
  obj['wallet_id'] = wallet_id;
53
- obj['quote_id'] = quote_id;
54
- obj['slippage_tolerance'] = slippage_tolerance;
55
55
  }
56
56
 
57
57
  /**
58
- * Constructs a <code>CreateSwapActivityRequest</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Constructs a <code>Merchant</code> from a plain JavaScript object, optionally creating a new instance.
59
59
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
60
  * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @param {module:model/CreateSwapActivityRequest} obj Optional instance to populate.
62
- * @return {module:model/CreateSwapActivityRequest} The populated <code>CreateSwapActivityRequest</code> instance.
61
+ * @param {module:model/Merchant} obj Optional instance to populate.
62
+ * @return {module:model/Merchant} The populated <code>Merchant</code> instance.
63
63
  */
64
64
  }, {
65
65
  key: "constructFromObject",
66
66
  value: function constructFromObject(data, obj) {
67
67
  if (data) {
68
- obj = obj || new CreateSwapActivityRequest();
69
- if (data.hasOwnProperty('wallet_id')) {
70
- obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
68
+ obj = obj || new Merchant();
69
+ if (data.hasOwnProperty('merchant_id')) {
70
+ obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
71
71
  }
72
- if (data.hasOwnProperty('quote_id')) {
73
- obj['quote_id'] = _ApiClient["default"].convertToType(data['quote_id'], 'String');
72
+ if (data.hasOwnProperty('name')) {
73
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
74
74
  }
75
- if (data.hasOwnProperty('slippage_tolerance')) {
76
- obj['slippage_tolerance'] = _ApiClient["default"].convertToType(data['slippage_tolerance'], 'String');
77
- }
78
- if (data.hasOwnProperty('app_initiator')) {
79
- obj['app_initiator'] = _ApiClient["default"].convertToType(data['app_initiator'], 'String');
75
+ if (data.hasOwnProperty('wallet_id')) {
76
+ obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
80
77
  }
81
78
  }
82
79
  return obj;
83
80
  }
84
81
 
85
82
  /**
86
- * Validates the JSON data with respect to <code>CreateSwapActivityRequest</code>.
83
+ * Validates the JSON data with respect to <code>Merchant</code>.
87
84
  * @param {Object} data The plain JavaScript object bearing properties of interest.
88
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSwapActivityRequest</code>.
85
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Merchant</code>.
89
86
  */
90
87
  }, {
91
88
  key: "validateJSON",
92
89
  value: function validateJSON(data) {
93
90
  // check to make sure all required properties are present in the JSON string
94
- var _iterator = _createForOfIteratorHelper(CreateSwapActivityRequest.RequiredProperties),
91
+ var _iterator = _createForOfIteratorHelper(Merchant.RequiredProperties),
95
92
  _step;
96
93
  try {
97
94
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -106,48 +103,38 @@ var CreateSwapActivityRequest = /*#__PURE__*/function () {
106
103
  } finally {
107
104
  _iterator.f();
108
105
  }
109
- if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
110
- throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
111
- }
112
- // ensure the json data is a string
113
- if (data['quote_id'] && !(typeof data['quote_id'] === 'string' || data['quote_id'] instanceof String)) {
114
- throw new Error("Expected the field `quote_id` to be a primitive type in the JSON string but got " + data['quote_id']);
106
+ if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
107
+ throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
115
108
  }
116
109
  // ensure the json data is a string
117
- if (data['slippage_tolerance'] && !(typeof data['slippage_tolerance'] === 'string' || data['slippage_tolerance'] instanceof String)) {
118
- throw new Error("Expected the field `slippage_tolerance` to be a primitive type in the JSON string but got " + data['slippage_tolerance']);
110
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
111
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
119
112
  }
120
113
  // ensure the json data is a string
121
- if (data['app_initiator'] && !(typeof data['app_initiator'] === 'string' || data['app_initiator'] instanceof String)) {
122
- throw new Error("Expected the field `app_initiator` to be a primitive type in the JSON string but got " + data['app_initiator']);
114
+ if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
115
+ throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
123
116
  }
124
117
  return true;
125
118
  }
126
119
  }]);
127
120
  }();
128
- CreateSwapActivityRequest.RequiredProperties = ["wallet_id", "quote_id", "slippage_tolerance"];
129
-
130
- /**
131
- * The unique identifier of the wallet.
132
- * @member {String} wallet_id
133
- */
134
- CreateSwapActivityRequest.prototype['wallet_id'] = undefined;
121
+ Merchant.RequiredProperties = ["merchant_id", "name", "wallet_id"];
135
122
 
136
123
  /**
137
- * The unique identifier of the quote.
138
- * @member {String} quote_id
124
+ * The merchant ID.
125
+ * @member {String} merchant_id
139
126
  */
140
- CreateSwapActivityRequest.prototype['quote_id'] = undefined;
127
+ Merchant.prototype['merchant_id'] = undefined;
141
128
 
142
129
  /**
143
- * The slippage tolerance for the swap.
144
- * @member {String} slippage_tolerance
130
+ * The merchant name.
131
+ * @member {String} name
145
132
  */
146
- CreateSwapActivityRequest.prototype['slippage_tolerance'] = undefined;
133
+ Merchant.prototype['name'] = undefined;
147
134
 
148
135
  /**
149
- * The initiator of the app activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.
150
- * @member {String} app_initiator
136
+ * The ID of the associated wallet.
137
+ * @member {String} wallet_id
151
138
  */
152
- CreateSwapActivityRequest.prototype['app_initiator'] = undefined;
153
- var _default = exports["default"] = CreateSwapActivityRequest;
139
+ Merchant.prototype['wallet_id'] = undefined;
140
+ var _default = exports["default"] = Merchant;
@@ -5,7 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _BTCBIP137MessageSignDestination = _interopRequireDefault(require("./BTCBIP137MessageSignDestination"));
9
+ var _BTCBIP322MessageSignDestination = _interopRequireDefault(require("./BTCBIP322MessageSignDestination"));
8
10
  var _BTCEIP191MessageSignDestination = _interopRequireDefault(require("./BTCEIP191MessageSignDestination"));
11
+ var _CosmosAdr36MessageSignDestination = _interopRequireDefault(require("./CosmosAdr36MessageSignDestination"));
9
12
  var _EvmEIP191MessageSignDestination = _interopRequireDefault(require("./EvmEIP191MessageSignDestination"));
10
13
  var _EvmEIP712MessageSignDestination = _interopRequireDefault(require("./EvmEIP712MessageSignDestination"));
11
14
  var _MessageSignDestinationType = _interopRequireDefault(require("./MessageSignDestinationType"));
@@ -36,7 +39,7 @@ var MessageSignDestination = /*#__PURE__*/function () {
36
39
  /**
37
40
  * Constructs a new <code>MessageSignDestination</code>.
38
41
  * @alias module:model/MessageSignDestination
39
- * @param {(module:model/BTCEIP191MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} instance The actual instance to initialize MessageSignDestination.
42
+ * @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/BTCEIP191MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} instance The actual instance to initialize MessageSignDestination.
40
43
  */
41
44
  function MessageSignDestination() {
42
45
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -57,10 +60,22 @@ var MessageSignDestination = /*#__PURE__*/function () {
57
60
  var discriminatorValue = instance["destination_type"];
58
61
  if (discriminatorValue) {
59
62
  switch (discriminatorValue) {
63
+ case "BTC_BIP_137_Signature":
64
+ this.actualInstance = _BTCBIP137MessageSignDestination["default"].constructFromObject(instance);
65
+ match++;
66
+ break;
67
+ case "BTC_BIP_322_Signature":
68
+ this.actualInstance = _BTCBIP322MessageSignDestination["default"].constructFromObject(instance);
69
+ match++;
70
+ break;
60
71
  case "BTC_EIP_191_Signature":
61
72
  this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
62
73
  match++;
63
74
  break;
75
+ case "COSMOS_ADR_36_Signature":
76
+ this.actualInstance = _CosmosAdr36MessageSignDestination["default"].constructFromObject(instance);
77
+ match++;
78
+ break;
64
79
  case "EVM_EIP_191_Signature":
65
80
  this.actualInstance = _EvmEIP191MessageSignDestination["default"].constructFromObject(instance);
66
81
  match++;
@@ -69,7 +84,7 @@ var MessageSignDestination = /*#__PURE__*/function () {
69
84
  this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
70
85
  match++;
71
86
  break;
72
- case "RAW_MESSAGE":
87
+ case "Raw_Message_Signature":
73
88
  this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
74
89
  match++;
75
90
  break;
@@ -171,13 +186,82 @@ var MessageSignDestination = /*#__PURE__*/function () {
171
186
  // json data failed to deserialize into BTCEIP191MessageSignDestination
172
187
  errorMessages.push("Failed to construct BTCEIP191MessageSignDestination: " + err);
173
188
  }
189
+ try {
190
+ if (instance instanceof _BTCBIP137MessageSignDestination["default"]) {
191
+ this.actualInstance = instance;
192
+ } else if (!!_BTCBIP137MessageSignDestination["default"].validateJSON && _BTCBIP137MessageSignDestination["default"].validateJSON(instance)) {
193
+ // plain JS object
194
+ // create BTCBIP137MessageSignDestination from JS object
195
+ this.actualInstance = _BTCBIP137MessageSignDestination["default"].constructFromObject(instance);
196
+ } else {
197
+ if (_BTCBIP137MessageSignDestination["default"].constructFromObject(instance)) {
198
+ if (!!_BTCBIP137MessageSignDestination["default"].constructFromObject(instance).toJSON) {
199
+ if (_BTCBIP137MessageSignDestination["default"].constructFromObject(instance).toJSON()) {
200
+ this.actualInstance = _BTCBIP137MessageSignDestination["default"].constructFromObject(instance);
201
+ }
202
+ } else {
203
+ this.actualInstance = _BTCBIP137MessageSignDestination["default"].constructFromObject(instance);
204
+ }
205
+ }
206
+ }
207
+ match++;
208
+ } catch (err) {
209
+ // json data failed to deserialize into BTCBIP137MessageSignDestination
210
+ errorMessages.push("Failed to construct BTCBIP137MessageSignDestination: " + err);
211
+ }
212
+ try {
213
+ if (instance instanceof _BTCBIP322MessageSignDestination["default"]) {
214
+ this.actualInstance = instance;
215
+ } else if (!!_BTCBIP322MessageSignDestination["default"].validateJSON && _BTCBIP322MessageSignDestination["default"].validateJSON(instance)) {
216
+ // plain JS object
217
+ // create BTCBIP322MessageSignDestination from JS object
218
+ this.actualInstance = _BTCBIP322MessageSignDestination["default"].constructFromObject(instance);
219
+ } else {
220
+ if (_BTCBIP322MessageSignDestination["default"].constructFromObject(instance)) {
221
+ if (!!_BTCBIP322MessageSignDestination["default"].constructFromObject(instance).toJSON) {
222
+ if (_BTCBIP322MessageSignDestination["default"].constructFromObject(instance).toJSON()) {
223
+ this.actualInstance = _BTCBIP322MessageSignDestination["default"].constructFromObject(instance);
224
+ }
225
+ } else {
226
+ this.actualInstance = _BTCBIP322MessageSignDestination["default"].constructFromObject(instance);
227
+ }
228
+ }
229
+ }
230
+ match++;
231
+ } catch (err) {
232
+ // json data failed to deserialize into BTCBIP322MessageSignDestination
233
+ errorMessages.push("Failed to construct BTCBIP322MessageSignDestination: " + err);
234
+ }
235
+ try {
236
+ if (instance instanceof _CosmosAdr36MessageSignDestination["default"]) {
237
+ this.actualInstance = instance;
238
+ } else if (!!_CosmosAdr36MessageSignDestination["default"].validateJSON && _CosmosAdr36MessageSignDestination["default"].validateJSON(instance)) {
239
+ // plain JS object
240
+ // create CosmosAdr36MessageSignDestination from JS object
241
+ this.actualInstance = _CosmosAdr36MessageSignDestination["default"].constructFromObject(instance);
242
+ } else {
243
+ if (_CosmosAdr36MessageSignDestination["default"].constructFromObject(instance)) {
244
+ if (!!_CosmosAdr36MessageSignDestination["default"].constructFromObject(instance).toJSON) {
245
+ if (_CosmosAdr36MessageSignDestination["default"].constructFromObject(instance).toJSON()) {
246
+ this.actualInstance = _CosmosAdr36MessageSignDestination["default"].constructFromObject(instance);
247
+ }
248
+ } else {
249
+ this.actualInstance = _CosmosAdr36MessageSignDestination["default"].constructFromObject(instance);
250
+ }
251
+ }
252
+ }
253
+ match++;
254
+ } catch (err) {
255
+ // json data failed to deserialize into CosmosAdr36MessageSignDestination
256
+ errorMessages.push("Failed to construct CosmosAdr36MessageSignDestination: " + err);
257
+ }
174
258
 
175
259
  // if (match > 1) {
176
- // throw new Error("Multiple matches found constructing `MessageSignDestination` with oneOf schemas BTCEIP191MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination, RawMessageSignDestination. Input: " + JSON.stringify(instance));
260
+ // throw new Error("Multiple matches found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, BTCEIP191MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination, RawMessageSignDestination. Input: " + JSON.stringify(instance));
177
261
  // } else
178
262
  if (match === 0) {
179
263
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
180
- // throw new Error("No match found constructing `MessageSignDestination` with oneOf schemas BTCEIP191MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination, RawMessageSignDestination. Details: " +
264
+ // throw new Error("No match found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, BTCEIP191MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination, RawMessageSignDestination. Details: " +
181
265
  // errorMessages.join(", "));
182
266
  return;
183
267
  } else {// only 1 match
@@ -196,16 +280,16 @@ var MessageSignDestination = /*#__PURE__*/function () {
196
280
  key: "getActualInstance",
197
281
  value:
198
282
  /**
199
- * Gets the actual instance, which can be <code>BTCEIP191MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>, <code>RawMessageSignDestination</code>.
200
- * @return {(module:model/BTCEIP191MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} The actual instance.
283
+ * Gets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>BTCEIP191MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>, <code>RawMessageSignDestination</code>.
284
+ * @return {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/BTCEIP191MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} The actual instance.
201
285
  */
202
286
  function getActualInstance() {
203
287
  return this.actualInstance;
204
288
  }
205
289
 
206
290
  /**
207
- * Sets the actual instance, which can be <code>BTCEIP191MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>, <code>RawMessageSignDestination</code>.
208
- * @param {(module:model/BTCEIP191MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} obj The actual instance.
291
+ * Sets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>BTCEIP191MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>, <code>RawMessageSignDestination</code>.
292
+ * @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/BTCEIP191MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} obj The actual instance.
209
293
  */
210
294
  }, {
211
295
  key: "setActualInstance",
@@ -250,5 +334,23 @@ MessageSignDestination.prototype['structured_data'] = undefined;
250
334
  * @member {String} msg_hash
251
335
  */
252
336
  MessageSignDestination.prototype['msg_hash'] = undefined;
253
- MessageSignDestination.OneOf = ["BTCEIP191MessageSignDestination", "EvmEIP191MessageSignDestination", "EvmEIP712MessageSignDestination", "RawMessageSignDestination"];
337
+
338
+ /**
339
+ * Message to be signed, in hexadecimal format.
340
+ * @member {String} message_bip137
341
+ */
342
+ MessageSignDestination.prototype['message_bip137'] = undefined;
343
+
344
+ /**
345
+ * Message to be signed, in hexadecimal format.
346
+ * @member {String} message_bip322
347
+ */
348
+ MessageSignDestination.prototype['message_bip322'] = undefined;
349
+
350
+ /**
351
+ * Message to be signed, in hexadecimal format.
352
+ * @member {String} message_cosmos_adr36
353
+ */
354
+ MessageSignDestination.prototype['message_cosmos_adr36'] = undefined;
355
+ MessageSignDestination.OneOf = ["BTCBIP137MessageSignDestination", "BTCBIP322MessageSignDestination", "BTCEIP191MessageSignDestination", "CosmosAdr36MessageSignDestination", "EvmEIP191MessageSignDestination", "EvmEIP712MessageSignDestination", "RawMessageSignDestination"];
254
356
  var _default = exports["default"] = MessageSignDestination;
@@ -45,6 +45,21 @@ var MessageSignDestinationType = exports["default"] = /*#__PURE__*/function () {
45
45
  * @const
46
46
  */
47
47
  _defineProperty(this, "BTC_EIP_191_Signature", "BTC_EIP_191_Signature");
48
+ /**
49
+ * value: "BTC_BIP_137_Signature"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "BTC_BIP_137_Signature", "BTC_BIP_137_Signature");
53
+ /**
54
+ * value: "BTC_BIP_322_Signature"
55
+ * @const
56
+ */
57
+ _defineProperty(this, "BTC_BIP_322_Signature", "BTC_BIP_322_Signature");
58
+ /**
59
+ * value: "COSMOS_ADR_36_Signature"
60
+ * @const
61
+ */
62
+ _defineProperty(this, "COSMOS_ADR_36_Signature", "COSMOS_ADR_36_Signature");
48
63
  /**
49
64
  * value: "Raw_Message_Signature"
50
65
  * @const