@cobo/cobo-waas2 1.19.0 → 1.20.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 +13 -1
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +1 -1
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +144 -6
- package/dist/api/TransactionsApi.js +94 -2
- package/dist/index.js +49 -0
- package/dist/model/AddressesEventData.js +13 -3
- package/dist/model/BalanceUpdateInfoEventData.js +13 -3
- package/dist/model/ChainsEventData.js +13 -3
- package/dist/model/ContractCallDestination.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +4 -4
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSettlement.js +1 -1
- package/dist/model/CustodialWeb3TransferSource.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +4 -6
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/FILBase.js +0 -1
- package/dist/model/ForcedSweep.js +193 -0
- package/dist/model/ForcedSweepRequest.js +156 -0
- package/dist/model/ForcedSweepStatus.js +66 -0
- package/dist/model/ListForcedSweepRequests200Response.js +123 -0
- package/dist/model/ListTransactionApprovalDetails200Response.js +107 -0
- package/dist/model/MPCVaultEventData.js +13 -3
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/Order.js +2 -2
- package/dist/model/PaymentAddressUpdateEventData.js +284 -0
- package/dist/model/PaymentOrderEventData.js +16 -6
- package/dist/model/PaymentRefundEventData.js +13 -3
- package/dist/model/PaymentSettlementEvent.js +13 -3
- package/dist/model/PaymentTransactionEventData.js +827 -0
- package/dist/model/SOLBase.js +0 -1
- package/dist/model/SafeWalletDelegates.js +1 -1
- package/dist/model/SafeWalletDelegatesContractCall.js +1 -1
- package/dist/model/SettlementInfo.js +26 -0
- package/dist/model/SuspendedTokenEventData.js +13 -3
- package/dist/model/TSSRequestWebhookEventData.js +13 -3
- package/dist/model/TokenListingEventData.js +13 -3
- package/dist/model/TokenizationContractCallParamsData.js +1 -1
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokensEventData.js +13 -3
- package/dist/model/TransactionDestination.js +1 -1
- package/dist/model/TransactionEvmContractDestination.js +2 -2
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionWebhookEventData.js +13 -3
- package/dist/model/UpdateTopUpAddress.js +2 -2
- package/dist/model/WalletInfoEventData.js +13 -3
- package/dist/model/WebhookEventData.js +115 -23
- package/dist/model/WebhookEventDataType.js +12 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressesEventData.md +5 -1
- package/docs/BalanceUpdateInfoEventData.md +5 -1
- package/docs/ChainsEventData.md +5 -1
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateSettlement.md +1 -1
- package/docs/CustodialWeb3TransferSource.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ForcedSweep.md +16 -0
- package/docs/ForcedSweepRequest.md +12 -0
- package/docs/ForcedSweepStatus.md +14 -0
- package/docs/ListForcedSweepRequests200Response.md +10 -0
- package/docs/ListTransactionApprovalDetails200Response.md +9 -0
- package/docs/MPCVaultEventData.md +5 -1
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +1 -1
- package/docs/PaymentAddressUpdateEventData.md +53 -0
- package/docs/PaymentApi.md +168 -3
- package/docs/PaymentOrderEventData.md +6 -2
- package/docs/PaymentRefundEventData.md +5 -1
- package/docs/PaymentSettlementEvent.md +5 -1
- package/docs/PaymentTransactionEventData.md +84 -0
- package/docs/SafeWalletDelegates.md +1 -1
- package/docs/SafeWalletDelegatesContractCall.md +1 -1
- package/docs/SettlementInfo.md +2 -0
- package/docs/SuspendedTokenEventData.md +5 -1
- package/docs/TSSRequestWebhookEventData.md +5 -1
- package/docs/TokenListingEventData.md +5 -1
- package/docs/TokenizationContractCallParamsData.md +1 -1
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokensEventData.md +5 -1
- package/docs/TransactionDestination.md +1 -1
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionWebhookEventData.md +5 -1
- package/docs/TransactionsApi.md +107 -1
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletInfoEventData.md +5 -1
- package/docs/WebhookEventData.md +22 -12
- package/docs/WebhookEventDataType.md +5 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](http
|
|
|
15
15
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
16
16
|
|
|
17
17
|
- API version: v2
|
|
18
|
-
- Package version: 1.
|
|
18
|
+
- Package version: 1.20.0
|
|
19
19
|
- Generator version: 7.6.0
|
|
20
20
|
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
|
21
21
|
For more information, please visit [https://www.cobo.com/waas](https://www.cobo.com/waas)
|
|
@@ -97,6 +97,7 @@ Class | Method | HTTP request | Description
|
|
|
97
97
|
*CoboWaas2.OAuthApi* | [**refreshToken**](docs/OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh Org Access Token
|
|
98
98
|
*CoboWaas2.OrganizationsApi* | [**getOrgInfo**](docs/OrganizationsApi.md#getOrgInfo) | **GET** /organizations/info | Get organization information
|
|
99
99
|
*CoboWaas2.PaymentApi* | [**cancelRefundById**](docs/PaymentApi.md#cancelRefundById) | **PUT** /payments/refunds/{refund_id}/cancel | Cancel refund order
|
|
100
|
+
*CoboWaas2.PaymentApi* | [**createForcedSweepRequest**](docs/PaymentApi.md#createForcedSweepRequest) | **POST** /payments/force_sweep_requests | Create force sweep request
|
|
100
101
|
*CoboWaas2.PaymentApi* | [**createMerchant**](docs/PaymentApi.md#createMerchant) | **POST** /payments/merchants | Create merchant
|
|
101
102
|
*CoboWaas2.PaymentApi* | [**createPaymentOrder**](docs/PaymentApi.md#createPaymentOrder) | **POST** /payments/orders | Create pay-in order
|
|
102
103
|
*CoboWaas2.PaymentApi* | [**createRefund**](docs/PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
|
|
@@ -110,6 +111,7 @@ Class | Method | HTTP request | Description
|
|
|
110
111
|
*CoboWaas2.PaymentApi* | [**getTopUpAddress**](docs/PaymentApi.md#getTopUpAddress) | **GET** /payments/topup/address | Get top-up address
|
|
111
112
|
*CoboWaas2.PaymentApi* | [**listBankAccounts**](docs/PaymentApi.md#listBankAccounts) | **GET** /payments/bank_accounts | List all bank accounts
|
|
112
113
|
*CoboWaas2.PaymentApi* | [**listCryptoAddresses**](docs/PaymentApi.md#listCryptoAddresses) | **GET** /payments/crypto_addresses | List crypto addresses
|
|
114
|
+
*CoboWaas2.PaymentApi* | [**listForcedSweepRequests**](docs/PaymentApi.md#listForcedSweepRequests) | **GET** /payments/force_sweep_requests | List force sweep requests
|
|
113
115
|
*CoboWaas2.PaymentApi* | [**listMerchants**](docs/PaymentApi.md#listMerchants) | **GET** /payments/merchants | List all merchants
|
|
114
116
|
*CoboWaas2.PaymentApi* | [**listPaymentOrders**](docs/PaymentApi.md#listPaymentOrders) | **GET** /payments/orders | List all pay-in orders
|
|
115
117
|
*CoboWaas2.PaymentApi* | [**listPaymentSupportedTokens**](docs/PaymentApi.md#listPaymentSupportedTokens) | **GET** /payments/supported_tokens | List all supported tokens
|
|
@@ -118,6 +120,7 @@ Class | Method | HTTP request | Description
|
|
|
118
120
|
*CoboWaas2.PaymentApi* | [**updateMerchantById**](docs/PaymentApi.md#updateMerchantById) | **PUT** /payments/merchants/{merchant_id} | Update merchant
|
|
119
121
|
*CoboWaas2.PaymentApi* | [**updatePaymentOrder**](docs/PaymentApi.md#updatePaymentOrder) | **PUT** /payments/orders/{order_id} | Update pay-in order
|
|
120
122
|
*CoboWaas2.PaymentApi* | [**updateRefundById**](docs/PaymentApi.md#updateRefundById) | **PUT** /payments/refunds/{refund_id} | Update refund order information
|
|
123
|
+
*CoboWaas2.PaymentApi* | [**updateTopUpAddress**](docs/PaymentApi.md#updateTopUpAddress) | **PUT** /payments/topup/address | Update top-up address
|
|
121
124
|
*CoboWaas2.PrimeBrokerApi* | [**changeGuardPubkey**](docs/PrimeBrokerApi.md#changeGuardPubkey) | **PUT** /prime_broker/user/{user_id}/guard_pubkey | Change Guard pubkey binding
|
|
122
125
|
*CoboWaas2.PrimeBrokerApi* | [**createGuardPubkey**](docs/PrimeBrokerApi.md#createGuardPubkey) | **POST** /prime_broker/user/{user_id}/guard_pubkey | Create Guard pubkey binding
|
|
123
126
|
*CoboWaas2.PrimeBrokerApi* | [**createPrimeBrokerAddress**](docs/PrimeBrokerApi.md#createPrimeBrokerAddress) | **POST** /prime_broker/user/{user_id}/addresses | Bind addresses to a broker user
|
|
@@ -152,7 +155,9 @@ Class | Method | HTTP request | Description
|
|
|
152
155
|
*CoboWaas2.TransactionsApi* | [**createTransferTransaction**](docs/TransactionsApi.md#createTransferTransaction) | **POST** /transactions/transfer | Transfer token
|
|
153
156
|
*CoboWaas2.TransactionsApi* | [**dropTransactionById**](docs/TransactionsApi.md#dropTransactionById) | **POST** /transactions/{transaction_id}/drop | Drop transaction
|
|
154
157
|
*CoboWaas2.TransactionsApi* | [**estimateFee**](docs/TransactionsApi.md#estimateFee) | **POST** /transactions/estimate_fee | Estimate transaction fee
|
|
158
|
+
*CoboWaas2.TransactionsApi* | [**getTransactionApprovalDetail**](docs/TransactionsApi.md#getTransactionApprovalDetail) | **GET** /transactions/{transaction_id}/approval_detail | Get transaction approval details
|
|
155
159
|
*CoboWaas2.TransactionsApi* | [**getTransactionById**](docs/TransactionsApi.md#getTransactionById) | **GET** /transactions/{transaction_id} | Get transaction information
|
|
160
|
+
*CoboWaas2.TransactionsApi* | [**listTransactionApprovalDetails**](docs/TransactionsApi.md#listTransactionApprovalDetails) | **GET** /transactions/approval_details | List transaction approval details
|
|
156
161
|
*CoboWaas2.TransactionsApi* | [**listTransactions**](docs/TransactionsApi.md#listTransactions) | **GET** /transactions | List all transactions
|
|
157
162
|
*CoboWaas2.TransactionsApi* | [**resendTransactionById**](docs/TransactionsApi.md#resendTransactionById) | **POST** /transactions/{transaction_id}/resend | Resend transaction
|
|
158
163
|
*CoboWaas2.TransactionsApi* | [**signAndBroadcastTransactionById**](docs/TransactionsApi.md#signAndBroadcastTransactionById) | **POST** /transactions/{transaction_id}/sign_and_broadcast | Sign and broadcast transaction
|
|
@@ -414,6 +419,9 @@ Class | Method | HTTP request | Description
|
|
|
414
419
|
- [CoboWaas2.FeeStationTransfer](docs/FeeStationTransfer.md)
|
|
415
420
|
- [CoboWaas2.FeeType](docs/FeeType.md)
|
|
416
421
|
- [CoboWaas2.FixedFeeRate](docs/FixedFeeRate.md)
|
|
422
|
+
- [CoboWaas2.ForcedSweep](docs/ForcedSweep.md)
|
|
423
|
+
- [CoboWaas2.ForcedSweepRequest](docs/ForcedSweepRequest.md)
|
|
424
|
+
- [CoboWaas2.ForcedSweepStatus](docs/ForcedSweepStatus.md)
|
|
417
425
|
- [CoboWaas2.GetApiKeyInfo200Response](docs/GetApiKeyInfo200Response.md)
|
|
418
426
|
- [CoboWaas2.GetExchangeRate200Response](docs/GetExchangeRate200Response.md)
|
|
419
427
|
- [CoboWaas2.GetMaxTransferableValueWithFeeModelRequest](docs/GetMaxTransferableValueWithFeeModelRequest.md)
|
|
@@ -447,6 +455,7 @@ Class | Method | HTTP request | Description
|
|
|
447
455
|
- [CoboWaas2.ListBabylonStakingRegistrations200Response](docs/ListBabylonStakingRegistrations200Response.md)
|
|
448
456
|
- [CoboWaas2.ListCallbackMessages200Response](docs/ListCallbackMessages200Response.md)
|
|
449
457
|
- [CoboWaas2.ListExchanges200ResponseInner](docs/ListExchanges200ResponseInner.md)
|
|
458
|
+
- [CoboWaas2.ListForcedSweepRequests200Response](docs/ListForcedSweepRequests200Response.md)
|
|
450
459
|
- [CoboWaas2.ListKeyShareHolderGroups200Response](docs/ListKeyShareHolderGroups200Response.md)
|
|
451
460
|
- [CoboWaas2.ListKeyShareHolders200Response](docs/ListKeyShareHolders200Response.md)
|
|
452
461
|
- [CoboWaas2.ListMerchants200Response](docs/ListMerchants200Response.md)
|
|
@@ -467,6 +476,7 @@ Class | Method | HTTP request | Description
|
|
|
467
476
|
- [CoboWaas2.ListTokenListingRequests200Response](docs/ListTokenListingRequests200Response.md)
|
|
468
477
|
- [CoboWaas2.ListTopUpPayers200Response](docs/ListTopUpPayers200Response.md)
|
|
469
478
|
- [CoboWaas2.ListTopUpPayers200ResponseDataInner](docs/ListTopUpPayers200ResponseDataInner.md)
|
|
479
|
+
- [CoboWaas2.ListTransactionApprovalDetails200Response](docs/ListTransactionApprovalDetails200Response.md)
|
|
470
480
|
- [CoboWaas2.ListTransactions200Response](docs/ListTransactions200Response.md)
|
|
471
481
|
- [CoboWaas2.ListTssRequests200Response](docs/ListTssRequests200Response.md)
|
|
472
482
|
- [CoboWaas2.ListUtxos200Response](docs/ListUtxos200Response.md)
|
|
@@ -502,10 +512,12 @@ Class | Method | HTTP request | Description
|
|
|
502
512
|
- [CoboWaas2.OrgInfo](docs/OrgInfo.md)
|
|
503
513
|
- [CoboWaas2.Pagination](docs/Pagination.md)
|
|
504
514
|
- [CoboWaas2.PayerAccount](docs/PayerAccount.md)
|
|
515
|
+
- [CoboWaas2.PaymentAddressUpdateEventData](docs/PaymentAddressUpdateEventData.md)
|
|
505
516
|
- [CoboWaas2.PaymentOrderEventData](docs/PaymentOrderEventData.md)
|
|
506
517
|
- [CoboWaas2.PaymentRefundEventData](docs/PaymentRefundEventData.md)
|
|
507
518
|
- [CoboWaas2.PaymentSettlementEvent](docs/PaymentSettlementEvent.md)
|
|
508
519
|
- [CoboWaas2.PaymentTransaction](docs/PaymentTransaction.md)
|
|
520
|
+
- [CoboWaas2.PaymentTransactionEventData](docs/PaymentTransactionEventData.md)
|
|
509
521
|
- [CoboWaas2.PayoutChannel](docs/PayoutChannel.md)
|
|
510
522
|
- [CoboWaas2.PolicyAction](docs/PolicyAction.md)
|
|
511
523
|
- [CoboWaas2.PolicyActionContent](docs/PolicyActionContent.md)
|
package/dist/ApiClient.js
CHANGED
package/dist/PreRequestScript.js
CHANGED
|
@@ -7,7 +7,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
8
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
9
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
10
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
10
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
11
11
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
12
12
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13
13
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
package/dist/api/OAuthApi.js
CHANGED
|
@@ -48,7 +48,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Get Access Token
|
|
51
|
-
* This operation acquires an Access Token and a Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
51
|
+
* This operation acquires an Access Token and a Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
52
52
|
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body to acquire an Access Token.
|
|
53
53
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangePermissionToken201Response} and HTTP response
|
|
54
54
|
*/
|
|
@@ -76,7 +76,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Get Access Token
|
|
79
|
-
* This operation acquires an Access Token and a Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
79
|
+
* This operation acquires an Access Token and a Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
80
80
|
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body to acquire an Access Token.
|
|
81
81
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
82
82
|
*/
|
|
@@ -148,7 +148,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* Refresh Access Token
|
|
151
|
-
* This operation refreshes the Access Token and Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
151
|
+
* This operation refreshes the Access Token and Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
152
152
|
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body to refresh the Access Token and the Refresh Token.
|
|
153
153
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangePermissionToken201Response} and HTTP response
|
|
154
154
|
*/
|
|
@@ -176,7 +176,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Refresh Access Token
|
|
179
|
-
* This operation refreshes the Access Token and Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
179
|
+
* This operation refreshes the Access Token and Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
180
180
|
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body to refresh the Access Token and the Refresh Token.
|
|
181
181
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
182
182
|
*/
|
package/dist/api/PaymentApi.js
CHANGED
|
@@ -13,9 +13,12 @@ var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefund
|
|
|
13
13
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
14
14
|
var _CryptoAddress = _interopRequireDefault(require("../model/CryptoAddress"));
|
|
15
15
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
16
|
+
var _ForcedSweep = _interopRequireDefault(require("../model/ForcedSweep"));
|
|
17
|
+
var _ForcedSweepRequest = _interopRequireDefault(require("../model/ForcedSweepRequest"));
|
|
16
18
|
var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
|
|
17
19
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
18
20
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
21
|
+
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("../model/ListForcedSweepRequests200Response"));
|
|
19
22
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
20
23
|
var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/ListPaymentOrders200Response"));
|
|
21
24
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
@@ -29,6 +32,7 @@ var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
|
|
|
29
32
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
30
33
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
31
34
|
var _UpdateRefundByIdRequest = _interopRequireDefault(require("../model/UpdateRefundByIdRequest"));
|
|
35
|
+
var _UpdateTopUpAddress = _interopRequireDefault(require("../model/UpdateTopUpAddress"));
|
|
32
36
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
33
37
|
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); }
|
|
34
38
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -106,6 +110,47 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Create force sweep request
|
|
115
|
+
* This operation creates a force sweep request to settle or refund available balances.
|
|
116
|
+
* @param {Object} opts Optional parameters
|
|
117
|
+
* @param {module:model/ForcedSweepRequest} [ForcedSweepRequest] The request body to force sweep.
|
|
118
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ForcedSweep} and HTTP response
|
|
119
|
+
*/
|
|
120
|
+
}, {
|
|
121
|
+
key: "createForcedSweepRequestWithHttpInfo",
|
|
122
|
+
value: function createForcedSweepRequestWithHttpInfo(opts) {
|
|
123
|
+
opts = opts || {};
|
|
124
|
+
var postBody = opts['ForcedSweepRequest'];
|
|
125
|
+
if (postBody && postBody.toJSON) {
|
|
126
|
+
postBody = postBody.toJSON();
|
|
127
|
+
}
|
|
128
|
+
var pathParams = {};
|
|
129
|
+
var queryParams = {};
|
|
130
|
+
var headerParams = {};
|
|
131
|
+
var formParams = {};
|
|
132
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
133
|
+
var contentTypes = ['application/json'];
|
|
134
|
+
var accepts = ['application/json'];
|
|
135
|
+
var returnType = _ForcedSweep["default"];
|
|
136
|
+
return this.apiClient.callApi('/payments/force_sweep_requests', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Create force sweep request
|
|
141
|
+
* This operation creates a force sweep request to settle or refund available balances.
|
|
142
|
+
* @param {Object} opts Optional parameters
|
|
143
|
+
* @param {module:model/ForcedSweepRequest} opts.ForcedSweepRequest The request body to force sweep.
|
|
144
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ForcedSweep}
|
|
145
|
+
*/
|
|
146
|
+
}, {
|
|
147
|
+
key: "createForcedSweepRequest",
|
|
148
|
+
value: function createForcedSweepRequest(opts) {
|
|
149
|
+
return this.createForcedSweepRequestWithHttpInfo(opts).then(function (response_and_data) {
|
|
150
|
+
return response_and_data.data;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
109
154
|
/**
|
|
110
155
|
* Create merchant
|
|
111
156
|
* This operation creates a merchant and links it to a specified wallet. Payments to the merchant will be deposited into the linked wallet. Upon successful creation, a merchant ID is generated and returned along with the merchant's information.
|
|
@@ -273,7 +318,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
273
318
|
/**
|
|
274
319
|
* Get exchange rate
|
|
275
320
|
* This operation retrieves the current exchange rate between a specified currency pair.
|
|
276
|
-
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `
|
|
321
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
277
322
|
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
278
323
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
|
|
279
324
|
*/
|
|
@@ -309,7 +354,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
309
354
|
/**
|
|
310
355
|
* Get exchange rate
|
|
311
356
|
* This operation retrieves the current exchange rate between a specified currency pair.
|
|
312
|
-
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `
|
|
357
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
313
358
|
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
314
359
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
|
|
315
360
|
*/
|
|
@@ -561,7 +606,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
561
606
|
* Get top-up address
|
|
562
607
|
* This operation retrieves the information of the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
563
608
|
* @param {String} merchant_id The merchant ID.
|
|
564
|
-
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `
|
|
609
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
565
610
|
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
566
611
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
567
612
|
*/
|
|
@@ -603,7 +648,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
603
648
|
* Get top-up address
|
|
604
649
|
* This operation retrieves the information of the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
605
650
|
* @param {String} merchant_id The merchant ID.
|
|
606
|
-
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `
|
|
651
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
607
652
|
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
608
653
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
609
654
|
*/
|
|
@@ -655,7 +700,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
655
700
|
* List crypto addresses
|
|
656
701
|
* This operation retrieves a list of crypto addresses registered for crypto withdrawal. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
657
702
|
* @param {Object} opts Optional parameters
|
|
658
|
-
* @param {String} [token_id] The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `
|
|
703
|
+
* @param {String} [token_id] The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
659
704
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CryptoAddress>} and HTTP response
|
|
660
705
|
*/
|
|
661
706
|
}, {
|
|
@@ -683,7 +728,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
683
728
|
* List crypto addresses
|
|
684
729
|
* This operation retrieves a list of crypto addresses registered for crypto withdrawal. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
685
730
|
* @param {Object} opts Optional parameters
|
|
686
|
-
* @param {String} opts.token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `
|
|
731
|
+
* @param {String} opts.token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
687
732
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CryptoAddress>}
|
|
688
733
|
*/
|
|
689
734
|
}, {
|
|
@@ -694,6 +739,58 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
694
739
|
});
|
|
695
740
|
}
|
|
696
741
|
|
|
742
|
+
/**
|
|
743
|
+
* List force sweep requests
|
|
744
|
+
* This operation retrieves the information of force_sweep requests.
|
|
745
|
+
* @param {Object} opts Optional parameters
|
|
746
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
747
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
748
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
749
|
+
* @param {String} [request_id] The request ID.
|
|
750
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListForcedSweepRequests200Response} and HTTP response
|
|
751
|
+
*/
|
|
752
|
+
}, {
|
|
753
|
+
key: "listForcedSweepRequestsWithHttpInfo",
|
|
754
|
+
value: function listForcedSweepRequestsWithHttpInfo(opts) {
|
|
755
|
+
opts = opts || {};
|
|
756
|
+
var postBody = null;
|
|
757
|
+
if (postBody && postBody.toJSON) {
|
|
758
|
+
postBody = postBody.toJSON();
|
|
759
|
+
}
|
|
760
|
+
var pathParams = {};
|
|
761
|
+
var queryParams = {
|
|
762
|
+
'limit': opts['limit'],
|
|
763
|
+
'before': opts['before'],
|
|
764
|
+
'after': opts['after'],
|
|
765
|
+
'request_id': opts['request_id']
|
|
766
|
+
};
|
|
767
|
+
var headerParams = {};
|
|
768
|
+
var formParams = {};
|
|
769
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
770
|
+
var contentTypes = [];
|
|
771
|
+
var accepts = ['application/json'];
|
|
772
|
+
var returnType = _ListForcedSweepRequests200Response["default"];
|
|
773
|
+
return this.apiClient.callApi('/payments/force_sweep_requests', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* List force sweep requests
|
|
778
|
+
* This operation retrieves the information of force_sweep requests.
|
|
779
|
+
* @param {Object} opts Optional parameters
|
|
780
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
781
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
782
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
783
|
+
* @param {String} opts.request_id The request ID.
|
|
784
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListForcedSweepRequests200Response}
|
|
785
|
+
*/
|
|
786
|
+
}, {
|
|
787
|
+
key: "listForcedSweepRequests",
|
|
788
|
+
value: function listForcedSweepRequests(opts) {
|
|
789
|
+
return this.listForcedSweepRequestsWithHttpInfo(opts).then(function (response_and_data) {
|
|
790
|
+
return response_and_data.data;
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
|
|
697
794
|
/**
|
|
698
795
|
* List all merchants
|
|
699
796
|
* This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID.
|
|
@@ -1097,5 +1194,46 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1097
1194
|
return response_and_data.data;
|
|
1098
1195
|
});
|
|
1099
1196
|
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Update top-up address
|
|
1200
|
+
* Update the top-up address for a payer under a specific merchant and token.
|
|
1201
|
+
* @param {Object} opts Optional parameters
|
|
1202
|
+
* @param {module:model/UpdateTopUpAddress} [UpdateTopUpAddress] The request body to update top up address.
|
|
1203
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
1204
|
+
*/
|
|
1205
|
+
}, {
|
|
1206
|
+
key: "updateTopUpAddressWithHttpInfo",
|
|
1207
|
+
value: function updateTopUpAddressWithHttpInfo(opts) {
|
|
1208
|
+
opts = opts || {};
|
|
1209
|
+
var postBody = opts['UpdateTopUpAddress'];
|
|
1210
|
+
if (postBody && postBody.toJSON) {
|
|
1211
|
+
postBody = postBody.toJSON();
|
|
1212
|
+
}
|
|
1213
|
+
var pathParams = {};
|
|
1214
|
+
var queryParams = {};
|
|
1215
|
+
var headerParams = {};
|
|
1216
|
+
var formParams = {};
|
|
1217
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1218
|
+
var contentTypes = ['application/json'];
|
|
1219
|
+
var accepts = ['application/json'];
|
|
1220
|
+
var returnType = _TopUpAddress["default"];
|
|
1221
|
+
return this.apiClient.callApi('/payments/topup/address', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* Update top-up address
|
|
1226
|
+
* Update the top-up address for a payer under a specific merchant and token.
|
|
1227
|
+
* @param {Object} opts Optional parameters
|
|
1228
|
+
* @param {module:model/UpdateTopUpAddress} opts.UpdateTopUpAddress The request body to update top up address.
|
|
1229
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
1230
|
+
*/
|
|
1231
|
+
}, {
|
|
1232
|
+
key: "updateTopUpAddress",
|
|
1233
|
+
value: function updateTopUpAddress(opts) {
|
|
1234
|
+
return this.updateTopUpAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
1235
|
+
return response_and_data.data;
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1100
1238
|
}]);
|
|
1101
1239
|
}();
|
|
@@ -13,8 +13,10 @@ var _CreateTransferTransaction201Response = _interopRequireDefault(require("../m
|
|
|
13
13
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
14
14
|
var _EstimateFeeParams = _interopRequireDefault(require("../model/EstimateFeeParams"));
|
|
15
15
|
var _EstimatedFee = _interopRequireDefault(require("../model/EstimatedFee"));
|
|
16
|
+
var _ListTransactionApprovalDetails200Response = _interopRequireDefault(require("../model/ListTransactionApprovalDetails200Response"));
|
|
16
17
|
var _ListTransactions200Response = _interopRequireDefault(require("../model/ListTransactions200Response"));
|
|
17
18
|
var _MessageSignParams = _interopRequireDefault(require("../model/MessageSignParams"));
|
|
19
|
+
var _TransactionApprovalDetail = _interopRequireDefault(require("../model/TransactionApprovalDetail"));
|
|
18
20
|
var _TransactionDetail = _interopRequireDefault(require("../model/TransactionDetail"));
|
|
19
21
|
var _TransactionRbf = _interopRequireDefault(require("../model/TransactionRbf"));
|
|
20
22
|
var _TransactionResend = _interopRequireDefault(require("../model/TransactionResend"));
|
|
@@ -199,7 +201,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
199
201
|
|
|
200
202
|
/**
|
|
201
203
|
* Call smart contract
|
|
202
|
-
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to the transactions from MPC Wallets or Smart Contract Wallets on the blockchains that have a similar architecture to Ethereum.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
|
|
204
|
+
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to the transactions from Custodial Wallets (Web3 Wallets), MPC Wallets, or Smart Contract Wallets on the blockchains that have a similar architecture to Ethereum.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
|
|
203
205
|
* @param {Object} opts Optional parameters
|
|
204
206
|
* @param {module:model/ContractCallParams} [ContractCallParams] The request body for making a contract call.
|
|
205
207
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateTransferTransaction201Response} and HTTP response
|
|
@@ -225,7 +227,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
225
227
|
|
|
226
228
|
/**
|
|
227
229
|
* Call smart contract
|
|
228
|
-
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to the transactions from MPC Wallets or Smart Contract Wallets on the blockchains that have a similar architecture to Ethereum.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
|
|
230
|
+
* This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to the transactions from Custodial Wallets (Web3 Wallets), MPC Wallets, or Smart Contract Wallets on the blockchains that have a similar architecture to Ethereum.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
|
|
229
231
|
* @param {Object} opts Optional parameters
|
|
230
232
|
* @param {module:model/ContractCallParams} opts.ContractCallParams The request body for making a contract call.
|
|
231
233
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateTransferTransaction201Response}
|
|
@@ -410,6 +412,50 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
410
412
|
});
|
|
411
413
|
}
|
|
412
414
|
|
|
415
|
+
/**
|
|
416
|
+
* Get transaction approval details
|
|
417
|
+
* This operation retrieves detailed approval information about a specified transaction.
|
|
418
|
+
* @param {String} transaction_id The transaction ID.
|
|
419
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TransactionApprovalDetail} and HTTP response
|
|
420
|
+
*/
|
|
421
|
+
}, {
|
|
422
|
+
key: "getTransactionApprovalDetailWithHttpInfo",
|
|
423
|
+
value: function getTransactionApprovalDetailWithHttpInfo(transaction_id) {
|
|
424
|
+
var postBody = null;
|
|
425
|
+
if (postBody && postBody.toJSON) {
|
|
426
|
+
postBody = postBody.toJSON();
|
|
427
|
+
}
|
|
428
|
+
// verify the required parameter 'transaction_id' is set
|
|
429
|
+
if (transaction_id === undefined || transaction_id === null) {
|
|
430
|
+
throw new Error("Missing the required parameter 'transaction_id' when calling getTransactionApprovalDetail");
|
|
431
|
+
}
|
|
432
|
+
var pathParams = {
|
|
433
|
+
'transaction_id': transaction_id
|
|
434
|
+
};
|
|
435
|
+
var queryParams = {};
|
|
436
|
+
var headerParams = {};
|
|
437
|
+
var formParams = {};
|
|
438
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
439
|
+
var contentTypes = [];
|
|
440
|
+
var accepts = ['application/json'];
|
|
441
|
+
var returnType = _TransactionApprovalDetail["default"];
|
|
442
|
+
return this.apiClient.callApi('/transactions/{transaction_id}/approval_detail', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Get transaction approval details
|
|
447
|
+
* This operation retrieves detailed approval information about a specified transaction.
|
|
448
|
+
* @param {String} transaction_id The transaction ID.
|
|
449
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TransactionApprovalDetail}
|
|
450
|
+
*/
|
|
451
|
+
}, {
|
|
452
|
+
key: "getTransactionApprovalDetail",
|
|
453
|
+
value: function getTransactionApprovalDetail(transaction_id) {
|
|
454
|
+
return this.getTransactionApprovalDetailWithHttpInfo(transaction_id).then(function (response_and_data) {
|
|
455
|
+
return response_and_data.data;
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
413
459
|
/**
|
|
414
460
|
* Get transaction information
|
|
415
461
|
* This operation retrieves detailed information about a specified transaction, such as the transaction status, source address, destination address, and timestamp.
|
|
@@ -454,6 +500,52 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
454
500
|
});
|
|
455
501
|
}
|
|
456
502
|
|
|
503
|
+
/**
|
|
504
|
+
* List transaction approval details
|
|
505
|
+
* This operation retrieves detailed approval information for all transactions.
|
|
506
|
+
* @param {Object} opts Optional parameters
|
|
507
|
+
* @param {String} [transaction_ids] A list of transaction IDs, separated by comma.
|
|
508
|
+
* @param {String} [cobo_ids] A list of Cobo IDs, separated by comma. A Cobo ID can be used to track a transaction.
|
|
509
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTransactionApprovalDetails200Response} and HTTP response
|
|
510
|
+
*/
|
|
511
|
+
}, {
|
|
512
|
+
key: "listTransactionApprovalDetailsWithHttpInfo",
|
|
513
|
+
value: function listTransactionApprovalDetailsWithHttpInfo(opts) {
|
|
514
|
+
opts = opts || {};
|
|
515
|
+
var postBody = null;
|
|
516
|
+
if (postBody && postBody.toJSON) {
|
|
517
|
+
postBody = postBody.toJSON();
|
|
518
|
+
}
|
|
519
|
+
var pathParams = {};
|
|
520
|
+
var queryParams = {
|
|
521
|
+
'transaction_ids': opts['transaction_ids'],
|
|
522
|
+
'cobo_ids': opts['cobo_ids']
|
|
523
|
+
};
|
|
524
|
+
var headerParams = {};
|
|
525
|
+
var formParams = {};
|
|
526
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
527
|
+
var contentTypes = [];
|
|
528
|
+
var accepts = ['application/json'];
|
|
529
|
+
var returnType = _ListTransactionApprovalDetails200Response["default"];
|
|
530
|
+
return this.apiClient.callApi('/transactions/approval_details', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* List transaction approval details
|
|
535
|
+
* This operation retrieves detailed approval information for all transactions.
|
|
536
|
+
* @param {Object} opts Optional parameters
|
|
537
|
+
* @param {String} opts.transaction_ids A list of transaction IDs, separated by comma.
|
|
538
|
+
* @param {String} opts.cobo_ids A list of Cobo IDs, separated by comma. A Cobo ID can be used to track a transaction.
|
|
539
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTransactionApprovalDetails200Response}
|
|
540
|
+
*/
|
|
541
|
+
}, {
|
|
542
|
+
key: "listTransactionApprovalDetails",
|
|
543
|
+
value: function listTransactionApprovalDetails(opts) {
|
|
544
|
+
return this.listTransactionApprovalDetailsWithHttpInfo(opts).then(function (response_and_data) {
|
|
545
|
+
return response_and_data.data;
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
|
|
457
549
|
/**
|
|
458
550
|
* List all transactions
|
|
459
551
|
* This operation retrieves all the transactions under your organization. You can filter the results by request ID, Cobo ID, transaction ID, transaction hash, type, status, and timestamps. You can also paginate and sort your query results.
|