@cobo/cobo-waas2 1.6.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 (97) hide show
  1. package/README.md +17 -2
  2. package/dist/ApiClient.js +56 -6
  3. package/dist/api/DevelopersWebhooksApi.js +2 -2
  4. package/dist/api/StakingsApi.js +91 -7
  5. package/dist/api/TransactionsApi.js +4 -4
  6. package/dist/crypto/Ed25519Signer.js +36 -0
  7. package/dist/crypto/Secp256k1Signer.js +36 -0
  8. package/dist/index.js +70 -7
  9. package/dist/model/Activity.js +4 -8
  10. package/dist/model/ActivityAction.js +20 -0
  11. package/dist/model/ActivityType.js +5 -0
  12. package/dist/model/AutoFuelType.js +61 -0
  13. package/dist/model/BabylonValidator.js +4 -12
  14. package/dist/model/ContractCallParams.js +9 -0
  15. package/dist/model/CoreStakeExtra.js +170 -0
  16. package/dist/model/CoreStakingExtra.js +187 -0
  17. package/dist/model/CreateClaimActivity.js +139 -0
  18. package/dist/model/CreateClaimActivityRequest.js +182 -0
  19. package/dist/model/CreateStakeActivity.js +4 -8
  20. package/dist/model/CreateStakeActivityExtra.js +60 -8
  21. package/dist/model/CreateStakeActivityRequest.js +5 -10
  22. package/dist/model/CreateWithdrawActivity.js +0 -13
  23. package/dist/model/CreateWithdrawActivityRequest.js +0 -18
  24. package/dist/model/EstimateClaimFee.js +145 -0
  25. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  26. package/dist/model/EstimateFeeParams.js +1 -1
  27. package/dist/model/EstimateStakeFee.js +5 -10
  28. package/dist/model/EstimateWithdrawFee.js +0 -18
  29. package/dist/model/EstimatedFee.js +1 -1
  30. package/dist/model/EstimatedFixedFee.js +4 -4
  31. package/dist/model/EstimatedUtxoFeeSlow.js +3 -3
  32. package/dist/model/EthStakingExtra.js +31 -0
  33. package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -0
  34. package/dist/model/FeeAmount.js +1 -1
  35. package/dist/model/FeeRate.js +1 -1
  36. package/dist/model/FixedFeeRate.js +2 -2
  37. package/dist/model/GetStakingEstimationFeeRequest.js +39 -17
  38. package/dist/model/MPCProject.js +4 -4
  39. package/dist/model/MpcTransferSource.js +1 -1
  40. package/dist/model/Pagination.js +2 -2
  41. package/dist/model/StakingPoolId.js +81 -0
  42. package/dist/model/StakingPoolType.js +5 -0
  43. package/dist/model/Stakings.js +10 -14
  44. package/dist/model/StakingsExtra.js +67 -8
  45. package/dist/model/TransactionRbf.js +9 -0
  46. package/dist/model/TransactionRbfSource.js +1 -1
  47. package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
  48. package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
  49. package/dist/model/TransactionRequestFixedFee.js +1 -1
  50. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  51. package/dist/model/TransferParams.js +9 -0
  52. package/docs/Activity.md +1 -1
  53. package/docs/ActivityAction.md +8 -0
  54. package/docs/ActivityType.md +2 -0
  55. package/docs/AutoFuelType.md +12 -0
  56. package/docs/BabylonValidator.md +4 -4
  57. package/docs/ContractCallParams.md +1 -0
  58. package/docs/CoreStakeExtra.md +13 -0
  59. package/docs/CoreStakingExtra.md +14 -0
  60. package/docs/CreateClaimActivity.md +11 -0
  61. package/docs/CreateClaimActivityRequest.md +12 -0
  62. package/docs/CreateStakeActivity.md +1 -1
  63. package/docs/CreateStakeActivityExtra.md +4 -0
  64. package/docs/CreateStakeActivityRequest.md +1 -1
  65. package/docs/CreateWithdrawActivity.md +0 -1
  66. package/docs/CreateWithdrawActivityRequest.md +0 -1
  67. package/docs/DevelopersWebhooksApi.md +1 -1
  68. package/docs/EstimateClaimFee.md +11 -0
  69. package/docs/EstimateContractCallFeeParams.md +1 -1
  70. package/docs/EstimateFeeParams.md +1 -1
  71. package/docs/EstimateStakeFee.md +1 -1
  72. package/docs/EstimateWithdrawFee.md +0 -1
  73. package/docs/EstimatedFee.md +1 -1
  74. package/docs/EstimatedFixedFee.md +1 -1
  75. package/docs/EstimatedUtxoFeeSlow.md +1 -1
  76. package/docs/EthStakingExtra.md +1 -0
  77. package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
  78. package/docs/FeeAmount.md +1 -1
  79. package/docs/FeeRate.md +1 -1
  80. package/docs/FixedFeeRate.md +1 -1
  81. package/docs/GetStakingEstimationFeeRequest.md +2 -3
  82. package/docs/MPCProject.md +1 -1
  83. package/docs/MpcTransferSource.md +1 -1
  84. package/docs/Pagination.md +1 -1
  85. package/docs/PoolDetailsAllOfValidatorsInfo.md +4 -4
  86. package/docs/StakingPoolId.md +20 -0
  87. package/docs/StakingPoolType.md +2 -0
  88. package/docs/Stakings.md +2 -2
  89. package/docs/StakingsApi.md +108 -2
  90. package/docs/StakingsExtra.md +5 -0
  91. package/docs/TransactionRbf.md +1 -0
  92. package/docs/TransactionRbfSource.md +1 -1
  93. package/docs/TransactionsApi.md +2 -2
  94. package/docs/TransferParams.md +1 -0
  95. package/package.json +3 -2
  96. package/dist/model/StakingsValidatorInfo.js +0 -140
  97. package/docs/StakingsValidatorInfo.md +0 -13
