@cobo/cobo-waas2 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -33
- package/dist/ApiClient.js +11 -1
- package/dist/api/AddressBooksApi.js +1 -1
- package/dist/api/DevelopersApi.js +7 -7
- package/dist/api/DevelopersWebhooksApi.js +8 -8
- package/dist/api/PrimeBrokerApi.js +317 -0
- package/dist/api/StakingsApi.js +412 -18
- package/dist/api/SwapsApi.js +360 -0
- package/dist/api/TransactionsApi.js +64 -20
- package/dist/api/TravelRuleApi.js +18 -18
- package/dist/api/WalletsApi.js +84 -13
- package/dist/api/WalletsExchangeWalletApi.js +1 -1
- package/dist/api/WalletsMPCWalletsApi.js +151 -39
- package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
- package/dist/index.js +276 -10
- package/dist/model/ActivityExtra.js +5 -5
- package/dist/model/AddressBalance.js +129 -0
- package/dist/model/AddressTransferDestination.js +36 -0
- package/dist/model/AddressesEventData.js +4 -4
- package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
- package/dist/model/ApprovalStatementStatus.js +81 -0
- package/dist/model/AssetBalance.js +6 -6
- package/dist/model/BTCEIP191MessageSignDestination.js +122 -0
- package/dist/model/BabylonAirdropPop.js +186 -0
- package/dist/model/BabylonAirdropRegistration.js +172 -0
- package/dist/model/BabylonEligibleAirdrop.js +157 -0
- package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
- package/dist/model/BabylonRegistrationStatus.js +66 -0
- package/dist/model/BabylonStakingActivityDetailExtra.js +1 -1
- package/dist/model/BabylonStakingRegistration.js +185 -0
- package/dist/model/{TokenBalanceBalance.js → Balance.js} +22 -22
- package/dist/model/{SwapSummary.js → ChangeGuardPubkey200Response.js} +28 -39
- package/dist/model/ContractCallParams.js +36 -0
- package/dist/model/ContractCallSource.js +6 -0
- package/dist/model/CoreStakingActivityDetailExtra.js +3 -3
- package/dist/model/CreateAddressRequest.js +28 -2
- package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
- package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
- package/dist/model/CreatePrimeBrokerAddress201Response.js +140 -0
- package/dist/model/CreatePrimeBrokerAddressRequest.js +107 -0
- package/dist/model/CreateSwapActivityRequest.js +153 -0
- package/dist/model/CreateSwapQuote201Response.js +264 -0
- package/dist/model/CreateSwapQuoteRequest.js +166 -0
- package/dist/model/DeleteGuardPubkey201Response.js +110 -0
- package/dist/model/EthStakeEstimatedFee.js +1 -1
- package/dist/model/EthStakingActivityDetailExtra.js +1 -1
- package/dist/model/GetStakingEstimationFee201Response.js +1 -1
- package/dist/model/GetTransactionLimitation200Response.js +4 -4
- package/dist/model/GuardPubkeyStatus.js +91 -0
- package/dist/model/ListAddressBalancesByToken200Response.js +123 -0
- package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
- package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
- package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
- package/dist/model/ListEnableTokenPairs200Response.js +123 -0
- package/dist/model/ListKeyShareHolders200Response.js +123 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/MessageSignDestination.js +70 -8
- package/dist/model/MessageSignDestinationType.js +12 -2
- package/dist/model/MessageSignSource.js +6 -0
- package/dist/model/MpcContractCallSource.js +16 -0
- package/dist/model/MpcMessageSignSource.js +16 -0
- package/dist/model/MpcSigningGroup.js +27 -4
- package/dist/model/MpcTransferSource.js +16 -0
- package/dist/model/OrgInfo.js +3 -3
- package/dist/model/QueryApprovalStatement200Response.js +122 -0
- package/dist/model/QueryGuardPubkey200Response.js +129 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +125 -0
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SelfCustodyWallet.js +7 -7
- package/dist/model/StakingPoolId.js +30 -0
- package/dist/model/StakingPoolType.js +15 -0
- package/dist/model/SubWalletAssetBalance.js +6 -6
- package/dist/model/SubmitDepositTravelRuleInfo201Response.js +1 -1
- package/dist/model/SwapQuote.js +203 -0
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TokenBalance.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +16 -0
- package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +83 -0
- package/dist/model/TransactionDestination.js +10 -4
- package/dist/model/TransactionRawTxInfo.js +29 -0
- package/dist/model/TransactionRbfSource.js +6 -0
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionUserApprovalDetail.js +3 -3
- package/dist/model/TransactionUtxoChange.js +101 -0
- package/dist/model/TransferDestination.js +6 -0
- package/dist/model/TransferParams.js +36 -0
- package/dist/model/TransferSource.js +6 -0
- package/dist/model/TravelRuleDepositExchangesOrVASP.js +4 -4
- package/dist/model/TravelRuleDepositExchangesOrVASPEntityInfo.js +7 -7
- package/dist/model/TravelRuleDepositLegalEntity.js +5 -5
- package/dist/model/TravelRuleDepositNaturalEntity.js +9 -9
- package/dist/model/TravelRuleDepositRequestTravelRuleInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawExchangesOrVASP.js +3 -3
- package/dist/model/TravelRuleWithdrawExchangesOrVASPEntityInfo.js +5 -5
- package/dist/model/TravelRuleWithdrawLegalEntity.js +2 -2
- package/dist/model/TravelRuleWithdrawNaturalEntity.js +7 -7
- package/dist/model/TravelRuleWithdrawRequestTravelRuleInfo.js +4 -4
- package/dist/model/Vasp.js +7 -7
- package/dist/model/WebhookEventData.js +2 -2
- package/docs/ActivityExtra.md +5 -5
- package/docs/AddressBalance.md +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressTransferDestination.md +14 -0
- package/docs/AddressesEventData.md +1 -1
- package/docs/AddressesEventDataAllOfAddresses.md +19 -0
- package/docs/ApprovalStatementStatus.md +20 -0
- package/docs/AssetBalance.md +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +10 -0
- package/docs/BabylonAirdropPop.md +14 -0
- package/docs/BabylonAirdropRegistration.md +16 -0
- package/docs/BabylonEligibleAirdrop.md +14 -0
- package/docs/BabylonRegistrationRequestStatus.md +14 -0
- package/docs/BabylonRegistrationStatus.md +14 -0
- package/docs/BabylonStakingActivityDetailExtra.md +1 -1
- package/docs/BabylonStakingRegistration.md +17 -0
- package/docs/{TokenBalanceBalance.md → Balance.md} +1 -1
- package/docs/ChangeGuardPubkey200Response.md +9 -0
- package/docs/ContractCallParams.md +14 -0
- package/docs/ContractCallSource.md +1 -0
- package/docs/CoreStakingActivityDetailExtra.md +3 -3
- package/docs/CreateAddressRequest.md +3 -1
- package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
- package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
- package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
- package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
- package/docs/CreatePrimeBrokerAddress201Response.md +10 -0
- package/docs/CreatePrimeBrokerAddressRequest.md +9 -0
- package/docs/CreateSwapActivityRequest.md +12 -0
- package/docs/CreateSwapQuote201Response.md +17 -0
- package/docs/CreateSwapQuoteRequest.md +13 -0
- package/docs/DeleteGuardPubkey201Response.md +9 -0
- package/docs/DevelopersApi.md +5 -5
- package/docs/DevelopersWebhooksApi.md +8 -8
- package/docs/EthStakeEstimatedFee.md +1 -1
- package/docs/EthStakingActivityDetailExtra.md +1 -1
- package/docs/GetStakingEstimationFee201Response.md +1 -1
- package/docs/GetTransactionLimitation200Response.md +4 -4
- package/docs/GuardPubkeyStatus.md +24 -0
- package/docs/ListAddressBalancesByToken200Response.md +10 -0
- package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
- package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
- package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
- package/docs/ListEnableTokenPairs200Response.md +10 -0
- package/docs/ListKeyShareHolders200Response.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/MessageSignDestination.md +1 -0
- package/docs/MessageSignDestinationType.md +6 -2
- package/docs/MessageSignSource.md +1 -0
- package/docs/MpcContractCallSource.md +1 -0
- package/docs/MpcMessageSignSource.md +1 -0
- package/docs/MpcSigningGroup.md +1 -1
- package/docs/MpcTransferSource.md +1 -0
- package/docs/OrgInfo.md +1 -1
- package/docs/PrimeBrokerApi.md +318 -0
- package/docs/QueryApprovalStatement200Response.md +12 -0
- package/docs/QueryGuardPubkey200Response.md +11 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +10 -0
- package/docs/RootPubkey.md +1 -1
- package/docs/SelfCustodyWallet.md +3 -3
- package/docs/StakingPoolId.md +12 -0
- package/docs/StakingPoolType.md +6 -0
- package/docs/StakingsApi.md +460 -12
- package/docs/SubWalletAssetBalance.md +1 -1
- package/docs/SubmitDepositTravelRuleInfo201Response.md +1 -1
- package/docs/SwapQuote.md +16 -0
- package/docs/SwapsApi.md +348 -0
- package/docs/TSSGroups.md +1 -1
- package/docs/TokenBalance.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -0
- package/docs/TransactionDepositToAddressDestinationTxInfo.md +9 -0
- package/docs/TransactionDestination.md +1 -0
- package/docs/TransactionRawTxInfo.md +2 -0
- package/docs/TransactionRbfSource.md +1 -0
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionUserApprovalDetail.md +3 -3
- package/docs/TransactionUtxoChange.md +10 -0
- package/docs/TransactionsApi.md +68 -17
- package/docs/TransferDestination.md +14 -0
- package/docs/TransferParams.md +14 -0
- package/docs/TransferSource.md +1 -0
- package/docs/TravelRuleApi.md +13 -13
- package/docs/TravelRuleDepositExchangesOrVASP.md +2 -2
- package/docs/TravelRuleDepositExchangesOrVASPEntityInfo.md +7 -7
- package/docs/TravelRuleDepositLegalEntity.md +3 -3
- package/docs/TravelRuleDepositNaturalEntity.md +5 -5
- package/docs/TravelRuleDepositRequestTravelRuleInfo.md +5 -5
- package/docs/TravelRuleWithdrawExchangesOrVASP.md +1 -1
- package/docs/TravelRuleWithdrawExchangesOrVASPEntityInfo.md +5 -5
- package/docs/TravelRuleWithdrawLegalEntity.md +1 -1
- package/docs/TravelRuleWithdrawNaturalEntity.md +4 -4
- package/docs/TravelRuleWithdrawRequestTravelRuleInfo.md +4 -4
- package/docs/Vasp.md +3 -3
- package/docs/WalletsApi.md +78 -13
- package/docs/WalletsExchangeWalletApi.md +1 -1
- package/docs/WalletsMPCWalletsApi.md +141 -27
- package/docs/WalletsSmartContractWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +1 -1
- package/package.json +2 -2
- package/docs/SwapSummary.md +0 -10
|
@@ -0,0 +1,317 @@
|
|
|
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 _ChangeGuardPubkey200Response = _interopRequireDefault(require("../model/ChangeGuardPubkey200Response"));
|
|
9
|
+
var _CreatePrimeBrokerAddress201Response = _interopRequireDefault(require("../model/CreatePrimeBrokerAddress201Response"));
|
|
10
|
+
var _CreatePrimeBrokerAddressRequest = _interopRequireDefault(require("../model/CreatePrimeBrokerAddressRequest"));
|
|
11
|
+
var _DeleteGuardPubkey201Response = _interopRequireDefault(require("../model/DeleteGuardPubkey201Response"));
|
|
12
|
+
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
13
|
+
var _QueryApprovalStatement200Response = _interopRequireDefault(require("../model/QueryApprovalStatement200Response"));
|
|
14
|
+
var _QueryGuardPubkey200Response = _interopRequireDefault(require("../model/QueryGuardPubkey200Response"));
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
+
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); }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
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); } /**
|
|
22
|
+
* Cobo Wallet as a Service 2.0
|
|
23
|
+
*
|
|
24
|
+
* Contact: help@cobo.com
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* PrimeBroker service.
|
|
33
|
+
* @module api/PrimeBrokerApi
|
|
34
|
+
*/
|
|
35
|
+
var PrimeBrokerApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new PrimeBrokerApi.
|
|
38
|
+
* @alias module:api/PrimeBrokerApi
|
|
39
|
+
* @class
|
|
40
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
+
*/
|
|
43
|
+
function PrimeBrokerApi(apiClient) {
|
|
44
|
+
_classCallCheck(this, PrimeBrokerApi);
|
|
45
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Change Guard pubkey binding
|
|
50
|
+
* This operation updates an existing binding to associate a broker user ID with a new Cobo Guard public key.
|
|
51
|
+
* @param {String} user_id The user ID.
|
|
52
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChangeGuardPubkey200Response} and HTTP response
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(PrimeBrokerApi, [{
|
|
55
|
+
key: "changeGuardPubkeyWithHttpInfo",
|
|
56
|
+
value: function changeGuardPubkeyWithHttpInfo(user_id) {
|
|
57
|
+
var postBody = null;
|
|
58
|
+
if (postBody && postBody.toJSON) {
|
|
59
|
+
postBody = postBody.toJSON();
|
|
60
|
+
}
|
|
61
|
+
// verify the required parameter 'user_id' is set
|
|
62
|
+
if (user_id === undefined || user_id === null) {
|
|
63
|
+
throw new Error("Missing the required parameter 'user_id' when calling changeGuardPubkey");
|
|
64
|
+
}
|
|
65
|
+
var pathParams = {
|
|
66
|
+
'user_id': user_id
|
|
67
|
+
};
|
|
68
|
+
var queryParams = {};
|
|
69
|
+
var headerParams = {};
|
|
70
|
+
var formParams = {};
|
|
71
|
+
var authNames = ['CoboAuth'];
|
|
72
|
+
var contentTypes = [];
|
|
73
|
+
var accepts = ['application/json'];
|
|
74
|
+
var returnType = _ChangeGuardPubkey200Response["default"];
|
|
75
|
+
return this.apiClient.callApi('/prime_broker/user/{user_id}/guard_pubkey', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Change Guard pubkey binding
|
|
80
|
+
* This operation updates an existing binding to associate a broker user ID with a new Cobo Guard public key.
|
|
81
|
+
* @param {String} user_id The user ID.
|
|
82
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ChangeGuardPubkey200Response}
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "changeGuardPubkey",
|
|
86
|
+
value: function changeGuardPubkey(user_id) {
|
|
87
|
+
return this.changeGuardPubkeyWithHttpInfo(user_id).then(function (response_and_data) {
|
|
88
|
+
return response_and_data.data;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Create Guard pubkey binding
|
|
94
|
+
* This operation creates a binding between a broker user ID and a Cobo Guard public key.
|
|
95
|
+
* @param {String} user_id The user ID.
|
|
96
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChangeGuardPubkey200Response} and HTTP response
|
|
97
|
+
*/
|
|
98
|
+
}, {
|
|
99
|
+
key: "createGuardPubkeyWithHttpInfo",
|
|
100
|
+
value: function createGuardPubkeyWithHttpInfo(user_id) {
|
|
101
|
+
var postBody = null;
|
|
102
|
+
if (postBody && postBody.toJSON) {
|
|
103
|
+
postBody = postBody.toJSON();
|
|
104
|
+
}
|
|
105
|
+
// verify the required parameter 'user_id' is set
|
|
106
|
+
if (user_id === undefined || user_id === null) {
|
|
107
|
+
throw new Error("Missing the required parameter 'user_id' when calling createGuardPubkey");
|
|
108
|
+
}
|
|
109
|
+
var pathParams = {
|
|
110
|
+
'user_id': user_id
|
|
111
|
+
};
|
|
112
|
+
var queryParams = {};
|
|
113
|
+
var headerParams = {};
|
|
114
|
+
var formParams = {};
|
|
115
|
+
var authNames = ['CoboAuth'];
|
|
116
|
+
var contentTypes = [];
|
|
117
|
+
var accepts = ['application/json'];
|
|
118
|
+
var returnType = _ChangeGuardPubkey200Response["default"];
|
|
119
|
+
return this.apiClient.callApi('/prime_broker/user/{user_id}/guard_pubkey', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Create Guard pubkey binding
|
|
124
|
+
* This operation creates a binding between a broker user ID and a Cobo Guard public key.
|
|
125
|
+
* @param {String} user_id The user ID.
|
|
126
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ChangeGuardPubkey200Response}
|
|
127
|
+
*/
|
|
128
|
+
}, {
|
|
129
|
+
key: "createGuardPubkey",
|
|
130
|
+
value: function createGuardPubkey(user_id) {
|
|
131
|
+
return this.createGuardPubkeyWithHttpInfo(user_id).then(function (response_and_data) {
|
|
132
|
+
return response_and_data.data;
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Bind addresses to a broker user
|
|
138
|
+
* This operation binds addresses to a broker user.
|
|
139
|
+
* @param {String} user_id The user ID.
|
|
140
|
+
* @param {Object} opts Optional parameters
|
|
141
|
+
* @param {module:model/CreatePrimeBrokerAddressRequest} [CreatePrimeBrokerAddressRequest] The request body to bind addresses to a broker user.
|
|
142
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreatePrimeBrokerAddress201Response} and HTTP response
|
|
143
|
+
*/
|
|
144
|
+
}, {
|
|
145
|
+
key: "createPrimeBrokerAddressWithHttpInfo",
|
|
146
|
+
value: function createPrimeBrokerAddressWithHttpInfo(user_id, opts) {
|
|
147
|
+
opts = opts || {};
|
|
148
|
+
var postBody = opts['CreatePrimeBrokerAddressRequest'];
|
|
149
|
+
if (postBody && postBody.toJSON) {
|
|
150
|
+
postBody = postBody.toJSON();
|
|
151
|
+
}
|
|
152
|
+
// verify the required parameter 'user_id' is set
|
|
153
|
+
if (user_id === undefined || user_id === null) {
|
|
154
|
+
throw new Error("Missing the required parameter 'user_id' when calling createPrimeBrokerAddress");
|
|
155
|
+
}
|
|
156
|
+
var pathParams = {
|
|
157
|
+
'user_id': user_id
|
|
158
|
+
};
|
|
159
|
+
var queryParams = {};
|
|
160
|
+
var headerParams = {};
|
|
161
|
+
var formParams = {};
|
|
162
|
+
var authNames = ['CoboAuth'];
|
|
163
|
+
var contentTypes = ['application/json'];
|
|
164
|
+
var accepts = ['application/json'];
|
|
165
|
+
var returnType = _CreatePrimeBrokerAddress201Response["default"];
|
|
166
|
+
return this.apiClient.callApi('/prime_broker/user/{user_id}/addresses', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Bind addresses to a broker user
|
|
171
|
+
* This operation binds addresses to a broker user.
|
|
172
|
+
* @param {String} user_id The user ID.
|
|
173
|
+
* @param {Object} opts Optional parameters
|
|
174
|
+
* @param {module:model/CreatePrimeBrokerAddressRequest} opts.CreatePrimeBrokerAddressRequest The request body to bind addresses to a broker user.
|
|
175
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreatePrimeBrokerAddress201Response}
|
|
176
|
+
*/
|
|
177
|
+
}, {
|
|
178
|
+
key: "createPrimeBrokerAddress",
|
|
179
|
+
value: function createPrimeBrokerAddress(user_id, opts) {
|
|
180
|
+
return this.createPrimeBrokerAddressWithHttpInfo(user_id, opts).then(function (response_and_data) {
|
|
181
|
+
return response_and_data.data;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Delete Guard pubkey binding
|
|
187
|
+
* This operation deletes a binding between a broker user ID and a Cobo Guard public key.
|
|
188
|
+
* @param {String} user_id The user ID.
|
|
189
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteGuardPubkey201Response} and HTTP response
|
|
190
|
+
*/
|
|
191
|
+
}, {
|
|
192
|
+
key: "deleteGuardPubkeyWithHttpInfo",
|
|
193
|
+
value: function deleteGuardPubkeyWithHttpInfo(user_id) {
|
|
194
|
+
var postBody = null;
|
|
195
|
+
if (postBody && postBody.toJSON) {
|
|
196
|
+
postBody = postBody.toJSON();
|
|
197
|
+
}
|
|
198
|
+
// verify the required parameter 'user_id' is set
|
|
199
|
+
if (user_id === undefined || user_id === null) {
|
|
200
|
+
throw new Error("Missing the required parameter 'user_id' when calling deleteGuardPubkey");
|
|
201
|
+
}
|
|
202
|
+
var pathParams = {
|
|
203
|
+
'user_id': user_id
|
|
204
|
+
};
|
|
205
|
+
var queryParams = {};
|
|
206
|
+
var headerParams = {};
|
|
207
|
+
var formParams = {};
|
|
208
|
+
var authNames = ['CoboAuth'];
|
|
209
|
+
var contentTypes = [];
|
|
210
|
+
var accepts = ['application/json'];
|
|
211
|
+
var returnType = _DeleteGuardPubkey201Response["default"];
|
|
212
|
+
return this.apiClient.callApi('/prime_broker/user/{user_id}/guard_pubkey/delete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Delete Guard pubkey binding
|
|
217
|
+
* This operation deletes a binding between a broker user ID and a Cobo Guard public key.
|
|
218
|
+
* @param {String} user_id The user ID.
|
|
219
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteGuardPubkey201Response}
|
|
220
|
+
*/
|
|
221
|
+
}, {
|
|
222
|
+
key: "deleteGuardPubkey",
|
|
223
|
+
value: function deleteGuardPubkey(user_id) {
|
|
224
|
+
return this.deleteGuardPubkeyWithHttpInfo(user_id).then(function (response_and_data) {
|
|
225
|
+
return response_and_data.data;
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Query approval statement
|
|
231
|
+
* This operation queries an approval statement.
|
|
232
|
+
* @param {String} statement_id The approval statement ID.
|
|
233
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueryApprovalStatement200Response} and HTTP response
|
|
234
|
+
*/
|
|
235
|
+
}, {
|
|
236
|
+
key: "queryApprovalStatementWithHttpInfo",
|
|
237
|
+
value: function queryApprovalStatementWithHttpInfo(statement_id) {
|
|
238
|
+
var postBody = null;
|
|
239
|
+
if (postBody && postBody.toJSON) {
|
|
240
|
+
postBody = postBody.toJSON();
|
|
241
|
+
}
|
|
242
|
+
// verify the required parameter 'statement_id' is set
|
|
243
|
+
if (statement_id === undefined || statement_id === null) {
|
|
244
|
+
throw new Error("Missing the required parameter 'statement_id' when calling queryApprovalStatement");
|
|
245
|
+
}
|
|
246
|
+
var pathParams = {
|
|
247
|
+
'statement_id': statement_id
|
|
248
|
+
};
|
|
249
|
+
var queryParams = {};
|
|
250
|
+
var headerParams = {};
|
|
251
|
+
var formParams = {};
|
|
252
|
+
var authNames = ['CoboAuth'];
|
|
253
|
+
var contentTypes = [];
|
|
254
|
+
var accepts = ['application/json'];
|
|
255
|
+
var returnType = _QueryApprovalStatement200Response["default"];
|
|
256
|
+
return this.apiClient.callApi('/prime_broker/approval_statement/{statement_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Query approval statement
|
|
261
|
+
* This operation queries an approval statement.
|
|
262
|
+
* @param {String} statement_id The approval statement ID.
|
|
263
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueryApprovalStatement200Response}
|
|
264
|
+
*/
|
|
265
|
+
}, {
|
|
266
|
+
key: "queryApprovalStatement",
|
|
267
|
+
value: function queryApprovalStatement(statement_id) {
|
|
268
|
+
return this.queryApprovalStatementWithHttpInfo(statement_id).then(function (response_and_data) {
|
|
269
|
+
return response_and_data.data;
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Query a Guard pubkey
|
|
275
|
+
* This operation retrieves the current Cobo Guard public key binding details for a broker user.
|
|
276
|
+
* @param {String} user_id The user ID.
|
|
277
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueryGuardPubkey200Response} and HTTP response
|
|
278
|
+
*/
|
|
279
|
+
}, {
|
|
280
|
+
key: "queryGuardPubkeyWithHttpInfo",
|
|
281
|
+
value: function queryGuardPubkeyWithHttpInfo(user_id) {
|
|
282
|
+
var postBody = null;
|
|
283
|
+
if (postBody && postBody.toJSON) {
|
|
284
|
+
postBody = postBody.toJSON();
|
|
285
|
+
}
|
|
286
|
+
// verify the required parameter 'user_id' is set
|
|
287
|
+
if (user_id === undefined || user_id === null) {
|
|
288
|
+
throw new Error("Missing the required parameter 'user_id' when calling queryGuardPubkey");
|
|
289
|
+
}
|
|
290
|
+
var pathParams = {
|
|
291
|
+
'user_id': user_id
|
|
292
|
+
};
|
|
293
|
+
var queryParams = {};
|
|
294
|
+
var headerParams = {};
|
|
295
|
+
var formParams = {};
|
|
296
|
+
var authNames = ['CoboAuth'];
|
|
297
|
+
var contentTypes = [];
|
|
298
|
+
var accepts = ['application/json'];
|
|
299
|
+
var returnType = _QueryGuardPubkey200Response["default"];
|
|
300
|
+
return this.apiClient.callApi('/prime_broker/user/{user_id}/guard_pubkey', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Query a Guard pubkey
|
|
305
|
+
* This operation retrieves the current Cobo Guard public key binding details for a broker user.
|
|
306
|
+
* @param {String} user_id The user ID.
|
|
307
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueryGuardPubkey200Response}
|
|
308
|
+
*/
|
|
309
|
+
}, {
|
|
310
|
+
key: "queryGuardPubkey",
|
|
311
|
+
value: function queryGuardPubkey(user_id) {
|
|
312
|
+
return this.queryGuardPubkeyWithHttpInfo(user_id).then(function (response_and_data) {
|
|
313
|
+
return response_and_data.data;
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}]);
|
|
317
|
+
}();
|