@cobo/cobo-waas2 1.1.1 → 1.1.2
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 +1 -1
- package/dist/ApiClient.js +1 -1
- package/dist/model/Activity.js +3 -1
- package/dist/model/AddressTransferDestination.js +3 -1
- package/dist/model/AssetBalance.js +3 -1
- package/dist/model/CoboSafeDelegate.js +3 -3
- package/dist/model/ContractCallDestination.js +3 -3
- package/dist/model/ContractCallParams.js +9 -3
- package/dist/model/ContractCallSource.js +6 -6
- package/dist/model/CreateSafeWalletParams.js +3 -1
- package/dist/model/CreateSmartContractWalletParams.js +3 -3
- package/dist/model/CreateStakeActivity.js +9 -3
- package/dist/model/CreateStakeActivityExtra.js +9 -9
- package/dist/model/CreateTssRequestRequest.js +3 -1
- package/dist/model/CreateUnstakeActivity.js +3 -1
- package/dist/model/CreateWalletParams.js +9 -9
- package/dist/model/CreateWithdrawActivity.js +3 -1
- package/dist/model/CreatedWalletInfo.js +9 -9
- package/dist/model/EstimateContractCallFeeParams.js +6 -2
- package/dist/model/EstimateFeeParams.js +6 -6
- package/dist/model/EstimateStakeFee.js +9 -3
- package/dist/model/EstimateTransferFeeParams.js +6 -2
- package/dist/model/EstimateUnstakeFee.js +3 -1
- package/dist/model/EstimateWithdrawFee.js +3 -1
- package/dist/model/EstimatedEvmEip1559Fee.js +9 -3
- package/dist/model/EstimatedEvmLegacyFee.js +9 -3
- package/dist/model/EstimatedFee.js +12 -12
- package/dist/model/EstimatedUtxoFee.js +9 -3
- package/dist/model/EvmEip1559FeeRate.js +9 -3
- package/dist/model/EvmLegacyFeeRate.js +9 -3
- package/dist/model/FeeRate.js +12 -12
- package/dist/model/ListAddresses200Response.js +3 -1
- package/dist/model/ListKeyShareHolderGroups200Response.js +3 -1
- package/dist/model/ListMpcProjects200Response.js +3 -1
- package/dist/model/ListMpcVaults200Response.js +3 -1
- package/dist/model/ListSupportedChains200Response.js +3 -1
- package/dist/model/ListSupportedTokens200Response.js +3 -1
- package/dist/model/ListTokenBalancesForAddress200Response.js +3 -1
- package/dist/model/ListTransactions200Response.js +3 -1
- package/dist/model/ListTssRequests200Response.js +3 -1
- package/dist/model/ListUtxos200Response.js +3 -1
- package/dist/model/ListWallets200Response.js +3 -1
- package/dist/model/ListWebhookEndpoints200Response.js +3 -1
- package/dist/model/ListWebhookEventLogs200Response.js +3 -1
- package/dist/model/ListWebhookEvents200Response.js +3 -1
- package/dist/model/MaxTransferableValue.js +3 -1
- package/dist/model/MessageSignDestination.js +6 -6
- package/dist/model/MessageSignParams.js +6 -2
- package/dist/model/MessageSignSource.js +3 -3
- package/dist/model/PoolDetailsAllOfValidatorsInfo.js +6 -6
- package/dist/model/SafeContractCallSource.js +3 -1
- package/dist/model/SafeTransferSource.js +3 -1
- package/dist/model/SafeWallet.js +3 -1
- package/dist/model/SmartContractWalletInfo.js +3 -3
- package/dist/model/StakingSource.js +6 -6
- package/dist/model/Stakings.js +3 -1
- package/dist/model/SubWalletAssetBalance.js +3 -1
- package/dist/model/TSSRequest.js +3 -1
- package/dist/model/TokenBalance.js +3 -1
- package/dist/model/Transaction.js +21 -7
- package/dist/model/TransactionDestination.js +21 -21
- package/dist/model/TransactionDetail.js +21 -7
- package/dist/model/TransactionDetails.js +24 -8
- package/dist/model/TransactionFee.js +12 -12
- package/dist/model/TransactionRbf.js +6 -2
- package/dist/model/TransactionRbfSource.js +3 -3
- package/dist/model/TransactionRequestFee.js +12 -12
- package/dist/model/TransactionResult.js +3 -3
- package/dist/model/TransactionSmartContractSafeWalletSource.js +3 -1
- package/dist/model/TransactionSource.js +21 -21
- package/dist/model/TransactionTransferToAddressDestination.js +3 -1
- package/dist/model/TransactionWebhookEventData.js +21 -7
- package/dist/model/TransferDestination.js +6 -6
- package/dist/model/TransferParams.js +9 -3
- package/dist/model/TransferSource.js +12 -12
- package/dist/model/UpdateWalletParams.js +12 -12
- package/dist/model/UtxoFeeRate.js +9 -3
- package/dist/model/WalletInfo.js +12 -12
- package/dist/model/WebhookEvent.js +3 -1
- package/dist/model/WebhookEventData.js +3 -3
- package/dist/model/WebhookEventLog.js +3 -1
- package/package.json +1 -1
|
@@ -246,22 +246,30 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
|
|
|
246
246
|
// validate the optional field `source`
|
|
247
247
|
if (data['source']) {
|
|
248
248
|
// data not null
|
|
249
|
-
_TransactionSource["default"].validateJSON
|
|
249
|
+
if (!!_TransactionSource["default"].validateJSON) {
|
|
250
|
+
_TransactionSource["default"].validateJSON(data['source']);
|
|
251
|
+
}
|
|
250
252
|
}
|
|
251
253
|
// validate the optional field `destination`
|
|
252
254
|
if (data['destination']) {
|
|
253
255
|
// data not null
|
|
254
|
-
_TransactionDestination["default"].validateJSON
|
|
256
|
+
if (!!_TransactionDestination["default"].validateJSON) {
|
|
257
|
+
_TransactionDestination["default"].validateJSON(data['destination']);
|
|
258
|
+
}
|
|
255
259
|
}
|
|
256
260
|
// validate the optional field `result`
|
|
257
261
|
if (data['result']) {
|
|
258
262
|
// data not null
|
|
259
|
-
_TransactionResult["default"].validateJSON
|
|
263
|
+
if (!!_TransactionResult["default"].validateJSON) {
|
|
264
|
+
_TransactionResult["default"].validateJSON(data['result']);
|
|
265
|
+
}
|
|
260
266
|
}
|
|
261
267
|
// validate the optional field `fee`
|
|
262
268
|
if (data['fee']) {
|
|
263
269
|
// data not null
|
|
264
|
-
_TransactionFee["default"].validateJSON
|
|
270
|
+
if (!!_TransactionFee["default"].validateJSON) {
|
|
271
|
+
_TransactionFee["default"].validateJSON(data['fee']);
|
|
272
|
+
}
|
|
265
273
|
}
|
|
266
274
|
// ensure the json data is a string
|
|
267
275
|
if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
|
|
@@ -274,17 +282,23 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
|
|
|
274
282
|
// validate the optional field `block_info`
|
|
275
283
|
if (data['block_info']) {
|
|
276
284
|
// data not null
|
|
277
|
-
_TransactionBlockInfo["default"].validateJSON
|
|
285
|
+
if (!!_TransactionBlockInfo["default"].validateJSON) {
|
|
286
|
+
_TransactionBlockInfo["default"].validateJSON(data['block_info']);
|
|
287
|
+
}
|
|
278
288
|
}
|
|
279
289
|
// validate the optional field `raw_tx_info`
|
|
280
290
|
if (data['raw_tx_info']) {
|
|
281
291
|
// data not null
|
|
282
|
-
_TransactionRawTxInfo["default"].validateJSON
|
|
292
|
+
if (!!_TransactionRawTxInfo["default"].validateJSON) {
|
|
293
|
+
_TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
|
|
294
|
+
}
|
|
283
295
|
}
|
|
284
296
|
// validate the optional field `replacement`
|
|
285
297
|
if (data['replacement']) {
|
|
286
298
|
// data not null
|
|
287
|
-
_TransactionReplacement["default"].validateJSON
|
|
299
|
+
if (!!_TransactionReplacement["default"].validateJSON) {
|
|
300
|
+
_TransactionReplacement["default"].validateJSON(data['replacement']);
|
|
301
|
+
}
|
|
288
302
|
}
|
|
289
303
|
// ensure the json data is an array
|
|
290
304
|
if (!Array.isArray(data['category'])) {
|
|
@@ -57,12 +57,12 @@ var TransferDestination = /*#__PURE__*/function () {
|
|
|
57
57
|
try {
|
|
58
58
|
if (instance instanceof _AddressTransferDestination["default"]) {
|
|
59
59
|
this.actualInstance = instance;
|
|
60
|
-
} else if (_AddressTransferDestination["default"].validateJSON(instance)) {
|
|
60
|
+
} else if (!!_AddressTransferDestination["default"].validateJSON && _AddressTransferDestination["default"].validateJSON(instance)) {
|
|
61
61
|
// plain JS object
|
|
62
62
|
// create AddressTransferDestination from JS object
|
|
63
63
|
this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
|
|
64
|
-
} else {
|
|
65
|
-
|
|
64
|
+
} else if (_AddressTransferDestination["default"].constructFromObject(instance)) {
|
|
65
|
+
this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
|
|
66
66
|
}
|
|
67
67
|
match++;
|
|
68
68
|
} catch (err) {
|
|
@@ -72,12 +72,12 @@ var TransferDestination = /*#__PURE__*/function () {
|
|
|
72
72
|
try {
|
|
73
73
|
if (instance instanceof _ExchangeTransferDestination["default"]) {
|
|
74
74
|
this.actualInstance = instance;
|
|
75
|
-
} else if (_ExchangeTransferDestination["default"].validateJSON(instance)) {
|
|
75
|
+
} else if (!!_ExchangeTransferDestination["default"].validateJSON && _ExchangeTransferDestination["default"].validateJSON(instance)) {
|
|
76
76
|
// plain JS object
|
|
77
77
|
// create ExchangeTransferDestination from JS object
|
|
78
78
|
this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
|
|
79
|
-
} else {
|
|
80
|
-
|
|
79
|
+
} else if (_ExchangeTransferDestination["default"].constructFromObject(instance)) {
|
|
80
|
+
this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
|
|
81
81
|
}
|
|
82
82
|
match++;
|
|
83
83
|
} catch (err) {
|
|
@@ -127,7 +127,9 @@ var TransferParams = /*#__PURE__*/function () {
|
|
|
127
127
|
// validate the optional field `source`
|
|
128
128
|
if (data['source']) {
|
|
129
129
|
// data not null
|
|
130
|
-
_TransferSource["default"].validateJSON
|
|
130
|
+
if (!!_TransferSource["default"].validateJSON) {
|
|
131
|
+
_TransferSource["default"].validateJSON(data['source']);
|
|
132
|
+
}
|
|
131
133
|
}
|
|
132
134
|
// ensure the json data is a string
|
|
133
135
|
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
@@ -136,7 +138,9 @@ var TransferParams = /*#__PURE__*/function () {
|
|
|
136
138
|
// validate the optional field `destination`
|
|
137
139
|
if (data['destination']) {
|
|
138
140
|
// data not null
|
|
139
|
-
_TransferDestination["default"].validateJSON
|
|
141
|
+
if (!!_TransferDestination["default"].validateJSON) {
|
|
142
|
+
_TransferDestination["default"].validateJSON(data['destination']);
|
|
143
|
+
}
|
|
140
144
|
}
|
|
141
145
|
// ensure the json data is an array
|
|
142
146
|
if (!Array.isArray(data['category_names'])) {
|
|
@@ -149,7 +153,9 @@ var TransferParams = /*#__PURE__*/function () {
|
|
|
149
153
|
// validate the optional field `fee`
|
|
150
154
|
if (data['fee']) {
|
|
151
155
|
// data not null
|
|
152
|
-
_TransactionRequestFee["default"].validateJSON
|
|
156
|
+
if (!!_TransactionRequestFee["default"].validateJSON) {
|
|
157
|
+
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
158
|
+
}
|
|
153
159
|
}
|
|
154
160
|
return true;
|
|
155
161
|
}
|
|
@@ -59,12 +59,12 @@ var TransferSource = /*#__PURE__*/function () {
|
|
|
59
59
|
try {
|
|
60
60
|
if (instance instanceof _CustodialTransferSource["default"]) {
|
|
61
61
|
this.actualInstance = instance;
|
|
62
|
-
} else if (_CustodialTransferSource["default"].validateJSON(instance)) {
|
|
62
|
+
} else if (!!_CustodialTransferSource["default"].validateJSON && _CustodialTransferSource["default"].validateJSON(instance)) {
|
|
63
63
|
// plain JS object
|
|
64
64
|
// create CustodialTransferSource from JS object
|
|
65
65
|
this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
|
|
66
|
-
} else {
|
|
67
|
-
|
|
66
|
+
} else if (_CustodialTransferSource["default"].constructFromObject(instance)) {
|
|
67
|
+
this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
|
|
68
68
|
}
|
|
69
69
|
match++;
|
|
70
70
|
} catch (err) {
|
|
@@ -74,12 +74,12 @@ var TransferSource = /*#__PURE__*/function () {
|
|
|
74
74
|
try {
|
|
75
75
|
if (instance instanceof _MpcTransferSource["default"]) {
|
|
76
76
|
this.actualInstance = instance;
|
|
77
|
-
} else if (_MpcTransferSource["default"].validateJSON(instance)) {
|
|
77
|
+
} else if (!!_MpcTransferSource["default"].validateJSON && _MpcTransferSource["default"].validateJSON(instance)) {
|
|
78
78
|
// plain JS object
|
|
79
79
|
// create MpcTransferSource from JS object
|
|
80
80
|
this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
|
|
81
|
-
} else {
|
|
82
|
-
|
|
81
|
+
} else if (_MpcTransferSource["default"].constructFromObject(instance)) {
|
|
82
|
+
this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
|
|
83
83
|
}
|
|
84
84
|
match++;
|
|
85
85
|
} catch (err) {
|
|
@@ -89,12 +89,12 @@ var TransferSource = /*#__PURE__*/function () {
|
|
|
89
89
|
try {
|
|
90
90
|
if (instance instanceof _SafeTransferSource["default"]) {
|
|
91
91
|
this.actualInstance = instance;
|
|
92
|
-
} else if (_SafeTransferSource["default"].validateJSON(instance)) {
|
|
92
|
+
} else if (!!_SafeTransferSource["default"].validateJSON && _SafeTransferSource["default"].validateJSON(instance)) {
|
|
93
93
|
// plain JS object
|
|
94
94
|
// create SafeTransferSource from JS object
|
|
95
95
|
this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
|
|
96
|
-
} else {
|
|
97
|
-
|
|
96
|
+
} else if (_SafeTransferSource["default"].constructFromObject(instance)) {
|
|
97
|
+
this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
|
|
98
98
|
}
|
|
99
99
|
match++;
|
|
100
100
|
} catch (err) {
|
|
@@ -104,12 +104,12 @@ var TransferSource = /*#__PURE__*/function () {
|
|
|
104
104
|
try {
|
|
105
105
|
if (instance instanceof _ExchangeTransferSource["default"]) {
|
|
106
106
|
this.actualInstance = instance;
|
|
107
|
-
} else if (_ExchangeTransferSource["default"].validateJSON(instance)) {
|
|
107
|
+
} else if (!!_ExchangeTransferSource["default"].validateJSON && _ExchangeTransferSource["default"].validateJSON(instance)) {
|
|
108
108
|
// plain JS object
|
|
109
109
|
// create ExchangeTransferSource from JS object
|
|
110
110
|
this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
|
|
111
|
-
} else {
|
|
112
|
-
|
|
111
|
+
} else if (_ExchangeTransferSource["default"].constructFromObject(instance)) {
|
|
112
|
+
this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
|
|
113
113
|
}
|
|
114
114
|
match++;
|
|
115
115
|
} catch (err) {
|
|
@@ -57,12 +57,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
57
57
|
try {
|
|
58
58
|
if (instance instanceof _UpdateCustodialWalletParams["default"]) {
|
|
59
59
|
this.actualInstance = instance;
|
|
60
|
-
} else if (_UpdateCustodialWalletParams["default"].validateJSON(instance)) {
|
|
60
|
+
} else if (!!_UpdateCustodialWalletParams["default"].validateJSON && _UpdateCustodialWalletParams["default"].validateJSON(instance)) {
|
|
61
61
|
// plain JS object
|
|
62
62
|
// create UpdateCustodialWalletParams from JS object
|
|
63
63
|
this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
|
|
64
|
-
} else {
|
|
65
|
-
|
|
64
|
+
} else if (_UpdateCustodialWalletParams["default"].constructFromObject(instance)) {
|
|
65
|
+
this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
|
|
66
66
|
}
|
|
67
67
|
match++;
|
|
68
68
|
} catch (err) {
|
|
@@ -72,12 +72,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
72
72
|
try {
|
|
73
73
|
if (instance instanceof _UpdateMpcWalletParams["default"]) {
|
|
74
74
|
this.actualInstance = instance;
|
|
75
|
-
} else if (_UpdateMpcWalletParams["default"].validateJSON(instance)) {
|
|
75
|
+
} else if (!!_UpdateMpcWalletParams["default"].validateJSON && _UpdateMpcWalletParams["default"].validateJSON(instance)) {
|
|
76
76
|
// plain JS object
|
|
77
77
|
// create UpdateMpcWalletParams from JS object
|
|
78
78
|
this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
|
|
79
|
-
} else {
|
|
80
|
-
|
|
79
|
+
} else if (_UpdateMpcWalletParams["default"].constructFromObject(instance)) {
|
|
80
|
+
this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
|
|
81
81
|
}
|
|
82
82
|
match++;
|
|
83
83
|
} catch (err) {
|
|
@@ -87,12 +87,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
87
87
|
try {
|
|
88
88
|
if (instance instanceof _UpdateSmartContractWalletParams["default"]) {
|
|
89
89
|
this.actualInstance = instance;
|
|
90
|
-
} else if (_UpdateSmartContractWalletParams["default"].validateJSON(instance)) {
|
|
90
|
+
} else if (!!_UpdateSmartContractWalletParams["default"].validateJSON && _UpdateSmartContractWalletParams["default"].validateJSON(instance)) {
|
|
91
91
|
// plain JS object
|
|
92
92
|
// create UpdateSmartContractWalletParams from JS object
|
|
93
93
|
this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
|
|
94
|
-
} else {
|
|
95
|
-
|
|
94
|
+
} else if (_UpdateSmartContractWalletParams["default"].constructFromObject(instance)) {
|
|
95
|
+
this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
|
|
96
96
|
}
|
|
97
97
|
match++;
|
|
98
98
|
} catch (err) {
|
|
@@ -102,12 +102,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
102
102
|
try {
|
|
103
103
|
if (instance instanceof _UpdateExchangeWalletParams["default"]) {
|
|
104
104
|
this.actualInstance = instance;
|
|
105
|
-
} else if (_UpdateExchangeWalletParams["default"].validateJSON(instance)) {
|
|
105
|
+
} else if (!!_UpdateExchangeWalletParams["default"].validateJSON && _UpdateExchangeWalletParams["default"].validateJSON(instance)) {
|
|
106
106
|
// plain JS object
|
|
107
107
|
// create UpdateExchangeWalletParams from JS object
|
|
108
108
|
this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
|
|
109
|
-
} else {
|
|
110
|
-
|
|
109
|
+
} else if (_UpdateExchangeWalletParams["default"].constructFromObject(instance)) {
|
|
110
|
+
this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
|
|
111
111
|
}
|
|
112
112
|
match++;
|
|
113
113
|
} catch (err) {
|
|
@@ -118,17 +118,23 @@ var UtxoFeeRate = /*#__PURE__*/function () {
|
|
|
118
118
|
// validate the optional field `slow`
|
|
119
119
|
if (data['slow']) {
|
|
120
120
|
// data not null
|
|
121
|
-
_UtxoFeeBasePrice["default"].validateJSON
|
|
121
|
+
if (!!_UtxoFeeBasePrice["default"].validateJSON) {
|
|
122
|
+
_UtxoFeeBasePrice["default"].validateJSON(data['slow']);
|
|
123
|
+
}
|
|
122
124
|
}
|
|
123
125
|
// validate the optional field `recommended`
|
|
124
126
|
if (data['recommended']) {
|
|
125
127
|
// data not null
|
|
126
|
-
_UtxoFeeBasePrice["default"].validateJSON
|
|
128
|
+
if (!!_UtxoFeeBasePrice["default"].validateJSON) {
|
|
129
|
+
_UtxoFeeBasePrice["default"].validateJSON(data['recommended']);
|
|
130
|
+
}
|
|
127
131
|
}
|
|
128
132
|
// validate the optional field `fast`
|
|
129
133
|
if (data['fast']) {
|
|
130
134
|
// data not null
|
|
131
|
-
_UtxoFeeBasePrice["default"].validateJSON
|
|
135
|
+
if (!!_UtxoFeeBasePrice["default"].validateJSON) {
|
|
136
|
+
_UtxoFeeBasePrice["default"].validateJSON(data['fast']);
|
|
137
|
+
}
|
|
132
138
|
}
|
|
133
139
|
return true;
|
|
134
140
|
}
|
package/dist/model/WalletInfo.js
CHANGED
|
@@ -61,12 +61,12 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
61
61
|
try {
|
|
62
62
|
if (instance instanceof _CustodialWalletInfo["default"]) {
|
|
63
63
|
this.actualInstance = instance;
|
|
64
|
-
} else if (_CustodialWalletInfo["default"].validateJSON(instance)) {
|
|
64
|
+
} else if (!!_CustodialWalletInfo["default"].validateJSON && _CustodialWalletInfo["default"].validateJSON(instance)) {
|
|
65
65
|
// plain JS object
|
|
66
66
|
// create CustodialWalletInfo from JS object
|
|
67
67
|
this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
|
|
68
|
-
} else {
|
|
69
|
-
|
|
68
|
+
} else if (_CustodialWalletInfo["default"].constructFromObject(instance)) {
|
|
69
|
+
this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
|
|
70
70
|
}
|
|
71
71
|
match++;
|
|
72
72
|
} catch (err) {
|
|
@@ -76,12 +76,12 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
76
76
|
try {
|
|
77
77
|
if (instance instanceof _MPCWalletInfo["default"]) {
|
|
78
78
|
this.actualInstance = instance;
|
|
79
|
-
} else if (_MPCWalletInfo["default"].validateJSON(instance)) {
|
|
79
|
+
} else if (!!_MPCWalletInfo["default"].validateJSON && _MPCWalletInfo["default"].validateJSON(instance)) {
|
|
80
80
|
// plain JS object
|
|
81
81
|
// create MPCWalletInfo from JS object
|
|
82
82
|
this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
|
|
83
|
-
} else {
|
|
84
|
-
|
|
83
|
+
} else if (_MPCWalletInfo["default"].constructFromObject(instance)) {
|
|
84
|
+
this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
|
|
85
85
|
}
|
|
86
86
|
match++;
|
|
87
87
|
} catch (err) {
|
|
@@ -91,12 +91,12 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
91
91
|
try {
|
|
92
92
|
if (instance instanceof _SmartContractWalletInfo["default"]) {
|
|
93
93
|
this.actualInstance = instance;
|
|
94
|
-
} else if (_SmartContractWalletInfo["default"].validateJSON(instance)) {
|
|
94
|
+
} else if (!!_SmartContractWalletInfo["default"].validateJSON && _SmartContractWalletInfo["default"].validateJSON(instance)) {
|
|
95
95
|
// plain JS object
|
|
96
96
|
// create SmartContractWalletInfo from JS object
|
|
97
97
|
this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
|
|
98
|
-
} else {
|
|
99
|
-
|
|
98
|
+
} else if (_SmartContractWalletInfo["default"].constructFromObject(instance)) {
|
|
99
|
+
this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
|
|
100
100
|
}
|
|
101
101
|
match++;
|
|
102
102
|
} catch (err) {
|
|
@@ -106,12 +106,12 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
106
106
|
try {
|
|
107
107
|
if (instance instanceof _ExchangeWalletInfo["default"]) {
|
|
108
108
|
this.actualInstance = instance;
|
|
109
|
-
} else if (_ExchangeWalletInfo["default"].validateJSON(instance)) {
|
|
109
|
+
} else if (!!_ExchangeWalletInfo["default"].validateJSON && _ExchangeWalletInfo["default"].validateJSON(instance)) {
|
|
110
110
|
// plain JS object
|
|
111
111
|
// create ExchangeWalletInfo from JS object
|
|
112
112
|
this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
|
|
113
|
-
} else {
|
|
114
|
-
|
|
113
|
+
} else if (_ExchangeWalletInfo["default"].constructFromObject(instance)) {
|
|
114
|
+
this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
|
|
115
115
|
}
|
|
116
116
|
match++;
|
|
117
117
|
} catch (err) {
|
|
@@ -134,7 +134,9 @@ var WebhookEvent = /*#__PURE__*/function () {
|
|
|
134
134
|
// validate the optional field `data`
|
|
135
135
|
if (data['data']) {
|
|
136
136
|
// data not null
|
|
137
|
-
_WebhookEventData["default"].validateJSON
|
|
137
|
+
if (!!_WebhookEventData["default"].validateJSON) {
|
|
138
|
+
_WebhookEventData["default"].validateJSON(data['data']);
|
|
139
|
+
}
|
|
138
140
|
}
|
|
139
141
|
return true;
|
|
140
142
|
}
|
|
@@ -64,12 +64,12 @@ var WebhookEventData = /*#__PURE__*/function () {
|
|
|
64
64
|
try {
|
|
65
65
|
if (instance instanceof _TransactionWebhookEventData["default"]) {
|
|
66
66
|
this.actualInstance = instance;
|
|
67
|
-
} else if (_TransactionWebhookEventData["default"].validateJSON(instance)) {
|
|
67
|
+
} else if (!!_TransactionWebhookEventData["default"].validateJSON && _TransactionWebhookEventData["default"].validateJSON(instance)) {
|
|
68
68
|
// plain JS object
|
|
69
69
|
// create TransactionWebhookEventData from JS object
|
|
70
70
|
this.actualInstance = _TransactionWebhookEventData["default"].constructFromObject(instance);
|
|
71
|
-
} else {
|
|
72
|
-
|
|
71
|
+
} else if (_TransactionWebhookEventData["default"].constructFromObject(instance)) {
|
|
72
|
+
this.actualInstance = _TransactionWebhookEventData["default"].constructFromObject(instance);
|
|
73
73
|
}
|
|
74
74
|
match++;
|
|
75
75
|
} catch (err) {
|
|
@@ -133,7 +133,9 @@ var WebhookEventLog = /*#__PURE__*/function () {
|
|
|
133
133
|
// validate the optional field `request_body`
|
|
134
134
|
if (data['request_body']) {
|
|
135
135
|
// data not null
|
|
136
|
-
_WebhookEvent["default"].validateJSON
|
|
136
|
+
if (!!_WebhookEvent["default"].validateJSON) {
|
|
137
|
+
_WebhookEvent["default"].validateJSON(data['request_body']);
|
|
138
|
+
}
|
|
137
139
|
}
|
|
138
140
|
// ensure the json data is a string
|
|
139
141
|
if (data['response_body'] && !(typeof data['response_body'] === 'string' || data['response_body'] instanceof String)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobo/cobo-waas2",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo’s WaaS API offering. It enables you to access Cobo’s full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features: - A unified API for Cobo’s [all four wallet types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform) - Support for 80+ chains and 3000+ tokens - A comprehensive selection of webhook events - Flexible usage models for MPC wallets, including [Organization-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction) and [User-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction) - Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls - Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction). ",
|
|
5
5
|
"license": "GPL 2.0",
|
|
6
6
|
"main": "dist/index.js",
|