@cobo/cobo-waas2 1.4.0 → 1.6.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 +32 -10
- package/dist/ApiClient.js +1 -1
- package/dist/ServerDemo.js +80 -0
- package/dist/api/AddressBooksApi.js +105 -0
- package/dist/api/DevelopersApi.js +79 -0
- package/dist/api/DevelopersWebhooksApi.js +43 -0
- package/dist/api/OAuthApi.js +10 -10
- package/dist/api/TransactionsApi.js +12 -12
- package/dist/api/WalletsApi.js +60 -59
- package/dist/api/WalletsExchangeWalletApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
- package/dist/index.js +181 -34
- package/dist/model/AddressBook.js +25 -10
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
- package/dist/model/ApiLogDetails.js +238 -0
- package/dist/model/ApiLogSummary.js +161 -0
- package/dist/model/BabylonStakeEstimatedFee.js +118 -0
- package/dist/model/BabylonValidator.js +5 -0
- package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
- package/dist/model/CoboSafeDelegate.js +2 -2
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +42 -8
- package/dist/model/CreateUnstakeActivity.js +16 -0
- package/dist/model/CreateUnstakeActivityExtra.js +159 -0
- package/dist/model/CreateUnstakeActivityRequest.js +20 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +5 -7
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +5 -9
- package/dist/model/EstimateUnstakeFee.js +20 -0
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EthStakeEstimatedFee.js +112 -0
- package/dist/model/EthStakeExtra.js +131 -0
- package/dist/model/EthStakingExtra.js +131 -0
- package/dist/model/EthUnstakeExtra.js +131 -0
- package/dist/model/ExchangeId.js +10 -0
- package/dist/model/ExtendedTokenInfo.js +17 -4
- package/dist/model/FeeGasLimit.js +1 -2
- package/dist/model/GetApiKeyInfo200Response.js +251 -0
- package/dist/model/GetStakingEstimationFee201Response.js +144 -43
- package/dist/model/GetStakingEstimationFeeRequest.js +2 -2
- package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
- package/dist/model/GetToken4XXResponse.js +12 -10
- package/dist/model/ListAddressBooks200Response.js +123 -0
- package/dist/model/MPCDelegate.js +5 -5
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/{RefreshToken200Response.js → RefreshToken2XXResponse.js} +21 -21
- package/dist/model/{WalletBalanceSnapshot.js → RoleScopes.js} +42 -34
- package/dist/model/SafeWalletDelegates.js +210 -0
- package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
- package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
- package/dist/model/Scopes.js +142 -0
- package/dist/model/SmartContractWalletInfo.js +1 -1
- package/dist/model/StakingPoolType.js +5 -0
- package/dist/model/StakingsExtra.js +36 -8
- package/dist/model/TokenAssetModelType.js +61 -0
- package/dist/model/TokenBalanceBalance.js +6 -6
- package/dist/model/TokenInfo.js +11 -2
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionDestination.js +50 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionEvmCalldataInfo.js +177 -0
- package/dist/model/TransactionEvmContractDestination.js +16 -0
- package/dist/model/TransactionEvmContractMethod.js +136 -0
- package/dist/model/TransactionEvmEip1559Fee.js +2 -4
- package/dist/model/TransactionEvmLegacyFee.js +2 -4
- package/dist/model/TransactionFee.js +1 -2
- package/dist/model/TransactionRawMessageSignDestination.js +120 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -2
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -2
- package/dist/model/TransactionRequestFee.js +1 -2
- package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
- package/dist/model/TransactionSource.js +1 -1
- package/dist/model/TransactionTokeApproval.js +17 -4
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TransferDestination.js +2 -2
- package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
- package/dist/model/TriggerTestWebhookEventRequest.js +115 -0
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AddressBook.md +8 -7
- package/docs/AddressBooksApi.md +71 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
- package/docs/ApiLogDetails.md +18 -0
- package/docs/ApiLogSummary.md +13 -0
- package/docs/BabylonStakeEstimatedFee.md +12 -0
- package/docs/BabylonValidator.md +2 -0
- package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/CoboSafeDelegate.md +2 -2
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateUnstakeActivityExtra.md +10 -0
- package/docs/CreateUnstakeActivityRequest.md +1 -0
- package/docs/DevelopersApi.md +55 -0
- package/docs/DevelopersWebhooksApi.md +53 -0
- package/docs/ErrorResponse.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +2 -2
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
- package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EthStakeEstimatedFee.md +11 -0
- package/docs/EthStakeExtra.md +10 -0
- package/docs/EthStakingExtra.md +10 -0
- package/docs/EthUnstakeExtra.md +10 -0
- package/docs/ExchangeId.md +4 -0
- package/docs/ExtendedTokenInfo.md +3 -2
- package/docs/FeeGasLimit.md +1 -1
- package/docs/GetApiKeyInfo200Response.md +30 -0
- package/docs/GetStakingEstimationFee201Response.md +3 -0
- package/docs/GetStakingEstimationFeeRequest.md +1 -1
- package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
- package/docs/GetToken4XXResponse.md +1 -1
- package/docs/ListAddressBooks200Response.md +10 -0
- package/docs/MPCDelegate.md +2 -2
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +5 -5
- package/docs/PoolDetailsAllOfValidatorsInfo.md +2 -0
- package/docs/{RefreshToken200Response.md → RefreshToken2XXResponse.md} +1 -1
- package/docs/RoleScopes.md +10 -0
- package/docs/SafeWalletDelegates.md +14 -0
- package/docs/SafeWalletDelegatesContractCall.md +12 -0
- package/docs/SafeWalletDelegatesTransfer.md +12 -0
- package/docs/Scopes.md +13 -0
- package/docs/StakingPoolType.md +2 -0
- package/docs/TokenAssetModelType.md +12 -0
- package/docs/TokenBalanceBalance.md +4 -4
- package/docs/TokenInfo.md +3 -2
- package/docs/Transaction.md +1 -1
- package/docs/TransactionDestination.md +4 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionEvmCalldataInfo.md +16 -0
- package/docs/TransactionEvmContractDestination.md +1 -0
- package/docs/TransactionEvmContractMethod.md +13 -0
- package/docs/TransactionEvmEip1559Fee.md +1 -1
- package/docs/TransactionEvmLegacyFee.md +1 -1
- package/docs/TransactionFee.md +1 -1
- package/docs/TransactionRawMessageSignDestination.md +10 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
- package/docs/TransactionRequestEvmLegacyFee.md +1 -1
- package/docs/TransactionRequestFee.md +1 -1
- package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
- package/docs/TransactionSource.md +1 -1
- package/docs/TransactionTokeApproval.md +3 -2
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +7 -7
- package/docs/TransferDestination.md +2 -2
- package/docs/TriggerTestWebhookEvent201Response.md +9 -0
- package/docs/TriggerTestWebhookEventRequest.md +10 -0
- package/docs/WalletsApi.md +55 -55
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +4 -4
- package/docs/WalletsSmartContractWalletsApi.md +63 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +3 -2
- package/dist/model/BookkeepingRecord.js +0 -243
- package/docs/BookkeepingRecord.md +0 -19
- package/docs/BookkeepingSummary.md +0 -12
- package/docs/WalletBalanceSnapshot.md +0 -10
- package/docs/WalletBalanceSnapshotRecord.md +0 -13
package/README.md
CHANGED
|
@@ -10,12 +10,12 @@ The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo’s Wa
|
|
|
10
10
|
- Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls
|
|
11
11
|
- Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more
|
|
12
12
|
|
|
13
|
-
For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](
|
|
13
|
+
For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](/v2/guides/overview/introduction).
|
|
14
14
|
|
|
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.6.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)
|
|
@@ -61,6 +61,8 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
61
61
|
|
|
62
62
|
Class | Method | HTTP request | Description
|
|
63
63
|
------------ | ------------- | ------------- | -------------
|
|
64
|
+
*CoboWaas2.AddressBooksApi* | [**listAddressBooks**](docs/AddressBooksApi.md#listAddressBooks) | **GET** /address_books | List address book entries
|
|
65
|
+
*CoboWaas2.DevelopersApi* | [**getApiKeyInfo**](docs/DevelopersApi.md#getApiKeyInfo) | **GET** /developers/api_key_info | Get API key information
|
|
64
66
|
*CoboWaas2.DevelopersWebhooksApi* | [**createWebhookEndpoint**](docs/DevelopersWebhooksApi.md#createWebhookEndpoint) | **POST** /webhooks/endpoints | Register webhook endpoint
|
|
65
67
|
*CoboWaas2.DevelopersWebhooksApi* | [**getWebhookEndpointById**](docs/DevelopersWebhooksApi.md#getWebhookEndpointById) | **GET** /webhooks/endpoints/{endpoint_id} | Get webhook endpoint information
|
|
66
68
|
*CoboWaas2.DevelopersWebhooksApi* | [**getWebhookEventById**](docs/DevelopersWebhooksApi.md#getWebhookEventById) | **GET** /webhooks/endpoints/{endpoint_id}/events/{event_id} | Retrieve event information
|
|
@@ -69,6 +71,7 @@ Class | Method | HTTP request | Description
|
|
|
69
71
|
*CoboWaas2.DevelopersWebhooksApi* | [**listWebhookEventLogs**](docs/DevelopersWebhooksApi.md#listWebhookEventLogs) | **GET** /webhooks/endpoints/{endpoint_id}/events/{event_id}/logs | List webhook event logs
|
|
70
72
|
*CoboWaas2.DevelopersWebhooksApi* | [**listWebhookEvents**](docs/DevelopersWebhooksApi.md#listWebhookEvents) | **GET** /webhooks/endpoints/{endpoint_id}/events | List all webhook events
|
|
71
73
|
*CoboWaas2.DevelopersWebhooksApi* | [**retryWebhookEventById**](docs/DevelopersWebhooksApi.md#retryWebhookEventById) | **POST** /webhooks/endpoints/{endpoint_id}/events/{event_id}/retry | Retry event
|
|
74
|
+
*CoboWaas2.DevelopersWebhooksApi* | [**triggerTestWebhookEvent**](docs/DevelopersWebhooksApi.md#triggerTestWebhookEvent) | **POST** /webhooks/events/trigger | Trigger test event
|
|
72
75
|
*CoboWaas2.DevelopersWebhooksApi* | [**updateWebhookEndpointById**](docs/DevelopersWebhooksApi.md#updateWebhookEndpointById) | **PUT** /webhooks/endpoints/{endpoint_id} | Update webhook endpoint
|
|
73
76
|
*CoboWaas2.OAuthApi* | [**getToken**](docs/OAuthApi.md#getToken) | **GET** /oauth/token | Get Org Access Token
|
|
74
77
|
*CoboWaas2.OAuthApi* | [**refreshToken**](docs/OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh Org Access Token
|
|
@@ -84,7 +87,7 @@ Class | Method | HTTP request | Description
|
|
|
84
87
|
*CoboWaas2.StakingsApi* | [**listStakings**](docs/StakingsApi.md#listStakings) | **GET** /stakings | List staking positions
|
|
85
88
|
*CoboWaas2.TransactionsApi* | [**broadcastSignedTransactions**](docs/TransactionsApi.md#broadcastSignedTransactions) | **POST** /transactions/broadcast | Broadcast signed transactions
|
|
86
89
|
*CoboWaas2.TransactionsApi* | [**cancelTransactionById**](docs/TransactionsApi.md#cancelTransactionById) | **POST** /transactions/{transaction_id}/cancel | Cancel transaction
|
|
87
|
-
*CoboWaas2.TransactionsApi* | [**checkLoopTransfers**](docs/TransactionsApi.md#checkLoopTransfers) | **GET** /transactions/check_loop_transfers | Check Loop transfers
|
|
90
|
+
*CoboWaas2.TransactionsApi* | [**checkLoopTransfers**](docs/TransactionsApi.md#checkLoopTransfers) | **GET** /transactions/check_loop_transfers | Check Cobo Loop transfers
|
|
88
91
|
*CoboWaas2.TransactionsApi* | [**createContractCallTransaction**](docs/TransactionsApi.md#createContractCallTransaction) | **POST** /transactions/contract_call | Call smart contract
|
|
89
92
|
*CoboWaas2.TransactionsApi* | [**createMessageSignTransaction**](docs/TransactionsApi.md#createMessageSignTransaction) | **POST** /transactions/message_sign | Sign message
|
|
90
93
|
*CoboWaas2.TransactionsApi* | [**createTransferTransaction**](docs/TransactionsApi.md#createTransferTransaction) | **POST** /transactions/transfer | Transfer token
|
|
@@ -94,12 +97,12 @@ Class | Method | HTTP request | Description
|
|
|
94
97
|
*CoboWaas2.TransactionsApi* | [**listTransactions**](docs/TransactionsApi.md#listTransactions) | **GET** /transactions | List all transactions
|
|
95
98
|
*CoboWaas2.TransactionsApi* | [**resendTransactionById**](docs/TransactionsApi.md#resendTransactionById) | **POST** /transactions/{transaction_id}/resend | Resend transaction
|
|
96
99
|
*CoboWaas2.TransactionsApi* | [**speedupTransactionById**](docs/TransactionsApi.md#speedupTransactionById) | **POST** /transactions/{transaction_id}/speedup | Speed up transaction
|
|
100
|
+
*CoboWaas2.WalletsApi* | [**checkAddressChainsValidity**](docs/WalletsApi.md#checkAddressChainsValidity) | **GET** /wallets/check_address_chains_validity | Check address validity across chains
|
|
97
101
|
*CoboWaas2.WalletsApi* | [**checkAddressValidity**](docs/WalletsApi.md#checkAddressValidity) | **GET** /wallets/check_address_validity | Check address validity
|
|
98
102
|
*CoboWaas2.WalletsApi* | [**checkAddressesValidity**](docs/WalletsApi.md#checkAddressesValidity) | **GET** /wallets/check_addresses_validity | Check addresses validity
|
|
99
103
|
*CoboWaas2.WalletsApi* | [**createAddress**](docs/WalletsApi.md#createAddress) | **POST** /wallets/{wallet_id}/addresses | Create addresses in wallet
|
|
100
104
|
*CoboWaas2.WalletsApi* | [**createWallet**](docs/WalletsApi.md#createWallet) | **POST** /wallets | Create wallet
|
|
101
105
|
*CoboWaas2.WalletsApi* | [**deleteWalletById**](docs/WalletsApi.md#deleteWalletById) | **POST** /wallets/{wallet_id}/delete | Delete wallet
|
|
102
|
-
*CoboWaas2.WalletsApi* | [**getAddress**](docs/WalletsApi.md#getAddress) | **GET** /wallets/{wallet_id}/addresses/{address} | Get address information
|
|
103
106
|
*CoboWaas2.WalletsApi* | [**getChainById**](docs/WalletsApi.md#getChainById) | **GET** /wallets/chains/{chain_id} | Get chain information
|
|
104
107
|
*CoboWaas2.WalletsApi* | [**getMaxTransferableValue**](docs/WalletsApi.md#getMaxTransferableValue) | **GET** /wallets/{wallet_id}/max_transferable_value | Get maximum transferable value
|
|
105
108
|
*CoboWaas2.WalletsApi* | [**getTokenById**](docs/WalletsApi.md#getTokenById) | **GET** /wallets/tokens/{token_id} | Get token information
|
|
@@ -138,6 +141,7 @@ Class | Method | HTTP request | Description
|
|
|
138
141
|
*CoboWaas2.WalletsMPCWalletsApi* | [**updateKeyShareHolderGroupById**](docs/WalletsMPCWalletsApi.md#updateKeyShareHolderGroupById) | **PUT** /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id} | Update key share holder group
|
|
139
142
|
*CoboWaas2.WalletsMPCWalletsApi* | [**updateMpcProjectById**](docs/WalletsMPCWalletsApi.md#updateMpcProjectById) | **PUT** /wallets/mpc/projects/{project_id} | Update project name
|
|
140
143
|
*CoboWaas2.WalletsMPCWalletsApi* | [**updateMpcVaultById**](docs/WalletsMPCWalletsApi.md#updateMpcVaultById) | **PUT** /wallets/mpc/vaults/{vault_id} | Update vault name
|
|
144
|
+
*CoboWaas2.WalletsSmartContractWalletsApi* | [**listSafeWalletDelegates**](docs/WalletsSmartContractWalletsApi.md#listSafeWalletDelegates) | **POST** /wallets/{wallet_id}/smart_contracts/delegates | List Delegates
|
|
141
145
|
|
|
142
146
|
|
|
143
147
|
## Documentation for Models
|
|
@@ -156,8 +160,11 @@ Class | Method | HTTP request | Description
|
|
|
156
160
|
- [CoboWaas2.AddressTransferDestinationUtxoOutputsInner](docs/AddressTransferDestinationUtxoOutputsInner.md)
|
|
157
161
|
- [CoboWaas2.AmountDetailsInner](docs/AmountDetailsInner.md)
|
|
158
162
|
- [CoboWaas2.AmountStatus](docs/AmountStatus.md)
|
|
163
|
+
- [CoboWaas2.ApiLogDetails](docs/ApiLogDetails.md)
|
|
164
|
+
- [CoboWaas2.ApiLogSummary](docs/ApiLogSummary.md)
|
|
159
165
|
- [CoboWaas2.AssetBalance](docs/AssetBalance.md)
|
|
160
166
|
- [CoboWaas2.AssetInfo](docs/AssetInfo.md)
|
|
167
|
+
- [CoboWaas2.BabylonStakeEstimatedFee](docs/BabylonStakeEstimatedFee.md)
|
|
161
168
|
- [CoboWaas2.BabylonStakeExtra](docs/BabylonStakeExtra.md)
|
|
162
169
|
- [CoboWaas2.BabylonStakingExtra](docs/BabylonStakingExtra.md)
|
|
163
170
|
- [CoboWaas2.BabylonValidator](docs/BabylonValidator.md)
|
|
@@ -165,11 +172,10 @@ Class | Method | HTTP request | Description
|
|
|
165
172
|
- [CoboWaas2.BaseEstimateStakingFee](docs/BaseEstimateStakingFee.md)
|
|
166
173
|
- [CoboWaas2.BaseStakeExtra](docs/BaseStakeExtra.md)
|
|
167
174
|
- [CoboWaas2.BaseStakeSource](docs/BaseStakeSource.md)
|
|
168
|
-
- [CoboWaas2.BookkeepingRecord](docs/BookkeepingRecord.md)
|
|
169
|
-
- [CoboWaas2.BookkeepingSummary](docs/BookkeepingSummary.md)
|
|
170
175
|
- [CoboWaas2.BroadcastSignedTransactions201ResponseInner](docs/BroadcastSignedTransactions201ResponseInner.md)
|
|
171
176
|
- [CoboWaas2.BroadcastSignedTransactionsRequest](docs/BroadcastSignedTransactionsRequest.md)
|
|
172
177
|
- [CoboWaas2.ChainInfo](docs/ChainInfo.md)
|
|
178
|
+
- [CoboWaas2.CheckAddressChainsValidity200ResponseInner](docs/CheckAddressChainsValidity200ResponseInner.md)
|
|
173
179
|
- [CoboWaas2.CheckAddressValidity200Response](docs/CheckAddressValidity200Response.md)
|
|
174
180
|
- [CoboWaas2.CheckAddressesValidity200ResponseInner](docs/CheckAddressesValidity200ResponseInner.md)
|
|
175
181
|
- [CoboWaas2.CheckLoopTransfers200ResponseInner](docs/CheckLoopTransfers200ResponseInner.md)
|
|
@@ -197,6 +203,7 @@ Class | Method | HTTP request | Description
|
|
|
197
203
|
- [CoboWaas2.CreateTransferTransaction201Response](docs/CreateTransferTransaction201Response.md)
|
|
198
204
|
- [CoboWaas2.CreateTssRequestRequest](docs/CreateTssRequestRequest.md)
|
|
199
205
|
- [CoboWaas2.CreateUnstakeActivity](docs/CreateUnstakeActivity.md)
|
|
206
|
+
- [CoboWaas2.CreateUnstakeActivityExtra](docs/CreateUnstakeActivityExtra.md)
|
|
200
207
|
- [CoboWaas2.CreateUnstakeActivityRequest](docs/CreateUnstakeActivityRequest.md)
|
|
201
208
|
- [CoboWaas2.CreateWalletParams](docs/CreateWalletParams.md)
|
|
202
209
|
- [CoboWaas2.CreateWebhookEndpointRequest](docs/CreateWebhookEndpointRequest.md)
|
|
@@ -227,6 +234,10 @@ Class | Method | HTTP request | Description
|
|
|
227
234
|
- [CoboWaas2.EstimatedFixedFee](docs/EstimatedFixedFee.md)
|
|
228
235
|
- [CoboWaas2.EstimatedUtxoFee](docs/EstimatedUtxoFee.md)
|
|
229
236
|
- [CoboWaas2.EstimatedUtxoFeeSlow](docs/EstimatedUtxoFeeSlow.md)
|
|
237
|
+
- [CoboWaas2.EthStakeEstimatedFee](docs/EthStakeEstimatedFee.md)
|
|
238
|
+
- [CoboWaas2.EthStakeExtra](docs/EthStakeExtra.md)
|
|
239
|
+
- [CoboWaas2.EthStakingExtra](docs/EthStakingExtra.md)
|
|
240
|
+
- [CoboWaas2.EthUnstakeExtra](docs/EthUnstakeExtra.md)
|
|
230
241
|
- [CoboWaas2.EvmContractCallDestination](docs/EvmContractCallDestination.md)
|
|
231
242
|
- [CoboWaas2.EvmEIP191MessageSignDestination](docs/EvmEIP191MessageSignDestination.md)
|
|
232
243
|
- [CoboWaas2.EvmEIP712MessageSignDestination](docs/EvmEIP712MessageSignDestination.md)
|
|
@@ -244,9 +255,10 @@ Class | Method | HTTP request | Description
|
|
|
244
255
|
- [CoboWaas2.FeeRate](docs/FeeRate.md)
|
|
245
256
|
- [CoboWaas2.FeeType](docs/FeeType.md)
|
|
246
257
|
- [CoboWaas2.FixedFeeRate](docs/FixedFeeRate.md)
|
|
258
|
+
- [CoboWaas2.GetApiKeyInfo200Response](docs/GetApiKeyInfo200Response.md)
|
|
247
259
|
- [CoboWaas2.GetStakingEstimationFee201Response](docs/GetStakingEstimationFee201Response.md)
|
|
248
260
|
- [CoboWaas2.GetStakingEstimationFeeRequest](docs/GetStakingEstimationFeeRequest.md)
|
|
249
|
-
- [CoboWaas2.
|
|
261
|
+
- [CoboWaas2.GetToken2XXResponse](docs/GetToken2XXResponse.md)
|
|
250
262
|
- [CoboWaas2.GetToken4XXResponse](docs/GetToken4XXResponse.md)
|
|
251
263
|
- [CoboWaas2.KeyShareHolder](docs/KeyShareHolder.md)
|
|
252
264
|
- [CoboWaas2.KeyShareHolderGroup](docs/KeyShareHolderGroup.md)
|
|
@@ -254,6 +266,7 @@ Class | Method | HTTP request | Description
|
|
|
254
266
|
- [CoboWaas2.KeyShareHolderGroupType](docs/KeyShareHolderGroupType.md)
|
|
255
267
|
- [CoboWaas2.KeyShareHolderStatus](docs/KeyShareHolderStatus.md)
|
|
256
268
|
- [CoboWaas2.KeyShareHolderType](docs/KeyShareHolderType.md)
|
|
269
|
+
- [CoboWaas2.ListAddressBooks200Response](docs/ListAddressBooks200Response.md)
|
|
257
270
|
- [CoboWaas2.ListAddresses200Response](docs/ListAddresses200Response.md)
|
|
258
271
|
- [CoboWaas2.ListAssetBalancesForExchangeWallet200Response](docs/ListAssetBalancesForExchangeWallet200Response.md)
|
|
259
272
|
- [CoboWaas2.ListExchanges200ResponseInner](docs/ListExchanges200ResponseInner.md)
|
|
@@ -300,14 +313,19 @@ Class | Method | HTTP request | Description
|
|
|
300
313
|
- [CoboWaas2.PoolDetailsAllOfValidatorsInfo](docs/PoolDetailsAllOfValidatorsInfo.md)
|
|
301
314
|
- [CoboWaas2.PoolSummary](docs/PoolSummary.md)
|
|
302
315
|
- [CoboWaas2.RawMessageSignDestination](docs/RawMessageSignDestination.md)
|
|
303
|
-
- [CoboWaas2.
|
|
316
|
+
- [CoboWaas2.RefreshToken2XXResponse](docs/RefreshToken2XXResponse.md)
|
|
304
317
|
- [CoboWaas2.RefreshTokenRequest](docs/RefreshTokenRequest.md)
|
|
305
318
|
- [CoboWaas2.ReplaceType](docs/ReplaceType.md)
|
|
306
319
|
- [CoboWaas2.RetryWebhookEventById201Response](docs/RetryWebhookEventById201Response.md)
|
|
320
|
+
- [CoboWaas2.RoleScopes](docs/RoleScopes.md)
|
|
307
321
|
- [CoboWaas2.RootPubkey](docs/RootPubkey.md)
|
|
308
322
|
- [CoboWaas2.SafeContractCallSource](docs/SafeContractCallSource.md)
|
|
309
323
|
- [CoboWaas2.SafeTransferSource](docs/SafeTransferSource.md)
|
|
310
324
|
- [CoboWaas2.SafeWallet](docs/SafeWallet.md)
|
|
325
|
+
- [CoboWaas2.SafeWalletDelegates](docs/SafeWalletDelegates.md)
|
|
326
|
+
- [CoboWaas2.SafeWalletDelegatesContractCall](docs/SafeWalletDelegatesContractCall.md)
|
|
327
|
+
- [CoboWaas2.SafeWalletDelegatesTransfer](docs/SafeWalletDelegatesTransfer.md)
|
|
328
|
+
- [CoboWaas2.Scopes](docs/Scopes.md)
|
|
311
329
|
- [CoboWaas2.SmartContractInitiator](docs/SmartContractInitiator.md)
|
|
312
330
|
- [CoboWaas2.SmartContractWalletInfo](docs/SmartContractWalletInfo.md)
|
|
313
331
|
- [CoboWaas2.SmartContractWalletOperationType](docs/SmartContractWalletOperationType.md)
|
|
@@ -325,6 +343,7 @@ Class | Method | HTTP request | Description
|
|
|
325
343
|
- [CoboWaas2.TSSRequestStatus](docs/TSSRequestStatus.md)
|
|
326
344
|
- [CoboWaas2.TSSRequestType](docs/TSSRequestType.md)
|
|
327
345
|
- [CoboWaas2.TSSRequestWebhookEventData](docs/TSSRequestWebhookEventData.md)
|
|
346
|
+
- [CoboWaas2.TokenAssetModelType](docs/TokenAssetModelType.md)
|
|
328
347
|
- [CoboWaas2.TokenBalance](docs/TokenBalance.md)
|
|
329
348
|
- [CoboWaas2.TokenBalanceBalance](docs/TokenBalanceBalance.md)
|
|
330
349
|
- [CoboWaas2.TokenInfo](docs/TokenInfo.md)
|
|
@@ -341,7 +360,9 @@ Class | Method | HTTP request | Description
|
|
|
341
360
|
- [CoboWaas2.TransactionDestinationType](docs/TransactionDestinationType.md)
|
|
342
361
|
- [CoboWaas2.TransactionDetail](docs/TransactionDetail.md)
|
|
343
362
|
- [CoboWaas2.TransactionDetails](docs/TransactionDetails.md)
|
|
363
|
+
- [CoboWaas2.TransactionEvmCalldataInfo](docs/TransactionEvmCalldataInfo.md)
|
|
344
364
|
- [CoboWaas2.TransactionEvmContractDestination](docs/TransactionEvmContractDestination.md)
|
|
365
|
+
- [CoboWaas2.TransactionEvmContractMethod](docs/TransactionEvmContractMethod.md)
|
|
345
366
|
- [CoboWaas2.TransactionEvmEip1559Fee](docs/TransactionEvmEip1559Fee.md)
|
|
346
367
|
- [CoboWaas2.TransactionEvmLegacyFee](docs/TransactionEvmLegacyFee.md)
|
|
347
368
|
- [CoboWaas2.TransactionExchangeWalletSource](docs/TransactionExchangeWalletSource.md)
|
|
@@ -352,6 +373,7 @@ Class | Method | HTTP request | Description
|
|
|
352
373
|
- [CoboWaas2.TransactionMPCWalletSource](docs/TransactionMPCWalletSource.md)
|
|
353
374
|
- [CoboWaas2.TransactionMessageSignEIP191Destination](docs/TransactionMessageSignEIP191Destination.md)
|
|
354
375
|
- [CoboWaas2.TransactionMessageSignEIP712Destination](docs/TransactionMessageSignEIP712Destination.md)
|
|
376
|
+
- [CoboWaas2.TransactionRawMessageSignDestination](docs/TransactionRawMessageSignDestination.md)
|
|
355
377
|
- [CoboWaas2.TransactionRawTxInfo](docs/TransactionRawTxInfo.md)
|
|
356
378
|
- [CoboWaas2.TransactionRbf](docs/TransactionRbf.md)
|
|
357
379
|
- [CoboWaas2.TransactionRbfSource](docs/TransactionRbfSource.md)
|
|
@@ -386,6 +408,8 @@ Class | Method | HTTP request | Description
|
|
|
386
408
|
- [CoboWaas2.TransferDestinationType](docs/TransferDestinationType.md)
|
|
387
409
|
- [CoboWaas2.TransferParams](docs/TransferParams.md)
|
|
388
410
|
- [CoboWaas2.TransferSource](docs/TransferSource.md)
|
|
411
|
+
- [CoboWaas2.TriggerTestWebhookEvent201Response](docs/TriggerTestWebhookEvent201Response.md)
|
|
412
|
+
- [CoboWaas2.TriggerTestWebhookEventRequest](docs/TriggerTestWebhookEventRequest.md)
|
|
389
413
|
- [CoboWaas2.UTXO](docs/UTXO.md)
|
|
390
414
|
- [CoboWaas2.UpdateCustodialWalletParams](docs/UpdateCustodialWalletParams.md)
|
|
391
415
|
- [CoboWaas2.UpdateExchangeWalletParams](docs/UpdateExchangeWalletParams.md)
|
|
@@ -399,8 +423,6 @@ Class | Method | HTTP request | Description
|
|
|
399
423
|
- [CoboWaas2.UpdateWebhookEndpointByIdRequest](docs/UpdateWebhookEndpointByIdRequest.md)
|
|
400
424
|
- [CoboWaas2.UtxoFeeBasePrice](docs/UtxoFeeBasePrice.md)
|
|
401
425
|
- [CoboWaas2.UtxoFeeRate](docs/UtxoFeeRate.md)
|
|
402
|
-
- [CoboWaas2.WalletBalanceSnapshot](docs/WalletBalanceSnapshot.md)
|
|
403
|
-
- [CoboWaas2.WalletBalanceSnapshotRecord](docs/WalletBalanceSnapshotRecord.md)
|
|
404
426
|
- [CoboWaas2.WalletInfo](docs/WalletInfo.md)
|
|
405
427
|
- [CoboWaas2.WalletSubtype](docs/WalletSubtype.md)
|
|
406
428
|
- [CoboWaas2.WalletType](docs/WalletType.md)
|
package/dist/ApiClient.js
CHANGED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var express = require("express");
|
|
4
|
+
var nacl = require("tweetnacl");
|
|
5
|
+
var CryptoJS = require("crypto-js");
|
|
6
|
+
|
|
7
|
+
// Logging setup
|
|
8
|
+
var logger = console;
|
|
9
|
+
|
|
10
|
+
// Public keys for different environments
|
|
11
|
+
var pubKeys = {
|
|
12
|
+
DEV: "a04ea1d5fa8da71f1dcfccf972b9c4eba0a2d8aba1f6da26f49977b08a0d2718",
|
|
13
|
+
PROD: "8d4a482641adb2a34b726f05827dba9a9653e5857469b8749052bf4458a86729"
|
|
14
|
+
};
|
|
15
|
+
var pubkey = pubKeys["DEV"];
|
|
16
|
+
|
|
17
|
+
// Express setup
|
|
18
|
+
var app = express();
|
|
19
|
+
app.use(express.json({
|
|
20
|
+
verify: function verify(req, res, buf) {
|
|
21
|
+
req.rawBody = buf.toString();
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
// Helper function to verify the request signature
|
|
26
|
+
function verifyRequest(req, res) {
|
|
27
|
+
var signature = req.headers['biz-resp-signature'];
|
|
28
|
+
var bizTimestamp = req.headers['biz-timestamp'];
|
|
29
|
+
if (!signature || !bizTimestamp) {
|
|
30
|
+
res.status(401).send('Missing signature or timestamp');
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
var message = "".concat(req.rawBody, "|").concat(bizTimestamp);
|
|
34
|
+
if (!verifySignature(pubkey, signature, message)) {
|
|
35
|
+
res.status(401).send('Signature verification failed');
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Webhook endpoint
|
|
42
|
+
app.post("/api/webhook", function (req, res) {
|
|
43
|
+
if (!verifyRequest(req, res)) return;
|
|
44
|
+
var event = req.body;
|
|
45
|
+
logger.info(event);
|
|
46
|
+
logger.info(event.data);
|
|
47
|
+
// Add your business logic here
|
|
48
|
+
res.sendStatus(201);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Callback endpoint
|
|
52
|
+
app.post("/api/callback", function (req, res) {
|
|
53
|
+
if (!verifyRequest(req, res)) return;
|
|
54
|
+
var tx = req.body;
|
|
55
|
+
logger.info(tx);
|
|
56
|
+
// Add your callback logic here
|
|
57
|
+
res.send("ok");
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// Signature verification function
|
|
61
|
+
function verifySignature(publicKey, signature, message) {
|
|
62
|
+
var vk = Buffer.from(publicKey, "hex");
|
|
63
|
+
|
|
64
|
+
// Double SHA-256 hash of the message
|
|
65
|
+
var hash2String = CryptoJS.SHA256(CryptoJS.SHA256(message)).toString(CryptoJS.enc.Hex);
|
|
66
|
+
try {
|
|
67
|
+
var signatureBuffer = Buffer.from(signature, "hex");
|
|
68
|
+
var messageBuffer = Buffer.from(hash2String, "hex");
|
|
69
|
+
return nacl.sign.detached.verify(messageBuffer, signatureBuffer, vk);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
logger.error("Signature verification failed", error);
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Server startup
|
|
77
|
+
var PORT = 8000;
|
|
78
|
+
app.listen(PORT, function () {
|
|
79
|
+
logger.info("Server running on http://localhost:".concat(PORT));
|
|
80
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
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 _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
9
|
+
var _ListAddressBooks200Response = _interopRequireDefault(require("../model/ListAddressBooks200Response"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
* Cobo Wallet as a Service 2.0
|
|
18
|
+
*
|
|
19
|
+
* Contact: help@cobo.com
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* AddressBooks service.
|
|
28
|
+
* @module api/AddressBooksApi
|
|
29
|
+
*/
|
|
30
|
+
var AddressBooksApi = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a new AddressBooksApi.
|
|
33
|
+
* @alias module:api/AddressBooksApi
|
|
34
|
+
* @class
|
|
35
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
36
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
37
|
+
*/
|
|
38
|
+
function AddressBooksApi(apiClient) {
|
|
39
|
+
_classCallCheck(this, AddressBooksApi);
|
|
40
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* List address book entries
|
|
45
|
+
* This operation retrieves a list of addresses from your address book.
|
|
46
|
+
* @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
47
|
+
* @param {Object} opts Optional parameters
|
|
48
|
+
* @param {String} [address] The wallet address.
|
|
49
|
+
* @param {String} [label] The address label.
|
|
50
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
51
|
+
* @param {String} [before] An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
|
|
52
|
+
* @param {String} [after] An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
|
|
53
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAddressBooks200Response} and HTTP response
|
|
54
|
+
*/
|
|
55
|
+
return _createClass(AddressBooksApi, [{
|
|
56
|
+
key: "listAddressBooksWithHttpInfo",
|
|
57
|
+
value: function listAddressBooksWithHttpInfo(chain_id, opts) {
|
|
58
|
+
opts = opts || {};
|
|
59
|
+
var postBody = null;
|
|
60
|
+
if (postBody && postBody.toJSON) {
|
|
61
|
+
postBody = postBody.toJSON();
|
|
62
|
+
}
|
|
63
|
+
// verify the required parameter 'chain_id' is set
|
|
64
|
+
if (chain_id === undefined || chain_id === null) {
|
|
65
|
+
throw new Error("Missing the required parameter 'chain_id' when calling listAddressBooks");
|
|
66
|
+
}
|
|
67
|
+
var pathParams = {};
|
|
68
|
+
var queryParams = {
|
|
69
|
+
'chain_id': chain_id,
|
|
70
|
+
'address': opts['address'],
|
|
71
|
+
'label': opts['label'],
|
|
72
|
+
'limit': opts['limit'],
|
|
73
|
+
'before': opts['before'],
|
|
74
|
+
'after': opts['after']
|
|
75
|
+
};
|
|
76
|
+
var headerParams = {};
|
|
77
|
+
var formParams = {};
|
|
78
|
+
var authNames = ['CoboAuth'];
|
|
79
|
+
var contentTypes = [];
|
|
80
|
+
var accepts = ['application/json'];
|
|
81
|
+
var returnType = _ListAddressBooks200Response["default"];
|
|
82
|
+
return this.apiClient.callApi('/address_books', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* List address book entries
|
|
87
|
+
* This operation retrieves a list of addresses from your address book.
|
|
88
|
+
* @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
89
|
+
* @param {Object} opts Optional parameters
|
|
90
|
+
* @param {String} opts.address The wallet address.
|
|
91
|
+
* @param {String} opts.label The address label.
|
|
92
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
93
|
+
* @param {String} opts.before An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
|
|
94
|
+
* @param {String} opts.after An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
|
|
95
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddressBooks200Response}
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "listAddressBooks",
|
|
99
|
+
value: function listAddressBooks(chain_id, opts) {
|
|
100
|
+
return this.listAddressBooksWithHttpInfo(chain_id, opts).then(function (response_and_data) {
|
|
101
|
+
return response_and_data.data;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}]);
|
|
105
|
+
}();
|
|
@@ -0,0 +1,79 @@
|
|
|
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 _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
9
|
+
var _GetApiKeyInfo200Response = _interopRequireDefault(require("../model/GetApiKeyInfo200Response"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
* Cobo Wallet as a Service 2.0
|
|
18
|
+
*
|
|
19
|
+
* Contact: help@cobo.com
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Developers service.
|
|
28
|
+
* @module api/DevelopersApi
|
|
29
|
+
*/
|
|
30
|
+
var DevelopersApi = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a new DevelopersApi.
|
|
33
|
+
* @alias module:api/DevelopersApi
|
|
34
|
+
* @class
|
|
35
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
36
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
37
|
+
*/
|
|
38
|
+
function DevelopersApi(apiClient) {
|
|
39
|
+
_classCallCheck(this, DevelopersApi);
|
|
40
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get API key information
|
|
45
|
+
* This operation retrieves the details of the API key that you are using.
|
|
46
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetApiKeyInfo200Response} and HTTP response
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(DevelopersApi, [{
|
|
49
|
+
key: "getApiKeyInfoWithHttpInfo",
|
|
50
|
+
value: function getApiKeyInfoWithHttpInfo() {
|
|
51
|
+
var postBody = null;
|
|
52
|
+
if (postBody && postBody.toJSON) {
|
|
53
|
+
postBody = postBody.toJSON();
|
|
54
|
+
}
|
|
55
|
+
var pathParams = {};
|
|
56
|
+
var queryParams = {};
|
|
57
|
+
var headerParams = {};
|
|
58
|
+
var formParams = {};
|
|
59
|
+
var authNames = ['CoboAuth'];
|
|
60
|
+
var contentTypes = [];
|
|
61
|
+
var accepts = ['application/json'];
|
|
62
|
+
var returnType = _GetApiKeyInfo200Response["default"];
|
|
63
|
+
return this.apiClient.callApi('/developers/api_key_info', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Get API key information
|
|
68
|
+
* This operation retrieves the details of the API key that you are using.
|
|
69
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetApiKeyInfo200Response}
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "getApiKeyInfo",
|
|
73
|
+
value: function getApiKeyInfo() {
|
|
74
|
+
return this.getApiKeyInfoWithHttpInfo().then(function (response_and_data) {
|
|
75
|
+
return response_and_data.data;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
79
|
+
}();
|
|
@@ -12,6 +12,8 @@ var _ListWebhookEventDefinitions200ResponseInner = _interopRequireDefault(requir
|
|
|
12
12
|
var _ListWebhookEventLogs200Response = _interopRequireDefault(require("../model/ListWebhookEventLogs200Response"));
|
|
13
13
|
var _ListWebhookEvents200Response = _interopRequireDefault(require("../model/ListWebhookEvents200Response"));
|
|
14
14
|
var _RetryWebhookEventById201Response = _interopRequireDefault(require("../model/RetryWebhookEventById201Response"));
|
|
15
|
+
var _TriggerTestWebhookEvent201Response = _interopRequireDefault(require("../model/TriggerTestWebhookEvent201Response"));
|
|
16
|
+
var _TriggerTestWebhookEventRequest = _interopRequireDefault(require("../model/TriggerTestWebhookEventRequest"));
|
|
15
17
|
var _UpdateWebhookEndpointByIdRequest = _interopRequireDefault(require("../model/UpdateWebhookEndpointByIdRequest"));
|
|
16
18
|
var _WebhookEndpoint = _interopRequireDefault(require("../model/WebhookEndpoint"));
|
|
17
19
|
var _WebhookEndpointStatus = _interopRequireDefault(require("../model/WebhookEndpointStatus"));
|
|
@@ -456,6 +458,47 @@ var DevelopersWebhooksApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
456
458
|
});
|
|
457
459
|
}
|
|
458
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Trigger test event
|
|
463
|
+
* This operation tests the functionality of your webhook endpoint by triggering a test webhook event. You only need to provide the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload.
|
|
464
|
+
* @param {Object} opts Optional parameters
|
|
465
|
+
* @param {module:model/TriggerTestWebhookEventRequest} [TriggerTestWebhookEventRequest] The request body used to trigger a test webhook event.
|
|
466
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TriggerTestWebhookEvent201Response} and HTTP response
|
|
467
|
+
*/
|
|
468
|
+
}, {
|
|
469
|
+
key: "triggerTestWebhookEventWithHttpInfo",
|
|
470
|
+
value: function triggerTestWebhookEventWithHttpInfo(opts) {
|
|
471
|
+
opts = opts || {};
|
|
472
|
+
var postBody = opts['TriggerTestWebhookEventRequest'];
|
|
473
|
+
if (postBody && postBody.toJSON) {
|
|
474
|
+
postBody = postBody.toJSON();
|
|
475
|
+
}
|
|
476
|
+
var pathParams = {};
|
|
477
|
+
var queryParams = {};
|
|
478
|
+
var headerParams = {};
|
|
479
|
+
var formParams = {};
|
|
480
|
+
var authNames = ['CoboAuth'];
|
|
481
|
+
var contentTypes = ['application/json'];
|
|
482
|
+
var accepts = ['application/json'];
|
|
483
|
+
var returnType = _TriggerTestWebhookEvent201Response["default"];
|
|
484
|
+
return this.apiClient.callApi('/webhooks/events/trigger', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Trigger test event
|
|
489
|
+
* This operation tests the functionality of your webhook endpoint by triggering a test webhook event. You only need to provide the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload.
|
|
490
|
+
* @param {Object} opts Optional parameters
|
|
491
|
+
* @param {module:model/TriggerTestWebhookEventRequest} opts.TriggerTestWebhookEventRequest The request body used to trigger a test webhook event.
|
|
492
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TriggerTestWebhookEvent201Response}
|
|
493
|
+
*/
|
|
494
|
+
}, {
|
|
495
|
+
key: "triggerTestWebhookEvent",
|
|
496
|
+
value: function triggerTestWebhookEvent(opts) {
|
|
497
|
+
return this.triggerTestWebhookEventWithHttpInfo(opts).then(function (response_and_data) {
|
|
498
|
+
return response_and_data.data;
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
|
|
459
502
|
/**
|
|
460
503
|
* Update webhook endpoint
|
|
461
504
|
* This operation updates the information of a specified webhook endpoint.
|
package/dist/api/OAuthApi.js
CHANGED
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
9
|
-
var
|
|
9
|
+
var _GetToken2XXResponse = _interopRequireDefault(require("../model/GetToken2XXResponse"));
|
|
10
10
|
var _GetToken4XXResponse = _interopRequireDefault(require("../model/GetToken4XXResponse"));
|
|
11
|
-
var
|
|
11
|
+
var _RefreshToken2XXResponse = _interopRequireDefault(require("../model/RefreshToken2XXResponse"));
|
|
12
12
|
var _RefreshTokenRequest = _interopRequireDefault(require("../model/RefreshTokenRequest"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
14
|
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); }
|
|
@@ -45,11 +45,11 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Get Org Access Token
|
|
48
|
-
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client ID, organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an Org Access Token and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](/v2/api-references/oauth/refresh-access-token) to get a new Org Access Token and a new Refresh Token.
|
|
48
|
+
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client ID, organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an Org Access Token and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](/v2/api-references/oauth/refresh-org-access-token) to get a new Org Access Token and a new Refresh Token.
|
|
49
49
|
* @param {String} client_id The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app.
|
|
50
50
|
* @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the organization ID from the callback message sent to the URL that was configured in the manifest file.
|
|
51
51
|
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
52
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
52
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetToken2XXResponse} and HTTP response
|
|
53
53
|
*/
|
|
54
54
|
return _createClass(OAuthApi, [{
|
|
55
55
|
key: "getTokenWithHttpInfo",
|
|
@@ -81,17 +81,17 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
81
81
|
var authNames = ['CoboAuth'];
|
|
82
82
|
var contentTypes = [];
|
|
83
83
|
var accepts = ['application/json'];
|
|
84
|
-
var returnType =
|
|
84
|
+
var returnType = _GetToken2XXResponse["default"];
|
|
85
85
|
return this.apiClient.callApi('/oauth/token', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Get Org Access Token
|
|
90
|
-
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client ID, organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an Org Access Token and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](/v2/api-references/oauth/refresh-access-token) to get a new Org Access Token and a new Refresh Token.
|
|
90
|
+
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client ID, organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an Org Access Token and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](/v2/api-references/oauth/refresh-org-access-token) to get a new Org Access Token and a new Refresh Token.
|
|
91
91
|
* @param {String} client_id The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app.
|
|
92
92
|
* @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the organization ID from the callback message sent to the URL that was configured in the manifest file.
|
|
93
93
|
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
94
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
94
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetToken2XXResponse}
|
|
95
95
|
*/
|
|
96
96
|
}, {
|
|
97
97
|
key: "getToken",
|
|
@@ -105,7 +105,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
105
105
|
* Refresh Org Access Token
|
|
106
106
|
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new Org Access Token with a specified client ID, grant type and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Org Access Token and a new Refresh Token.
|
|
107
107
|
* @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an Org Access Token.
|
|
108
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
108
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RefreshToken2XXResponse} and HTTP response
|
|
109
109
|
*/
|
|
110
110
|
}, {
|
|
111
111
|
key: "refreshTokenWithHttpInfo",
|
|
@@ -125,7 +125,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
125
125
|
var authNames = ['CoboAuth'];
|
|
126
126
|
var contentTypes = ['application/json'];
|
|
127
127
|
var accepts = ['application/json'];
|
|
128
|
-
var returnType =
|
|
128
|
+
var returnType = _RefreshToken2XXResponse["default"];
|
|
129
129
|
return this.apiClient.callApi('/oauth/token', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -133,7 +133,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
133
133
|
* Refresh Org Access Token
|
|
134
134
|
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new Org Access Token with a specified client ID, grant type and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Org Access Token and a new Refresh Token.
|
|
135
135
|
* @param {module:model/RefreshTokenRequest} RefreshTokenRequest The request body for refreshing an Org Access Token.
|
|
136
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
136
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RefreshToken2XXResponse}
|
|
137
137
|
*/
|
|
138
138
|
}, {
|
|
139
139
|
key: "refreshToken",
|