@cobo/cobo-waas2 1.5.0 → 1.7.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 (166) hide show
  1. package/README.md +31 -5
  2. package/dist/ApiClient.js +56 -6
  3. package/dist/ServerDemo.js +80 -0
  4. package/dist/api/DevelopersApi.js +79 -0
  5. package/dist/api/DevelopersWebhooksApi.js +2 -2
  6. package/dist/api/OAuthApi.js +8 -8
  7. package/dist/api/StakingsApi.js +91 -7
  8. package/dist/api/TransactionsApi.js +4 -4
  9. package/dist/api/WalletsApi.js +58 -57
  10. package/dist/crypto/Ed25519Signer.js +36 -0
  11. package/dist/crypto/Secp256k1Signer.js +36 -0
  12. package/dist/index.js +153 -13
  13. package/dist/model/Activity.js +4 -8
  14. package/dist/model/ActivityAction.js +20 -0
  15. package/dist/model/ActivityType.js +5 -0
  16. package/dist/model/AddressTransferDestination.js +2 -2
  17. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
  18. package/dist/model/AutoFuelType.js +61 -0
  19. package/dist/model/BabylonStakeEstimatedFee.js +118 -0
  20. package/dist/model/BabylonValidator.js +9 -12
  21. package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
  22. package/dist/model/ContractCallParams.js +9 -0
  23. package/dist/model/CoreStakeExtra.js +170 -0
  24. package/dist/model/CoreStakingExtra.js +187 -0
  25. package/dist/model/CreateClaimActivity.js +139 -0
  26. package/dist/model/CreateClaimActivityRequest.js +182 -0
  27. package/dist/model/CreateSmartContractWalletParams.js +1 -1
  28. package/dist/model/CreateStakeActivity.js +4 -8
  29. package/dist/model/CreateStakeActivityExtra.js +94 -8
  30. package/dist/model/CreateStakeActivityRequest.js +5 -10
  31. package/dist/model/CreateUnstakeActivity.js +16 -0
  32. package/dist/model/CreateUnstakeActivityExtra.js +159 -0
  33. package/dist/model/CreateUnstakeActivityRequest.js +20 -0
  34. package/dist/model/CreateWithdrawActivity.js +0 -13
  35. package/dist/model/CreateWithdrawActivityRequest.js +0 -18
  36. package/dist/model/EstimateClaimFee.js +145 -0
  37. package/dist/model/EstimateContractCallFeeParams.js +6 -8
  38. package/dist/model/EstimateFeeParams.js +1 -1
  39. package/dist/model/EstimateStakeFee.js +5 -10
  40. package/dist/model/EstimateTransferFeeParams.js +4 -8
  41. package/dist/model/EstimateUnstakeFee.js +20 -0
  42. package/dist/model/EstimateWithdrawFee.js +0 -18
  43. package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
  44. package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
  45. package/dist/model/EstimatedFee.js +1 -1
  46. package/dist/model/EstimatedFixedFee.js +4 -4
  47. package/dist/model/EstimatedUtxoFeeSlow.js +3 -3
  48. package/dist/model/EthStakeEstimatedFee.js +112 -0
  49. package/dist/model/EthStakeExtra.js +131 -0
  50. package/dist/model/EthStakingExtra.js +162 -0
  51. package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -0
  52. package/dist/model/EthUnstakeExtra.js +131 -0
  53. package/dist/model/FeeAmount.js +1 -1
  54. package/dist/model/FeeGasLimit.js +1 -2
  55. package/dist/model/FeeRate.js +1 -1
  56. package/dist/model/FixedFeeRate.js +2 -2
  57. package/dist/model/GetApiKeyInfo200Response.js +251 -0
  58. package/dist/model/GetStakingEstimationFee201Response.js +144 -43
  59. package/dist/model/GetStakingEstimationFeeRequest.js +41 -19
  60. package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
  61. package/dist/model/GetToken4XXResponse.js +12 -10
  62. package/dist/model/MPCDelegate.js +1 -1
  63. package/dist/model/MPCProject.js +4 -4
  64. package/dist/model/MpcTransferSource.js +2 -2
  65. package/dist/model/Pagination.js +2 -2
  66. package/dist/model/{RefreshToken201Response.js → RefreshToken2XXResponse.js} +21 -21
  67. package/dist/model/RoleScopes.js +128 -0
  68. package/dist/model/Scopes.js +142 -0
  69. package/dist/model/SmartContractWalletInfo.js +1 -1
  70. package/dist/model/StakingPoolId.js +81 -0
  71. package/dist/model/StakingPoolType.js +10 -0
  72. package/dist/model/Stakings.js +10 -14
  73. package/dist/model/StakingsExtra.js +95 -8
  74. package/dist/model/TransactionEvmEip1559Fee.js +2 -4
  75. package/dist/model/TransactionEvmLegacyFee.js +2 -4
  76. package/dist/model/TransactionFee.js +1 -2
  77. package/dist/model/TransactionRbf.js +9 -0
  78. package/dist/model/TransactionRbfSource.js +1 -1
  79. package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -3
  80. package/dist/model/TransactionRequestEvmLegacyFee.js +2 -3
  81. package/dist/model/TransactionRequestFee.js +1 -2
  82. package/dist/model/TransactionRequestFixedFee.js +1 -1
  83. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  84. package/dist/model/TransactionSource.js +1 -1
  85. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
  86. package/dist/model/TransferDestination.js +2 -2
  87. package/dist/model/TransferParams.js +9 -0
  88. package/docs/Activity.md +1 -1
  89. package/docs/ActivityAction.md +8 -0
  90. package/docs/ActivityType.md +2 -0
  91. package/docs/AddressTransferDestination.md +2 -2
  92. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
  93. package/docs/AutoFuelType.md +12 -0
  94. package/docs/BabylonStakeEstimatedFee.md +12 -0
  95. package/docs/BabylonValidator.md +6 -4
  96. package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
  97. package/docs/ContractCallParams.md +1 -0
  98. package/docs/CoreStakeExtra.md +13 -0
  99. package/docs/CoreStakingExtra.md +14 -0
  100. package/docs/CreateClaimActivity.md +11 -0
  101. package/docs/CreateClaimActivityRequest.md +12 -0
  102. package/docs/CreateStakeActivity.md +1 -1
  103. package/docs/CreateStakeActivityExtra.md +5 -0
  104. package/docs/CreateStakeActivityRequest.md +1 -1
  105. package/docs/CreateUnstakeActivity.md +1 -0
  106. package/docs/CreateUnstakeActivityExtra.md +10 -0
  107. package/docs/CreateUnstakeActivityRequest.md +1 -0
  108. package/docs/CreateWithdrawActivity.md +0 -1
  109. package/docs/CreateWithdrawActivityRequest.md +0 -1
  110. package/docs/DevelopersApi.md +55 -0
  111. package/docs/DevelopersWebhooksApi.md +1 -1
  112. package/docs/EstimateClaimFee.md +11 -0
  113. package/docs/EstimateContractCallFeeParams.md +2 -2
  114. package/docs/EstimateFeeParams.md +2 -2
  115. package/docs/EstimateStakeFee.md +1 -1
  116. package/docs/EstimateTransferFeeParams.md +2 -2
  117. package/docs/EstimateUnstakeFee.md +1 -0
  118. package/docs/EstimateWithdrawFee.md +0 -1
  119. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
  120. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
  121. package/docs/EstimatedFee.md +1 -1
  122. package/docs/EstimatedFixedFee.md +1 -1
  123. package/docs/EstimatedUtxoFeeSlow.md +1 -1
  124. package/docs/EthStakeEstimatedFee.md +11 -0
  125. package/docs/EthStakeExtra.md +10 -0
  126. package/docs/EthStakingExtra.md +11 -0
  127. package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
  128. package/docs/EthUnstakeExtra.md +10 -0
  129. package/docs/FeeAmount.md +1 -1
  130. package/docs/FeeGasLimit.md +1 -1
  131. package/docs/FeeRate.md +1 -1
  132. package/docs/FixedFeeRate.md +1 -1
  133. package/docs/GetApiKeyInfo200Response.md +30 -0
  134. package/docs/GetStakingEstimationFee201Response.md +3 -0
  135. package/docs/GetStakingEstimationFeeRequest.md +3 -4
  136. package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
  137. package/docs/GetToken4XXResponse.md +1 -1
  138. package/docs/MPCProject.md +1 -1
  139. package/docs/MpcTransferSource.md +1 -1
  140. package/docs/OAuthApi.md +4 -4
  141. package/docs/Pagination.md +1 -1
  142. package/docs/PoolDetailsAllOfValidatorsInfo.md +6 -4
  143. package/docs/{RefreshToken201Response.md → RefreshToken2XXResponse.md} +1 -1
  144. package/docs/RoleScopes.md +10 -0
  145. package/docs/Scopes.md +13 -0
  146. package/docs/StakingPoolId.md +20 -0
  147. package/docs/StakingPoolType.md +4 -0
  148. package/docs/Stakings.md +2 -2
  149. package/docs/StakingsApi.md +108 -2
  150. package/docs/StakingsExtra.md +5 -0
  151. package/docs/TransactionEvmEip1559Fee.md +1 -1
  152. package/docs/TransactionEvmLegacyFee.md +1 -1
  153. package/docs/TransactionFee.md +1 -1
  154. package/docs/TransactionRbf.md +1 -0
  155. package/docs/TransactionRbfSource.md +1 -1
  156. package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
  157. package/docs/TransactionRequestEvmLegacyFee.md +1 -1
  158. package/docs/TransactionRequestFee.md +1 -1
  159. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
  160. package/docs/TransactionsApi.md +2 -2
  161. package/docs/TransferDestination.md +2 -2
  162. package/docs/TransferParams.md +1 -0
  163. package/docs/WalletsApi.md +54 -54
  164. package/package.json +4 -2
  165. package/dist/model/StakingsValidatorInfo.js +0 -140
  166. package/docs/StakingsValidatorInfo.md +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobo/cobo-waas2",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
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](/v2/guides/overview/introduction). ",
5
5
  "license": "GPL 2.0",
