@cobo/cobo-waas2 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +22 -10
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +105 -0
  4. package/dist/api/DevelopersWebhooksApi.js +43 -0
  5. package/dist/api/OAuthApi.js +18 -18
  6. package/dist/api/TransactionsApi.js +14 -14
  7. package/dist/api/WalletsApi.js +4 -4
  8. package/dist/api/WalletsExchangeWalletApi.js +4 -4
  9. package/dist/api/WalletsMPCWalletsApi.js +10 -10
  10. package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
  11. package/dist/index.js +108 -31
  12. package/dist/model/AddressBook.js +217 -0
  13. package/dist/model/AddressTransferDestination.js +2 -2
  14. package/dist/model/ApiLogDetails.js +238 -0
  15. package/dist/model/ApiLogSummary.js +161 -0
  16. package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
  17. package/dist/model/CoboSafeDelegate.js +2 -2
  18. package/dist/model/ContractCallSource.js +0 -6
  19. package/dist/model/CreateKeyShareHolder.js +2 -2
  20. package/dist/model/ErrorResponse.js +2 -2
  21. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  22. package/dist/model/EstimateFeeParams.js +2 -2
  23. package/dist/model/EstimateTransferFeeParams.js +2 -2
  24. package/dist/model/EstimatedFee.js +1 -1
  25. package/dist/model/EstimatedFixedFee.js +1 -1
  26. package/dist/model/ExchangeId.js +10 -0
  27. package/dist/model/ExtendedTokenInfo.js +17 -4
  28. package/dist/model/GetToken200Response.js +4 -4
  29. package/dist/model/KeyShareHolder.js +1 -1
  30. package/dist/model/ListAddressBooks200Response.js +123 -0
  31. package/dist/model/MPCDelegate.js +4 -4
  32. package/dist/model/MessageSignParams.js +1 -1
  33. package/dist/model/MpcContractCallSource.js +0 -9
  34. package/dist/model/{RefreshToken200Response.js → RefreshToken201Response.js} +25 -25
  35. package/dist/model/RefreshTokenRequest.js +2 -2
  36. package/dist/model/SafeWalletDelegates.js +210 -0
  37. package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
  38. package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
  39. package/dist/model/TSSRequestStatus.js +5 -0
  40. package/dist/model/TokenAssetModelType.js +61 -0
  41. package/dist/model/TokenBalanceBalance.js +6 -6
  42. package/dist/model/TokenInfo.js +11 -2
  43. package/dist/model/Transaction.js +1 -1
  44. package/dist/model/TransactionDestination.js +50 -10
  45. package/dist/model/TransactionDestinationType.js +5 -0
  46. package/dist/model/TransactionDetail.js +2 -2
  47. package/dist/model/TransactionDetails.js +2 -2
  48. package/dist/model/TransactionEvmCalldataInfo.js +177 -0
  49. package/dist/model/TransactionEvmContractDestination.js +16 -0
  50. package/dist/model/TransactionEvmContractMethod.js +136 -0
  51. package/dist/model/TransactionRawMessageSignDestination.js +120 -0
  52. package/dist/model/TransactionSignatureResult.js +1 -1
  53. package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
  54. package/dist/model/TransactionStatus.js +0 -5
  55. package/dist/model/TransactionSubStatus.js +40 -5
  56. package/dist/model/TransactionTokeApproval.js +17 -4
  57. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  58. package/dist/model/TransactionWebhookEventData.js +2 -2
  59. package/dist/model/TransferDestination.js +2 -2
  60. package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
  61. package/dist/model/{WalletBalanceSnapshot.js → TriggerTestWebhookEventRequest.js} +31 -36
  62. package/dist/model/WebhookEventData.js +1 -1
  63. package/docs/AddressBook.md +17 -0
  64. package/docs/AddressBooksApi.md +71 -0
  65. package/docs/AddressTransferDestination.md +2 -2
  66. package/docs/ApiLogDetails.md +18 -0
  67. package/docs/ApiLogSummary.md +13 -0
  68. package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
  69. package/docs/CoboSafeDelegate.md +2 -2
  70. package/docs/ContractCallSource.md +0 -1
  71. package/docs/CreateKeyShareHolder.md +2 -2
  72. package/docs/DevelopersWebhooksApi.md +53 -0
  73. package/docs/ErrorResponse.md +1 -1
  74. package/docs/EstimateContractCallFeeParams.md +1 -1
  75. package/docs/EstimateFeeParams.md +1 -1
  76. package/docs/EstimateTransferFeeParams.md +1 -1
  77. package/docs/EstimatedFee.md +1 -1
  78. package/docs/EstimatedFixedFee.md +1 -1
  79. package/docs/ExchangeId.md +4 -0
  80. package/docs/ExtendedTokenInfo.md +3 -2
  81. package/docs/GetToken200Response.md +4 -4
  82. package/docs/KeyShareHolder.md +1 -1
  83. package/docs/ListAddressBooks200Response.md +10 -0
  84. package/docs/MPCDelegate.md +2 -2
  85. package/docs/MessageSignParams.md +1 -1
  86. package/docs/MpcContractCallSource.md +0 -1
  87. package/docs/OAuthApi.md +11 -11
  88. package/docs/RefreshToken201Response.md +13 -0
  89. package/docs/RefreshTokenRequest.md +2 -2
  90. package/docs/SafeWalletDelegates.md +14 -0
  91. package/docs/SafeWalletDelegatesContractCall.md +12 -0
  92. package/docs/SafeWalletDelegatesTransfer.md +12 -0
  93. package/docs/TSSRequestStatus.md +2 -0
  94. package/docs/TokenAssetModelType.md +12 -0
  95. package/docs/TokenBalanceBalance.md +4 -4
  96. package/docs/TokenInfo.md +3 -2
  97. package/docs/Transaction.md +1 -1
  98. package/docs/TransactionDestination.md +4 -2
  99. package/docs/TransactionDestinationType.md +2 -0
  100. package/docs/TransactionDetail.md +1 -1
  101. package/docs/TransactionDetails.md +1 -1
  102. package/docs/TransactionEvmCalldataInfo.md +16 -0
  103. package/docs/TransactionEvmContractDestination.md +1 -0
  104. package/docs/TransactionEvmContractMethod.md +13 -0
  105. package/docs/TransactionRawMessageSignDestination.md +10 -0
  106. package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
  107. package/docs/TransactionSource.md +1 -1
  108. package/docs/TransactionStatus.md +0 -2
  109. package/docs/TransactionSubStatus.md +16 -2
  110. package/docs/TransactionTokeApproval.md +3 -2
  111. package/docs/TransactionTransferToAddressDestination.md +2 -2
  112. package/docs/TransactionWebhookEventData.md +1 -1
  113. package/docs/TransactionsApi.md +8 -8
  114. package/docs/TransferDestination.md +2 -2
  115. package/docs/TriggerTestWebhookEvent201Response.md +9 -0
  116. package/docs/TriggerTestWebhookEventRequest.md +10 -0
  117. package/docs/WalletsApi.md +2 -2
  118. package/docs/WalletsExchangeWalletApi.md +2 -2
  119. package/docs/WalletsMPCWalletsApi.md +5 -5
  120. package/docs/WalletsSmartContractWalletsApi.md +63 -0
  121. package/docs/WebhookEventData.md +1 -1
  122. package/package.json +2 -2
  123. package/dist/model/BookkeepingRecord.js +0 -243
  124. package/docs/BookkeepingRecord.md +0 -19
  125. package/docs/BookkeepingSummary.md +0 -12
  126. package/docs/RefreshToken200Response.md +0 -13
  127. package/docs/WalletBalanceSnapshot.md +0 -10
  128. package/docs/WalletBalanceSnapshotRecord.md +0 -13
