From 5efa2b3dabdab5e8e2d8822cf446f1d831f3045d Mon Sep 17 00:00:00 2001
From: Shanshan Li utxo_outputs
property to specify the destination addresses.0
.utxo_outputs
property to specify the destination addresses.0
.utxo_outputs
property to specify the destination addresses.0
.utxo_outputs
property to specify the destination addresses.0
.
Activity
.
* The staking activity.
* @alias module:model/Activity
- * @param pool_id {String} The ID of the staking pool.
+ * @param pool_id {module:model/StakingPoolId}
* @param token_id {String} The token ID.
* @param amount {String} The staking amount.
* @param status {module:model/ActivityStatus}
@@ -77,7 +78,7 @@ class Activity {
obj['address'] = ApiClient.convertToType(data['address'], 'String');
}
if (data.hasOwnProperty('pool_id')) {
- obj['pool_id'] = ApiClient.convertToType(data['pool_id'], 'String');
+ obj['pool_id'] = StakingPoolId.constructFromObject(data['pool_id']);
}
if (data.hasOwnProperty('token_id')) {
obj['token_id'] = ApiClient.convertToType(data['token_id'], 'String');
@@ -139,10 +140,6 @@ class Activity {
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
}
// ensure the json data is a string
- if (data['pool_id'] && !(typeof data['pool_id'] === 'string' || data['pool_id'] instanceof String)) {
- throw new Error("Expected the field `pool_id` to be a primitive type in the JSON string but got " + data['pool_id']);
- }
- // ensure the json data is a string
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
}
@@ -218,8 +215,7 @@ Activity.prototype['wallet_id'] = undefined;
Activity.prototype['address'] = undefined;
/**
- * The ID of the staking pool.
- * @member {String} pool_id
+ * @member {module:model/StakingPoolId} pool_id
*/
Activity.prototype['pool_id'] = undefined;
diff --git a/src/model/ActivityAction.js b/src/model/ActivityAction.js
index be3f25d4..dd1e5a9d 100644
--- a/src/model/ActivityAction.js
+++ b/src/model/ActivityAction.js
@@ -38,6 +38,34 @@ export default class ActivityAction {
"BabylonConfirmation" = "BabylonConfirmation";
+ /**
+ * value: "DepositETH"
+ * @const
+ */
+ "DepositETH" = "DepositETH";
+
+
+ /**
+ * value: "ClaimRewards"
+ * @const
+ */
+ "ClaimRewards" = "ClaimRewards";
+
+
+ /**
+ * value: "ActivateValidator"
+ * @const
+ */
+ "ActivateValidator" = "ActivateValidator";
+
+
+ /**
+ * value: "UnstakeETH"
+ * @const
+ */
+ "UnstakeETH" = "UnstakeETH";
+
+
/**
* value: "unknown_default_open_api"
* @const
diff --git a/src/model/ActivityType.js b/src/model/ActivityType.js
index 5aa831d4..179fbf20 100644
--- a/src/model/ActivityType.js
+++ b/src/model/ActivityType.js
@@ -38,6 +38,13 @@ export default class ActivityType {
"Withdraw" = "Withdraw";
+ /**
+ * value: "Claim"
+ * @const
+ */
+ "Claim" = "Claim";
+
+
/**
* value: "unknown_default_open_api"
* @const
diff --git a/src/model/AutoFuelType.js b/src/model/AutoFuelType.js
new file mode 100644
index 00000000..d98b9f04
--- /dev/null
+++ b/src/model/AutoFuelType.js
@@ -0,0 +1,51 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+/**
+* Enum class AutoFuelType.
+* @enum {}
+* @readonly
+*/
+export default class AutoFuelType {
+
+ /**
+ * value: "PassiveAutoFuel"
+ * @const
+ */
+ "PassiveAutoFuel" = "PassiveAutoFuel";
+
+
+ /**
+ * value: "ProActiveAutoFuel"
+ * @const
+ */
+ "ProActiveAutoFuel" = "ProActiveAutoFuel";
+
+
+ /**
+ * value: "unknown_default_open_api"
+ * @const
+ */
+ "unknown_default_open_api" = "unknown_default_open_api";
+
+
+
+ /**
+ * Returns a AutoFuelType
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/AutoFuelType} The enum AutoFuelType
value.
+ */
+ static constructFromObject(object) {
+ return object;
+ }
+}
+
diff --git a/src/model/BabylonValidator.js b/src/model/BabylonValidator.js
index d9ec1852..791557c3 100644
--- a/src/model/BabylonValidator.js
+++ b/src/model/BabylonValidator.js
@@ -23,15 +23,11 @@ class BabylonValidator {
* @alias module:model/BabylonValidator
* @implements module:model/BaseStakeExtra
* @param pool_type {module:model/StakingPoolType}
- * @param icon_url {String} The URL of the validator's icon.
* @param name {String} The validator's name.
- * @param public_key {String} The public key of the validator.
- * @param commission_rate {Number} The commission rate of the validator.
- * @param supported_pos_chains {Array.CoreStakeExtra
.
+ * @alias module:model/CoreStakeExtra
+ * @implements module:model/BaseStakeExtra
+ * @param pool_type {module:model/StakingPoolType}
+ * @param timelock {Number} The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
+ * @param validator_address {String} The validator's EVM address.
+ * @param reward_address {String} The EVM address to receive staking rewards.
+ */
+ constructor(pool_type, timelock, validator_address, reward_address) {
+ BaseStakeExtra.initialize(this, pool_type);
+ CoreStakeExtra.initialize(this, pool_type, timelock, validator_address, reward_address);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, pool_type, timelock, validator_address, reward_address) {
+ obj['pool_type'] = pool_type;
+ obj['timelock'] = timelock;
+ obj['validator_address'] = validator_address;
+ obj['reward_address'] = reward_address;
+ }
+
+ /**
+ * Constructs a CoreStakeExtra
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/CoreStakeExtra} obj Optional instance to populate.
+ * @return {module:model/CoreStakeExtra} The populated CoreStakeExtra
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new CoreStakeExtra();
+ BaseStakeExtra.constructFromObject(data, obj);
+
+ if (data.hasOwnProperty('pool_type')) {
+ obj['pool_type'] = StakingPoolType.constructFromObject(data['pool_type']);
+ }
+ if (data.hasOwnProperty('timelock')) {
+ obj['timelock'] = ApiClient.convertToType(data['timelock'], 'Number');
+ }
+ if (data.hasOwnProperty('change_address')) {
+ obj['change_address'] = ApiClient.convertToType(data['change_address'], 'String');
+ }
+ if (data.hasOwnProperty('validator_address')) {
+ obj['validator_address'] = ApiClient.convertToType(data['validator_address'], 'String');
+ }
+ if (data.hasOwnProperty('reward_address')) {
+ obj['reward_address'] = ApiClient.convertToType(data['reward_address'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to CoreStakeExtra
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to CoreStakeExtra
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of CoreStakeExtra.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['change_address'] && !(typeof data['change_address'] === 'string' || data['change_address'] instanceof String)) {
+ throw new Error("Expected the field `change_address` to be a primitive type in the JSON string but got " + data['change_address']);
+ }
+ // ensure the json data is a string
+ if (data['validator_address'] && !(typeof data['validator_address'] === 'string' || data['validator_address'] instanceof String)) {
+ throw new Error("Expected the field `validator_address` to be a primitive type in the JSON string but got " + data['validator_address']);
+ }
+ // ensure the json data is a string
+ if (data['reward_address'] && !(typeof data['reward_address'] === 'string' || data['reward_address'] instanceof String)) {
+ throw new Error("Expected the field `reward_address` to be a primitive type in the JSON string but got " + data['reward_address']);
+ }
+
+ return true;
+ }
+
+
+}
+
+CoreStakeExtra.RequiredProperties = ["pool_type", "timelock", "validator_address", "reward_address"];
+
+/**
+ * @member {module:model/StakingPoolType} pool_type
+ */
+CoreStakeExtra.prototype['pool_type'] = undefined;
+
+/**
+ * The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
+ * @member {Number} timelock
+ */
+CoreStakeExtra.prototype['timelock'] = undefined;
+
+/**
+ * The change address on the Bitcoin chain. If not provided, the source wallet's address will be used as the change address.
+ * @member {String} change_address
+ */
+CoreStakeExtra.prototype['change_address'] = undefined;
+
+/**
+ * The validator's EVM address.
+ * @member {String} validator_address
+ */
+CoreStakeExtra.prototype['validator_address'] = undefined;
+
+/**
+ * The EVM address to receive staking rewards.
+ * @member {String} reward_address
+ */
+CoreStakeExtra.prototype['reward_address'] = undefined;
+
+
+// Implement BaseStakeExtra interface:
+/**
+ * @member {module:model/StakingPoolType} pool_type
+ */
+BaseStakeExtra.prototype['pool_type'] = undefined;
+
+
+
+
+export default CoreStakeExtra;
+
diff --git a/src/model/CoreStakingExtra.js b/src/model/CoreStakingExtra.js
new file mode 100644
index 00000000..ad34cc4b
--- /dev/null
+++ b/src/model/CoreStakingExtra.js
@@ -0,0 +1,168 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import BaseStakeExtra from './BaseStakeExtra';
+import StakingPoolType from './StakingPoolType';
+
+/**
+ * The CoreStakingExtra model module.
+ * @module model/CoreStakingExtra
+ */
+class CoreStakingExtra {
+ /**
+ * Constructs a new CoreStakingExtra
.
+ * @alias module:model/CoreStakingExtra
+ * @implements module:model/BaseStakeExtra
+ * @param pool_type {module:model/StakingPoolType}
+ * @param pos_chain {String} The Proof-of-Stake (PoS) chain.
+ * @param staker_address {String} The staker's Bitcoin address.
+ * @param validator_address {String} The validator's EVM address.
+ * @param reward_address {String} The EVM address to receive staking rewards.
+ * @param timelock {Number} The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
+ */
+ constructor(pool_type, pos_chain, staker_address, validator_address, reward_address, timelock) {
+ BaseStakeExtra.initialize(this, pool_type);
+ CoreStakingExtra.initialize(this, pool_type, pos_chain, staker_address, validator_address, reward_address, timelock);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, pool_type, pos_chain, staker_address, validator_address, reward_address, timelock) {
+ obj['pool_type'] = pool_type;
+ obj['pos_chain'] = pos_chain;
+ obj['staker_address'] = staker_address;
+ obj['validator_address'] = validator_address;
+ obj['reward_address'] = reward_address;
+ obj['timelock'] = timelock;
+ }
+
+ /**
+ * Constructs a CoreStakingExtra
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/CoreStakingExtra} obj Optional instance to populate.
+ * @return {module:model/CoreStakingExtra} The populated CoreStakingExtra
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new CoreStakingExtra();
+ BaseStakeExtra.constructFromObject(data, obj);
+
+ if (data.hasOwnProperty('pool_type')) {
+ obj['pool_type'] = StakingPoolType.constructFromObject(data['pool_type']);
+ }
+ if (data.hasOwnProperty('pos_chain')) {
+ obj['pos_chain'] = ApiClient.convertToType(data['pos_chain'], 'String');
+ }
+ if (data.hasOwnProperty('staker_address')) {
+ obj['staker_address'] = ApiClient.convertToType(data['staker_address'], 'String');
+ }
+ if (data.hasOwnProperty('validator_address')) {
+ obj['validator_address'] = ApiClient.convertToType(data['validator_address'], 'String');
+ }
+ if (data.hasOwnProperty('reward_address')) {
+ obj['reward_address'] = ApiClient.convertToType(data['reward_address'], 'String');
+ }
+ if (data.hasOwnProperty('timelock')) {
+ obj['timelock'] = ApiClient.convertToType(data['timelock'], 'Number');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to CoreStakingExtra
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to CoreStakingExtra
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of CoreStakingExtra.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['pos_chain'] && !(typeof data['pos_chain'] === 'string' || data['pos_chain'] instanceof String)) {
+ throw new Error("Expected the field `pos_chain` to be a primitive type in the JSON string but got " + data['pos_chain']);
+ }
+ // ensure the json data is a string
+ if (data['staker_address'] && !(typeof data['staker_address'] === 'string' || data['staker_address'] instanceof String)) {
+ throw new Error("Expected the field `staker_address` to be a primitive type in the JSON string but got " + data['staker_address']);
+ }
+ // ensure the json data is a string
+ if (data['validator_address'] && !(typeof data['validator_address'] === 'string' || data['validator_address'] instanceof String)) {
+ throw new Error("Expected the field `validator_address` to be a primitive type in the JSON string but got " + data['validator_address']);
+ }
+ // ensure the json data is a string
+ if (data['reward_address'] && !(typeof data['reward_address'] === 'string' || data['reward_address'] instanceof String)) {
+ throw new Error("Expected the field `reward_address` to be a primitive type in the JSON string but got " + data['reward_address']);
+ }
+
+ return true;
+ }
+
+
+}
+
+CoreStakingExtra.RequiredProperties = ["pool_type", "pos_chain", "staker_address", "validator_address", "reward_address", "timelock"];
+
+/**
+ * @member {module:model/StakingPoolType} pool_type
+ */
+CoreStakingExtra.prototype['pool_type'] = undefined;
+
+/**
+ * The Proof-of-Stake (PoS) chain.
+ * @member {String} pos_chain
+ */
+CoreStakingExtra.prototype['pos_chain'] = undefined;
+
+/**
+ * The staker's Bitcoin address.
+ * @member {String} staker_address
+ */
+CoreStakingExtra.prototype['staker_address'] = undefined;
+
+/**
+ * The validator's EVM address.
+ * @member {String} validator_address
+ */
+CoreStakingExtra.prototype['validator_address'] = undefined;
+
+/**
+ * The EVM address to receive staking rewards.
+ * @member {String} reward_address
+ */
+CoreStakingExtra.prototype['reward_address'] = undefined;
+
+/**
+ * The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
+ * @member {Number} timelock
+ */
+CoreStakingExtra.prototype['timelock'] = undefined;
+
+
+// Implement BaseStakeExtra interface:
+/**
+ * @member {module:model/StakingPoolType} pool_type
+ */
+BaseStakeExtra.prototype['pool_type'] = undefined;
+
+
+
+
+export default CoreStakingExtra;
+
diff --git a/src/model/CreateClaimActivity.js b/src/model/CreateClaimActivity.js
new file mode 100644
index 00000000..6e454388
--- /dev/null
+++ b/src/model/CreateClaimActivity.js
@@ -0,0 +1,121 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import TransactionRequestFee from './TransactionRequestFee';
+
+/**
+ * The CreateClaimActivity model module.
+ * @module model/CreateClaimActivity
+ */
+class CreateClaimActivity {
+ /**
+ * Constructs a new CreateClaimActivity
.
+ * @alias module:model/CreateClaimActivity
+ * @param 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).
+ */
+ constructor(staking_id) {
+
+ CreateClaimActivity.initialize(this, staking_id);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, staking_id) {
+ obj['staking_id'] = staking_id;
+ }
+
+ /**
+ * Constructs a CreateClaimActivity
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/CreateClaimActivity} obj Optional instance to populate.
+ * @return {module:model/CreateClaimActivity} The populated CreateClaimActivity
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new CreateClaimActivity();
+
+ if (data.hasOwnProperty('request_id')) {
+ obj['request_id'] = ApiClient.convertToType(data['request_id'], 'String');
+ }
+ if (data.hasOwnProperty('staking_id')) {
+ obj['staking_id'] = ApiClient.convertToType(data['staking_id'], 'String');
+ }
+ if (data.hasOwnProperty('fee')) {
+ obj['fee'] = TransactionRequestFee.constructFromObject(data['fee']);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to CreateClaimActivity
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to CreateClaimActivity
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of CreateClaimActivity.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
+ }
+ // ensure the json data is a string
+ if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
+ throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
+ }
+ // validate the optional field `fee`
+ if (data['fee']) { // data not null
+ if (!!TransactionRequestFee.validateJSON) {
+ TransactionRequestFee.validateJSON(data['fee']);
+ }
+ }
+
+ return true;
+ }
+
+
+}
+
+CreateClaimActivity.RequiredProperties = ["staking_id"];
+
+/**
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
+ * @member {String} request_id
+ */
+CreateClaimActivity.prototype['request_id'] = undefined;
+
+/**
+ * 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).
+ * @member {String} staking_id
+ */
+CreateClaimActivity.prototype['staking_id'] = undefined;
+
+/**
+ * @member {module:model/TransactionRequestFee} fee
+ */
+CreateClaimActivity.prototype['fee'] = undefined;
+
+
+
+
+
+
+export default CreateClaimActivity;
+
diff --git a/src/model/CreateClaimActivityRequest.js b/src/model/CreateClaimActivityRequest.js
new file mode 100644
index 00000000..174edee7
--- /dev/null
+++ b/src/model/CreateClaimActivityRequest.js
@@ -0,0 +1,161 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import ActivityInitiator from './ActivityInitiator';
+import CreateClaimActivity from './CreateClaimActivity';
+import TransactionRequestFee from './TransactionRequestFee';
+
+/**
+ * The CreateClaimActivityRequest model module.
+ * @module model/CreateClaimActivityRequest
+ */
+class CreateClaimActivityRequest {
+ /**
+ * Constructs a new CreateClaimActivityRequest
.
+ * @alias module:model/CreateClaimActivityRequest
+ * @implements module:model/CreateClaimActivity
+ * @implements module:model/ActivityInitiator
+ * @param 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).
+ */
+ constructor(staking_id) {
+ CreateClaimActivity.initialize(this, staking_id);ActivityInitiator.initialize(this);
+ CreateClaimActivityRequest.initialize(this, staking_id);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, staking_id) {
+ obj['staking_id'] = staking_id;
+ }
+
+ /**
+ * Constructs a CreateClaimActivityRequest
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/CreateClaimActivityRequest} obj Optional instance to populate.
+ * @return {module:model/CreateClaimActivityRequest} The populated CreateClaimActivityRequest
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new CreateClaimActivityRequest();
+ CreateClaimActivity.constructFromObject(data, obj);
+ ActivityInitiator.constructFromObject(data, obj);
+
+ if (data.hasOwnProperty('request_id')) {
+ obj['request_id'] = ApiClient.convertToType(data['request_id'], 'String');
+ }
+ if (data.hasOwnProperty('staking_id')) {
+ obj['staking_id'] = ApiClient.convertToType(data['staking_id'], 'String');
+ }
+ if (data.hasOwnProperty('fee')) {
+ obj['fee'] = TransactionRequestFee.constructFromObject(data['fee']);
+ }
+ if (data.hasOwnProperty('app_initiator')) {
+ obj['app_initiator'] = ApiClient.convertToType(data['app_initiator'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to CreateClaimActivityRequest
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to CreateClaimActivityRequest
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of CreateClaimActivityRequest.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
+ }
+ // ensure the json data is a string
+ if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
+ throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
+ }
+ // validate the optional field `fee`
+ if (data['fee']) { // data not null
+ if (!!TransactionRequestFee.validateJSON) {
+ TransactionRequestFee.validateJSON(data['fee']);
+ }
+ }
+ // ensure the json data is a string
+ if (data['app_initiator'] && !(typeof data['app_initiator'] === 'string' || data['app_initiator'] instanceof String)) {
+ throw new Error("Expected the field `app_initiator` to be a primitive type in the JSON string but got " + data['app_initiator']);
+ }
+
+ return true;
+ }
+
+
+}
+
+CreateClaimActivityRequest.RequiredProperties = ["staking_id"];
+
+/**
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
+ * @member {String} request_id
+ */
+CreateClaimActivityRequest.prototype['request_id'] = undefined;
+
+/**
+ * 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).
+ * @member {String} staking_id
+ */
+CreateClaimActivityRequest.prototype['staking_id'] = undefined;
+
+/**
+ * @member {module:model/TransactionRequestFee} fee
+ */
+CreateClaimActivityRequest.prototype['fee'] = undefined;
+
+/**
+ * The initiator of the staking activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.
+ * @member {String} app_initiator
+ */
+CreateClaimActivityRequest.prototype['app_initiator'] = undefined;
+
+
+// Implement CreateClaimActivity interface:
+/**
+ * The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
+ * @member {String} request_id
+ */
+CreateClaimActivity.prototype['request_id'] = undefined;
+/**
+ * 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).
+ * @member {String} staking_id
+ */
+CreateClaimActivity.prototype['staking_id'] = undefined;
+/**
+ * @member {module:model/TransactionRequestFee} fee
+ */
+CreateClaimActivity.prototype['fee'] = undefined;
+// Implement ActivityInitiator interface:
+/**
+ * The initiator of the staking activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.
+ * @member {String} app_initiator
+ */
+ActivityInitiator.prototype['app_initiator'] = undefined;
+
+
+
+
+export default CreateClaimActivityRequest;
+
diff --git a/src/model/CreateStakeActivity.js b/src/model/CreateStakeActivity.js
index aa24c059..07a07301 100644
--- a/src/model/CreateStakeActivity.js
+++ b/src/model/CreateStakeActivity.js
@@ -11,6 +11,7 @@
import ApiClient from '../ApiClient';
import CreateStakeActivityExtra from './CreateStakeActivityExtra';
+import StakingPoolId from './StakingPoolId';
import StakingSource from './StakingSource';
import TransactionRequestFee from './TransactionRequestFee';
@@ -22,7 +23,7 @@ class CreateStakeActivity {
/**
* Constructs a new CreateStakeActivity
.
* @alias module:model/CreateStakeActivity
- * @param pool_id {String} The ID of the staking pool.
+ * @param pool_id {module:model/StakingPoolId}
* @param amount {String} The amount to stake.
* @param fee {module:model/TransactionRequestFee}
* @param extra {module:model/CreateStakeActivityExtra}
@@ -62,7 +63,7 @@ class CreateStakeActivity {
obj['source'] = StakingSource.constructFromObject(data['source']);
}
if (data.hasOwnProperty('pool_id')) {
- obj['pool_id'] = ApiClient.convertToType(data['pool_id'], 'String');
+ obj['pool_id'] = StakingPoolId.constructFromObject(data['pool_id']);
}
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
@@ -100,10 +101,6 @@ class CreateStakeActivity {
}
}
// ensure the json data is a string
- if (data['pool_id'] && !(typeof data['pool_id'] === 'string' || data['pool_id'] instanceof String)) {
- throw new Error("Expected the field `pool_id` to be a primitive type in the JSON string but got " + data['pool_id']);
- }
- // ensure the json data is a string
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
}
@@ -140,8 +137,7 @@ CreateStakeActivity.prototype['request_id'] = undefined;
CreateStakeActivity.prototype['source'] = undefined;
/**
- * The ID of the staking pool.
- * @member {String} pool_id
+ * @member {module:model/StakingPoolId} pool_id
*/
CreateStakeActivity.prototype['pool_id'] = undefined;
diff --git a/src/model/CreateStakeActivityExtra.js b/src/model/CreateStakeActivityExtra.js
index 5d785d2f..a565f6a9 100644
--- a/src/model/CreateStakeActivityExtra.js
+++ b/src/model/CreateStakeActivityExtra.js
@@ -11,6 +11,7 @@
import ApiClient from '../ApiClient';
import BabylonStakeExtra from './BabylonStakeExtra';
+import CoreStakeExtra from './CoreStakeExtra';
import EthStakeExtra from './EthStakeExtra';
import StakingPoolType from './StakingPoolType';
@@ -22,7 +23,7 @@ class CreateStakeActivityExtra {
/**
* Constructs a new CreateStakeActivityExtra
.
* @alias module:model/CreateStakeActivityExtra
- * @param {(module:model/BabylonStakeExtra|module:model/EthStakeExtra)} instance The actual instance to initialize CreateStakeActivityExtra.
+ * @param {(module:model/BabylonStakeExtra|module:model/CoreStakeExtra|module:model/EthStakeExtra)} instance The actual instance to initialize CreateStakeActivityExtra.
*/
constructor(instance = null) {
if (instance === null) {
@@ -39,6 +40,10 @@ class CreateStakeActivityExtra {
this.actualInstance = BabylonStakeExtra.constructFromObject(instance);
match++;
break;
+ case "CoreBTC":
+ this.actualInstance = CoreStakeExtra.constructFromObject(instance);
+ match++;
+ break;
case "ETHBeacon":
this.actualInstance = EthStakeExtra.constructFromObject(instance);
match++;
@@ -100,12 +105,37 @@ class CreateStakeActivityExtra {
errorMessages.push("Failed to construct EthStakeExtra: " + err)
}
+ try {
+ if (instance instanceof CoreStakeExtra) {
+ this.actualInstance = instance;
+ } else if(!!CoreStakeExtra.validateJSON && CoreStakeExtra.validateJSON(instance)){
+ // plain JS object
+ // create CoreStakeExtra from JS object
+ this.actualInstance = CoreStakeExtra.constructFromObject(instance);
+ } else {
+ if(CoreStakeExtra.constructFromObject(instance)) {
+ if (!!CoreStakeExtra.constructFromObject(instance).toJSON) {
+ if (CoreStakeExtra.constructFromObject(instance).toJSON()) {
+ this.actualInstance = CoreStakeExtra.constructFromObject(instance);
+ }
+ } else {
+ this.actualInstance = CoreStakeExtra.constructFromObject(instance);
+ }
+ }
+
+ }
+ match++;
+ } catch(err) {
+ // json data failed to deserialize into CoreStakeExtra
+ errorMessages.push("Failed to construct CoreStakeExtra: " + err)
+ }
+
// if (match > 1) {
- // throw new Error("Multiple matches found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra, EthStakeExtra. Input: " + JSON.stringify(instance));
+ // throw new Error("Multiple matches found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra, CoreStakeExtra, EthStakeExtra. Input: " + JSON.stringify(instance));
// } else
if (match === 0) {
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
- // throw new Error("No match found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra, EthStakeExtra. Details: " +
+ // throw new Error("No match found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra, CoreStakeExtra, EthStakeExtra. Details: " +
// errorMessages.join(", "));
return;
} else { // only 1 match
@@ -125,16 +155,16 @@ class CreateStakeActivityExtra {
}
/**
- * Gets the actual instance, which can be BabylonStakeExtra
, EthStakeExtra
.
- * @return {(module:model/BabylonStakeExtra|module:model/EthStakeExtra)} The actual instance.
+ * Gets the actual instance, which can be BabylonStakeExtra
, CoreStakeExtra
, EthStakeExtra
.
+ * @return {(module:model/BabylonStakeExtra|module:model/CoreStakeExtra|module:model/EthStakeExtra)} The actual instance.
*/
getActualInstance() {
return this.actualInstance;
}
/**
- * Sets the actual instance, which can be BabylonStakeExtra
, EthStakeExtra
.
- * @param {(module:model/BabylonStakeExtra|module:model/EthStakeExtra)} obj The actual instance.
+ * Sets the actual instance, which can be BabylonStakeExtra
, CoreStakeExtra
, EthStakeExtra
.
+ * @param {(module:model/BabylonStakeExtra|module:model/CoreStakeExtra|module:model/EthStakeExtra)} obj The actual instance.
*/
setActualInstance(obj) {
this.actualInstance = CreateStakeActivityExtra.constructFromObject(obj).getActualInstance();
@@ -187,8 +217,32 @@ CreateStakeActivityExtra.prototype['auto_broadcast'] = undefined;
*/
CreateStakeActivityExtra.prototype['provider_name'] = undefined;
+/**
+ * The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
+ * @member {Number} timelock
+ */
+CreateStakeActivityExtra.prototype['timelock'] = undefined;
+
+/**
+ * The change address on the Bitcoin chain. If not provided, the source wallet's address will be used as the change address.
+ * @member {String} change_address
+ */
+CreateStakeActivityExtra.prototype['change_address'] = undefined;
+
+/**
+ * The validator's EVM address.
+ * @member {String} validator_address
+ */
+CreateStakeActivityExtra.prototype['validator_address'] = undefined;
+
+/**
+ * The EVM address to receive staking rewards.
+ * @member {String} reward_address
+ */
+CreateStakeActivityExtra.prototype['reward_address'] = undefined;
+
-CreateStakeActivityExtra.OneOf = ["BabylonStakeExtra", "EthStakeExtra"];
+CreateStakeActivityExtra.OneOf = ["BabylonStakeExtra", "CoreStakeExtra", "EthStakeExtra"];
export default CreateStakeActivityExtra;
diff --git a/src/model/CreateStakeActivityRequest.js b/src/model/CreateStakeActivityRequest.js
index be7b4f2e..4ab08a4e 100644
--- a/src/model/CreateStakeActivityRequest.js
+++ b/src/model/CreateStakeActivityRequest.js
@@ -13,6 +13,7 @@ import ApiClient from '../ApiClient';
import ActivityInitiator from './ActivityInitiator';
import CreateStakeActivity from './CreateStakeActivity';
import CreateStakeActivityExtra from './CreateStakeActivityExtra';
+import StakingPoolId from './StakingPoolId';
import StakingSource from './StakingSource';
import TransactionRequestFee from './TransactionRequestFee';
@@ -26,7 +27,7 @@ class CreateStakeActivityRequest {
* @alias module:model/CreateStakeActivityRequest
* @implements module:model/CreateStakeActivity
* @implements module:model/ActivityInitiator
- * @param pool_id {String} The ID of the staking pool.
+ * @param pool_id {module:model/StakingPoolId}
* @param amount {String} The amount to stake.
* @param fee {module:model/TransactionRequestFee}
* @param extra {module:model/CreateStakeActivityExtra}
@@ -68,7 +69,7 @@ class CreateStakeActivityRequest {
obj['source'] = StakingSource.constructFromObject(data['source']);
}
if (data.hasOwnProperty('pool_id')) {
- obj['pool_id'] = ApiClient.convertToType(data['pool_id'], 'String');
+ obj['pool_id'] = StakingPoolId.constructFromObject(data['pool_id']);
}
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
@@ -109,10 +110,6 @@ class CreateStakeActivityRequest {
}
}
// ensure the json data is a string
- if (data['pool_id'] && !(typeof data['pool_id'] === 'string' || data['pool_id'] instanceof String)) {
- throw new Error("Expected the field `pool_id` to be a primitive type in the JSON string but got " + data['pool_id']);
- }
- // ensure the json data is a string
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
}
@@ -153,8 +150,7 @@ CreateStakeActivityRequest.prototype['request_id'] = undefined;
CreateStakeActivityRequest.prototype['source'] = undefined;
/**
- * The ID of the staking pool.
- * @member {String} pool_id
+ * @member {module:model/StakingPoolId} pool_id
*/
CreateStakeActivityRequest.prototype['pool_id'] = undefined;
@@ -192,8 +188,7 @@ CreateStakeActivity.prototype['request_id'] = undefined;
*/
CreateStakeActivity.prototype['source'] = undefined;
/**
- * The ID of the staking pool.
- * @member {String} pool_id
+ * @member {module:model/StakingPoolId} pool_id
*/
CreateStakeActivity.prototype['pool_id'] = undefined;
/**
diff --git a/src/model/CreateWithdrawActivity.js b/src/model/CreateWithdrawActivity.js
index 10689f71..c41cac30 100644
--- a/src/model/CreateWithdrawActivity.js
+++ b/src/model/CreateWithdrawActivity.js
@@ -58,9 +58,6 @@ class CreateWithdrawActivity {
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
}
- if (data.hasOwnProperty('address')) {
- obj['address'] = ApiClient.convertToType(data['address'], 'String');
- }
if (data.hasOwnProperty('fee')) {
obj['fee'] = TransactionRequestFee.constructFromObject(data['fee']);
}
@@ -92,10 +89,6 @@ class CreateWithdrawActivity {
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
}
- // ensure the json data is a string
- if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
- throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
- }
// validate the optional field `fee`
if (data['fee']) { // data not null
if (!!TransactionRequestFee.validateJSON) {
@@ -129,12 +122,6 @@ CreateWithdrawActivity.prototype['staking_id'] = undefined;
*/
CreateWithdrawActivity.prototype['amount'] = undefined;
-/**
- * The withdrawal address.
- * @member {String} address
- */
-CreateWithdrawActivity.prototype['address'] = undefined;
-
/**
* @member {module:model/TransactionRequestFee} fee
*/
diff --git a/src/model/CreateWithdrawActivityRequest.js b/src/model/CreateWithdrawActivityRequest.js
index 14cfd6a2..89f03e94 100644
--- a/src/model/CreateWithdrawActivityRequest.js
+++ b/src/model/CreateWithdrawActivityRequest.js
@@ -64,9 +64,6 @@ class CreateWithdrawActivityRequest {
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
}
- if (data.hasOwnProperty('address')) {
- obj['address'] = ApiClient.convertToType(data['address'], 'String');
- }
if (data.hasOwnProperty('fee')) {
obj['fee'] = TransactionRequestFee.constructFromObject(data['fee']);
}
@@ -101,10 +98,6 @@ class CreateWithdrawActivityRequest {
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
}
- // ensure the json data is a string
- if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
- throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
- }
// validate the optional field `fee`
if (data['fee']) { // data not null
if (!!TransactionRequestFee.validateJSON) {
@@ -142,12 +135,6 @@ CreateWithdrawActivityRequest.prototype['staking_id'] = undefined;
*/
CreateWithdrawActivityRequest.prototype['amount'] = undefined;
-/**
- * The withdrawal address.
- * @member {String} address
- */
-CreateWithdrawActivityRequest.prototype['address'] = undefined;
-
/**
* @member {module:model/TransactionRequestFee} fee
*/
@@ -176,11 +163,6 @@ CreateWithdrawActivity.prototype['staking_id'] = undefined;
* @member {String} amount
*/
CreateWithdrawActivity.prototype['amount'] = undefined;
-/**
- * The withdrawal address.
- * @member {String} address
- */
-CreateWithdrawActivity.prototype['address'] = undefined;
/**
* @member {module:model/TransactionRequestFee} fee
*/
diff --git a/src/model/EstimateClaimFee.js b/src/model/EstimateClaimFee.js
new file mode 100644
index 00000000..fd21027a
--- /dev/null
+++ b/src/model/EstimateClaimFee.js
@@ -0,0 +1,125 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import ActivityType from './ActivityType';
+import BaseEstimateStakingFee from './BaseEstimateStakingFee';
+import TransactionRequestFee from './TransactionRequestFee';
+
+/**
+ * The EstimateClaimFee model module.
+ * @module model/EstimateClaimFee
+ */
+class EstimateClaimFee {
+ /**
+ * Constructs a new EstimateClaimFee
.
+ * @alias module:model/EstimateClaimFee
+ * @implements module:model/BaseEstimateStakingFee
+ * @param activity_type {module:model/ActivityType}
+ */
+ constructor(activity_type) {
+ BaseEstimateStakingFee.initialize(this, activity_type);
+ EstimateClaimFee.initialize(this, activity_type);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, activity_type) {
+ obj['activity_type'] = activity_type;
+ }
+
+ /**
+ * Constructs a EstimateClaimFee
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/EstimateClaimFee} obj Optional instance to populate.
+ * @return {module:model/EstimateClaimFee} The populated EstimateClaimFee
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new EstimateClaimFee();
+ BaseEstimateStakingFee.constructFromObject(data, obj);
+
+ if (data.hasOwnProperty('activity_type')) {
+ obj['activity_type'] = ActivityType.constructFromObject(data['activity_type']);
+ }
+ if (data.hasOwnProperty('staking_id')) {
+ obj['staking_id'] = ApiClient.convertToType(data['staking_id'], 'String');
+ }
+ if (data.hasOwnProperty('fee')) {
+ obj['fee'] = TransactionRequestFee.constructFromObject(data['fee']);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to EstimateClaimFee
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to EstimateClaimFee
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of EstimateClaimFee.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
+ throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
+ }
+ // validate the optional field `fee`
+ if (data['fee']) { // data not null
+ if (!!TransactionRequestFee.validateJSON) {
+ TransactionRequestFee.validateJSON(data['fee']);
+ }
+ }
+
+ return true;
+ }
+
+
+}
+
+EstimateClaimFee.RequiredProperties = ["activity_type"];
+
+/**
+ * @member {module:model/ActivityType} activity_type
+ */
+EstimateClaimFee.prototype['activity_type'] = undefined;
+
+/**
+ * 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).
+ * @member {String} staking_id
+ */
+EstimateClaimFee.prototype['staking_id'] = undefined;
+
+/**
+ * @member {module:model/TransactionRequestFee} fee
+ */
+EstimateClaimFee.prototype['fee'] = undefined;
+
+
+// Implement BaseEstimateStakingFee interface:
+/**
+ * @member {module:model/ActivityType} activity_type
+ */
+BaseEstimateStakingFee.prototype['activity_type'] = undefined;
+
+
+
+
+export default EstimateClaimFee;
+
diff --git a/src/model/EstimateContractCallFeeParams.js b/src/model/EstimateContractCallFeeParams.js
index b301b0f9..624741bc 100644
--- a/src/model/EstimateContractCallFeeParams.js
+++ b/src/model/EstimateContractCallFeeParams.js
@@ -25,7 +25,7 @@ class EstimateContractCallFeeParams {
* The information about a transaction that interacts with a smart contract
* @alias module:model/EstimateContractCallFeeParams
* @param request_type {module:model/EstimateFeeRequestType}
- * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
+ * @param chain_id {String} The chain ID of the chain on which the smart contract is deployed. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
* @param source {module:model/ContractCallSource}
* @param destination {module:model/ContractCallDestination}
*/
@@ -132,7 +132,7 @@ EstimateContractCallFeeParams.prototype['request_id'] = undefined;
EstimateContractCallFeeParams.prototype['request_type'] = undefined;
/**
- * The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
+ * The chain ID of the chain on which the smart contract is deployed. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
* @member {String} chain_id
*/
EstimateContractCallFeeParams.prototype['chain_id'] = undefined;
diff --git a/src/model/EstimateFeeParams.js b/src/model/EstimateFeeParams.js
index a7aa64b6..861b307c 100644
--- a/src/model/EstimateFeeParams.js
+++ b/src/model/EstimateFeeParams.js
@@ -194,7 +194,7 @@ EstimateFeeParams.prototype['destination'] = undefined;
EstimateFeeParams.prototype['fee_type'] = undefined;
/**
- * The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
+ * The chain ID of the chain on which the smart contract is deployed. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
* @member {String} chain_id
*/
EstimateFeeParams.prototype['chain_id'] = undefined;
diff --git a/src/model/EstimateStakeFee.js b/src/model/EstimateStakeFee.js
index 882f145f..fe4a06c1 100644
--- a/src/model/EstimateStakeFee.js
+++ b/src/model/EstimateStakeFee.js
@@ -14,6 +14,7 @@ import ActivityType from './ActivityType';
import BaseEstimateStakingFee from './BaseEstimateStakingFee';
import CreateStakeActivity from './CreateStakeActivity';
import CreateStakeActivityExtra from './CreateStakeActivityExtra';
+import StakingPoolId from './StakingPoolId';
import StakingSource from './StakingSource';
import TransactionRequestFee from './TransactionRequestFee';
@@ -28,7 +29,7 @@ class EstimateStakeFee {
* @implements module:model/BaseEstimateStakingFee
* @implements module:model/CreateStakeActivity
* @param activity_type {module:model/ActivityType}
- * @param pool_id {String} The ID of the staking pool.
+ * @param pool_id {module:model/StakingPoolId}
* @param amount {String} The amount to stake.
* @param fee {module:model/TransactionRequestFee}
* @param extra {module:model/CreateStakeActivityExtra}
@@ -74,7 +75,7 @@ class EstimateStakeFee {
obj['source'] = StakingSource.constructFromObject(data['source']);
}
if (data.hasOwnProperty('pool_id')) {
- obj['pool_id'] = ApiClient.convertToType(data['pool_id'], 'String');
+ obj['pool_id'] = StakingPoolId.constructFromObject(data['pool_id']);
}
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
@@ -112,10 +113,6 @@ class EstimateStakeFee {
}
}
// ensure the json data is a string
- if (data['pool_id'] && !(typeof data['pool_id'] === 'string' || data['pool_id'] instanceof String)) {
- throw new Error("Expected the field `pool_id` to be a primitive type in the JSON string but got " + data['pool_id']);
- }
- // ensure the json data is a string
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
}
@@ -157,8 +154,7 @@ EstimateStakeFee.prototype['request_id'] = undefined;
EstimateStakeFee.prototype['source'] = undefined;
/**
- * The ID of the staking pool.
- * @member {String} pool_id
+ * @member {module:model/StakingPoolId} pool_id
*/
EstimateStakeFee.prototype['pool_id'] = undefined;
@@ -195,8 +191,7 @@ CreateStakeActivity.prototype['request_id'] = undefined;
*/
CreateStakeActivity.prototype['source'] = undefined;
/**
- * The ID of the staking pool.
- * @member {String} pool_id
+ * @member {module:model/StakingPoolId} pool_id
*/
CreateStakeActivity.prototype['pool_id'] = undefined;
/**
diff --git a/src/model/EstimateWithdrawFee.js b/src/model/EstimateWithdrawFee.js
index b5da5591..e252e5af 100644
--- a/src/model/EstimateWithdrawFee.js
+++ b/src/model/EstimateWithdrawFee.js
@@ -70,9 +70,6 @@ class EstimateWithdrawFee {
if (data.hasOwnProperty('amount')) {
obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
}
- if (data.hasOwnProperty('address')) {
- obj['address'] = ApiClient.convertToType(data['address'], 'String');
- }
if (data.hasOwnProperty('fee')) {
obj['fee'] = TransactionRequestFee.constructFromObject(data['fee']);
}
@@ -104,10 +101,6 @@ class EstimateWithdrawFee {
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
}
- // ensure the json data is a string
- if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
- throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
- }
// validate the optional field `fee`
if (data['fee']) { // data not null
if (!!TransactionRequestFee.validateJSON) {
@@ -146,12 +139,6 @@ EstimateWithdrawFee.prototype['staking_id'] = undefined;
*/
EstimateWithdrawFee.prototype['amount'] = undefined;
-/**
- * The withdrawal address.
- * @member {String} address
- */
-EstimateWithdrawFee.prototype['address'] = undefined;
-
/**
* @member {module:model/TransactionRequestFee} fee
*/
@@ -179,11 +166,6 @@ CreateWithdrawActivity.prototype['staking_id'] = undefined;
* @member {String} amount
*/
CreateWithdrawActivity.prototype['amount'] = undefined;
-/**
- * The withdrawal address.
- * @member {String} address
- */
-CreateWithdrawActivity.prototype['address'] = undefined;
/**
* @member {module:model/TransactionRequestFee} fee
*/
diff --git a/src/model/EstimatedFee.js b/src/model/EstimatedFee.js
index ff5fb218..885b76cd 100644
--- a/src/model/EstimatedFee.js
+++ b/src/model/EstimatedFee.js
@@ -237,7 +237,7 @@ EstimatedFee.prototype['token_id'] = undefined;
EstimatedFee.prototype['is_loop'] = undefined;
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
EstimatedFee.prototype['fee_amount'] = undefined;
diff --git a/src/model/EstimatedFixedFee.js b/src/model/EstimatedFixedFee.js
index 707ef2b5..00190b1e 100644
--- a/src/model/EstimatedFixedFee.js
+++ b/src/model/EstimatedFixedFee.js
@@ -20,10 +20,10 @@ import FeeType from './FeeType';
class EstimatedFixedFee {
/**
* Constructs a new EstimatedFixedFee
.
- * In the fixed fee model, the transaction fee is a fixed amount within a certain amount of period regardless of the transaction size or network congestion, which can vary between different chains.
+ * The estimated transaction fee based on the fixed fee model.
* @alias module:model/EstimatedFixedFee
* @implements module:model/FeeAmount
- * @param fee_amount {String} The fee that you need to pay for the transaction.
+ * @param fee_amount {String} The transaction fee that you need to pay for the transaction.
* @param fee_type {module:model/FeeType}
* @param token_id {String} The token ID of the transaction fee.
*/
@@ -101,7 +101,7 @@ class EstimatedFixedFee {
EstimatedFixedFee.RequiredProperties = ["fee_amount", "fee_type", "token_id"];
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
EstimatedFixedFee.prototype['fee_amount'] = undefined;
@@ -126,7 +126,7 @@ EstimatedFixedFee.prototype['is_loop'] = undefined;
// Implement FeeAmount interface:
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
FeeAmount.prototype['fee_amount'] = undefined;
diff --git a/src/model/EstimatedUtxoFeeSlow.js b/src/model/EstimatedUtxoFeeSlow.js
index 547075d4..d294e2d6 100644
--- a/src/model/EstimatedUtxoFeeSlow.js
+++ b/src/model/EstimatedUtxoFeeSlow.js
@@ -24,7 +24,7 @@ class EstimatedUtxoFeeSlow {
* @implements module:model/UtxoFeeBasePrice
* @implements module:model/FeeAmount
* @param fee_rate {String} The fee rate in sat/vByte. The fee rate represents the satoshis you are willing to pay for each byte of data that your transaction will consume on the blockchain.
- * @param fee_amount {String} The fee that you need to pay for the transaction.
+ * @param fee_amount {String} The transaction fee that you need to pay for the transaction.
*/
constructor(fee_rate, fee_amount) {
UtxoFeeBasePrice.initialize(this);FeeAmount.initialize(this);
@@ -100,7 +100,7 @@ EstimatedUtxoFeeSlow.RequiredProperties = ["fee_rate", "fee_amount"];
EstimatedUtxoFeeSlow.prototype['fee_rate'] = undefined;
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
EstimatedUtxoFeeSlow.prototype['fee_amount'] = undefined;
@@ -114,7 +114,7 @@ EstimatedUtxoFeeSlow.prototype['fee_amount'] = undefined;
UtxoFeeBasePrice.prototype['fee_rate'] = undefined;
// Implement FeeAmount interface:
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
FeeAmount.prototype['fee_amount'] = undefined;
diff --git a/src/model/EthStakingExtra.js b/src/model/EthStakingExtra.js
index fd1eddee..0b726a0c 100644
--- a/src/model/EthStakingExtra.js
+++ b/src/model/EthStakingExtra.js
@@ -11,6 +11,7 @@
import ApiClient from '../ApiClient';
import BaseStakeExtra from './BaseStakeExtra';
+import EthStakingExtraAllOfBeaconValidators from './EthStakingExtraAllOfBeaconValidators';
import StakingPoolType from './StakingPoolType';
/**
@@ -58,6 +59,9 @@ class EthStakingExtra {
if (data.hasOwnProperty('pos_chain')) {
obj['pos_chain'] = ApiClient.convertToType(data['pos_chain'], 'String');
}
+ if (data.hasOwnProperty('beacon_validators')) {
+ obj['beacon_validators'] = ApiClient.convertToType(data['beacon_validators'], [EthStakingExtraAllOfBeaconValidators]);
+ }
}
return obj;
}
@@ -78,6 +82,16 @@ class EthStakingExtra {
if (data['pos_chain'] && !(typeof data['pos_chain'] === 'string' || data['pos_chain'] instanceof String)) {
throw new Error("Expected the field `pos_chain` to be a primitive type in the JSON string but got " + data['pos_chain']);
}
+ if (data['beacon_validators']) { // data not null
+ // ensure the json data is an array
+ if (!Array.isArray(data['beacon_validators'])) {
+ throw new Error("Expected the field `beacon_validators` to be an array in the JSON data but got " + data['beacon_validators']);
+ }
+ // validate the optional field `beacon_validators` (array)
+ for (const item of data['beacon_validators']) {
+ EthStakingExtraAllOfBeaconValidators.validateJSON(item);
+ };
+ }
return true;
}
@@ -98,6 +112,12 @@ EthStakingExtra.prototype['pool_type'] = undefined;
*/
EthStakingExtra.prototype['pos_chain'] = undefined;
+/**
+ * The list of validator information.
+ * @member {Array.EthStakingExtraAllOfBeaconValidators
.
+ * @alias module:model/EthStakingExtraAllOfBeaconValidators
+ */
+ constructor() {
+
+ EthStakingExtraAllOfBeaconValidators.initialize(this);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj) {
+ }
+
+ /**
+ * Constructs a EthStakingExtraAllOfBeaconValidators
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/EthStakingExtraAllOfBeaconValidators} obj Optional instance to populate.
+ * @return {module:model/EthStakingExtraAllOfBeaconValidators} The populated EthStakingExtraAllOfBeaconValidators
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new EthStakingExtraAllOfBeaconValidators();
+
+ if (data.hasOwnProperty('pubkey')) {
+ obj['pubkey'] = ApiClient.convertToType(data['pubkey'], 'String');
+ }
+ if (data.hasOwnProperty('status')) {
+ obj['status'] = AmountStatus.constructFromObject(data['status']);
+ }
+ if (data.hasOwnProperty('apy')) {
+ obj['apy'] = ApiClient.convertToType(data['apy'], 'Number');
+ }
+ if (data.hasOwnProperty('staked_amount')) {
+ obj['staked_amount'] = ApiClient.convertToType(data['staked_amount'], 'String');
+ }
+ if (data.hasOwnProperty('rewards_received')) {
+ obj['rewards_received'] = ApiClient.convertToType(data['rewards_received'], 'String');
+ }
+ if (data.hasOwnProperty('updated_timestamp')) {
+ obj['updated_timestamp'] = ApiClient.convertToType(data['updated_timestamp'], 'Number');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to EthStakingExtraAllOfBeaconValidators
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to EthStakingExtraAllOfBeaconValidators
.
+ */
+ static validateJSON(data) {
+ // ensure the json data is a string
+ if (data['pubkey'] && !(typeof data['pubkey'] === 'string' || data['pubkey'] instanceof String)) {
+ throw new Error("Expected the field `pubkey` to be a primitive type in the JSON string but got " + data['pubkey']);
+ }
+ // ensure the json data is a string
+ if (data['staked_amount'] && !(typeof data['staked_amount'] === 'string' || data['staked_amount'] instanceof String)) {
+ throw new Error("Expected the field `staked_amount` to be a primitive type in the JSON string but got " + data['staked_amount']);
+ }
+ // ensure the json data is a string
+ if (data['rewards_received'] && !(typeof data['rewards_received'] === 'string' || data['rewards_received'] instanceof String)) {
+ throw new Error("Expected the field `rewards_received` to be a primitive type in the JSON string but got " + data['rewards_received']);
+ }
+
+ return true;
+ }
+
+
+}
+
+
+
+/**
+ * The public key of the validator.
+ * @member {String} pubkey
+ */
+EthStakingExtraAllOfBeaconValidators.prototype['pubkey'] = undefined;
+
+/**
+ * @member {module:model/AmountStatus} status
+ */
+EthStakingExtraAllOfBeaconValidators.prototype['status'] = undefined;
+
+/**
+ * The annual percentage yield (APY) of the validator.
+ * @member {Number} apy
+ */
+EthStakingExtraAllOfBeaconValidators.prototype['apy'] = undefined;
+
+/**
+ * The staked amount.
+ * @member {String} staked_amount
+ */
+EthStakingExtraAllOfBeaconValidators.prototype['staked_amount'] = undefined;
+
+/**
+ * The rewards received.
+ * @member {String} rewards_received
+ */
+EthStakingExtraAllOfBeaconValidators.prototype['rewards_received'] = undefined;
+
+/**
+ * The time when the validator's status was last updated, in Unix timestamp format and measured in milliseconds.
+ * @member {Number} updated_timestamp
+ */
+EthStakingExtraAllOfBeaconValidators.prototype['updated_timestamp'] = undefined;
+
+
+
+
+
+
+export default EthStakingExtraAllOfBeaconValidators;
+
diff --git a/src/model/FeeAmount.js b/src/model/FeeAmount.js
index 57837df4..9e250381 100644
--- a/src/model/FeeAmount.js
+++ b/src/model/FeeAmount.js
@@ -72,7 +72,7 @@ class FeeAmount {
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
FeeAmount.prototype['fee_amount'] = undefined;
diff --git a/src/model/FeeRate.js b/src/model/FeeRate.js
index 1b92016c..5dc1d99e 100644
--- a/src/model/FeeRate.js
+++ b/src/model/FeeRate.js
@@ -231,7 +231,7 @@ FeeRate.prototype['fee_type'] = undefined;
FeeRate.prototype['token_id'] = undefined;
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
FeeRate.prototype['fee_amount'] = undefined;
diff --git a/src/model/FixedFeeRate.js b/src/model/FixedFeeRate.js
index 4ae7e39a..db837424 100644
--- a/src/model/FixedFeeRate.js
+++ b/src/model/FixedFeeRate.js
@@ -96,7 +96,7 @@ class FixedFeeRate {
FixedFeeRate.RequiredProperties = ["fee_type", "token_id"];
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
FixedFeeRate.prototype['fee_amount'] = undefined;
@@ -115,7 +115,7 @@ FixedFeeRate.prototype['token_id'] = undefined;
// Implement FeeAmount interface:
/**
- * The fee that you need to pay for the transaction.
+ * The transaction fee that you need to pay for the transaction.
* @member {String} fee_amount
*/
FeeAmount.prototype['fee_amount'] = undefined;
diff --git a/src/model/GetStakingEstimationFeeRequest.js b/src/model/GetStakingEstimationFeeRequest.js
index fc0e8d76..c61fd8d0 100644
--- a/src/model/GetStakingEstimationFeeRequest.js
+++ b/src/model/GetStakingEstimationFeeRequest.js
@@ -12,9 +12,11 @@
import ApiClient from '../ApiClient';
import ActivityType from './ActivityType';
import CreateUnstakeActivityExtra from './CreateUnstakeActivityExtra';
+import EstimateClaimFee from './EstimateClaimFee';
import EstimateStakeFee from './EstimateStakeFee';
import EstimateUnstakeFee from './EstimateUnstakeFee';
import EstimateWithdrawFee from './EstimateWithdrawFee';
+import StakingPoolId from './StakingPoolId';
import StakingSource from './StakingSource';
import TransactionRequestFee from './TransactionRequestFee';
@@ -26,7 +28,7 @@ class GetStakingEstimationFeeRequest {
/**
* Constructs a new GetStakingEstimationFeeRequest
.
* @alias module:model/GetStakingEstimationFeeRequest
- * @param {(module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} instance The actual instance to initialize GetStakingEstimationFeeRequest.
+ * @param {(module:model/EstimateClaimFee|module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} instance The actual instance to initialize GetStakingEstimationFeeRequest.
*/
constructor(instance = null) {
if (instance === null) {
@@ -39,6 +41,10 @@ class GetStakingEstimationFeeRequest {
if (discriminatorValue) {
switch(discriminatorValue) {
+ case "Claim":
+ this.actualInstance = EstimateClaimFee.constructFromObject(instance);
+ match++;
+ break;
case "Stake":
this.actualInstance = EstimateStakeFee.constructFromObject(instance);
match++;
@@ -133,12 +139,37 @@ class GetStakingEstimationFeeRequest {
errorMessages.push("Failed to construct EstimateWithdrawFee: " + err)
}
+ try {
+ if (instance instanceof EstimateClaimFee) {
+ this.actualInstance = instance;
+ } else if(!!EstimateClaimFee.validateJSON && EstimateClaimFee.validateJSON(instance)){
+ // plain JS object
+ // create EstimateClaimFee from JS object
+ this.actualInstance = EstimateClaimFee.constructFromObject(instance);
+ } else {
+ if(EstimateClaimFee.constructFromObject(instance)) {
+ if (!!EstimateClaimFee.constructFromObject(instance).toJSON) {
+ if (EstimateClaimFee.constructFromObject(instance).toJSON()) {
+ this.actualInstance = EstimateClaimFee.constructFromObject(instance);
+ }
+ } else {
+ this.actualInstance = EstimateClaimFee.constructFromObject(instance);
+ }
+ }
+
+ }
+ match++;
+ } catch(err) {
+ // json data failed to deserialize into EstimateClaimFee
+ errorMessages.push("Failed to construct EstimateClaimFee: " + err)
+ }
+
// if (match > 1) {
- // throw new Error("Multiple matches found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Input: " + JSON.stringify(instance));
+ // throw new Error("Multiple matches found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateClaimFee, EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Input: " + JSON.stringify(instance));
// } else
if (match === 0) {
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
- // throw new Error("No match found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Details: " +
+ // throw new Error("No match found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateClaimFee, EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Details: " +
// errorMessages.join(", "));
return;
} else { // only 1 match
@@ -158,16 +189,16 @@ class GetStakingEstimationFeeRequest {
}
/**
- * Gets the actual instance, which can be EstimateStakeFee
, EstimateUnstakeFee
, EstimateWithdrawFee
.
- * @return {(module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} The actual instance.
+ * Gets the actual instance, which can be EstimateClaimFee
, EstimateStakeFee
, EstimateUnstakeFee
, EstimateWithdrawFee
.
+ * @return {(module:model/EstimateClaimFee|module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} The actual instance.
*/
getActualInstance() {
return this.actualInstance;
}
/**
- * Sets the actual instance, which can be EstimateStakeFee
, EstimateUnstakeFee
, EstimateWithdrawFee
.
- * @param {(module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} obj The actual instance.
+ * Sets the actual instance, which can be EstimateClaimFee
, EstimateStakeFee
, EstimateUnstakeFee
, EstimateWithdrawFee
.
+ * @param {(module:model/EstimateClaimFee|module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} obj The actual instance.
*/
setActualInstance(obj) {
this.actualInstance = GetStakingEstimationFeeRequest.constructFromObject(obj).getActualInstance();
@@ -208,8 +239,7 @@ GetStakingEstimationFeeRequest.prototype['request_id'] = undefined;
GetStakingEstimationFeeRequest.prototype['source'] = undefined;
/**
- * The ID of the staking pool.
- * @member {String} pool_id
+ * @member {module:model/StakingPoolId} pool_id
*/
GetStakingEstimationFeeRequest.prototype['pool_id'] = undefined;
@@ -230,19 +260,13 @@ GetStakingEstimationFeeRequest.prototype['fee'] = undefined;
GetStakingEstimationFeeRequest.prototype['extra'] = undefined;
/**
- * The ID of the corresponding staking position.
+ * 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).
* @member {String} staking_id
*/
GetStakingEstimationFeeRequest.prototype['staking_id'] = undefined;
-/**
- * The withdrawal address.
- * @member {String} address
- */
-GetStakingEstimationFeeRequest.prototype['address'] = undefined;
-
-GetStakingEstimationFeeRequest.OneOf = ["EstimateStakeFee", "EstimateUnstakeFee", "EstimateWithdrawFee"];
+GetStakingEstimationFeeRequest.OneOf = ["EstimateClaimFee", "EstimateStakeFee", "EstimateUnstakeFee", "EstimateWithdrawFee"];
export default GetStakingEstimationFeeRequest;
diff --git a/src/model/MPCProject.js b/src/model/MPCProject.js
index 8badd92f..69b9f435 100644
--- a/src/model/MPCProject.js
+++ b/src/model/MPCProject.js
@@ -60,8 +60,8 @@ class MPCProject {
if (data.hasOwnProperty('threshold')) {
obj['threshold'] = ApiClient.convertToType(data['threshold'], 'Number');
}
- if (data.hasOwnProperty('create_timestamp')) {
- obj['create_timestamp'] = ApiClient.convertToType(data['create_timestamp'], 'Number');
+ if (data.hasOwnProperty('created_timestamp')) {
+ obj['created_timestamp'] = ApiClient.convertToType(data['created_timestamp'], 'Number');
}
}
return obj;
@@ -126,9 +126,9 @@ MPCProject.prototype['threshold'] = undefined;
/**
* The project's creation time in Unix timestamp format, measured in milliseconds.
- * @member {Number} create_timestamp
+ * @member {Number} created_timestamp
*/
-MPCProject.prototype['create_timestamp'] = undefined;
+MPCProject.prototype['created_timestamp'] = undefined;
diff --git a/src/model/MpcTransferSource.js b/src/model/MpcTransferSource.js
index 550e441f..f297796c 100644
--- a/src/model/MpcTransferSource.js
+++ b/src/model/MpcTransferSource.js
@@ -131,7 +131,7 @@ MpcTransferSource.prototype['source_type'] = undefined;
MpcTransferSource.prototype['wallet_id'] = undefined;
/**
- * 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.
+ * 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.
* @member {String} address
*/
MpcTransferSource.prototype['address'] = undefined;
diff --git a/src/model/Pagination.js b/src/model/Pagination.js
index b90db0fb..98336b12 100644
--- a/src/model/Pagination.js
+++ b/src/model/Pagination.js
@@ -22,7 +22,7 @@ class Pagination {
* @alias module:model/Pagination
* @param before {String} An object ID that serves as a starting point for retrieving data in reverse chronological order for the next request. If this property is empty, it means that you have reached the start of the data records.
* @param after {String} An object ID that acts as a starting point for retrieving data in chronological order for the next request. If this property is empty, it means that you have reached the end of the data records.
- * @param total_count {Number} The total number of records that match the query, across all pages.
+ * @param total_count {Number} The total number of records that match the query criteria, unaffected by the pagination parameters (`before` , `after`, and `limit`).
*/
constructor(before, after, total_count) {
@@ -106,7 +106,7 @@ Pagination.prototype['before'] = undefined;
Pagination.prototype['after'] = undefined;
/**
- * The total number of records that match the query, across all pages.
+ * The total number of records that match the query criteria, unaffected by the pagination parameters (`before` , `after`, and `limit`).
* @member {Number} total_count
*/
Pagination.prototype['total_count'] = undefined;
diff --git a/src/model/StakingPoolId.js b/src/model/StakingPoolId.js
new file mode 100644
index 00000000..d406156e
--- /dev/null
+++ b/src/model/StakingPoolId.js
@@ -0,0 +1,79 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+/**
+* Enum class StakingPoolId.
+* @enum {}
+* @readonly
+*/
+export default class StakingPoolId {
+
+ /**
+ * value: "babylon_btc_signet"
+ * @const
+ */
+ "babylon_btc_signet" = "babylon_btc_signet";
+
+
+ /**
+ * value: "babylon_btc"
+ * @const
+ */
+ "babylon_btc" = "babylon_btc";
+
+
+ /**
+ * value: "beacon_eth"
+ * @const
+ */
+ "beacon_eth" = "beacon_eth";
+
+
+ /**
+ * value: "beacon_eth_holesky"
+ * @const
+ */
+ "beacon_eth_holesky" = "beacon_eth_holesky";
+
+
+ /**
+ * value: "core_btc"
+ * @const
+ */
+ "core_btc" = "core_btc";
+
+
+ /**
+ * value: "core_xtn"
+ * @const
+ */
+ "core_xtn" = "core_xtn";
+
+
+ /**
+ * value: "unknown_default_open_api"
+ * @const
+ */
+ "unknown_default_open_api" = "unknown_default_open_api";
+
+
+
+ /**
+ * Returns a StakingPoolId
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/StakingPoolId} The enum StakingPoolId
value.
+ */
+ static constructFromObject(object) {
+ return object;
+ }
+}
+
diff --git a/src/model/StakingPoolType.js b/src/model/StakingPoolType.js
index 53b7d4f4..eb7fc512 100644
--- a/src/model/StakingPoolType.js
+++ b/src/model/StakingPoolType.js
@@ -31,6 +31,13 @@ export default class StakingPoolType {
"ETHBeacon" = "ETHBeacon";
+ /**
+ * value: "CoreBTC"
+ * @const
+ */
+ "CoreBTC" = "CoreBTC";
+
+
/**
* value: "unknown_default_open_api"
* @const
diff --git a/src/model/Stakings.js b/src/model/Stakings.js
index 78d1abcd..d8d99d13 100644
--- a/src/model/Stakings.js
+++ b/src/model/Stakings.js
@@ -11,8 +11,9 @@
import ApiClient from '../ApiClient';
import AmountDetailsInner from './AmountDetailsInner';
+import BabylonValidator from './BabylonValidator';
+import StakingPoolId from './StakingPoolId';
import StakingsExtra from './StakingsExtra';
-import StakingsValidatorInfo from './StakingsValidatorInfo';
/**
* The Stakings model module.
@@ -27,11 +28,11 @@ class Stakings {
* @param wallet_id {String} The staker's wallet ID.
* @param address {String} The staker's wallet address.
* @param amounts {Array.StakingsExtra
.
* @alias module:model/StakingsExtra
- * @param {(module:model/BabylonStakingExtra|module:model/EthStakingExtra)} instance The actual instance to initialize StakingsExtra.
+ * @param {(module:model/BabylonStakingExtra|module:model/CoreStakingExtra|module:model/EthStakingExtra)} instance The actual instance to initialize StakingsExtra.
*/
constructor(instance = null) {
if (instance === null) {
@@ -39,6 +41,10 @@ class StakingsExtra {
this.actualInstance = BabylonStakingExtra.constructFromObject(instance);
match++;
break;
+ case "CoreBTC":
+ this.actualInstance = CoreStakingExtra.constructFromObject(instance);
+ match++;
+ break;
case "ETHBeacon":
this.actualInstance = EthStakingExtra.constructFromObject(instance);
match++;
@@ -100,12 +106,37 @@ class StakingsExtra {
errorMessages.push("Failed to construct EthStakingExtra: " + err)
}
+ try {
+ if (instance instanceof CoreStakingExtra) {
+ this.actualInstance = instance;
+ } else if(!!CoreStakingExtra.validateJSON && CoreStakingExtra.validateJSON(instance)){
+ // plain JS object
+ // create CoreStakingExtra from JS object
+ this.actualInstance = CoreStakingExtra.constructFromObject(instance);
+ } else {
+ if(CoreStakingExtra.constructFromObject(instance)) {
+ if (!!CoreStakingExtra.constructFromObject(instance).toJSON) {
+ if (CoreStakingExtra.constructFromObject(instance).toJSON()) {
+ this.actualInstance = CoreStakingExtra.constructFromObject(instance);
+ }
+ } else {
+ this.actualInstance = CoreStakingExtra.constructFromObject(instance);
+ }
+ }
+
+ }
+ match++;
+ } catch(err) {
+ // json data failed to deserialize into CoreStakingExtra
+ errorMessages.push("Failed to construct CoreStakingExtra: " + err)
+ }
+
// if (match > 1) {
- // throw new Error("Multiple matches found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, EthStakingExtra. Input: " + JSON.stringify(instance));
+ // throw new Error("Multiple matches found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, CoreStakingExtra, EthStakingExtra. Input: " + JSON.stringify(instance));
// } else
if (match === 0) {
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
- // throw new Error("No match found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, EthStakingExtra. Details: " +
+ // throw new Error("No match found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, CoreStakingExtra, EthStakingExtra. Details: " +
// errorMessages.join(", "));
return;
} else { // only 1 match
@@ -125,16 +156,16 @@ class StakingsExtra {
}
/**
- * Gets the actual instance, which can be BabylonStakingExtra
, EthStakingExtra
.
- * @return {(module:model/BabylonStakingExtra|module:model/EthStakingExtra)} The actual instance.
+ * Gets the actual instance, which can be BabylonStakingExtra
, CoreStakingExtra
, EthStakingExtra
.
+ * @return {(module:model/BabylonStakingExtra|module:model/CoreStakingExtra|module:model/EthStakingExtra)} The actual instance.
*/
getActualInstance() {
return this.actualInstance;
}
/**
- * Sets the actual instance, which can be BabylonStakingExtra
, EthStakingExtra
.
- * @param {(module:model/BabylonStakingExtra|module:model/EthStakingExtra)} obj The actual instance.
+ * Sets the actual instance, which can be BabylonStakingExtra
, CoreStakingExtra
, EthStakingExtra
.
+ * @param {(module:model/BabylonStakingExtra|module:model/CoreStakingExtra|module:model/EthStakingExtra)} obj The actual instance.
*/
setActualInstance(obj) {
this.actualInstance = StakingsExtra.constructFromObject(obj).getActualInstance();
@@ -193,8 +224,38 @@ StakingsExtra.prototype['stake_address'] = undefined;
*/
StakingsExtra.prototype['unbond_address'] = undefined;
+/**
+ * The list of validator information.
+ * @member {Array.StakingsValidatorInfo
.
- * The information about the validator.
- * @alias module:model/StakingsValidatorInfo
- */
- constructor() {
-
- StakingsValidatorInfo.initialize(this);
- }
-
- /**
- * Initializes the fields of this object.
- * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
- * Only for internal use.
- */
- static initialize(obj) {
- }
-
- /**
- * Constructs a StakingsValidatorInfo
from a plain JavaScript object, optionally creating a new instance.
- * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
- * @param {Object} data The plain JavaScript object bearing properties of interest.
- * @param {module:model/StakingsValidatorInfo} obj Optional instance to populate.
- * @return {module:model/StakingsValidatorInfo} The populated StakingsValidatorInfo
instance.
- */
- static constructFromObject(data, obj) {
- if (data) {
- obj = obj || new StakingsValidatorInfo();
-
- if (data.hasOwnProperty('icon_url')) {
- obj['icon_url'] = ApiClient.convertToType(data['icon_url'], 'String');
- }
- if (data.hasOwnProperty('public_key')) {
- obj['public_key'] = ApiClient.convertToType(data['public_key'], 'String');
- }
- if (data.hasOwnProperty('name')) {
- obj['name'] = ApiClient.convertToType(data['name'], 'String');
- }
- if (data.hasOwnProperty('address')) {
- obj['address'] = ApiClient.convertToType(data['address'], 'String');
- }
- if (data.hasOwnProperty('commission_rate')) {
- obj['commission_rate'] = ApiClient.convertToType(data['commission_rate'], 'String');
- }
- }
- return obj;
- }
-
- /**
- * Validates the JSON data with respect to StakingsValidatorInfo
.
- * @param {Object} data The plain JavaScript object bearing properties of interest.
- * @return {boolean} to indicate whether the JSON data is valid with respect to StakingsValidatorInfo
.
- */
- static validateJSON(data) {
- // ensure the json data is a string
- if (data['icon_url'] && !(typeof data['icon_url'] === 'string' || data['icon_url'] instanceof String)) {
- throw new Error("Expected the field `icon_url` to be a primitive type in the JSON string but got " + data['icon_url']);
- }
- // ensure the json data is a string
- if (data['public_key'] && !(typeof data['public_key'] === 'string' || data['public_key'] instanceof String)) {
- throw new Error("Expected the field `public_key` to be a primitive type in the JSON string but got " + data['public_key']);
- }
- // ensure the json data is a string
- if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
- throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
- }
- // ensure the json data is a string
- if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
- throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
- }
- // ensure the json data is a string
- if (data['commission_rate'] && !(typeof data['commission_rate'] === 'string' || data['commission_rate'] instanceof String)) {
- throw new Error("Expected the field `commission_rate` to be a primitive type in the JSON string but got " + data['commission_rate']);
- }
-
- return true;
- }
-
-
-}
-
-
-
-/**
- * The URL of the validator's icon.
- * @member {String} icon_url
- */
-StakingsValidatorInfo.prototype['icon_url'] = undefined;
-
-/**
- * The validator's public key.
- * @member {String} public_key
- */
-StakingsValidatorInfo.prototype['public_key'] = undefined;
-
-/**
- * The validator's name.
- * @member {String} name
- */
-StakingsValidatorInfo.prototype['name'] = undefined;
-
-/**
- * The wallet address of the validator.
- * @member {String} address
- */
-StakingsValidatorInfo.prototype['address'] = undefined;
-
-/**
- * The commission rate of the validator.
- * @member {String} commission_rate
- */
-StakingsValidatorInfo.prototype['commission_rate'] = undefined;
-
-
-
-
-
-
-export default StakingsValidatorInfo;
-
diff --git a/src/model/TransactionRbf.js b/src/model/TransactionRbf.js
index c6c1aad8..ed7fa093 100644
--- a/src/model/TransactionRbf.js
+++ b/src/model/TransactionRbf.js
@@ -10,6 +10,7 @@
*/
import ApiClient from '../ApiClient';
+import AutoFuelType from './AutoFuelType';
import TransactionRbfSource from './TransactionRbfSource';
import TransactionRequestFee from './TransactionRequestFee';
@@ -66,6 +67,9 @@ class TransactionRbf {
if (data.hasOwnProperty('description')) {
obj['description'] = ApiClient.convertToType(data['description'], 'String');
}
+ if (data.hasOwnProperty('auto_fuel')) {
+ obj['auto_fuel'] = AutoFuelType.constructFromObject(data['auto_fuel']);
+ }
}
return obj;
}
@@ -143,6 +147,11 @@ TransactionRbf.prototype['category_names'] = undefined;
*/
TransactionRbf.prototype['description'] = undefined;
+/**
+ * @member {module:model/AutoFuelType} auto_fuel
+ */
+TransactionRbf.prototype['auto_fuel'] = undefined;
+
diff --git a/src/model/TransactionRbfSource.js b/src/model/TransactionRbfSource.js
index a78e32b2..10fa7f96 100644
--- a/src/model/TransactionRbfSource.js
+++ b/src/model/TransactionRbfSource.js
@@ -145,7 +145,7 @@ TransactionRbfSource.prototype['source_type'] = undefined;
TransactionRbfSource.prototype['wallet_id'] = undefined;
/**
- * 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.
+ * 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.
* @member {String} address
*/
TransactionRbfSource.prototype['address'] = undefined;
diff --git a/src/model/TransactionRequestEvmEip1559Fee.js b/src/model/TransactionRequestEvmEip1559Fee.js
index b44d2850..8c53d4d6 100644
--- a/src/model/TransactionRequestEvmEip1559Fee.js
+++ b/src/model/TransactionRequestEvmEip1559Fee.js
@@ -20,7 +20,7 @@ import FeeType from './FeeType';
class TransactionRequestEvmEip1559Fee {
/**
* Constructs a new TransactionRequestEvmEip1559Fee
.
- * The preset properties to limit transaction fee. In the EIP-1559 fee model, the transaction fee is calculated by multiplying the gas price and the gas units used by the transaction. This can be expressed as: Transaction fee = gas price * gas units used. You can specify the maximum gas fee per gas unit, maximum priority fee per gas unit, and the gas limit to limit the gas price, priority fee per gas unit, gas units used in the transaction. Switch between the tabs to display the properties for different transaction fee models.
+ * The preset properties to limit transaction fee. In the EIP-1559 fee model, the transaction fee is calculated by multiplying the gas price and the gas units used by the transaction. This can be expressed as: Transaction fee = gas price * gas units used. For more information about the EIP-1559 fee model, refer to [Fee models](/v2/guides/transactions/estimate-fees#fee-models). You can specify the maximum gas fee per gas unit, maximum priority fee per gas unit, and the gas limit to limit the gas price, priority fee per gas unit, gas units used in the transaction. Switch between the tabs to display the properties for different transaction fee models.
* @alias module:model/TransactionRequestEvmEip1559Fee
* @implements module:model/EvmEip1559FeeBasePrice
* @param max_fee_per_gas {String} The maximum gas fee per gas unit used on the chain, in wei.
diff --git a/src/model/TransactionRequestEvmLegacyFee.js b/src/model/TransactionRequestEvmLegacyFee.js
index 151386d1..8e0f88b1 100644
--- a/src/model/TransactionRequestEvmLegacyFee.js
+++ b/src/model/TransactionRequestEvmLegacyFee.js
@@ -20,7 +20,7 @@ import FeeType from './FeeType';
class TransactionRequestEvmLegacyFee {
/**
* Constructs a new TransactionRequestEvmLegacyFee
.
- * The preset properties to limit transaction fee. In the legacy fee model, the transaction fee is calculated by multiplying the gas price by the gas units used by the transaction. This can be expressed as: Transaction fee = (gas price * gas units used). You can specify the gas limit to limit the gas units used in the transaction. Switch between the tabs to display the properties for different transaction fee models.
+ * The preset properties to limit transaction fee. In the legacy fee model, the transaction fee is calculated by multiplying the gas price by the gas units used by the transaction. This can be expressed as: Transaction fee = (gas price * gas units used). For more information about the legacy fee model, refer to [Fee models](/v2/guides/transactions/estimate-fees#fee-models). You can specify the gas limit to limit the gas units used in the transaction. Switch between the tabs to display the properties for different transaction fee models.
* @alias module:model/TransactionRequestEvmLegacyFee
* @implements module:model/EvmLegacyFeeBasePrice
* @param gas_price {String} The gas price, in wei. The gas price represents the amount of ETH that must be paid to validators for processing transactions per gas unit used.
diff --git a/src/model/TransactionRequestFixedFee.js b/src/model/TransactionRequestFixedFee.js
index a2634299..60f7a85b 100644
--- a/src/model/TransactionRequestFixedFee.js
+++ b/src/model/TransactionRequestFixedFee.js
@@ -20,7 +20,7 @@ import MaxFeeAmount from './MaxFeeAmount';
class TransactionRequestFixedFee {
/**
* Constructs a new TransactionRequestFixedFee
.
- * The preset properties to limit transaction fee. In the fixed fee model, the transaction fee is a fixed amount within a certain amount of period regardless of the transaction size or network congestion, which can vary between different chains. You can specify the maximum fee amount to limit the transaction fee. The transaction will fail if the transaction fee exceeds the specified maximum fee amount. Switch between the tabs to display the properties for different transaction fee models.
+ * The preset properties to limit transaction fee. In the fixed fee model, the transaction fee is a fixed amount within a certain amount of period regardless of the transaction size or network congestion, which can vary between different chains. For more information about the fixed fee model, refer to [Fee models](/v2/guides/transactions/estimate-fees#fee-models). You can specify the maximum fee amount to limit the transaction fee. The transaction will fail if the transaction fee exceeds the specified maximum fee amount. Switch between the tabs to display the properties for different transaction fee models.
* @alias module:model/TransactionRequestFixedFee
* @implements module:model/MaxFeeAmount
* @param fee_type {module:model/FeeType}
diff --git a/src/model/TransactionRequestUtxoFee.js b/src/model/TransactionRequestUtxoFee.js
index 13244dc9..e114cdea 100644
--- a/src/model/TransactionRequestUtxoFee.js
+++ b/src/model/TransactionRequestUtxoFee.js
@@ -20,7 +20,7 @@ import UtxoFeeBasePrice from './UtxoFeeBasePrice';
class TransactionRequestUtxoFee {
/**
* Constructs a new TransactionRequestUtxoFee
.
- * The preset properties to limit transaction fee. In the UTXO fee model, the transaction fee is calculated by multiplying the fee rate by the transaction size. This can be expressed as: Transaction fee = fee rate * transaction size. You can specify the maximum fee amount to limit the transaction fee. The transaction will fail if the transaction fee exceeds the specified maximum fee amount. Switch between the tabs to display the properties for different transaction fee models.
+ * The preset properties to limit transaction fee. In the UTXO fee model, the transaction fee is calculated by multiplying the fee rate by the transaction size. This can be expressed as: Transaction fee = fee rate * transaction size. For more information about the UTXO fee model, see [Fee models](/v2/guides/transactions/estimate-fees#fee-models). You can specify the maximum fee amount to limit the transaction fee. The transaction will fail if the transaction fee exceeds the specified maximum fee amount. Switch between the tabs to display the properties for different transaction fee models.
* @alias module:model/TransactionRequestUtxoFee
* @implements module:model/UtxoFeeBasePrice
* @param fee_rate {String} The fee rate in sat/vByte. The fee rate represents the satoshis you are willing to pay for each byte of data that your transaction will consume on the blockchain.
diff --git a/src/model/TransferParams.js b/src/model/TransferParams.js
index 097441c3..e4683487 100644
--- a/src/model/TransferParams.js
+++ b/src/model/TransferParams.js
@@ -10,6 +10,7 @@
*/
import ApiClient from '../ApiClient';
+import AutoFuelType from './AutoFuelType';
import TransactionRequestFee from './TransactionRequestFee';
import TransferDestination from './TransferDestination';
import TransferSource from './TransferSource';
@@ -77,6 +78,9 @@ class TransferParams {
if (data.hasOwnProperty('fee')) {
obj['fee'] = TransactionRequestFee.constructFromObject(data['fee']);
}
+ if (data.hasOwnProperty('auto_fuel')) {
+ obj['auto_fuel'] = AutoFuelType.constructFromObject(data['auto_fuel']);
+ }
}
return obj;
}
@@ -175,6 +179,11 @@ TransferParams.prototype['description'] = undefined;
*/
TransferParams.prototype['fee'] = undefined;
+/**
+ * @member {module:model/AutoFuelType} auto_fuel
+ */
+TransferParams.prototype['auto_fuel'] = undefined;
+
diff --git a/test/api/StakingsApi.spec.js b/test/api/StakingsApi.spec.js
index 2e34904e..8177d012 100644
--- a/test/api/StakingsApi.spec.js
+++ b/test/api/StakingsApi.spec.js
@@ -36,6 +36,16 @@ import {ApiClient, Env} from "../../src/index.js";
});
describe('StakingsApi', function() {
+ describe('createClaimActivity', function() {
+ it('should call createClaimActivity successfully', function() {
+ //uncomment below and update the code to test createClaimActivity
+ //instance.createClaimActivity().then(function(data) {
+ // console.log(data);
+ //}, function(error) {
+ // console.error(error);
+ //});
+ });
+ });
describe('createStakeActivity', function() {
it('should call createStakeActivity successfully', function() {
//uncomment below and update the code to test createStakeActivity
@@ -96,6 +106,16 @@ import {ApiClient, Env} from "../../src/index.js";
//});
});
});
+ describe('getStakingEstimationFeeV2', function() {
+ it('should call getStakingEstimationFeeV2 successfully', function() {
+ //uncomment below and update the code to test getStakingEstimationFeeV2
+ //instance.getStakingEstimationFeeV2().then(function(data) {
+ // console.log(data);
+ //}, function(error) {
+ // console.error(error);
+ //});
+ });
+ });
describe('getStakingPoolById', function() {
it('should call getStakingPoolById successfully', function() {
//uncomment below and update the code to test getStakingPoolById
diff --git a/test/model/AutoFuelType.spec.js b/test/model/AutoFuelType.spec.js
new file mode 100644
index 00000000..b23c9532
--- /dev/null
+++ b/test/model/AutoFuelType.spec.js
@@ -0,0 +1,56 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', process.cwd()+'/src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.CoboWaas2);
+ }
+}(this, function(expect, CoboWaas2) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('AutoFuelType', function() {
+ it('should create an instance of AutoFuelType', function() {
+ // uncomment below and update the code to test AutoFuelType
+ //var instance = new CoboWaas2.AutoFuelType();
+ //expect(instance).to.be.a(CoboWaas2.AutoFuelType);
+ });
+
+ });
+
+}));
diff --git a/test/model/ContractCallParams.spec.js b/test/model/ContractCallParams.spec.js
index 8fad4d9c..abe51131 100644
--- a/test/model/ContractCallParams.spec.js
+++ b/test/model/ContractCallParams.spec.js
@@ -94,6 +94,12 @@
//expect(instance).to.be();
});
+ it('should have the property auto_fuel (base name: "auto_fuel")', function() {
+ // uncomment below and update the code to test the property auto_fuel
+ //var instance = new CoboWaas2.ContractCallParams();
+ //expect(instance).to.be();
+ });
+
});
}));
diff --git a/test/model/StakingsValidatorInfo.spec.js b/test/model/CoreStakeExtra.spec.js
similarity index 62%
rename from test/model/StakingsValidatorInfo.spec.js
rename to test/model/CoreStakeExtra.spec.js
index cb7f6bbd..91eb542d 100644
--- a/test/model/StakingsValidatorInfo.spec.js
+++ b/test/model/CoreStakeExtra.spec.js
@@ -26,7 +26,7 @@
var instance;
beforeEach(function() {
- instance = new CoboWaas2.StakingsValidatorInfo();
+ instance = new CoboWaas2.CoreStakeExtra();
});
var getProperty = function(object, getter, property) {
@@ -45,40 +45,40 @@
object[property] = value;
}
- describe('StakingsValidatorInfo', function() {
- it('should create an instance of StakingsValidatorInfo', function() {
- // uncomment below and update the code to test StakingsValidatorInfo
- //var instance = new CoboWaas2.StakingsValidatorInfo();
- //expect(instance).to.be.a(CoboWaas2.StakingsValidatorInfo);
+ describe('CoreStakeExtra', function() {
+ it('should create an instance of CoreStakeExtra', function() {
+ // uncomment below and update the code to test CoreStakeExtra
+ //var instance = new CoboWaas2.CoreStakeExtra();
+ //expect(instance).to.be.a(CoboWaas2.CoreStakeExtra);
});
- it('should have the property icon_url (base name: "icon_url")', function() {
- // uncomment below and update the code to test the property icon_url
- //var instance = new CoboWaas2.StakingsValidatorInfo();
+ it('should have the property pool_type (base name: "pool_type")', function() {
+ // uncomment below and update the code to test the property pool_type
+ //var instance = new CoboWaas2.CoreStakeExtra();
//expect(instance).to.be();
});
- it('should have the property public_key (base name: "public_key")', function() {
- // uncomment below and update the code to test the property public_key
- //var instance = new CoboWaas2.StakingsValidatorInfo();
+ it('should have the property timelock (base name: "timelock")', function() {
+ // uncomment below and update the code to test the property timelock
+ //var instance = new CoboWaas2.CoreStakeExtra();
//expect(instance).to.be();
});
- it('should have the property name (base name: "name")', function() {
- // uncomment below and update the code to test the property name
- //var instance = new CoboWaas2.StakingsValidatorInfo();
+ it('should have the property change_address (base name: "change_address")', function() {
+ // uncomment below and update the code to test the property change_address
+ //var instance = new CoboWaas2.CoreStakeExtra();
//expect(instance).to.be();
});
- it('should have the property address (base name: "address")', function() {
- // uncomment below and update the code to test the property address
- //var instance = new CoboWaas2.StakingsValidatorInfo();
+ it('should have the property validator_address (base name: "validator_address")', function() {
+ // uncomment below and update the code to test the property validator_address
+ //var instance = new CoboWaas2.CoreStakeExtra();
//expect(instance).to.be();
});
- it('should have the property commission_rate (base name: "commission_rate")', function() {
- // uncomment below and update the code to test the property commission_rate
- //var instance = new CoboWaas2.StakingsValidatorInfo();
+ it('should have the property reward_address (base name: "reward_address")', function() {
+ // uncomment below and update the code to test the property reward_address
+ //var instance = new CoboWaas2.CoreStakeExtra();
//expect(instance).to.be();
});
diff --git a/test/model/CoreStakingExtra.spec.js b/test/model/CoreStakingExtra.spec.js
new file mode 100644
index 00000000..1c915476
--- /dev/null
+++ b/test/model/CoreStakingExtra.spec.js
@@ -0,0 +1,93 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', process.cwd()+'/src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.CoboWaas2);
+ }
+}(this, function(expect, CoboWaas2) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ instance = new CoboWaas2.CoreStakingExtra();
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('CoreStakingExtra', function() {
+ it('should create an instance of CoreStakingExtra', function() {
+ // uncomment below and update the code to test CoreStakingExtra
+ //var instance = new CoboWaas2.CoreStakingExtra();
+ //expect(instance).to.be.a(CoboWaas2.CoreStakingExtra);
+ });
+
+ it('should have the property pool_type (base name: "pool_type")', function() {
+ // uncomment below and update the code to test the property pool_type
+ //var instance = new CoboWaas2.CoreStakingExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property pos_chain (base name: "pos_chain")', function() {
+ // uncomment below and update the code to test the property pos_chain
+ //var instance = new CoboWaas2.CoreStakingExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property staker_address (base name: "staker_address")', function() {
+ // uncomment below and update the code to test the property staker_address
+ //var instance = new CoboWaas2.CoreStakingExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property validator_address (base name: "validator_address")', function() {
+ // uncomment below and update the code to test the property validator_address
+ //var instance = new CoboWaas2.CoreStakingExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property reward_address (base name: "reward_address")', function() {
+ // uncomment below and update the code to test the property reward_address
+ //var instance = new CoboWaas2.CoreStakingExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property timelock (base name: "timelock")', function() {
+ // uncomment below and update the code to test the property timelock
+ //var instance = new CoboWaas2.CoreStakingExtra();
+ //expect(instance).to.be();
+ });
+
+ });
+
+}));
diff --git a/test/model/CreateClaimActivity.spec.js b/test/model/CreateClaimActivity.spec.js
new file mode 100644
index 00000000..1339e1f8
--- /dev/null
+++ b/test/model/CreateClaimActivity.spec.js
@@ -0,0 +1,75 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', process.cwd()+'/src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.CoboWaas2);
+ }
+}(this, function(expect, CoboWaas2) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ instance = new CoboWaas2.CreateClaimActivity();
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('CreateClaimActivity', function() {
+ it('should create an instance of CreateClaimActivity', function() {
+ // uncomment below and update the code to test CreateClaimActivity
+ //var instance = new CoboWaas2.CreateClaimActivity();
+ //expect(instance).to.be.a(CoboWaas2.CreateClaimActivity);
+ });
+
+ it('should have the property request_id (base name: "request_id")', function() {
+ // uncomment below and update the code to test the property request_id
+ //var instance = new CoboWaas2.CreateClaimActivity();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property staking_id (base name: "staking_id")', function() {
+ // uncomment below and update the code to test the property staking_id
+ //var instance = new CoboWaas2.CreateClaimActivity();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property fee (base name: "fee")', function() {
+ // uncomment below and update the code to test the property fee
+ //var instance = new CoboWaas2.CreateClaimActivity();
+ //expect(instance).to.be();
+ });
+
+ });
+
+}));
diff --git a/test/model/CreateClaimActivityRequest.spec.js b/test/model/CreateClaimActivityRequest.spec.js
new file mode 100644
index 00000000..8b55dac4
--- /dev/null
+++ b/test/model/CreateClaimActivityRequest.spec.js
@@ -0,0 +1,81 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', process.cwd()+'/src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.CoboWaas2);
+ }
+}(this, function(expect, CoboWaas2) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ instance = new CoboWaas2.CreateClaimActivityRequest();
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('CreateClaimActivityRequest', function() {
+ it('should create an instance of CreateClaimActivityRequest', function() {
+ // uncomment below and update the code to test CreateClaimActivityRequest
+ //var instance = new CoboWaas2.CreateClaimActivityRequest();
+ //expect(instance).to.be.a(CoboWaas2.CreateClaimActivityRequest);
+ });
+
+ it('should have the property request_id (base name: "request_id")', function() {
+ // uncomment below and update the code to test the property request_id
+ //var instance = new CoboWaas2.CreateClaimActivityRequest();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property staking_id (base name: "staking_id")', function() {
+ // uncomment below and update the code to test the property staking_id
+ //var instance = new CoboWaas2.CreateClaimActivityRequest();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property fee (base name: "fee")', function() {
+ // uncomment below and update the code to test the property fee
+ //var instance = new CoboWaas2.CreateClaimActivityRequest();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property app_initiator (base name: "app_initiator")', function() {
+ // uncomment below and update the code to test the property app_initiator
+ //var instance = new CoboWaas2.CreateClaimActivityRequest();
+ //expect(instance).to.be();
+ });
+
+ });
+
+}));
diff --git a/test/model/CreateStakeActivityExtra.spec.js b/test/model/CreateStakeActivityExtra.spec.js
index 3c57c08d..dc9fc8b6 100644
--- a/test/model/CreateStakeActivityExtra.spec.js
+++ b/test/model/CreateStakeActivityExtra.spec.js
@@ -82,6 +82,30 @@
//expect(instance).to.be();
});
+ it('should have the property timelock (base name: "timelock")', function() {
+ // uncomment below and update the code to test the property timelock
+ //var instance = new CoboWaas2.CreateStakeActivityExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property change_address (base name: "change_address")', function() {
+ // uncomment below and update the code to test the property change_address
+ //var instance = new CoboWaas2.CreateStakeActivityExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property validator_address (base name: "validator_address")', function() {
+ // uncomment below and update the code to test the property validator_address
+ //var instance = new CoboWaas2.CreateStakeActivityExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property reward_address (base name: "reward_address")', function() {
+ // uncomment below and update the code to test the property reward_address
+ //var instance = new CoboWaas2.CreateStakeActivityExtra();
+ //expect(instance).to.be();
+ });
+
});
}));
diff --git a/test/model/CreateWithdrawActivity.spec.js b/test/model/CreateWithdrawActivity.spec.js
index 1a08419e..afb90372 100644
--- a/test/model/CreateWithdrawActivity.spec.js
+++ b/test/model/CreateWithdrawActivity.spec.js
@@ -70,12 +70,6 @@
//expect(instance).to.be();
});
- it('should have the property address (base name: "address")', function() {
- // uncomment below and update the code to test the property address
- //var instance = new CoboWaas2.CreateWithdrawActivity();
- //expect(instance).to.be();
- });
-
it('should have the property fee (base name: "fee")', function() {
// uncomment below and update the code to test the property fee
//var instance = new CoboWaas2.CreateWithdrawActivity();
diff --git a/test/model/CreateWithdrawActivityRequest.spec.js b/test/model/CreateWithdrawActivityRequest.spec.js
index aa3c23dd..7af982db 100644
--- a/test/model/CreateWithdrawActivityRequest.spec.js
+++ b/test/model/CreateWithdrawActivityRequest.spec.js
@@ -70,12 +70,6 @@
//expect(instance).to.be();
});
- it('should have the property address (base name: "address")', function() {
- // uncomment below and update the code to test the property address
- //var instance = new CoboWaas2.CreateWithdrawActivityRequest();
- //expect(instance).to.be();
- });
-
it('should have the property fee (base name: "fee")', function() {
// uncomment below and update the code to test the property fee
//var instance = new CoboWaas2.CreateWithdrawActivityRequest();
diff --git a/test/model/EstimateClaimFee.spec.js b/test/model/EstimateClaimFee.spec.js
new file mode 100644
index 00000000..a880f861
--- /dev/null
+++ b/test/model/EstimateClaimFee.spec.js
@@ -0,0 +1,75 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', process.cwd()+'/src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.CoboWaas2);
+ }
+}(this, function(expect, CoboWaas2) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ instance = new CoboWaas2.EstimateClaimFee();
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('EstimateClaimFee', function() {
+ it('should create an instance of EstimateClaimFee', function() {
+ // uncomment below and update the code to test EstimateClaimFee
+ //var instance = new CoboWaas2.EstimateClaimFee();
+ //expect(instance).to.be.a(CoboWaas2.EstimateClaimFee);
+ });
+
+ it('should have the property activity_type (base name: "activity_type")', function() {
+ // uncomment below and update the code to test the property activity_type
+ //var instance = new CoboWaas2.EstimateClaimFee();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property staking_id (base name: "staking_id")', function() {
+ // uncomment below and update the code to test the property staking_id
+ //var instance = new CoboWaas2.EstimateClaimFee();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property fee (base name: "fee")', function() {
+ // uncomment below and update the code to test the property fee
+ //var instance = new CoboWaas2.EstimateClaimFee();
+ //expect(instance).to.be();
+ });
+
+ });
+
+}));
diff --git a/test/model/EstimateWithdrawFee.spec.js b/test/model/EstimateWithdrawFee.spec.js
index 13dab083..b7a1511e 100644
--- a/test/model/EstimateWithdrawFee.spec.js
+++ b/test/model/EstimateWithdrawFee.spec.js
@@ -76,12 +76,6 @@
//expect(instance).to.be();
});
- it('should have the property address (base name: "address")', function() {
- // uncomment below and update the code to test the property address
- //var instance = new CoboWaas2.EstimateWithdrawFee();
- //expect(instance).to.be();
- });
-
it('should have the property fee (base name: "fee")', function() {
// uncomment below and update the code to test the property fee
//var instance = new CoboWaas2.EstimateWithdrawFee();
diff --git a/test/model/EthStakingExtra.spec.js b/test/model/EthStakingExtra.spec.js
index 05d00302..ce4a38e1 100644
--- a/test/model/EthStakingExtra.spec.js
+++ b/test/model/EthStakingExtra.spec.js
@@ -64,6 +64,12 @@
//expect(instance).to.be();
});
+ it('should have the property beacon_validators (base name: "beacon_validators")', function() {
+ // uncomment below and update the code to test the property beacon_validators
+ //var instance = new CoboWaas2.EthStakingExtra();
+ //expect(instance).to.be();
+ });
+
});
}));
diff --git a/test/model/EthStakingExtraAllOfBeaconValidators.spec.js b/test/model/EthStakingExtraAllOfBeaconValidators.spec.js
new file mode 100644
index 00000000..7cb38207
--- /dev/null
+++ b/test/model/EthStakingExtraAllOfBeaconValidators.spec.js
@@ -0,0 +1,93 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', process.cwd()+'/src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.CoboWaas2);
+ }
+}(this, function(expect, CoboWaas2) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('EthStakingExtraAllOfBeaconValidators', function() {
+ it('should create an instance of EthStakingExtraAllOfBeaconValidators', function() {
+ // uncomment below and update the code to test EthStakingExtraAllOfBeaconValidators
+ //var instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ //expect(instance).to.be.a(CoboWaas2.EthStakingExtraAllOfBeaconValidators);
+ });
+
+ it('should have the property pubkey (base name: "pubkey")', function() {
+ // uncomment below and update the code to test the property pubkey
+ //var instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property status (base name: "status")', function() {
+ // uncomment below and update the code to test the property status
+ //var instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property apy (base name: "apy")', function() {
+ // uncomment below and update the code to test the property apy
+ //var instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property staked_amount (base name: "staked_amount")', function() {
+ // uncomment below and update the code to test the property staked_amount
+ //var instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property rewards_received (base name: "rewards_received")', function() {
+ // uncomment below and update the code to test the property rewards_received
+ //var instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property updated_timestamp (base name: "updated_timestamp")', function() {
+ // uncomment below and update the code to test the property updated_timestamp
+ //var instance = new CoboWaas2.EthStakingExtraAllOfBeaconValidators();
+ //expect(instance).to.be();
+ });
+
+ });
+
+}));
diff --git a/test/model/GetStakingEstimationFeeRequest.spec.js b/test/model/GetStakingEstimationFeeRequest.spec.js
index afdb8843..88c9a2af 100644
--- a/test/model/GetStakingEstimationFeeRequest.spec.js
+++ b/test/model/GetStakingEstimationFeeRequest.spec.js
@@ -100,12 +100,6 @@
//expect(instance).to.be();
});
- it('should have the property address (base name: "address")', function() {
- // uncomment below and update the code to test the property address
- //var instance = new CoboWaas2.GetStakingEstimationFeeRequest();
- //expect(instance).to.be();
- });
-
});
}));
diff --git a/test/model/MPCProject.spec.js b/test/model/MPCProject.spec.js
index 96be1fdc..6a6a1c0c 100644
--- a/test/model/MPCProject.spec.js
+++ b/test/model/MPCProject.spec.js
@@ -82,8 +82,8 @@
//expect(instance).to.be();
});
- it('should have the property create_timestamp (base name: "create_timestamp")', function() {
- // uncomment below and update the code to test the property create_timestamp
+ it('should have the property created_timestamp (base name: "created_timestamp")', function() {
+ // uncomment below and update the code to test the property created_timestamp
//var instance = new CoboWaas2.MPCProject();
//expect(instance).to.be();
});
diff --git a/test/model/StakingPoolId.spec.js b/test/model/StakingPoolId.spec.js
new file mode 100644
index 00000000..b53d5ba4
--- /dev/null
+++ b/test/model/StakingPoolId.spec.js
@@ -0,0 +1,56 @@
+/**
+ * Cobo Wallet as a Service 2.0
+ *
+ * Contact: help@cobo.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', process.cwd()+'/src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.CoboWaas2);
+ }
+}(this, function(expect, CoboWaas2) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('StakingPoolId', function() {
+ it('should create an instance of StakingPoolId', function() {
+ // uncomment below and update the code to test StakingPoolId
+ //var instance = new CoboWaas2.StakingPoolId();
+ //expect(instance).to.be.a(CoboWaas2.StakingPoolId);
+ });
+
+ });
+
+}));
diff --git a/test/model/StakingsExtra.spec.js b/test/model/StakingsExtra.spec.js
index c4bb71b8..06c97b3d 100644
--- a/test/model/StakingsExtra.spec.js
+++ b/test/model/StakingsExtra.spec.js
@@ -88,6 +88,36 @@
//expect(instance).to.be();
});
+ it('should have the property beacon_validators (base name: "beacon_validators")', function() {
+ // uncomment below and update the code to test the property beacon_validators
+ //var instance = new CoboWaas2.StakingsExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property staker_address (base name: "staker_address")', function() {
+ // uncomment below and update the code to test the property staker_address
+ //var instance = new CoboWaas2.StakingsExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property validator_address (base name: "validator_address")', function() {
+ // uncomment below and update the code to test the property validator_address
+ //var instance = new CoboWaas2.StakingsExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property reward_address (base name: "reward_address")', function() {
+ // uncomment below and update the code to test the property reward_address
+ //var instance = new CoboWaas2.StakingsExtra();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property timelock (base name: "timelock")', function() {
+ // uncomment below and update the code to test the property timelock
+ //var instance = new CoboWaas2.StakingsExtra();
+ //expect(instance).to.be();
+ });
+
});
}));
diff --git a/test/model/TransactionRbf.spec.js b/test/model/TransactionRbf.spec.js
index 3ffb5265..6050e4b9 100644
--- a/test/model/TransactionRbf.spec.js
+++ b/test/model/TransactionRbf.spec.js
@@ -82,6 +82,12 @@
//expect(instance).to.be();
});
+ it('should have the property auto_fuel (base name: "auto_fuel")', function() {
+ // uncomment below and update the code to test the property auto_fuel
+ //var instance = new CoboWaas2.TransactionRbf();
+ //expect(instance).to.be();
+ });
+
});
}));
diff --git a/test/model/TransferParams.spec.js b/test/model/TransferParams.spec.js
index 51f923b0..f34a20d8 100644
--- a/test/model/TransferParams.spec.js
+++ b/test/model/TransferParams.spec.js
@@ -94,6 +94,12 @@
//expect(instance).to.be();
});
+ it('should have the property auto_fuel (base name: "auto_fuel")', function() {
+ // uncomment below and update the code to test the property auto_fuel
+ //var instance = new CoboWaas2.TransferParams();
+ //expect(instance).to.be();
+ });
+
});
}));