@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.
- package/README.md +54 -18
- package/dist/ApiClient.js +1 -1
- package/dist/api/FeeStationApi.js +18 -18
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/api/WalletsApi.js +8 -8
- package/dist/index.js +260 -43
- package/dist/model/ActivityExtra.js +0 -23
- package/dist/model/AddressEncoding.js +15 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/BTCBIP137MessageSignDestination.js +122 -0
- package/dist/model/BTCBIP322MessageSignDestination.js +122 -0
- package/dist/model/BabylonStakingActivityDetailExtra.js +0 -39
- package/dist/model/{ListSwapActivities200Response.js → BankAccount.js} +51 -51
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CosmosAdr36MessageSignDestination.js +122 -0
- package/dist/model/CosmosContractCallDestination.js +152 -0
- package/dist/model/CosmosContractCallMessage.js +126 -0
- package/dist/model/CreateSettlement.js +174 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/{CreateSwapActivityRequest.js → Merchant.js} +45 -58
- package/dist/model/MessageSignDestination.js +111 -9
- package/dist/model/MessageSignDestinationType.js +15 -0
- package/dist/model/Order.js +306 -0
- package/dist/model/OrderStatus.js +76 -0
- package/dist/model/PaymentTransaction.js +201 -0
- package/dist/model/RefreshAddressBalancesByTokenRequest.js +2 -3
- package/dist/model/Refund.js +237 -0
- package/dist/model/RefundStatus.js +76 -0
- package/dist/model/RefundType.js +61 -0
- package/dist/model/SettleRequestStatus.js +76 -0
- package/dist/model/SettleStatus.js +76 -0
- package/dist/model/Settlement.js +168 -0
- package/dist/model/SettlementDetail.js +184 -0
- package/dist/model/SettlementInfo.js +175 -0
- package/dist/model/SettlementType.js +61 -0
- package/dist/model/SwapActivity.js +36 -5
- package/dist/model/SwapActivityStatus.js +66 -0
- package/dist/model/SwapActivityType.js +61 -0
- package/dist/model/SwapQuote.js +21 -34
- package/dist/model/{CreateSwapQuoteRequest.js → SwapToken.js} +73 -60
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListing.js +230 -0
- package/dist/model/TokenListingEventData.js +363 -0
- package/dist/model/TokenListingRequestSource.js +61 -0
- package/dist/model/TokenListingRequestStatus.js +66 -0
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/Transaction.js +22 -5
- package/dist/model/TransactionBIP137Destination.js +122 -0
- package/dist/model/TransactionBIP322Destination.js +122 -0
- package/dist/model/TransactionBabylonBusinessInfo.js +138 -0
- package/dist/model/TransactionBabylonTxParameters.js +168 -0
- package/dist/model/TransactionCoreStakeInfo.js +168 -0
- package/dist/model/TransactionCosmosAdr36Destination.js +122 -0
- package/dist/model/TransactionCosmosContractDestination.js +152 -0
- package/dist/model/{ListEnableTokenPairs200Response.js → TransactionCosmosMessage.js} +54 -51
- package/dist/model/TransactionDestination.js +172 -8
- package/dist/model/TransactionDestinationType.js +20 -0
- package/dist/model/TransactionDetail.js +29 -7
- package/dist/model/TransactionDetails.js +29 -7
- package/dist/model/TransactionExtra.js +278 -0
- package/dist/model/TransactionExtraType.js +66 -0
- package/dist/model/TransactionFuelingInfo.js +3 -3
- package/dist/model/TransactionMessageSignBTCEIP191Destination.js +122 -0
- package/dist/model/TransactionRbfSource.js +37 -9
- package/dist/model/TransactionSelectedUtxo.js +2 -2
- package/dist/model/TransactionSubStatus.js +45 -0
- package/dist/model/TransactionWebhookEventData.js +37 -10
- package/dist/model/UpdateCustodialWalletParams.js +6 -4
- package/dist/model/UpdateExchangeWalletParams.js +6 -4
- package/dist/model/UpdateMpcWalletParams.js +6 -4
- package/dist/model/UpdateSmartContractWalletParams.js +6 -4
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +81 -18
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/ActivityExtra.md +0 -4
- package/docs/AddressEncoding.md +6 -0
- package/docs/AddressesEventData.md +3 -1
- package/docs/BTCBIP137MessageSignDestination.md +10 -0
- package/docs/BTCBIP322MessageSignDestination.md +10 -0
- package/docs/BabylonStakingActivityDetailExtra.md +0 -4
- package/docs/BankAccount.md +10 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/CosmosAdr36MessageSignDestination.md +10 -0
- package/docs/CosmosContractCallDestination.md +11 -0
- package/docs/CosmosContractCallMessage.md +10 -0
- package/docs/CreateSettlement.md +14 -0
- package/docs/FeeStationApi.md +13 -13
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +11 -0
- package/docs/MessageSignDestination.md +3 -0
- package/docs/MessageSignDestinationType.md +6 -0
- package/docs/Order.md +23 -0
- package/docs/OrderStatus.md +18 -0
- package/docs/PaymentTransaction.md +16 -0
- package/docs/RefreshAddressBalancesByTokenRequest.md +1 -1
- package/docs/Refund.md +17 -0
- package/docs/RefundStatus.md +18 -0
- package/docs/RefundType.md +12 -0
- package/docs/SettleRequestStatus.md +18 -0
- package/docs/SettleStatus.md +18 -0
- package/docs/Settlement.md +12 -0
- package/docs/SettlementDetail.md +15 -0
- package/docs/SettlementInfo.md +14 -0
- package/docs/SettlementType.md +12 -0
- package/docs/SwapActivity.md +4 -1
- package/docs/SwapActivityStatus.md +14 -0
- package/docs/SwapActivityType.md +12 -0
- package/docs/SwapQuote.md +3 -4
- package/docs/SwapToken.md +14 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListing.md +19 -0
- package/docs/TokenListingEventData.md +45 -0
- package/docs/TokenListingRequestSource.md +12 -0
- package/docs/TokenListingRequestStatus.md +14 -0
- package/docs/TokensEventData.md +3 -1
- package/docs/Transaction.md +4 -3
- package/docs/TransactionBIP137Destination.md +10 -0
- package/docs/TransactionBIP322Destination.md +10 -0
- package/docs/TransactionBabylonBusinessInfo.md +11 -0
- package/docs/TransactionBabylonTxParameters.md +15 -0
- package/docs/TransactionCoreStakeInfo.md +14 -0
- package/docs/TransactionCosmosAdr36Destination.md +10 -0
- package/docs/TransactionCosmosContractDestination.md +11 -0
- package/docs/TransactionCosmosMessage.md +10 -0
- package/docs/TransactionDestination.md +4 -0
- package/docs/TransactionDestinationType.md +8 -0
- package/docs/TransactionDetail.md +4 -3
- package/docs/TransactionDetails.md +4 -3
- package/docs/TransactionExtra.md +21 -0
- package/docs/TransactionExtraType.md +14 -0
- package/docs/TransactionFuelingInfo.md +2 -2
- package/docs/TransactionMessageSignBTCEIP191Destination.md +10 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionSelectedUtxo.md +2 -2
- package/docs/TransactionSubStatus.md +18 -0
- package/docs/TransactionWebhookEventData.md +7 -4
- package/docs/TransactionsApi.md +1 -1
- package/docs/UpdateCustodialWalletParams.md +1 -1
- package/docs/UpdateExchangeWalletParams.md +1 -1
- package/docs/UpdateMpcWalletParams.md +1 -1
- package/docs/UpdateSmartContractWalletParams.md +1 -1
- package/docs/UpdateWalletParams.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +5 -5
- package/docs/WebhookEventData.md +16 -8
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/dist/api/SwapsApi.js +0 -360
- package/dist/model/CreateSwapQuote201Response.js +0 -264
- package/dist/model/SwapTokenPair.js +0 -100
- package/docs/CreateSwapActivityRequest.md +0 -12
- package/docs/CreateSwapQuote201Response.md +0 -17
- package/docs/CreateSwapQuoteRequest.md +0 -13
- package/docs/ListEnableTokenPairs200Response.md +0 -10
- package/docs/ListSwapActivities200Response.md +0 -10
- package/docs/SwapTokenPair.md +0 -10
- 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
|
|
29
|
-
* @module model/
|
|
28
|
+
* The Merchant model module.
|
|
29
|
+
* @module model/Merchant
|
|
30
30
|
*/
|
|
31
|
-
var
|
|
31
|
+
var Merchant = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
|
-
* Constructs a new <code>
|
|
34
|
-
* @alias module:model/
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
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
|
|
40
|
-
_classCallCheck(this,
|
|
41
|
-
|
|
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(
|
|
49
|
+
return _createClass(Merchant, null, [{
|
|
50
50
|
key: "initialize",
|
|
51
|
-
value: function initialize(obj,
|
|
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>
|
|
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/
|
|
62
|
-
* @return {module:model/
|
|
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
|
|
69
|
-
if (data.hasOwnProperty('
|
|
70
|
-
obj['
|
|
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('
|
|
73
|
-
obj['
|
|
72
|
+
if (data.hasOwnProperty('name')) {
|
|
73
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
74
74
|
}
|
|
75
|
-
if (data.hasOwnProperty('
|
|
76
|
-
obj['
|
|
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>
|
|
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>
|
|
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(
|
|
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['
|
|
110
|
-
throw new Error("Expected the field `
|
|
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['
|
|
118
|
-
throw new Error("Expected the field `
|
|
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['
|
|
122
|
-
throw new Error("Expected the field `
|
|
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
|
-
|
|
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
|
|
138
|
-
* @member {String}
|
|
124
|
+
* The merchant ID.
|
|
125
|
+
* @member {String} merchant_id
|
|
139
126
|
*/
|
|
140
|
-
|
|
127
|
+
Merchant.prototype['merchant_id'] = undefined;
|
|
141
128
|
|
|
142
129
|
/**
|
|
143
|
-
* The
|
|
144
|
-
* @member {String}
|
|
130
|
+
* The merchant name.
|
|
131
|
+
* @member {String} name
|
|
145
132
|
*/
|
|
146
|
-
|
|
133
|
+
Merchant.prototype['name'] = undefined;
|
|
147
134
|
|
|
148
135
|
/**
|
|
149
|
-
* The
|
|
150
|
-
* @member {String}
|
|
136
|
+
* The ID of the associated wallet.
|
|
137
|
+
* @member {String} wallet_id
|
|
151
138
|
*/
|
|
152
|
-
|
|
153
|
-
var _default = exports["default"] =
|
|
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 "
|
|
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
|
-
|
|
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
|