@@ -5,12 +5,12 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **pool_type** | [**StakingPoolType**](StakingPoolType.md) | |
8
- **icon_url** | **String** | The URL of the validator's icon. |
8
+ **icon_url** | **String** | The URL of the validator's icon. | [optional]
9
9
  **name** | **String** | The validator's name. |
10
10
  **priority** | **Number** | This property can be ignored. | [optional]
11
- **public_key** | **String** | The public key of the validator. |
12
- **commission_rate** | **Number** | The commission rate of the validator. |
13
- **supported_pos_chains** | **[String]** | A list of supported Proof-of-Stake (PoS) chains. |
11
+ **public_key** | **String** | The public key of the validator. | [optional]
12
+ **commission_rate** | **Number** | The commission rate of the validator. | [optional]
13
+ **supported_pos_chains** | **[String]** | A list of supported Proof-of-Stake (PoS) chains. | [optional]
14
14
 
15
15
 
16
16
 
@@ -0,0 +1,20 @@
1
+ # CoboWaas2.StakingPoolId
2
+
3
+ ## Enum
4
+
5
+
6
+ * `babylon_btc_signet` (value: `"babylon_btc_signet"`)
7
+
8
+ * `babylon_btc` (value: `"babylon_btc"`)
9
+
10
+ * `beacon_eth` (value: `"beacon_eth"`)
11
+
12
+ * `beacon_eth_holesky` (value: `"beacon_eth_holesky"`)
13
+
14
+ * `core_btc` (value: `"core_btc"`)
15
+
16
+ * `core_xtn` (value: `"core_xtn"`)
17
+
18
+ * `unknown_default_open_api` (value: `"unknown_default_open_api"`)
19
+
20
+
@@ -7,6 +7,8 @@
7
7
 
8
8
  * `ETHBeacon` (value: `"ETHBeacon"`)
9
9
 
10
+ * `CoreBTC` (value: `"CoreBTC"`)
11
+
10
12
  * `unknown_default_open_api` (value: `"unknown_default_open_api"`)
11
13
 
12
14
 
package/docs/Stakings.md CHANGED
@@ -8,12 +8,12 @@ Name | Type | Description | Notes
8
8
  **wallet_id** | **String** | The staker's wallet ID. |
9
9
  **address** | **String** | The staker's wallet address. |
10
10
  **amounts** | [**[AmountDetailsInner]**](AmountDetailsInner.md) | The details about the staking amount. |
11
- **pool_id** | **String** | The ID of the staking pool. |
11
+ **pool_id** | [**StakingPoolId**](StakingPoolId.md) | |
12
12
  **token_id** | **String** | The token ID. |
13
13
  **rewards_info** | **Object** | The information about the staking rewards. | [optional]
14
14
  **created_timestamp** | **Number** | The time when the staking position was created. |
15
15
  **updated_timestamp** | **Number** | The time when the staking position was last updated. |
16
- **validator_info** | [**StakingsValidatorInfo**](StakingsValidatorInfo.md) | |
16
+ **validator_info** | [**BabylonValidator**](BabylonValidator.md) | |
17
17
  **extra** | [**StakingsExtra**](StakingsExtra.md) | | [optional]
18
18
 
19
19
 
