@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.
- package/README.md +17 -2
- package/dist/ApiClient.js +56 -6
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/StakingsApi.js +91 -7
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/crypto/Ed25519Signer.js +36 -0
- package/dist/crypto/Secp256k1Signer.js +36 -0
- package/dist/index.js +70 -7
- package/dist/model/Activity.js +4 -8
- package/dist/model/ActivityAction.js +20 -0
- package/dist/model/ActivityType.js +5 -0
- package/dist/model/AutoFuelType.js +61 -0
- package/dist/model/BabylonValidator.js +4 -12
- package/dist/model/ContractCallParams.js +9 -0
- package/dist/model/CoreStakeExtra.js +170 -0
- package/dist/model/CoreStakingExtra.js +187 -0
- package/dist/model/CreateClaimActivity.js +139 -0
- package/dist/model/CreateClaimActivityRequest.js +182 -0
- package/dist/model/CreateStakeActivity.js +4 -8
- package/dist/model/CreateStakeActivityExtra.js +60 -8
- package/dist/model/CreateStakeActivityRequest.js +5 -10
- package/dist/model/CreateWithdrawActivity.js +0 -13
- package/dist/model/CreateWithdrawActivityRequest.js +0 -18
- package/dist/model/EstimateClaimFee.js +145 -0
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateStakeFee.js +5 -10
- package/dist/model/EstimateWithdrawFee.js +0 -18
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +4 -4
- package/dist/model/EstimatedUtxoFeeSlow.js +3 -3
- package/dist/model/EthStakingExtra.js +31 -0
- package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -0
- package/dist/model/FeeAmount.js +1 -1
- package/dist/model/FeeRate.js +1 -1
- package/dist/model/FixedFeeRate.js +2 -2
- package/dist/model/GetStakingEstimationFeeRequest.js +39 -17
- package/dist/model/MPCProject.js +4 -4
- package/dist/model/MpcTransferSource.js +1 -1
- package/dist/model/Pagination.js +2 -2
- package/dist/model/StakingPoolId.js +81 -0
- package/dist/model/StakingPoolType.js +5 -0
- package/dist/model/Stakings.js +10 -14
- package/dist/model/StakingsExtra.js +67 -8
- package/dist/model/TransactionRbf.js +9 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFixedFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransferParams.js +9 -0
- package/docs/Activity.md +1 -1
- package/docs/ActivityAction.md +8 -0
- package/docs/ActivityType.md +2 -0
- package/docs/AutoFuelType.md +12 -0
- package/docs/BabylonValidator.md +4 -4
- package/docs/ContractCallParams.md +1 -0
- package/docs/CoreStakeExtra.md +13 -0
- package/docs/CoreStakingExtra.md +14 -0
- package/docs/CreateClaimActivity.md +11 -0
- package/docs/CreateClaimActivityRequest.md +12 -0
- package/docs/CreateStakeActivity.md +1 -1
- package/docs/CreateStakeActivityExtra.md +4 -0
- package/docs/CreateStakeActivityRequest.md +1 -1
- package/docs/CreateWithdrawActivity.md +0 -1
- package/docs/CreateWithdrawActivityRequest.md +0 -1
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EstimateClaimFee.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateStakeFee.md +1 -1
- package/docs/EstimateWithdrawFee.md +0 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EstimatedUtxoFeeSlow.md +1 -1
- package/docs/EthStakingExtra.md +1 -0
- package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
- package/docs/FeeAmount.md +1 -1
- package/docs/FeeRate.md +1 -1
- package/docs/FixedFeeRate.md +1 -1
- package/docs/GetStakingEstimationFeeRequest.md +2 -3
- package/docs/MPCProject.md +1 -1
- package/docs/MpcTransferSource.md +1 -1
- package/docs/Pagination.md +1 -1
- package/docs/PoolDetailsAllOfValidatorsInfo.md +4 -4
- package/docs/StakingPoolId.md +20 -0
- package/docs/StakingPoolType.md +2 -0
- package/docs/Stakings.md +2 -2
- package/docs/StakingsApi.md +108 -2
- package/docs/StakingsExtra.md +5 -0
- package/docs/TransactionRbf.md +1 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionsApi.md +2 -2
- package/docs/TransferParams.md +1 -0
- package/package.json +3 -2
- package/dist/model/StakingsValidatorInfo.js +0 -140
- 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
|
+
|
package/docs/StakingPoolType.md
CHANGED
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** | **
|
|
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** | [**
|
|
16
|
+
**validator_info** | [**BabylonValidator**](BabylonValidator.md) | |
|
|
17
17
|
**extra** | [**StakingsExtra**](StakingsExtra.md) | | [optional]
|
|
18
18
|
|
|
19
19
|
|
package/docs/StakingsApi.md
CHANGED
|
@@ -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-
|
|
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 `fee.fee_rate` property in the request body to specify the fee rate you are willing to pay. The `fee.max_fee_amount` property in the request body will be ignored. <Note>For the Babylon protocol, you can only select UTXO as the fee model.</Note>
|
|
336
|
+
<Note>This operation is deprecated. Please use the [updated version](/v2/api-references/stakings/estimate-staking-fees-1) instead.</Note> 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 `fee.fee_rate` property in the request body to specify the fee rate you are willing to pay. The `fee.max_fee_amount` property in the request body will be ignored. <Note>For the Babylon protocol, you can only select UTXO as the fee model.</Note>
|
|
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. <Note>For the Babylon protocol, you can only select UTXO as the fee model.</Note>
|
|
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)
|
package/docs/StakingsExtra.md
CHANGED
|
@@ -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's Bitcoin address. |
|
|
15
|
+
**validator_address** | **String** | The validator'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
|
|
package/docs/TransactionRbf.md
CHANGED
|
@@ -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 `included_utxos` property. If you specify both the `address` and `included_utxos` properties, the specified included UTXOs must belong to the address. You need to provide either the `address` or `included_utxos` 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 `included_utxos` property. If you specify both the `address` and `included_utxos` 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 `address` or `included_utxos` 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
|
|
package/docs/TransactionsApi.md
CHANGED
|
@@ -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
|
|
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. <Note>If you make transfers from Custodial Wallets, do not set the fee-related properties. Otherwise, the transaction will fail.</Note> <Note>You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the <code>utxo_outputs</code> property to specify the destination addresses.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
|
|
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
|
|
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
|
|
package/docs/TransferParams.md
CHANGED
|
@@ -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.
|
|
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's icon. | [optional]
|
|
8
|
-
**public_key** | **String** | The validator's public key. | [optional]
|
|
9
|
-
**name** | **String** | The validator'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
|
-
|