@@ -83,7 +83,7 @@ Name | Type | Description | Notes
83
83
 
84
84
  Create key share holder group
85
85
 
86
- This operation creates a key share holder group for a specified vault.
86
+ This operation creates a key share holder group for a specified vault. <Note>This operation will not return the `tss_key_share_groups` property until key shares have been created using the [Create TSS request](/v2/api-references/wallets--mpc-wallets/create-tss-request) operation. Creating a wallet with the [Create wallet](/v2/api-references/wallets/create-wallet) operation is only possible after you've completed the previous actions.</Note>
87
87
 
88
88
  ### Example
89
89
 
@@ -189,7 +189,7 @@ Name | Type | Description | Notes
189
189
 
190
190
  Create vault
191
191
 
192
- This operation creates a vault.
192
+ This operation creates a vault. <Info>To learn what a vault is and how it relates to MPC Wallets, see [Get started with MPC Wallets](/v2/guides/mpc-wallets/get-started-ocw#technical-architecture).</Info>
193
193
 
194
194
  ### Example
195
195
 
@@ -449,7 +449,7 @@ Name | Type | Description | Notes
449
449
 
450
450
  Get vault information
451
451
 
452
- This operation retrieves detailed information about a vault.
452
+ This operation retrieves detailed information about a vault. <Info>To learn what a vault is and how it relates to MPC Wallets, see [Get started with MPC Wallets](/v2/guides/mpc-wallets/get-started-ocw#technical-architecture).</Info>
453
453
 
454
454
  ### Example
455
455
 
@@ -713,7 +713,7 @@ Name | Type | Description | Notes
713
713
 
714
714
  List all vaults
715
715
 
716
- This operation retrieves a list of all vaults. You can filter the result by project ID. **Notes for query parameters**: 1. `project_id` is required when `vault_type` is set to `User-Controlled`. 2. `project_id` must be left blank when `vault_type` is set to `Org-Controlled`.
716
+ This operation retrieves a list of all vaults. You can filter the result by project ID. **Notes for query parameters**: 1. `project_id` is required when `vault_type` is set to `User-Controlled`. 2. `project_id` must be left blank when `vault_type` is set to `Org-Controlled`. <Info>To learn what a vault is and how it relates to MPC Wallets, see [Get started with MPC Wallets](/v2/guides/mpc-wallets/get-started-ocw#technical-architecture).</Info>
717
717
 
718
718
  ### Example
719
719
 
@@ -943,7 +943,7 @@ Name | Type | Description | Notes
943
943
 
944
944
  Update vault name
945
945
 
946
- This operation updates a vault's name.
946
+ This operation updates a vault's name. <Info>To learn what a vault is and how it relates to MPC Wallets, see [Get started with MPC Wallets](/v2/guides/mpc-wallets/get-started-ocw#technical-architecture).</Info>
947
947
 
948
948
  ### Example
949
949
 
@@ -0,0 +1,63 @@
1
+ # CoboWaas2.WalletsSmartContractWalletsApi
2
+
3
+ All URIs are relative to *https://api.dev.cobo.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**listSafeWalletDelegates**](WalletsSmartContractWalletsApi.md#listSafeWalletDelegates) | **POST** /wallets/{wallet_id}/smart_contracts/delegates | List Delegates
8
+
9
+
10
+
11
+ ## listSafeWalletDelegates
12
+
13
+ > [CoboSafeDelegate] listSafeWalletDelegates(wallet_id, opts)
14
+
15
+ List Delegates
16
+
17
+ This operation retrieves all available Delegates of a Safe\\{Wallet\\} for a given transfer or contract call request.
18
+
19
+ ### Example
20
+
21
+ ```javascript
22
+ const CoboWaas2 = require('@cobo/cobo-waas2');
23
+ // Initialize the API client
24
+ const apiClient = CoboWaas2.ApiClient.instance
25
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
26
+ apiClient.setEnv(CoboWaas2.Env.DEV);
27
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
28
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
29
+ // Call the API
30
+ const apiInstance = new CoboWaas2.WalletsSmartContractWalletsApi();
31
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
32
+ const opts = {
33
+ 'SafeWalletDelegates': new CoboWaas2.SafeWalletDelegates()
34
+ };
35
+ apiInstance.listSafeWalletDelegates(wallet_id, opts).then((data) => {
36
+ console.log('API called successfully. Returned data: ' + data);
37
+ }, (error) => {
38
+ console.error(error);
39
+ });
40
+
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+
46
+ Name | Type | Description | Notes
47
+ ------------- | ------------- | ------------- | -------------
48
+ **wallet_id** | **String**| The wallet ID. |
49
+ **SafeWalletDelegates** | [**SafeWalletDelegates**](SafeWalletDelegates.md)| The request body to query the Delegates of a Safe{Wallet}. | [optional]
50
+
51
+ ### Return type
52
+
53
+ [**[CoboSafeDelegate]**](CoboSafeDelegate.md)
54
+
55
+ ### Authorization
56
+
57
+ [CoboAuth](../README.md#CoboAuth)
58
+
59
+ ### HTTP request headers
60
+
61
+ - **Content-Type**: application/json
62
+ - **Accept**: application/json
63
+
@@ -30,7 +30,7 @@ Name | Type | Description | Notes
30
30
  **replacement** | [**TransactionReplacement**](TransactionReplacement.md) | | [optional]
31
31
  **category** | **[String]** | A custom transaction category for you to identify your transfers more easily. | [optional]
32
32
  **description** | **String** | The description of the TSS request. | [optional]
33
- **is_loop** | **Boolean** | Whether the transaction is a Loop transfer. For more information about Loop, see [Loop&#39;s website](https://loop.top/). - &#x60;true&#x60;: The transaction is a Loop transfer. - &#x60;false&#x60;: The transaction is not a Loop transfer. | [optional]
33
+ **is_loop** | **Boolean** | Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - &#x60;true&#x60;: The transaction was executed as a Cobo Loop transfer. - &#x60;false&#x60;: The transaction was not executed as a Cobo Loop transfer. | [optional]
34
34
  **created_timestamp** | **Number** | The TSS request&#39;s creation time in Unix timestamp format, measured in milliseconds. | [optional]
35
35
  **updated_timestamp** | **Number** | The time when the transaction was updated, in Unix timestamp format, measured in milliseconds. | [optional]
36
36
  **tss_request_id** | **String** | The TSS request ID. | [optional]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cobo/cobo-waas2",
3
- "version": "1.3.0",
4
- "description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo’s WaaS API offering. It enables you to access Cobo’s full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features: - A unified API for Cobo’s [all four wallet types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform) - Support for 80+ chains and 3000+ tokens - A comprehensive selection of webhook events - Flexible usage models for MPC Wallets, including [Organization-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction) and [User-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction) - Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls - Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction). ",
3
+ "version": "1.5.0",
4
+ "description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo’s WaaS API offering. It enables you to access Cobo’s full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features: - A unified API for Cobo’s [all four wallet types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform) - Support for 80+ chains and 3000+ tokens - A comprehensive selection of webhook events - Flexible usage models for MPC Wallets, including [Organization-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction) and [User-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction) - Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls - Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](/v2/guides/overview/introduction). ",
5
5
  "license": "GPL 2.0",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
@@ -1,243 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _WalletType = _interopRequireDefault(require("./WalletType"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
- * Cobo Wallet as a Service 2.0
20
- *
21
- * Contact: help@cobo.com
22
- *
23
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
- * https://openapi-generator.tech
25
- * Do not edit the class manually.
26
- *
27
- */
28
- /**
29
- * The BookkeepingRecord model module.
30
- * @module model/BookkeepingRecord
31
- */
32
- var BookkeepingRecord = /*#__PURE__*/function () {
33
- /**
34
- * Constructs a new <code>BookkeepingRecord</code>.
35
- * The bookkeeping item information.
36
- * @alias module:model/BookkeepingRecord
37
- * @param wallet_id {String} The wallet ID.
38
- * @param transaction_timestamp {Number} The time when the bookkeeping was created, in Unix timestamp format, measured in milliseconds.
39
- * @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
40
- * @param type {String} The bookkeeping type.
41
- * @param amount {String} The amount of the bookkeeping.
42
- * @param balance {String} The post-balance of the tx.
43
- */
44
- function BookkeepingRecord(wallet_id, transaction_timestamp, token_id, type, amount, balance) {
45
- _classCallCheck(this, BookkeepingRecord);
46
- BookkeepingRecord.initialize(this, wallet_id, transaction_timestamp, token_id, type, amount, balance);
47
- }
48
-
49
- /**
50
- * Initializes the fields of this object.
51
- * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
52
- * Only for internal use.
53
- */
54
- return _createClass(BookkeepingRecord, null, [{
55
- key: "initialize",
56
- value: function initialize(obj, wallet_id, transaction_timestamp, token_id, type, amount, balance) {
57
- obj['wallet_id'] = wallet_id;
58
- obj['transaction_timestamp'] = transaction_timestamp;
59
- obj['token_id'] = token_id;
60
- obj['type'] = type;
61
- obj['amount'] = amount;
62
- obj['balance'] = balance;
63
- }
64
-
65
- /**
66
- * Constructs a <code>BookkeepingRecord</code> from a plain JavaScript object, optionally creating a new instance.
67
- * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
68
- * @param {Object} data The plain JavaScript object bearing properties of interest.
69
- * @param {module:model/BookkeepingRecord} obj Optional instance to populate.
70
- * @return {module:model/BookkeepingRecord} The populated <code>BookkeepingRecord</code> instance.
71
- */
72
- }, {
73
- key: "constructFromObject",
74
- value: function constructFromObject(data, obj) {
75
- if (data) {
76
- obj = obj || new BookkeepingRecord();
77
- if (data.hasOwnProperty('wallet_id')) {
78
- obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
79
- }
80
- if (data.hasOwnProperty('wallet_type')) {
81
- obj['wallet_type'] = _WalletType["default"].constructFromObject(data['wallet_type']);
82
- }
83
- if (data.hasOwnProperty('wallet_name')) {
84
- obj['wallet_name'] = _ApiClient["default"].convertToType(data['wallet_name'], 'String');
85
- }
86
- if (data.hasOwnProperty('transaction_timestamp')) {
87
- obj['transaction_timestamp'] = _ApiClient["default"].convertToType(data['transaction_timestamp'], 'Number');
88
- }
89
- if (data.hasOwnProperty('token_id')) {
90
- obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
91
- }
92
- if (data.hasOwnProperty('type')) {
93
- obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
94
- }
95
- if (data.hasOwnProperty('amount')) {
96
- obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
97
- }
98
- if (data.hasOwnProperty('balance')) {
99
- obj['balance'] = _ApiClient["default"].convertToType(data['balance'], 'String');
100
- }
101
- if (data.hasOwnProperty('from_address')) {
102
- obj['from_address'] = _ApiClient["default"].convertToType(data['from_address'], 'String');
103
- }
104
- if (data.hasOwnProperty('to_address')) {
105
- obj['to_address'] = _ApiClient["default"].convertToType(data['to_address'], 'String');
106
- }
107
- if (data.hasOwnProperty('transaction_hash')) {
108
- obj['transaction_hash'] = _ApiClient["default"].convertToType(data['transaction_hash'], 'String');
109
- }
110
- }
111
- return obj;
112
- }
113
-
114
- /**
115
- * Validates the JSON data with respect to <code>BookkeepingRecord</code>.
116
- * @param {Object} data The plain JavaScript object bearing properties of interest.
117
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BookkeepingRecord</code>.
118
- */
119
- }, {
120
- key: "validateJSON",
121
- value: function validateJSON(data) {
122
- // check to make sure all required properties are present in the JSON string
123
- var _iterator = _createForOfIteratorHelper(BookkeepingRecord.RequiredProperties),
124
- _step;
125
- try {
126
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
127
- var property = _step.value;
128
- if (!data.hasOwnProperty(property)) {
129
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
130
- }
131
- }
132
- // ensure the json data is a string
133
- } catch (err) {
134
- _iterator.e(err);
135
- } finally {
136
- _iterator.f();
137
- }
138
- if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
139
- throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
140
- }
141
- // ensure the json data is a string
142
- if (data['wallet_name'] && !(typeof data['wallet_name'] === 'string' || data['wallet_name'] instanceof String)) {
143
- throw new Error("Expected the field `wallet_name` to be a primitive type in the JSON string but got " + data['wallet_name']);
144
- }
145
- // ensure the json data is a string
146
- if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
147
- throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
148
- }
149
- // ensure the json data is a string
150
- if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
151
- throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
152
- }
153
- // ensure the json data is a string
154
- if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
155
- throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
156
- }
157
- // ensure the json data is a string
158
- if (data['balance'] && !(typeof data['balance'] === 'string' || data['balance'] instanceof String)) {
159
- throw new Error("Expected the field `balance` to be a primitive type in the JSON string but got " + data['balance']);
160
- }
161
- // ensure the json data is a string
162
- if (data['from_address'] && !(typeof data['from_address'] === 'string' || data['from_address'] instanceof String)) {
163
- throw new Error("Expected the field `from_address` to be a primitive type in the JSON string but got " + data['from_address']);
164
- }
165
- // ensure the json data is a string
166
- if (data['to_address'] && !(typeof data['to_address'] === 'string' || data['to_address'] instanceof String)) {
167
- throw new Error("Expected the field `to_address` to be a primitive type in the JSON string but got " + data['to_address']);
168
- }
169
- // ensure the json data is a string
170
- if (data['transaction_hash'] && !(typeof data['transaction_hash'] === 'string' || data['transaction_hash'] instanceof String)) {
171
- throw new Error("Expected the field `transaction_hash` to be a primitive type in the JSON string but got " + data['transaction_hash']);
172
- }
173
- return true;
174
- }
175
- }]);
176
- }();
177
- BookkeepingRecord.RequiredProperties = ["wallet_id", "transaction_timestamp", "token_id", "type", "amount", "balance"];
178
-
179
- /**
180
- * The wallet ID.
181
- * @member {String} wallet_id
182
- */
183
- BookkeepingRecord.prototype['wallet_id'] = undefined;
184
-
185
- /**
186
- * @member {module:model/WalletType} wallet_type
187
- */
188
- BookkeepingRecord.prototype['wallet_type'] = undefined;
189
-
190
- /**
191
- * The wallet name.
192
- * @member {String} wallet_name
193
- */
194
- BookkeepingRecord.prototype['wallet_name'] = undefined;
195
-
196
- /**
197
- * The time when the bookkeeping was created, in Unix timestamp format, measured in milliseconds.
198
- * @member {Number} transaction_timestamp
199
- */
200
- BookkeepingRecord.prototype['transaction_timestamp'] = undefined;
201
-
202
- /**
203
- * The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
204
- * @member {String} token_id
205
- */
206
- BookkeepingRecord.prototype['token_id'] = undefined;
207
-
208
- /**
209
- * The bookkeeping type.
210
- * @member {String} type
211
- */
212
- BookkeepingRecord.prototype['type'] = undefined;
213
-
214
- /**
215
- * The amount of the bookkeeping.
216
- * @member {String} amount
217
- */
218
- BookkeepingRecord.prototype['amount'] = undefined;
219
-
220
- /**
221
- * The post-balance of the tx.
222
- * @member {String} balance
223
- */
224
- BookkeepingRecord.prototype['balance'] = undefined;
225
-
226
- /**
227
- * The from address.
228
- * @member {String} from_address
229
- */
230
- BookkeepingRecord.prototype['from_address'] = undefined;
231
-
232
- /**
233
- * The to address.
234
- * @member {String} to_address
235
- */
236
- BookkeepingRecord.prototype['to_address'] = undefined;
237
-
238
- /**
239
- * The transaction hash.
240
- * @member {String} transaction_hash
241
- */
242
- BookkeepingRecord.prototype['transaction_hash'] = undefined;
243
- var _default = exports["default"] = BookkeepingRecord;
@@ -1,19 +0,0 @@
1
- # CoboWaas2.BookkeepingRecord
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **wallet_id** | **String** | The wallet ID. |
8
- **wallet_type** | [**WalletType**](WalletType.md) | | [optional]
9
- **wallet_name** | **String** | The wallet name. | [optional]
10
- **transaction_timestamp** | **Number** | The time when the bookkeeping was created, in Unix timestamp format, measured in milliseconds. |
11
- **token_id** | **String** | The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens). |
12
- **type** | **String** | The bookkeeping type. |
13
- **amount** | **String** | The amount of the bookkeeping. |
14
- **balance** | **String** | The post-balance of the tx. |
15
- **from_address** | **String** | The from address. | [optional]
16
- **to_address** | **String** | The to address. | [optional]
17
- **transaction_hash** | **String** | The transaction hash. | [optional]
18
-
19
-
@@ -1,12 +0,0 @@
1
- # CoboWaas2.BookkeepingSummary
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **total_transaction_count** | **Number** | Total transaction count. |
8
- **total_inflow_value** | **String** | The USD value of the inflow. |
9
- **total_outflow_value** | **String** | The USD value of the outflow. |
10
- **total_fee_value** | **String** | The USD value of the fee. | [optional]
11
-
12
-
@@ -1,13 +0,0 @@
1
- # CoboWaas2.RefreshToken200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **access_token** | **String** | The new access token. | [optional]
8
- **token_type** | **String** | The type of the tokens, which is Bearer. | [optional]
9
- **scope** | **String** | The scope of the access token to limit the app&#39;s access to the organization&#39;s resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app. | [optional]
10
- **expires_in** | **Number** | The time in seconds in which the new access token expires. | [optional]
11
- **refresh_token** | **String** | The refresh token, used to obtain another access token when the new access token expires. | [optional]
12
-
13
-
@@ -1,10 +0,0 @@
1
- # CoboWaas2.WalletBalanceSnapshot
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **snapshot_id** | **Number** | The snapshot ID. |
8
- **snapshot_name** | **String** | The snapshot name. | [optional]
9
-
10
-
@@ -1,13 +0,0 @@
1
- # CoboWaas2.WalletBalanceSnapshotRecord
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **wallet_id** | **String** | The wallet ID. |
8
- **wallet_type** | [**WalletType**](WalletType.md) | | [optional]
9
- **wallet_name** | **String** | The wallet name. | [optional]
10
- **token_id** | **String** | The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens). |
11
- **balance** | **String** | The balance of the token. |
12
-
13
-