6
6
  "main": "dist/index.js",
@@ -15,8 +15,10 @@
15
15
  "dependencies": {
16
16
  "@babel/cli": "^7.0.0",
17
17
  "crypto-js": "^4.2.0",
18
+ "express": "^4.21.1",
18
19
  "superagent": "^5.3.0",
19
- "tweetnacl": "^1.0.3"
20
+ "tweetnacl": "^1.0.3",
21
+ "elliptic": "^6.6.1"
20
22
  },
21
23
  "devDependencies": {
22
24
  "@babel/core": "^7.0.0",
@@ -1,140 +0,0 @@
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 StakingsValidatorInfo model module.
26
- * @module model/StakingsValidatorInfo
27
- */
28
- var StakingsValidatorInfo = /*#__PURE__*/function () {
29
- /**
30
- * Constructs a new <code>StakingsValidatorInfo</code>.
31
- * The information about the validator.
32
- * @alias module:model/StakingsValidatorInfo
33
- */
34
- function StakingsValidatorInfo() {
35
- _classCallCheck(this, StakingsValidatorInfo);
36
- StakingsValidatorInfo.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(StakingsValidatorInfo, null, [{
45
- key: "initialize",
46
- value: function initialize(obj) {}
47
-
48
- /**
49
- * Constructs a <code>StakingsValidatorInfo</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/StakingsValidatorInfo} obj Optional instance to populate.
53
- * @return {module:model/StakingsValidatorInfo} The populated <code>StakingsValidatorInfo</code> instance.
54
- */
55
- }, {
56
- key: "constructFromObject",
57
- value: function constructFromObject(data, obj) {
58
- if (data) {
59
- obj = obj || new StakingsValidatorInfo();
60
- if (data.hasOwnProperty('icon_url')) {
61
- obj['icon_url'] = _ApiClient["default"].convertToType(data['icon_url'], 'String');
62
- }
63
- if (data.hasOwnProperty('public_key')) {
64
- obj['public_key'] = _ApiClient["default"].convertToType(data['public_key'], 'String');
65
- }
66
- if (data.hasOwnProperty('name')) {
67
- obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
68
- }
69
- if (data.hasOwnProperty('address')) {
70
- obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
71
- }
72
- if (data.hasOwnProperty('commission_rate')) {
73
- obj['commission_rate'] = _ApiClient["default"].convertToType(data['commission_rate'], 'String');
74
- }
75
- }
76
- return obj;
77
- }
78
-
79
- /**
80
- * Validates the JSON data with respect to <code>StakingsValidatorInfo</code>.
81
- * @param {Object} data The plain JavaScript object bearing properties of interest.
82
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>StakingsValidatorInfo</code>.
83
- */
84
- }, {
85
- key: "validateJSON",
86
- value: function validateJSON(data) {
87
- // ensure the json data is a string
88
- if (data['icon_url'] && !(typeof data['icon_url'] === 'string' || data['icon_url'] instanceof String)) {
89
- throw new Error("Expected the field `icon_url` to be a primitive type in the JSON string but got " + data['icon_url']);
90
- }
91
- // ensure the json data is a string
92
- if (data['public_key'] && !(typeof data['public_key'] === 'string' || data['public_key'] instanceof String)) {
93
- throw new Error("Expected the field `public_key` to be a primitive type in the JSON string but got " + data['public_key']);
94
- }
95
- // ensure the json data is a string
96
- if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
97
- throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
98
- }
99
- // ensure the json data is a string
100
- if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
101
- throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
102
- }
103
- // ensure the json data is a string
104
- if (data['commission_rate'] && !(typeof data['commission_rate'] === 'string' || data['commission_rate'] instanceof String)) {
105
- throw new Error("Expected the field `commission_rate` to be a primitive type in the JSON string but got " + data['commission_rate']);
106
- }
107
- return true;
108
- }
109
- }]);
110
- }();
111
- /**
112
- * The URL of the validator's icon.
113
- * @member {String} icon_url
114
- */
115
- StakingsValidatorInfo.prototype['icon_url'] = undefined;
116
-
117
- /**
118
- * The validator's public key.
119
- * @member {String} public_key
120
- */
121
- StakingsValidatorInfo.prototype['public_key'] = undefined;
122
-
123
- /**
124
- * The validator's name.
125
- * @member {String} name
126
- */
127
- StakingsValidatorInfo.prototype['name'] = undefined;
128
-
129
- /**
130
- * The wallet address of the validator.
131
- * @member {String} address
132
- */
133
- StakingsValidatorInfo.prototype['address'] = undefined;
134
-
135
- /**
136
- * The commission rate of the validator.
137
- * @member {String} commission_rate
138
- */
139
- StakingsValidatorInfo.prototype['commission_rate'] = undefined;
140
- var _default = exports["default"] = StakingsValidatorInfo;
@@ -1,13 +0,0 @@
1
- # CoboWaas2.StakingsValidatorInfo
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **icon_url** | **String** | The URL of the validator&#39;s icon. | [optional]
8
- **public_key** | **String** | The validator&#39;s public key. | [optional]
9
- **name** | **String** | The validator&#39;s name. | [optional]
10
- **address** | **String** | The wallet address of the validator. | [optional]
11
- **commission_rate** | **String** | The commission rate of the validator. | [optional]
12
-
13
-