@@ -4,12 +4,14 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**createClaimActivity**](StakingsApi.md#createClaimActivity) | **POST** /stakings/activities/claim | Create claim activity
7
8
  [**createStakeActivity**](StakingsApi.md#createStakeActivity) | **POST** /stakings/activities/stake | Create stake activity
8
9
  [**createUnstakeActivity**](StakingsApi.md#createUnstakeActivity) | **POST** /stakings/activities/unstake | Create unstake activity
9
10
  [**createWithdrawActivity**](StakingsApi.md#createWithdrawActivity) | **POST** /stakings/activities/withdraw | Create withdraw activity
10
11
  [**getStakingActivityById**](StakingsApi.md#getStakingActivityById) | **GET** /stakings/activities/{activity_id} | Get staking activity details
11
12
  [**getStakingById**](StakingsApi.md#getStakingById) | **GET** /stakings/{staking_id} | Get staking position details
12
13
  [**getStakingEstimationFee**](StakingsApi.md#getStakingEstimationFee) | **POST** /stakings/estimate_fee | Estimate staking fees
14
+ [**getStakingEstimationFeeV2**](StakingsApi.md#getStakingEstimationFeeV2) | **POST** /stakings/estimate_fee_v2 | Estimate staking fees
13
15
  [**getStakingPoolById**](StakingsApi.md#getStakingPoolById) | **GET** /stakings/pools/{pool_id} | Get staking pool details
14
16
  [**listStakingActivities**](StakingsApi.md#listStakingActivities) | **GET** /stakings/activities | List staking activities
15
17
  [**listStakingPools**](StakingsApi.md#listStakingPools) | **GET** /stakings/pools | List staking pools
@@ -17,6 +19,58 @@ Method | HTTP request | Description
17
19
 
18
20
 
19
21
 
22
+ ## createClaimActivity
23
+
24
+ > CreateStakeActivity201Response createClaimActivity(opts)
25
+
26
+ Create claim activity
27
+
28
+ This operation creates a claim request. <Note>Currently, only the Ethereum Beacon protocol supports this operation.</Note> For some protocols, you can use the `fee` property in the request body to specify the maximum fee you are willing to pay. The transaction will fail if the actual fee exceeds the specified maximum fee.
29
+
30
+ ### Example
31
+
32
+ ```javascript
33
+ const CoboWaas2 = require('@cobo/cobo-waas2');
34
+ // Initialize the API client
35
+ const apiClient = CoboWaas2.ApiClient.instance
36
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
37
+ apiClient.setEnv(CoboWaas2.Env.DEV);
38
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
39
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
40
+ // Call the API
41
+ const apiInstance = new CoboWaas2.StakingsApi();
42
+ const opts = {
43
+ 'CreateClaimActivityRequest': new CoboWaas2.CreateClaimActivityRequest()
44
+ };
45
+ apiInstance.createClaimActivity(opts).then((data) => {
46
+ console.log('API called successfully. Returned data: ' + data);
47
+ }, (error) => {
48
+ console.error(error);
49
+ });
50
+
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+
56
+ Name | Type | Description | Notes
57
+ ------------- | ------------- | ------------- | -------------
58
+ **CreateClaimActivityRequest** | [**CreateClaimActivityRequest**](CreateClaimActivityRequest.md)| The request body to create a staking request. | [optional]
59
+
60
+ ### Return type
61
+
62
+ [**CreateStakeActivity201Response**](CreateStakeActivity201Response.md)
63
+
64
+ ### Authorization
65
+
66
+ [CoboAuth](../README.md#CoboAuth)
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: application/json
71
+ - **Accept**: application/json
72
+
73
+
20
74
  ## createStakeActivity
21
75
 
22
76
  > CreateStakeActivity201Response createStakeActivity(opts)
@@ -257,7 +311,7 @@ apiInstance.getStakingById(staking_id).then((data) => {
257
311
 
258
312
  Name | Type | Description | Notes
259
313
  ------------- | ------------- | ------------- | -------------
260
- **staking_id** | **String**| The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-all-stakings). |
314
+ **staking_id** | **String**| The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-staking-positions). |
261
315
 
262
316
  ### Return type
263
317
 
@@ -279,7 +333,7 @@ Name | Type | Description | Notes
279
333
 
280
334
  Estimate staking fees
281
335
 
282
- This operation calculates the fee required for a staking activity based on factors such as network congestion and transaction complexity. For some protocols, you can use the &#x60;fee.fee_rate&#x60; property in the request body to specify the fee rate you are willing to pay. The &#x60;fee.max_fee_amount&#x60; property in the request body will be ignored. &lt;Note&gt;For the Babylon protocol, you can only select UTXO as the fee model.&lt;/Note&gt;
336
+ &lt;Note&gt;This operation is deprecated. Please use the [updated version](/v2/api-references/stakings/estimate-staking-fees-1) instead.&lt;/Note&gt; This operation calculates the fee required for a staking activity based on factors such as network congestion and transaction complexity. For some protocols, you can use the &#x60;fee.fee_rate&#x60; property in the request body to specify the fee rate you are willing to pay. The &#x60;fee.max_fee_amount&#x60; property in the request body will be ignored. &lt;Note&gt;For the Babylon protocol, you can only select UTXO as the fee model.&lt;/Note&gt;
283
337
 
284
338
  ### Example
285
339
 
@@ -325,6 +379,58 @@ Name | Type | Description | Notes
325
379
  - **Accept**: application/json
326
380
 
327
381
 
382
+ ## getStakingEstimationFeeV2
383
+
384
+ > EthStakeEstimatedFee getStakingEstimationFeeV2(opts)
385
+
386
+ Estimate staking fees
387
+
388
+ This operation calculates the fee required for a staking activity based on factors such as network congestion and transaction complexity. &lt;Note&gt;For the Babylon protocol, you can only select UTXO as the fee model.&lt;/Note&gt;
389
+
390
+ ### Example
391
+
392
+ ```javascript
393
+ const CoboWaas2 = require('@cobo/cobo-waas2');
394
+ // Initialize the API client
395
+ const apiClient = CoboWaas2.ApiClient.instance
396
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
397
+ apiClient.setEnv(CoboWaas2.Env.DEV);
398
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
399
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
400
+ // Call the API
401
+ const apiInstance = new CoboWaas2.StakingsApi();
402
+ const opts = {
403
+ 'GetStakingEstimationFeeRequest': new CoboWaas2.GetStakingEstimationFeeRequest()
404
+ };
405
+ apiInstance.getStakingEstimationFeeV2(opts).then((data) => {
406
+ console.log('API called successfully. Returned data: ' + data);
407
+ }, (error) => {
408
+ console.error(error);
409
+ });
410
+
411
+ ```
412
+
413
+ ### Parameters
414
+
415
+
416
+ Name | Type | Description | Notes
417
+ ------------- | ------------- | ------------- | -------------
418
+ **GetStakingEstimationFeeRequest** | [**GetStakingEstimationFeeRequest**](GetStakingEstimationFeeRequest.md)| The request body to get the estimated fee of a staking activity. | [optional]
419
+
420
+ ### Return type
421
+
422
+ [**EthStakeEstimatedFee**](EthStakeEstimatedFee.md)
423
+
424
+ ### Authorization
425
+
426
+ [CoboAuth](../README.md#CoboAuth)
427
+
428
+ ### HTTP request headers
429
+
430
+ - **Content-Type**: application/json
431
+ - **Accept**: application/json
432
+
433
+
328
434
  ## getStakingPoolById
329
435
 
330
436
  > PoolDetails getStakingPoolById(pool_id)
@@ -10,5 +10,10 @@ Name | Type | Description | Notes
10
10
  **unlock_block_height** | **Number** | The block height at which the bitcoins will be unlocked. | [optional]
11
11
  **stake_address** | **String** | The address receiving the staked bitcoins. | [optional]
12
12
  **unbond_address** | **String** | The address receiving the unlocked bitcoins. | [optional]
13
+ **beacon_validators** | [**[EthStakingExtraAllOfBeaconValidators]**](EthStakingExtraAllOfBeaconValidators.md) | The list of validator information. | [optional]
14
+ **staker_address** | **String** | The staker&#39;s Bitcoin address. |
15
+ **validator_address** | **String** | The validator&#39;s EVM address. |
16
+ **reward_address** | **String** | The EVM address to receive staking rewards. |
17
+ **timelock** | **Number** | The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal. |
13
18
 
14
19
 
@@ -9,5 +9,6 @@ Name | Type | Description | Notes
9
9
  **source** | [**TransactionRbfSource**](TransactionRbfSource.md) | | [optional]
10
10
  **category_names** | **[String]** | The custom category for you to identify your transactions. | [optional]
11
11
  **description** | **String** | The description of the RBF transaction. | [optional]
12
+ **auto_fuel** | [**AutoFuelType**](AutoFuelType.md) | | [optional]
12
13
 
13
14
 
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **source_type** | [**WalletSubtype**](WalletSubtype.md) | |
8
8
  **wallet_id** | **String** | The wallet ID. |
9
- **address** | **String** | The wallet address. If you want to specify the UTXOs to be used, please provide the &#x60;included_utxos&#x60; property. If you specify both the &#x60;address&#x60; and &#x60;included_utxos&#x60; properties, the specified included UTXOs must belong to the address. You need to provide either the &#x60;address&#x60; or &#x60;included_utxos&#x60; property. If neither property is provided, the transfer will fail. | [optional]
9
+ **address** | **String** | The wallet address. If you want to specify the UTXOs to be used, please provide the &#x60;included_utxos&#x60; property. If you specify both the &#x60;address&#x60; and &#x60;included_utxos&#x60; properties, the specified included UTXOs must belong to the address. It is recommended to specify no more than 100 included UTXOs to ensure optimal transaction processing. You need to provide either the &#x60;address&#x60; or &#x60;included_utxos&#x60; property. If neither property is provided, the transfer will fail. | [optional]
10
10
  **included_utxos** | [**[TransactionUtxo]**](TransactionUtxo.md) | | [optional]
11
11
  **excluded_utxos** | [**[TransactionUtxo]**](TransactionUtxo.md) | | [optional]
12
12
 
@@ -285,7 +285,7 @@ Name | Type | Description | Notes
285
285
 
286
286
  Transfer token
287
287
 
288
- The operation transfers your assets from a wallet created on Cobo Protal to another address. You need to specify details such as the sender address and recipient address, token ID, and the amount to transfer. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. &lt;Note&gt;If you make transfers from Custodial Wallets, do not set the fee-related properties. Otherwise, the transaction will fail.&lt;/Note&gt; &lt;Note&gt;You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the &lt;code&gt;utxo_outputs&lt;/code&gt; property to specify the destination addresses.&lt;/Note&gt; &lt;Info&gt;If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe&#39;s address of the Smart Contract Wallet, with a transfer amount of &lt;code&gt;0&lt;/code&gt;.&lt;/Info&gt;
288
+ The operation transfers your assets from a wallet created on Cobo Portal to another address. You need to specify details such as the sender address and recipient address, token ID, and the amount to transfer. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. &lt;Note&gt;If you make transfers from Custodial Wallets, do not set the fee-related properties. Otherwise, the transaction will fail.&lt;/Note&gt; &lt;Note&gt;You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the &lt;code&gt;utxo_outputs&lt;/code&gt; property to specify the destination addresses.&lt;/Note&gt; &lt;Info&gt;If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe&#39;s address of the Smart Contract Wallet, with a transfer amount of &lt;code&gt;0&lt;/code&gt;.&lt;/Info&gt;
289
289
 
290
290
  ### Example
291
291
 
@@ -391,7 +391,7 @@ Name | Type | Description | Notes
391
391
 
392
392
  Estimate transaction fee
393
393
 
394
- This operation estimates the transaction fee rates of a token transfer or a contract call based on three different transaction speeds (slow, recommended, and fast), considering factors such as network congestion and transaction complexity. You need to specify the transaction information, including the request ID, request type, source address, destination address, and token ID of the transaction fee. The response can contain different properties based on the transaction fee model used by the chain, including EIP-1559 fee model, legacy fee model, UTXO fee model, and fixed fee model.
394
+ This operation estimates the transaction fee of a token transfer or a contract call based on the fee model that the chain uses, considering factors such as network congestion and transaction complexity. You need to specify the transaction information, including the request ID, request type, source address, destination address, token ID (only applicable to token transfers), and chain ID (only applicable to contract calls). The response can contain different properties based on the transaction fee model used by the chain. For the legacy, EIP-1559, and UTXO fee models, Cobo also supports three different transaction speed levels: slow, recommended, and fast. For more information about estimating transaction fees, refer to [Estimate transaction fee](/v2/guides/transactions/estimate-fees).
395
395
 
396
396
  ### Example
397
397
 
@@ -11,5 +11,6 @@ Name | Type | Description | Notes
11
11
  **category_names** | **[String]** | The custom category for you to identify your transactions. | [optional]
12
12
  **description** | **String** | The description of the transfer. | [optional]
13
13
  **fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional]
14
+ **auto_fuel** | [**AutoFuelType**](AutoFuelType.md) | | [optional]
14
15
 
15
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobo/cobo-waas2",
3
- "version": "1.6.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",
@@ -17,7 +17,8 @@
17
17
  "crypto-js": "^4.2.0",
18
18
  "express": "^4.21.1",
19
19
  "superagent": "^5.3.0",
20
- "tweetnacl": "^1.0.3"
20
+ "tweetnacl": "^1.0.3",
21
+ "elliptic": "^6.6.1"
21
22
  },
22
23
  "devDependencies": {
23
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
-