diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5707ddb..23c2354 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -939,6 +939,7 @@ RewardsInfo.md RiskLevelEnum.md RoleDetails.md RoleDetails2.md +RoleFeeInfo.md RoleGrantee.md Rule.md RuleActionEnum.md @@ -1227,9 +1228,13 @@ TokensPaginatedResponse.md TotalSupplyItemDto.md TotalSupplyPagedResponse.md TotalSupplyPagedResponse2.md +TradeClass.md TradingAccountType.md TradingApi.md TradingErrorSchema.md +TradingPair.md +TradingPairSide.md +TradingPairsListPage.md TradingProvider.md Transaction.md TransactionConfigurations.md @@ -1334,7 +1339,7 @@ TxLog.md TypedMessageTransactionStatusEnum.md USWireAddress.md USWireDestination.md -UTXOManagementBetaApi.md +UTXOManagementApi.md UnfreezeTransactionResponse.md UnmanagedWallet.md UnspentInput.md @@ -1498,7 +1503,7 @@ api/travel-rule-api.ts api/trlink-api.ts api/user-groups-beta-api.ts api/users-api.ts -api/utxomanagement-beta-api.ts +api/utxomanagement-api.ts api/vaults-api.ts api/web3-connections-api.ts api/webhooks-api.ts @@ -2413,6 +2418,7 @@ models/rewards-info.ts models/risk-level-enum.ts models/role-details.ts models/role-details2.ts +models/role-fee-info.ts models/role-grantee.ts models/rule-action-enum.ts models/rule-condition-operator-enum.ts @@ -2600,8 +2606,12 @@ models/tokens-paginated-response.ts models/total-supply-item-dto.ts models/total-supply-paged-response.ts models/total-supply-paged-response2.ts +models/trade-class.ts models/trading-account-type.ts models/trading-error-schema.ts +models/trading-pair-side.ts +models/trading-pair.ts +models/trading-pairs-list-page.ts models/trading-provider.ts models/transaction-configurations.ts models/transaction-direction.ts diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8996ea6..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,258 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v36.0.0](https://github.com/fireblocks/ts-sdk/compare/v19.0.0...v36.0.0) - 2026-11-04 - -### Merged - -- Generated SDK #3026276285 [`#216`](https://github.com/fireblocks/ts-sdk/pull/216) - -## [v19.0.0](https://github.com/fireblocks/ts-sdk/compare/v18.0.0...v19.0.0) - 2026-05-17 - -### Merged - -- Generated SDK #7742 (major) [`#183`](https://github.com/fireblocks/ts-sdk/pull/183) - -## [v18.0.0](https://github.com/fireblocks/ts-sdk/compare/v17.0.0...v18.0.0) - 2026-05-06 - -### Merged - -- Generated SDK #3222 [`#181`](https://github.com/fireblocks/ts-sdk/pull/181) - -## [v17.0.0](https://github.com/fireblocks/ts-sdk/compare/v16.0.0...v17.0.0) - 2026-04-20 - -### Merged - -- Generated SDK #9605 (major) [`#180`](https://github.com/fireblocks/ts-sdk/pull/180) - -## [v16.0.0](https://github.com/fireblocks/ts-sdk/compare/v15.0.0...v16.0.0) - 2026-04-06 - -### Merged - -- Generated SDK #3331 [`#179`](https://github.com/fireblocks/ts-sdk/pull/179) - -## [v15.0.0](https://github.com/fireblocks/ts-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#174`](https://github.com/fireblocks/ts-sdk/pull/174) - -## [v14.1.0](https://github.com/fireblocks/ts-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#172`](https://github.com/fireblocks/ts-sdk/pull/172) - -## [v14.0.0](https://github.com/fireblocks/ts-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#164`](https://github.com/fireblocks/ts-sdk/pull/164) - -## [v13.0.0](https://github.com/fireblocks/ts-sdk/compare/v12.1.2...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#146`](https://github.com/fireblocks/ts-sdk/pull/146) - -## [v12.1.2](https://github.com/fireblocks/ts-sdk/compare/v12.1.1...v12.1.2) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#145`](https://github.com/fireblocks/ts-sdk/pull/145) - -## [v12.1.1](https://github.com/fireblocks/ts-sdk/compare/v12.1.0...v12.1.1) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#143`](https://github.com/fireblocks/ts-sdk/pull/143) - -## [v12.1.0](https://github.com/fireblocks/ts-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#142`](https://github.com/fireblocks/ts-sdk/pull/142) - -## [v12.0.0](https://github.com/fireblocks/ts-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#141`](https://github.com/fireblocks/ts-sdk/pull/141) - -## [v11.2.0](https://github.com/fireblocks/ts-sdk/compare/v11.1.0...v11.2.0) - 2025-08-18 - -### Merged - -- Generated SDK #3302 [`#140`](https://github.com/fireblocks/ts-sdk/pull/140) - -## [v11.1.0](https://github.com/fireblocks/ts-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#139`](https://github.com/fireblocks/ts-sdk/pull/139) - -## [v11.0.0](https://github.com/fireblocks/ts-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#136`](https://github.com/fireblocks/ts-sdk/pull/136) - -## [v10.4.0](https://github.com/fireblocks/ts-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#135`](https://github.com/fireblocks/ts-sdk/pull/135) - -## [v10.3.0](https://github.com/fireblocks/ts-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#134`](https://github.com/fireblocks/ts-sdk/pull/134) - -## [v10.2.0](https://github.com/fireblocks/ts-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#133`](https://github.com/fireblocks/ts-sdk/pull/133) - -## [v10.1.1](https://github.com/fireblocks/ts-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#132`](https://github.com/fireblocks/ts-sdk/pull/132) - -## [v10.1.0](https://github.com/fireblocks/ts-sdk/compare/v10.0.2...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#130`](https://github.com/fireblocks/ts-sdk/pull/130) - -## [v10.0.2](https://github.com/fireblocks/ts-sdk/compare/v10.0.1...v10.0.2) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#128`](https://github.com/fireblocks/ts-sdk/pull/128) - -## [v10.0.1](https://github.com/fireblocks/ts-sdk/compare/v10.0.0...v10.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#126`](https://github.com/fireblocks/ts-sdk/pull/126) - -## [v10.0.0](https://github.com/fireblocks/ts-sdk/compare/v9.0.0...v10.0.0) - 2025-03-27 - -### Merged - -- Generated SDK #619 [`#124`](https://github.com/fireblocks/ts-sdk/pull/124) - -## [v9.0.0](https://github.com/fireblocks/ts-sdk/compare/v8.1.0...v9.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#123`](https://github.com/fireblocks/ts-sdk/pull/123) - -## [v8.1.0](https://github.com/fireblocks/ts-sdk/compare/v8.0.1...v8.1.0) - 2025-02-24 - -### Merged - -- Generated SDK #9833 [`#120`](https://github.com/fireblocks/ts-sdk/pull/120) - -## [v8.0.1](https://github.com/fireblocks/ts-sdk/compare/v8.0.0...v8.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#119`](https://github.com/fireblocks/ts-sdk/pull/119) - -## [v8.0.0](https://github.com/fireblocks/ts-sdk/compare/v7.0.0...v8.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#118`](https://github.com/fireblocks/ts-sdk/pull/118) - -## [v7.0.0](https://github.com/fireblocks/ts-sdk/compare/v6.0.0...v7.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#116`](https://github.com/fireblocks/ts-sdk/pull/116) - -## [v6.0.0](https://github.com/fireblocks/ts-sdk/compare/v5.0.0...v6.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#111`](https://github.com/fireblocks/ts-sdk/pull/111) - -## [v5.0.0](https://github.com/fireblocks/ts-sdk/compare/v4.0.0...v5.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#109`](https://github.com/fireblocks/ts-sdk/pull/109) - -## [v4.0.0](https://github.com/fireblocks/ts-sdk/compare/v3.1.0...v4.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#107`](https://github.com/fireblocks/ts-sdk/pull/107) - -## [v3.1.0](https://github.com/fireblocks/ts-sdk/compare/v3.0.0...v3.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#102`](https://github.com/fireblocks/ts-sdk/pull/102) - -## [v3.0.0](https://github.com/fireblocks/ts-sdk/compare/v2.1.0...v3.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#90`](https://github.com/fireblocks/ts-sdk/pull/90) -- Generated SDK #2589 [`#86`](https://github.com/fireblocks/ts-sdk/pull/86) -- Generated SDK #7882 [`#85`](https://github.com/fireblocks/ts-sdk/pull/85) -- Generated SDK #8418 [`#84`](https://github.com/fireblocks/ts-sdk/pull/84) -- Generated SDK #3524 [`#83`](https://github.com/fireblocks/ts-sdk/pull/83) -- Generated SDK #7984 [`#82`](https://github.com/fireblocks/ts-sdk/pull/82) -- Generated SDK #2873 [`#81`](https://github.com/fireblocks/ts-sdk/pull/81) - -## [v2.1.0](https://github.com/fireblocks/ts-sdk/compare/v2.0.0...v2.1.0) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#44`](https://github.com/fireblocks/ts-sdk/pull/44) - -## [v2.0.0](https://github.com/fireblocks/ts-sdk/compare/v1.1.0...v2.0.0) - 2024-05-08 - -### Merged - -- feat: add tokenization api [`#35`](https://github.com/fireblocks/ts-sdk/pull/35) - -## [v1.1.0](https://github.com/fireblocks/ts-sdk/compare/v1.0.1...v1.1.0) - 2024-04-17 - -### Merged - -- feat: adding consigners beta api [`#34`](https://github.com/fireblocks/ts-sdk/pull/34) -- fix: modify error message when secretKey missing and fix readme doc [`#33`](https://github.com/fireblocks/ts-sdk/pull/33) - -## [v1.0.1](https://github.com/fireblocks/ts-sdk/compare/v1.0.0...v1.0.1) - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.1 [`#32`](https://github.com/fireblocks/ts-sdk/pull/32) - -## v1.0.0 - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.0 GA [`#31`](https://github.com/fireblocks/ts-sdk/pull/31) -- add_license [`#30`](https://github.com/fireblocks/ts-sdk/pull/30) -- version_3_0_6_beta [`#29`](https://github.com/fireblocks/ts-sdk/pull/29) -- version_3_0_5_beta [`#27`](https://github.com/fireblocks/ts-sdk/pull/27) -- Version 3.0.4-beta [`#26`](https://github.com/fireblocks/ts-sdk/pull/26) -- Fireblocks api spec/generated/9818 [`#25`](https://github.com/fireblocks/ts-sdk/pull/25) -- Generated SDK for version 9817 [`#24`](https://github.com/fireblocks/ts-sdk/pull/24) -- Generated SDK for version master [`#23`](https://github.com/fireblocks/ts-sdk/pull/23) -- Added Idempotency & NCW headers support [`#22`](https://github.com/fireblocks/ts-sdk/pull/22) -- API SDK Improvments [`#21`](https://github.com/fireblocks/ts-sdk/pull/21) -- Update README.md [`#18`](https://github.com/fireblocks/ts-sdk/pull/18) -- Update README.md [`#17`](https://github.com/fireblocks/ts-sdk/pull/17) diff --git a/README.md b/README.md index 7e05543..24a7e39 100644 --- a/README.md +++ b/README.md @@ -543,6 +543,7 @@ Class | Method | HTTP request | Description *TradingApi* | [**getOrder**](docs/apis/TradingApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details *TradingApi* | [**getOrderRequirements**](docs/apis/TradingApi.md#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order *TradingApi* | [**getOrders**](docs/apis/TradingApi.md#getOrders) | **GET** /trading/orders | Get orders +*TradingApi* | [**getTradingPairs**](docs/apis/TradingApi.md#getTradingPairs) | **GET** /trading/pairs | Get trading pairs *TradingApi* | [**getTradingProviderById**](docs/apis/TradingApi.md#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID *TradingApi* | [**getTradingProviders**](docs/apis/TradingApi.md#getTradingProviders) | **GET** /trading/providers | Get providers *TradingApi* | [**submitOrderRequirements**](docs/apis/TradingApi.md#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement @@ -568,12 +569,12 @@ Class | Method | HTTP request | Description *TravelRuleApi* | [**setVaspForVault**](docs/apis/TravelRuleApi.md#setVaspForVault) | **POST** /screening/travel_rule/vault/{vaultAccountId}/vasp | Assign VASP to vault *TravelRuleApi* | [**updateVasp**](docs/apis/TravelRuleApi.md#updateVasp) | **PUT** /screening/travel_rule/vasp/update | Add jsonDidKey to VASP details *TravelRuleApi* | [**validateFullTravelRuleTransaction**](docs/apis/TravelRuleApi.md#validateFullTravelRuleTransaction) | **POST** /screening/travel_rule/transaction/validate/full | Validate Full Travel Rule Transaction -*UTXOManagementBetaApi* | [**getUtxoSelectionConfig**](docs/apis/UTXOManagementBetaApi.md#getUtxoSelectionConfig) | **GET** /utxo_management/selection_config | Get UTXO selection config -*UTXOManagementBetaApi* | [**getUtxos**](docs/apis/UTXOManagementBetaApi.md#getUtxos) | **GET** /utxo_management/{vaultAccountId}/{assetId}/unspent_outputs | List unspent outputs (UTXOs) -*UTXOManagementBetaApi* | [**getVaultAssetUtxoSelectionConfig**](docs/apis/UTXOManagementBetaApi.md#getVaultAssetUtxoSelectionConfig) | **GET** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Get vault and asset UTXO selection config -*UTXOManagementBetaApi* | [**updateUtxoLabels**](docs/apis/UTXOManagementBetaApi.md#updateUtxoLabels) | **PATCH** /utxo_management/{vaultAccountId}/{assetId}/labels | Attach or detach labels to/from UTXOs -*UTXOManagementBetaApi* | [**upsertUtxoSelectionConfig**](docs/apis/UTXOManagementBetaApi.md#upsertUtxoSelectionConfig) | **PUT** /utxo_management/selection_config | Upsert UTXO selection config -*UTXOManagementBetaApi* | [**upsertVaultAssetUtxoSelectionConfig**](docs/apis/UTXOManagementBetaApi.md#upsertVaultAssetUtxoSelectionConfig) | **PUT** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Upsert vault and asset UTXO selection config +*UTXOManagementApi* | [**getUtxoSelectionConfig**](docs/apis/UTXOManagementApi.md#getUtxoSelectionConfig) | **GET** /utxo_management/selection_config | Get UTXO selection config +*UTXOManagementApi* | [**getUtxos**](docs/apis/UTXOManagementApi.md#getUtxos) | **GET** /utxo_management/{vaultAccountId}/{assetId}/unspent_outputs | List unspent outputs (UTXOs) +*UTXOManagementApi* | [**getVaultAssetUtxoSelectionConfig**](docs/apis/UTXOManagementApi.md#getVaultAssetUtxoSelectionConfig) | **GET** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Get vault and asset UTXO selection config +*UTXOManagementApi* | [**updateUtxoLabels**](docs/apis/UTXOManagementApi.md#updateUtxoLabels) | **PATCH** /utxo_management/{vaultAccountId}/{assetId}/labels | Attach or detach labels to/from UTXOs +*UTXOManagementApi* | [**upsertUtxoSelectionConfig**](docs/apis/UTXOManagementApi.md#upsertUtxoSelectionConfig) | **PUT** /utxo_management/selection_config | Upsert UTXO selection config +*UTXOManagementApi* | [**upsertVaultAssetUtxoSelectionConfig**](docs/apis/UTXOManagementApi.md#upsertVaultAssetUtxoSelectionConfig) | **PUT** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Upsert vault and asset UTXO selection config *UserGroupsBetaApi* | [**createUserGroup**](docs/apis/UserGroupsBetaApi.md#createUserGroup) | **POST** /management/user_groups | Create user group *UserGroupsBetaApi* | [**deleteUserGroup**](docs/apis/UserGroupsBetaApi.md#deleteUserGroup) | **DELETE** /management/user_groups/{groupId} | Delete user group *UserGroupsBetaApi* | [**getUserGroup**](docs/apis/UserGroupsBetaApi.md#getUserGroup) | **GET** /management/user_groups/{groupId} | Get user group @@ -1555,6 +1556,7 @@ Class | Method | HTTP request | Description - [RiskLevelEnum](docs/models/RiskLevelEnum.md) - [RoleDetails](docs/models/RoleDetails.md) - [RoleDetails2](docs/models/RoleDetails2.md) + - [RoleFeeInfo](docs/models/RoleFeeInfo.md) - [RoleGrantee](docs/models/RoleGrantee.md) - [Rule](docs/models/Rule.md) - [RuleActionEnum](docs/models/RuleActionEnum.md) @@ -1836,8 +1838,12 @@ Class | Method | HTTP request | Description - [TotalSupplyItemDto](docs/models/TotalSupplyItemDto.md) - [TotalSupplyPagedResponse](docs/models/TotalSupplyPagedResponse.md) - [TotalSupplyPagedResponse2](docs/models/TotalSupplyPagedResponse2.md) + - [TradeClass](docs/models/TradeClass.md) - [TradingAccountType](docs/models/TradingAccountType.md) - [TradingErrorSchema](docs/models/TradingErrorSchema.md) + - [TradingPair](docs/models/TradingPair.md) + - [TradingPairSide](docs/models/TradingPairSide.md) + - [TradingPairsListPage](docs/models/TradingPairsListPage.md) - [TradingProvider](docs/models/TradingProvider.md) - [Transaction](docs/models/Transaction.md) - [TransactionConfigurations](docs/models/TransactionConfigurations.md) diff --git a/api.ts b/api.ts index 8605628..dbdaf74 100644 --- a/api.ts +++ b/api.ts @@ -62,7 +62,7 @@ export * from './api/tokenization-api'; export * from './api/trading-api'; export * from './api/transactions-api'; export * from './api/travel-rule-api'; -export * from './api/utxomanagement-beta-api'; +export * from './api/utxomanagement-api'; export * from './api/user-groups-beta-api'; export * from './api/users-api'; export * from './api/vaults-api'; diff --git a/api/trading-api.ts b/api/trading-api.ts index b97635f..1c8d153 100644 --- a/api/trading-api.ts +++ b/api/trading-api.ts @@ -55,9 +55,17 @@ import { RatesResponse } from '../models'; // @ts-ignore import { SubmitOrderRequirementRequest } from '../models'; // @ts-ignore +import { TradeClass } from '../models'; +// @ts-ignore import { TradingErrorSchema } from '../models'; // @ts-ignore +import { TradingPairSide } from '../models'; +// @ts-ignore +import { TradingPairsListPage } from '../models'; +// @ts-ignore import { TradingProvider } from '../models'; +// @ts-ignore +import { TransferRail } from '../models'; /** * TradingApi - axios parameter creator * @export @@ -385,6 +393,115 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the base/quote trading pairs supported by the tenant\'s trading providers. All filters are optional and combined with AND. A provider can return several rows for one pair, one per side and per connected account, each with its own `tradeClass`. Rows may use the wildcard `*` asset ID or the `BOTH` side and are returned unexpanded (see the `baseAsset`, `side` and `baseChain` filters for how they match). **Examples** - Which providers support ETH/USDC: `?baseAsset=ETH"eAsset=USDC`. Add `providerId` to check one provider; an empty `data` array means it does not support the pair. - All pairs of one account: `?providerId=ACME&accountId=`. Page through large results with `pageSize` and `pageCursor`. - Everything you can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + * @summary Get trading pairs + * @param {string} [baseAsset] Filter by base asset ID. Also matches `*` rows on the chain of this asset. + * @param {string} [quoteAsset] Filter by quote asset ID. Also matches `*` rows on the chain of this asset. + * @param {string} [baseChain] Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + * @param {string} [quoteChain] Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + * @param {TransferRail} [baseRail] Filter by base asset transfer rail. + * @param {TransferRail} [quoteRail] Filter by quote asset transfer rail. + * @param {TradingPairSide} [side] Filter by trading side. `BUY` or `SELL` also matches rows whose side is `BOTH`; `BOTH` matches rows of any side. + * @param {TradeClass} [tradeClass] Filter by trade class. + * @param {Array} [providerId] Filter by provider ID. Repeat the parameter to match any of several providers, up to 50. + * @param {Array} [accountId] Filter by connected account ID. Repeat the parameter to match any of several accounts, up to 50. + * @param {boolean} [prefunded] Filter by whether the pair requires prefunding. + * @param {string} [min] An order-size filter, not a bound on the result. Only returns pairs whose own `min` field (the smallest base-asset amount the pair accepts) is at most this value, i.e. pairs that can serve an order of this size. For example, `min=10` returns pairs with a `min` of 10 or less. + * @param {string} [max] An order-size filter, not a bound on the result. Only returns pairs whose own `max` field (the largest base-asset amount the pair accepts) is at least this value. For example, `max=1000` returns pairs with a `max` of 1000 or more. + * @param {number} [pageSize] Page size for pagination. + * @param {string} [pageCursor] Page cursor for pagination. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTradingPairs: async (baseAsset?: string, quoteAsset?: string, baseChain?: string, quoteChain?: string, baseRail?: TransferRail, quoteRail?: TransferRail, side?: TradingPairSide, tradeClass?: TradeClass, providerId?: Array, accountId?: Array, prefunded?: boolean, min?: string, max?: string, pageSize?: number, pageCursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/trading/pairs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + // Stamped onto the request config (not the headers, so it never goes on + // the wire) so the response interceptor can name the operation in the + // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. + (localVarRequestOptions as any).fireblocksOperationId = 'getTradingPairs'; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (baseAsset !== undefined) { + localVarQueryParameter['baseAsset'] = baseAsset; + } + + if (quoteAsset !== undefined) { + localVarQueryParameter['quoteAsset'] = quoteAsset; + } + + if (baseChain !== undefined) { + localVarQueryParameter['baseChain'] = baseChain; + } + + if (quoteChain !== undefined) { + localVarQueryParameter['quoteChain'] = quoteChain; + } + + if (baseRail !== undefined) { + localVarQueryParameter['baseRail'] = baseRail; + } + + if (quoteRail !== undefined) { + localVarQueryParameter['quoteRail'] = quoteRail; + } + + if (side !== undefined) { + localVarQueryParameter['side'] = side; + } + + if (tradeClass !== undefined) { + localVarQueryParameter['tradeClass'] = tradeClass; + } + + if (providerId) { + localVarQueryParameter['providerId'] = providerId; + } + + if (accountId) { + localVarQueryParameter['accountId'] = accountId; + } + + if (prefunded !== undefined) { + localVarQueryParameter['prefunded'] = prefunded; + } + + if (min !== undefined) { + localVarQueryParameter['min'] = min; + } + + if (max !== undefined) { + localVarQueryParameter['max'] = max; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + if (pageCursor !== undefined) { + localVarQueryParameter['pageCursor'] = pageCursor; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -693,6 +810,33 @@ export const TradingApiFp = function(configuration?: Configuration) { const operationBasePath = operationServerMap['TradingApi.getOrders']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, + /** + * Retrieve the base/quote trading pairs supported by the tenant\'s trading providers. All filters are optional and combined with AND. A provider can return several rows for one pair, one per side and per connected account, each with its own `tradeClass`. Rows may use the wildcard `*` asset ID or the `BOTH` side and are returned unexpanded (see the `baseAsset`, `side` and `baseChain` filters for how they match). **Examples** - Which providers support ETH/USDC: `?baseAsset=ETH"eAsset=USDC`. Add `providerId` to check one provider; an empty `data` array means it does not support the pair. - All pairs of one account: `?providerId=ACME&accountId=`. Page through large results with `pageSize` and `pageCursor`. - Everything you can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + * @summary Get trading pairs + * @param {string} [baseAsset] Filter by base asset ID. Also matches `*` rows on the chain of this asset. + * @param {string} [quoteAsset] Filter by quote asset ID. Also matches `*` rows on the chain of this asset. + * @param {string} [baseChain] Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + * @param {string} [quoteChain] Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + * @param {TransferRail} [baseRail] Filter by base asset transfer rail. + * @param {TransferRail} [quoteRail] Filter by quote asset transfer rail. + * @param {TradingPairSide} [side] Filter by trading side. `BUY` or `SELL` also matches rows whose side is `BOTH`; `BOTH` matches rows of any side. + * @param {TradeClass} [tradeClass] Filter by trade class. + * @param {Array} [providerId] Filter by provider ID. Repeat the parameter to match any of several providers, up to 50. + * @param {Array} [accountId] Filter by connected account ID. Repeat the parameter to match any of several accounts, up to 50. + * @param {boolean} [prefunded] Filter by whether the pair requires prefunding. + * @param {string} [min] An order-size filter, not a bound on the result. Only returns pairs whose own `min` field (the smallest base-asset amount the pair accepts) is at most this value, i.e. pairs that can serve an order of this size. For example, `min=10` returns pairs with a `min` of 10 or less. + * @param {string} [max] An order-size filter, not a bound on the result. Only returns pairs whose own `max` field (the largest base-asset amount the pair accepts) is at least this value. For example, `max=1000` returns pairs with a `max` of 1000 or more. + * @param {number} [pageSize] Page size for pagination. + * @param {string} [pageCursor] Page cursor for pagination. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTradingPairs(baseAsset?: string, quoteAsset?: string, baseChain?: string, quoteChain?: string, baseRail?: TransferRail, quoteRail?: TransferRail, side?: TradingPairSide, tradeClass?: TradeClass, providerId?: Array, accountId?: Array, prefunded?: boolean, min?: string, max?: string, pageSize?: number, pageCursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTradingPairs(baseAsset, quoteAsset, baseChain, quoteChain, baseRail, quoteRail, side, tradeClass, providerId, accountId, prefunded, min, max, pageSize, pageCursor, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TradingApi.getTradingPairs']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, /** * Retrieve a single provider by ID. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). * @summary Get trading provider by ID @@ -831,6 +975,16 @@ export const TradingApiFactory = function (configuration?: Configuration, basePa getOrders(requestParameters: TradingApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getOrders(requestParameters.pageSize, requestParameters.pageCursor, requestParameters.order, requestParameters.accountId, requestParameters.providerId, requestParameters.statuses, requestParameters.startTime, requestParameters.endTime, requestParameters.assetConversionType, options).then((request) => request(axios, basePath)); }, + /** + * Retrieve the base/quote trading pairs supported by the tenant\'s trading providers. All filters are optional and combined with AND. A provider can return several rows for one pair, one per side and per connected account, each with its own `tradeClass`. Rows may use the wildcard `*` asset ID or the `BOTH` side and are returned unexpanded (see the `baseAsset`, `side` and `baseChain` filters for how they match). **Examples** - Which providers support ETH/USDC: `?baseAsset=ETH"eAsset=USDC`. Add `providerId` to check one provider; an empty `data` array means it does not support the pair. - All pairs of one account: `?providerId=ACME&accountId=`. Page through large results with `pageSize` and `pageCursor`. - Everything you can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + * @summary Get trading pairs + * @param {TradingApiGetTradingPairsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTradingPairs(requestParameters: TradingApiGetTradingPairsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTradingPairs(requestParameters.baseAsset, requestParameters.quoteAsset, requestParameters.baseChain, requestParameters.quoteChain, requestParameters.baseRail, requestParameters.quoteRail, requestParameters.side, requestParameters.tradeClass, requestParameters.providerId, requestParameters.accountId, requestParameters.prefunded, requestParameters.min, requestParameters.max, requestParameters.pageSize, requestParameters.pageCursor, options).then((request) => request(axios, basePath)); + }, /** * Retrieve a single provider by ID. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). * @summary Get trading provider by ID @@ -1056,6 +1210,118 @@ export interface TradingApiGetOrdersRequest { readonly assetConversionType?: GetOrdersAssetConversionTypeEnum } +/** + * Request parameters for getTradingPairs operation in TradingApi. + * @export + * @interface TradingApiGetTradingPairsRequest + */ +export interface TradingApiGetTradingPairsRequest { + /** + * Filter by base asset ID. Also matches `*` rows on the chain of this asset. + * @type {string} + * @memberof TradingApiGetTradingPairs + */ + readonly baseAsset?: string + + /** + * Filter by quote asset ID. Also matches `*` rows on the chain of this asset. + * @type {string} + * @memberof TradingApiGetTradingPairs + */ + readonly quoteAsset?: string + + /** + * Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + * @type {string} + * @memberof TradingApiGetTradingPairs + */ + readonly baseChain?: string + + /** + * Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + * @type {string} + * @memberof TradingApiGetTradingPairs + */ + readonly quoteChain?: string + + /** + * Filter by base asset transfer rail. + * @type {TransferRail} + * @memberof TradingApiGetTradingPairs + */ + readonly baseRail?: TransferRail + + /** + * Filter by quote asset transfer rail. + * @type {TransferRail} + * @memberof TradingApiGetTradingPairs + */ + readonly quoteRail?: TransferRail + + /** + * Filter by trading side. `BUY` or `SELL` also matches rows whose side is `BOTH`; `BOTH` matches rows of any side. + * @type {TradingPairSide} + * @memberof TradingApiGetTradingPairs + */ + readonly side?: TradingPairSide + + /** + * Filter by trade class. + * @type {TradeClass} + * @memberof TradingApiGetTradingPairs + */ + readonly tradeClass?: TradeClass + + /** + * Filter by provider ID. Repeat the parameter to match any of several providers, up to 50. + * @type {Array} + * @memberof TradingApiGetTradingPairs + */ + readonly providerId?: Array + + /** + * Filter by connected account ID. Repeat the parameter to match any of several accounts, up to 50. + * @type {Array} + * @memberof TradingApiGetTradingPairs + */ + readonly accountId?: Array + + /** + * Filter by whether the pair requires prefunding. + * @type {boolean} + * @memberof TradingApiGetTradingPairs + */ + readonly prefunded?: boolean + + /** + * An order-size filter, not a bound on the result. Only returns pairs whose own `min` field (the smallest base-asset amount the pair accepts) is at most this value, i.e. pairs that can serve an order of this size. For example, `min=10` returns pairs with a `min` of 10 or less. + * @type {string} + * @memberof TradingApiGetTradingPairs + */ + readonly min?: string + + /** + * An order-size filter, not a bound on the result. Only returns pairs whose own `max` field (the largest base-asset amount the pair accepts) is at least this value. For example, `max=1000` returns pairs with a `max` of 1000 or more. + * @type {string} + * @memberof TradingApiGetTradingPairs + */ + readonly max?: string + + /** + * Page size for pagination. + * @type {number} + * @memberof TradingApiGetTradingPairs + */ + readonly pageSize?: number + + /** + * Page cursor for pagination. + * @type {string} + * @memberof TradingApiGetTradingPairs + */ + readonly pageCursor?: string +} + /** * Request parameters for getTradingProviderById operation in TradingApi. * @export @@ -1245,6 +1511,18 @@ export class TradingApi extends BaseAPI { return TradingApiFp(this.configuration).getOrders(requestParameters.pageSize, requestParameters.pageCursor, requestParameters.order, requestParameters.accountId, requestParameters.providerId, requestParameters.statuses, requestParameters.startTime, requestParameters.endTime, requestParameters.assetConversionType).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } + /** + * Retrieve the base/quote trading pairs supported by the tenant\'s trading providers. All filters are optional and combined with AND. A provider can return several rows for one pair, one per side and per connected account, each with its own `tradeClass`. Rows may use the wildcard `*` asset ID or the `BOTH` side and are returned unexpanded (see the `baseAsset`, `side` and `baseChain` filters for how they match). **Examples** - Which providers support ETH/USDC: `?baseAsset=ETH"eAsset=USDC`. Add `providerId` to check one provider; an empty `data` array means it does not support the pair. - All pairs of one account: `?providerId=ACME&accountId=`. Page through large results with `pageSize` and `pageCursor`. - Everything you can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + * @summary Get trading pairs + * @param {TradingApiGetTradingPairsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TradingApi + */ + public getTradingPairs(requestParameters: TradingApiGetTradingPairsRequest = {}) { + return TradingApiFp(this.configuration).getTradingPairs(requestParameters.baseAsset, requestParameters.quoteAsset, requestParameters.baseChain, requestParameters.quoteChain, requestParameters.baseRail, requestParameters.quoteRail, requestParameters.side, requestParameters.tradeClass, requestParameters.providerId, requestParameters.accountId, requestParameters.prefunded, requestParameters.min, requestParameters.max, requestParameters.pageSize, requestParameters.pageCursor).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); + } + /** * Retrieve a single provider by ID. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). * @summary Get trading provider by ID diff --git a/api/utxomanagement-beta-api.ts b/api/utxomanagement-api.ts similarity index 79% rename from api/utxomanagement-beta-api.ts rename to api/utxomanagement-api.ts index 1c84124..0a141d9 100644 --- a/api/utxomanagement-beta-api.ts +++ b/api/utxomanagement-api.ts @@ -41,13 +41,13 @@ import { UtxoLabelsErrorResponse } from '../models'; // @ts-ignore import { UtxoSelectionConfigResponse } from '../models'; /** - * UTXOManagementBetaApi - axios parameter creator + * UTXOManagementApi - axios parameter creator * @export */ -export const UTXOManagementBetaApiAxiosParamCreator = function (configuration?: Configuration) { +export const UTXOManagementApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get UTXO selection config * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -81,7 +81,7 @@ export const UTXOManagementBetaApiAxiosParamCreator = function (configuration?: }; }, /** - * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary List unspent outputs (UTXOs) * @param {string} vaultAccountId The ID of the vault account * @param {string} assetId The ID of the asset @@ -186,7 +186,7 @@ export const UTXOManagementBetaApiAxiosParamCreator = function (configuration?: }; }, /** - * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get vault and asset UTXO selection config * @param {string} vaultAccountId The ID of the vault account. * @param {string} assetId The ID of the asset @@ -226,7 +226,7 @@ export const UTXOManagementBetaApiAxiosParamCreator = function (configuration?: }; }, /** - * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * @summary Attach or detach labels to/from UTXOs * @param {AttachDetachUtxoLabelsRequest} attachDetachUtxoLabelsRequest * @param {string} vaultAccountId The ID of the vault account @@ -276,7 +276,7 @@ export const UTXOManagementBetaApiAxiosParamCreator = function (configuration?: }; }, /** - * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert UTXO selection config * @param {UpsertUtxoSelectionConfigRequest} upsertUtxoSelectionConfigRequest * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. @@ -320,7 +320,7 @@ export const UTXOManagementBetaApiAxiosParamCreator = function (configuration?: }; }, /** - * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert vault and asset UTXO selection config * @param {UpsertUtxoSelectionConfigRequest} upsertUtxoSelectionConfigRequest * @param {string} vaultAccountId The ID of the vault account. @@ -373,14 +373,14 @@ export const UTXOManagementBetaApiAxiosParamCreator = function (configuration?: }; /** - * UTXOManagementBetaApi - functional programming interface + * UTXOManagementApi - functional programming interface * @export */ -export const UTXOManagementBetaApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = UTXOManagementBetaApiAxiosParamCreator(configuration) +export const UTXOManagementApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UTXOManagementApiAxiosParamCreator(configuration) return { /** - * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get UTXO selection config * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -388,11 +388,11 @@ export const UTXOManagementBetaApiFp = function(configuration?: Configuration) { async getUtxoSelectionConfig(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUtxoSelectionConfig(options); const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UTXOManagementBetaApi.getUtxoSelectionConfig']?.[index]?.url; + const operationBasePath = operationServerMap['UTXOManagementApi.getUtxoSelectionConfig']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** - * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary List unspent outputs (UTXOs) * @param {string} vaultAccountId The ID of the vault account * @param {string} assetId The ID of the asset @@ -415,11 +415,11 @@ export const UTXOManagementBetaApiFp = function(configuration?: Configuration) { async getUtxos(vaultAccountId: string, assetId: string, pageCursor?: string, pageSize?: number, sort?: GetUtxosSortEnum, order?: GetUtxosOrderEnum, includeAllLabels?: Array, includeAnyLabels?: Array, excludeAnyLabels?: Array, includeStatuses?: Array, address?: string, txHash?: string, txId?: string, minAmount?: string, maxAmount?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUtxos(vaultAccountId, assetId, pageCursor, pageSize, sort, order, includeAllLabels, includeAnyLabels, excludeAnyLabels, includeStatuses, address, txHash, txId, minAmount, maxAmount, options); const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UTXOManagementBetaApi.getUtxos']?.[index]?.url; + const operationBasePath = operationServerMap['UTXOManagementApi.getUtxos']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** - * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get vault and asset UTXO selection config * @param {string} vaultAccountId The ID of the vault account. * @param {string} assetId The ID of the asset @@ -429,11 +429,11 @@ export const UTXOManagementBetaApiFp = function(configuration?: Configuration) { async getVaultAssetUtxoSelectionConfig(vaultAccountId: string, assetId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getVaultAssetUtxoSelectionConfig(vaultAccountId, assetId, options); const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UTXOManagementBetaApi.getVaultAssetUtxoSelectionConfig']?.[index]?.url; + const operationBasePath = operationServerMap['UTXOManagementApi.getVaultAssetUtxoSelectionConfig']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** - * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * @summary Attach or detach labels to/from UTXOs * @param {AttachDetachUtxoLabelsRequest} attachDetachUtxoLabelsRequest * @param {string} vaultAccountId The ID of the vault account @@ -445,11 +445,11 @@ export const UTXOManagementBetaApiFp = function(configuration?: Configuration) { async updateUtxoLabels(attachDetachUtxoLabelsRequest: AttachDetachUtxoLabelsRequest, vaultAccountId: string, assetId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUtxoLabels(attachDetachUtxoLabelsRequest, vaultAccountId, assetId, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UTXOManagementBetaApi.updateUtxoLabels']?.[index]?.url; + const operationBasePath = operationServerMap['UTXOManagementApi.updateUtxoLabels']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** - * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert UTXO selection config * @param {UpsertUtxoSelectionConfigRequest} upsertUtxoSelectionConfigRequest * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. @@ -459,11 +459,11 @@ export const UTXOManagementBetaApiFp = function(configuration?: Configuration) { async upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest: UpsertUtxoSelectionConfigRequest, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UTXOManagementBetaApi.upsertUtxoSelectionConfig']?.[index]?.url; + const operationBasePath = operationServerMap['UTXOManagementApi.upsertUtxoSelectionConfig']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** - * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert vault and asset UTXO selection config * @param {UpsertUtxoSelectionConfigRequest} upsertUtxoSelectionConfigRequest * @param {string} vaultAccountId The ID of the vault account. @@ -475,21 +475,21 @@ export const UTXOManagementBetaApiFp = function(configuration?: Configuration) { async upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest: UpsertUtxoSelectionConfigRequest, vaultAccountId: string, assetId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest, vaultAccountId, assetId, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UTXOManagementBetaApi.upsertVaultAssetUtxoSelectionConfig']?.[index]?.url; + const operationBasePath = operationServerMap['UTXOManagementApi.upsertVaultAssetUtxoSelectionConfig']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, } }; /** - * UTXOManagementBetaApi - factory interface + * UTXOManagementApi - factory interface * @export */ -export const UTXOManagementBetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = UTXOManagementBetaApiFp(configuration) +export const UTXOManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UTXOManagementApiFp(configuration) return { /** - * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get UTXO selection config * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -498,358 +498,358 @@ export const UTXOManagementBetaApiFactory = function (configuration?: Configurat return localVarFp.getUtxoSelectionConfig(options).then((request) => request(axios, basePath)); }, /** - * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary List unspent outputs (UTXOs) - * @param {UTXOManagementBetaApiGetUtxosRequest} requestParameters Request parameters. + * @param {UTXOManagementApiGetUtxosRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUtxos(requestParameters: UTXOManagementBetaApiGetUtxosRequest, options?: RawAxiosRequestConfig): AxiosPromise { + getUtxos(requestParameters: UTXOManagementApiGetUtxosRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getUtxos(requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sort, requestParameters.order, requestParameters.includeAllLabels, requestParameters.includeAnyLabels, requestParameters.excludeAnyLabels, requestParameters.includeStatuses, requestParameters.address, requestParameters.txHash, requestParameters.txId, requestParameters.minAmount, requestParameters.maxAmount, options).then((request) => request(axios, basePath)); }, /** - * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get vault and asset UTXO selection config - * @param {UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. + * @param {UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { + getVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getVaultAssetUtxoSelectionConfig(requestParameters.vaultAccountId, requestParameters.assetId, options).then((request) => request(axios, basePath)); }, /** - * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * @summary Attach or detach labels to/from UTXOs - * @param {UTXOManagementBetaApiUpdateUtxoLabelsRequest} requestParameters Request parameters. + * @param {UTXOManagementApiUpdateUtxoLabelsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUtxoLabels(requestParameters: UTXOManagementBetaApiUpdateUtxoLabelsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + updateUtxoLabels(requestParameters: UTXOManagementApiUpdateUtxoLabelsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateUtxoLabels(requestParameters.attachDetachUtxoLabelsRequest, requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, /** - * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert UTXO selection config - * @param {UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest} requestParameters Request parameters. + * @param {UTXOManagementApiUpsertUtxoSelectionConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - upsertUtxoSelectionConfig(requestParameters: UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { + upsertUtxoSelectionConfig(requestParameters: UTXOManagementApiUpsertUtxoSelectionConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.upsertUtxoSelectionConfig(requestParameters.upsertUtxoSelectionConfigRequest, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, /** - * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert vault and asset UTXO selection config - * @param {UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. + * @param {UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - upsertVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { + upsertVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.upsertVaultAssetUtxoSelectionConfig(requestParameters.upsertUtxoSelectionConfigRequest, requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, }; }; /** - * Request parameters for getUtxos operation in UTXOManagementBetaApi. + * Request parameters for getUtxos operation in UTXOManagementApi. * @export - * @interface UTXOManagementBetaApiGetUtxosRequest + * @interface UTXOManagementApiGetUtxosRequest */ -export interface UTXOManagementBetaApiGetUtxosRequest { +export interface UTXOManagementApiGetUtxosRequest { /** * The ID of the vault account * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly vaultAccountId: string /** * The ID of the asset * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly assetId: string /** * Cursor for the next page of results * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly pageCursor?: string /** * Number of results per page (max 250, default 50) * @type {number} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly pageSize?: number /** * Field to sort by * @type {'AMOUNT' | 'CONFIRMATIONS'} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly sort?: GetUtxosSortEnum /** * Sort order * @type {'ASC' | 'DESC'} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly order?: GetUtxosOrderEnum /** * Only return UTXOs that have ALL of these labels (AND logic). * @type {Array} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly includeAllLabels?: Array /** * Return UTXOs that have ANY of these labels (OR logic). * @type {Array} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly includeAnyLabels?: Array /** * Exclude UTXOs that have ANY of these labels. * @type {Array} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly excludeAnyLabels?: Array /** * Filter by UTXO statuses to include. * @type {Array} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly includeStatuses?: Array /** * Filter by address * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly address?: string /** * Filter by the on-chain hash of the transaction that created the UTXOs. Returns all UTXOs originating from that transaction. * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly txHash?: string /** * Filter by the Fireblocks transaction ID that created the UTXOs. * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly txId?: string /** * Minimum amount filter * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly minAmount?: string /** * Maximum amount filter * @type {string} - * @memberof UTXOManagementBetaApiGetUtxos + * @memberof UTXOManagementApiGetUtxos */ readonly maxAmount?: string } /** - * Request parameters for getVaultAssetUtxoSelectionConfig operation in UTXOManagementBetaApi. + * Request parameters for getVaultAssetUtxoSelectionConfig operation in UTXOManagementApi. * @export - * @interface UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest + * @interface UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest */ -export interface UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest { +export interface UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest { /** * The ID of the vault account. * @type {string} - * @memberof UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfig + * @memberof UTXOManagementApiGetVaultAssetUtxoSelectionConfig */ readonly vaultAccountId: string /** * The ID of the asset * @type {string} - * @memberof UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfig + * @memberof UTXOManagementApiGetVaultAssetUtxoSelectionConfig */ readonly assetId: string } /** - * Request parameters for updateUtxoLabels operation in UTXOManagementBetaApi. + * Request parameters for updateUtxoLabels operation in UTXOManagementApi. * @export - * @interface UTXOManagementBetaApiUpdateUtxoLabelsRequest + * @interface UTXOManagementApiUpdateUtxoLabelsRequest */ -export interface UTXOManagementBetaApiUpdateUtxoLabelsRequest { +export interface UTXOManagementApiUpdateUtxoLabelsRequest { /** * * @type {AttachDetachUtxoLabelsRequest} - * @memberof UTXOManagementBetaApiUpdateUtxoLabels + * @memberof UTXOManagementApiUpdateUtxoLabels */ readonly attachDetachUtxoLabelsRequest: AttachDetachUtxoLabelsRequest /** * The ID of the vault account * @type {string} - * @memberof UTXOManagementBetaApiUpdateUtxoLabels + * @memberof UTXOManagementApiUpdateUtxoLabels */ readonly vaultAccountId: string /** * The ID of the asset * @type {string} - * @memberof UTXOManagementBetaApiUpdateUtxoLabels + * @memberof UTXOManagementApiUpdateUtxoLabels */ readonly assetId: string /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} - * @memberof UTXOManagementBetaApiUpdateUtxoLabels + * @memberof UTXOManagementApiUpdateUtxoLabels */ readonly idempotencyKey?: string } /** - * Request parameters for upsertUtxoSelectionConfig operation in UTXOManagementBetaApi. + * Request parameters for upsertUtxoSelectionConfig operation in UTXOManagementApi. * @export - * @interface UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest + * @interface UTXOManagementApiUpsertUtxoSelectionConfigRequest */ -export interface UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest { +export interface UTXOManagementApiUpsertUtxoSelectionConfigRequest { /** * * @type {UpsertUtxoSelectionConfigRequest} - * @memberof UTXOManagementBetaApiUpsertUtxoSelectionConfig + * @memberof UTXOManagementApiUpsertUtxoSelectionConfig */ readonly upsertUtxoSelectionConfigRequest: UpsertUtxoSelectionConfigRequest /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} - * @memberof UTXOManagementBetaApiUpsertUtxoSelectionConfig + * @memberof UTXOManagementApiUpsertUtxoSelectionConfig */ readonly idempotencyKey?: string } /** - * Request parameters for upsertVaultAssetUtxoSelectionConfig operation in UTXOManagementBetaApi. + * Request parameters for upsertVaultAssetUtxoSelectionConfig operation in UTXOManagementApi. * @export - * @interface UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest + * @interface UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest */ -export interface UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest { +export interface UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest { /** * * @type {UpsertUtxoSelectionConfigRequest} - * @memberof UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfig + * @memberof UTXOManagementApiUpsertVaultAssetUtxoSelectionConfig */ readonly upsertUtxoSelectionConfigRequest: UpsertUtxoSelectionConfigRequest /** * The ID of the vault account. * @type {string} - * @memberof UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfig + * @memberof UTXOManagementApiUpsertVaultAssetUtxoSelectionConfig */ readonly vaultAccountId: string /** * The ID of the asset * @type {string} - * @memberof UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfig + * @memberof UTXOManagementApiUpsertVaultAssetUtxoSelectionConfig */ readonly assetId: string /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} - * @memberof UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfig + * @memberof UTXOManagementApiUpsertVaultAssetUtxoSelectionConfig */ readonly idempotencyKey?: string } /** - * UTXOManagementBetaApi - object-oriented interface + * UTXOManagementApi - object-oriented interface * @export - * @class UTXOManagementBetaApi + * @class UTXOManagementApi * @extends {BaseAPI} */ -export class UTXOManagementBetaApi extends BaseAPI { +export class UTXOManagementApi extends BaseAPI { /** - * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get UTXO selection config * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UTXOManagementBetaApi + * @memberof UTXOManagementApi */ public getUtxoSelectionConfig() { - return UTXOManagementBetaApiFp(this.configuration).getUtxoSelectionConfig().then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); + return UTXOManagementApiFp(this.configuration).getUtxoSelectionConfig().then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** - * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary List unspent outputs (UTXOs) - * @param {UTXOManagementBetaApiGetUtxosRequest} requestParameters Request parameters. + * @param {UTXOManagementApiGetUtxosRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UTXOManagementBetaApi + * @memberof UTXOManagementApi */ - public getUtxos(requestParameters: UTXOManagementBetaApiGetUtxosRequest) { - return UTXOManagementBetaApiFp(this.configuration).getUtxos(requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sort, requestParameters.order, requestParameters.includeAllLabels, requestParameters.includeAnyLabels, requestParameters.excludeAnyLabels, requestParameters.includeStatuses, requestParameters.address, requestParameters.txHash, requestParameters.txId, requestParameters.minAmount, requestParameters.maxAmount).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); + public getUtxos(requestParameters: UTXOManagementApiGetUtxosRequest) { + return UTXOManagementApiFp(this.configuration).getUtxos(requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sort, requestParameters.order, requestParameters.includeAllLabels, requestParameters.includeAnyLabels, requestParameters.excludeAnyLabels, requestParameters.includeStatuses, requestParameters.address, requestParameters.txHash, requestParameters.txId, requestParameters.minAmount, requestParameters.maxAmount).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** - * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * @summary Get vault and asset UTXO selection config - * @param {UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. + * @param {UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UTXOManagementBetaApi + * @memberof UTXOManagementApi */ - public getVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest) { - return UTXOManagementBetaApiFp(this.configuration).getVaultAssetUtxoSelectionConfig(requestParameters.vaultAccountId, requestParameters.assetId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); + public getVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest) { + return UTXOManagementApiFp(this.configuration).getVaultAssetUtxoSelectionConfig(requestParameters.vaultAccountId, requestParameters.assetId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** - * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * @summary Attach or detach labels to/from UTXOs - * @param {UTXOManagementBetaApiUpdateUtxoLabelsRequest} requestParameters Request parameters. + * @param {UTXOManagementApiUpdateUtxoLabelsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UTXOManagementBetaApi + * @memberof UTXOManagementApi */ - public updateUtxoLabels(requestParameters: UTXOManagementBetaApiUpdateUtxoLabelsRequest) { - return UTXOManagementBetaApiFp(this.configuration).updateUtxoLabels(requestParameters.attachDetachUtxoLabelsRequest, requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); + public updateUtxoLabels(requestParameters: UTXOManagementApiUpdateUtxoLabelsRequest) { + return UTXOManagementApiFp(this.configuration).updateUtxoLabels(requestParameters.attachDetachUtxoLabelsRequest, requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** - * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert UTXO selection config - * @param {UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest} requestParameters Request parameters. + * @param {UTXOManagementApiUpsertUtxoSelectionConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UTXOManagementBetaApi + * @memberof UTXOManagementApi */ - public upsertUtxoSelectionConfig(requestParameters: UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest) { - return UTXOManagementBetaApiFp(this.configuration).upsertUtxoSelectionConfig(requestParameters.upsertUtxoSelectionConfigRequest, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); + public upsertUtxoSelectionConfig(requestParameters: UTXOManagementApiUpsertUtxoSelectionConfigRequest) { + return UTXOManagementApiFp(this.configuration).upsertUtxoSelectionConfig(requestParameters.upsertUtxoSelectionConfigRequest, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** - * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * @summary Upsert vault and asset UTXO selection config - * @param {UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. + * @param {UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UTXOManagementBetaApi + * @memberof UTXOManagementApi */ - public upsertVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest) { - return UTXOManagementBetaApiFp(this.configuration).upsertVaultAssetUtxoSelectionConfig(requestParameters.upsertUtxoSelectionConfigRequest, requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); + public upsertVaultAssetUtxoSelectionConfig(requestParameters: UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest) { + return UTXOManagementApiFp(this.configuration).upsertVaultAssetUtxoSelectionConfig(requestParameters.upsertUtxoSelectionConfigRequest, requestParameters.vaultAccountId, requestParameters.assetId, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } } diff --git a/api/vaults-api.ts b/api/vaults-api.ts index a0a52f0..c8d6488 100644 --- a/api/vaults-api.ts +++ b/api/vaults-api.ts @@ -793,12 +793,12 @@ export const VaultsApiAxiosParamCreator = function (configuration?: Configuratio * @param {string} vaultAccountId The ID of the vault account * @param {string} assetId The ID of the asset * @param {boolean} [manualSignging] False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. - * @param {Array} [includeAllLabels] Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {Array} [includeAnyLabels] Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {Array} [excludeAnyLabels] Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {string} [address] Only include UTXOs from this specific address. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {string} [minAmount] Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {string} [maxAmount] Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * @param {Array} [includeAllLabels] Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. + * @param {Array} [includeAnyLabels] Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. + * @param {Array} [excludeAnyLabels] Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. + * @param {string} [address] Only include UTXOs from this specific address. Requires the UTXO Manager. + * @param {string} [minAmount] Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. + * @param {string} [maxAmount] Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -2129,12 +2129,12 @@ export const VaultsApiFp = function(configuration?: Configuration) { * @param {string} vaultAccountId The ID of the vault account * @param {string} assetId The ID of the asset * @param {boolean} [manualSignging] False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. - * @param {Array} [includeAllLabels] Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {Array} [includeAnyLabels] Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {Array} [excludeAnyLabels] Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {string} [address] Only include UTXOs from this specific address. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {string} [minAmount] Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - * @param {string} [maxAmount] Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * @param {Array} [includeAllLabels] Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. + * @param {Array} [includeAnyLabels] Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. + * @param {Array} [excludeAnyLabels] Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. + * @param {string} [address] Only include UTXOs from this specific address. Requires the UTXO Manager. + * @param {string} [minAmount] Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. + * @param {string} [maxAmount] Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -3289,42 +3289,42 @@ export interface VaultsApiGetMaxSpendableAmountRequest { readonly manualSignging?: boolean /** - * Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. * @type {Array} * @memberof VaultsApiGetMaxSpendableAmount */ readonly includeAllLabels?: Array /** - * Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. * @type {Array} * @memberof VaultsApiGetMaxSpendableAmount */ readonly includeAnyLabels?: Array /** - * Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. * @type {Array} * @memberof VaultsApiGetMaxSpendableAmount */ readonly excludeAnyLabels?: Array /** - * Only include UTXOs from this specific address. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * Only include UTXOs from this specific address. Requires the UTXO Manager. * @type {string} * @memberof VaultsApiGetMaxSpendableAmount */ readonly address?: string /** - * Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. * @type {string} * @memberof VaultsApiGetMaxSpendableAmount */ readonly minAmount?: string /** - * Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + * Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. * @type {string} * @memberof VaultsApiGetMaxSpendableAmount */ diff --git a/client/client.ts b/client/client.ts index e6c41bf..4bbd9fd 100644 --- a/client/client.ts +++ b/client/client.ts @@ -60,7 +60,7 @@ import { ApiUserApi, TradingApi, TransactionsApi, TravelRuleApi, - UTXOManagementBetaApi, + UTXOManagementApi, UserGroupsBetaApi, UsersApi, VaultsApi, @@ -125,7 +125,7 @@ export class Fireblocks { private _trading?: TradingApi; private _transactions?: TransactionsApi; private _travelRule?: TravelRuleApi; - private _utxoManagementBeta?: UTXOManagementBetaApi; + private _utxoManagement?: UTXOManagementApi; private _userGroupsBeta?: UserGroupsBetaApi; private _users?: UsersApi; private _vaults?: VaultsApi; @@ -300,8 +300,8 @@ export class Fireblocks { get travelRule(): TravelRuleApi { return this._travelRule ?? new TravelRuleApi(this.config, undefined, this.axiosManager.axios); } - get utxoManagementBeta(): UTXOManagementBetaApi { - return this._utxoManagementBeta ?? new UTXOManagementBetaApi(this.config, undefined, this.axiosManager.axios); + get utxoManagement(): UTXOManagementApi { + return this._utxoManagement ?? new UTXOManagementApi(this.config, undefined, this.axiosManager.axios); } get userGroupsBeta(): UserGroupsBetaApi { return this._userGroupsBeta ?? new UserGroupsBetaApi(this.config, undefined, this.axiosManager.axios); diff --git a/docs/apis/TradingApi.md b/docs/apis/TradingApi.md index 17e2eb6..4b7523f 100644 --- a/docs/apis/TradingApi.md +++ b/docs/apis/TradingApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**getOrder**](#getOrder) | **GET** /trading/orders/{orderId} | Get order details [**getOrderRequirements**](#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order [**getOrders**](#getOrders) | **GET** /trading/orders | Get orders +[**getTradingPairs**](#getTradingPairs) | **GET** /trading/pairs | Get trading pairs [**getTradingProviderById**](#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID [**getTradingProviders**](#getTradingProviders) | **GET** /trading/providers | Get providers [**submitOrderRequirements**](#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement @@ -508,6 +509,113 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **getTradingPairs** +> TradingPairsListPage getTradingPairs() + +Retrieve the base/quote trading pairs supported by the tenant\'s trading providers. All filters are optional and combined with AND. A provider can return several rows for one pair, one per side and per connected account, each with its own `tradeClass`. Rows may use the wildcard `*` asset ID or the `BOTH` side and are returned unexpanded (see the `baseAsset`, `side` and `baseChain` filters for how they match). **Examples** - Which providers support ETH/USDC: `?baseAsset=ETH"eAsset=USDC`. Add `providerId` to check one provider; an empty `data` array means it does not support the pair. - All pairs of one account: `?providerId=ACME&accountId=`. Page through large results with `pageSize` and `pageCursor`. - Everything you can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + +### Example + + +```typescript +import { readFileSync } from 'fs'; +import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; +import type { FireblocksResponse, TradingApiGetTradingPairsRequest, TradingPairsListPage } from '@fireblocks/ts-sdk'; + +// Set the environment variables for authentication +process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" +process.env.FIREBLOCKS_API_KEY = "my-api-key"; +process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8"); + +const fireblocks = new Fireblocks(); + +let body: TradingApiGetTradingPairsRequest = { + // string | Filter by base asset ID. Also matches `*` rows on the chain of this asset. (optional) + baseAsset: baseAsset_example, + // string | Filter by quote asset ID. Also matches `*` rows on the chain of this asset. (optional) + quoteAsset: quoteAsset_example, + // string | Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. (optional) + baseChain: baseChain_example, + // string | Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. (optional) + quoteChain: quoteChain_example, + // TransferRail | Filter by base asset transfer rail. (optional) + baseRail: param_value, + // TransferRail | Filter by quote asset transfer rail. (optional) + quoteRail: param_value, + // TradingPairSide | Filter by trading side. `BUY` or `SELL` also matches rows whose side is `BOTH`; `BOTH` matches rows of any side. (optional) + side: param_value, + // TradeClass | Filter by trade class. (optional) + tradeClass: param_value, + // Array | Filter by provider ID. Repeat the parameter to match any of several providers, up to 50. (optional) + providerId: param_value, + // Array | Filter by connected account ID. Repeat the parameter to match any of several accounts, up to 50. (optional) + accountId: param_value, + // boolean | Filter by whether the pair requires prefunding. (optional) + prefunded: true, + // string | An order-size filter, not a bound on the result. Only returns pairs whose own `min` field (the smallest base-asset amount the pair accepts) is at most this value, i.e. pairs that can serve an order of this size. For example, `min=10` returns pairs with a `min` of 10 or less. (optional) + min: min_example, + // string | An order-size filter, not a bound on the result. Only returns pairs whose own `max` field (the largest base-asset amount the pair accepts) is at least this value. For example, `max=1000` returns pairs with a `max` of 1000 or more. (optional) + max: max_example, + // number | Page size for pagination. (optional) + pageSize: 56, + // string | Page cursor for pagination. (optional) + pageCursor: pageCursor_example, +}; + +fireblocks.trading.getTradingPairs(body).then((res: FireblocksResponse) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); +}).catch((error:any) => console.error(error)); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **baseAsset** | [**string**] | Filter by base asset ID. Also matches `*` rows on the chain of this asset. | (optional) defaults to undefined + **quoteAsset** | [**string**] | Filter by quote asset ID. Also matches `*` rows on the chain of this asset. | (optional) defaults to undefined + **baseChain** | [**string**] | Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. | (optional) defaults to undefined + **quoteChain** | [**string**] | Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. | (optional) defaults to undefined + **baseRail** | **TransferRail** | Filter by base asset transfer rail. | (optional) defaults to undefined + **quoteRail** | **TransferRail** | Filter by quote asset transfer rail. | (optional) defaults to undefined + **side** | **TradingPairSide** | Filter by trading side. `BUY` or `SELL` also matches rows whose side is `BOTH`; `BOTH` matches rows of any side. | (optional) defaults to undefined + **tradeClass** | **TradeClass** | Filter by trade class. | (optional) defaults to undefined + **providerId** | **Array<string>** | Filter by provider ID. Repeat the parameter to match any of several providers, up to 50. | (optional) defaults to undefined + **accountId** | **Array<string>** | Filter by connected account ID. Repeat the parameter to match any of several accounts, up to 50. | (optional) defaults to undefined + **prefunded** | [**boolean**] | Filter by whether the pair requires prefunding. | (optional) defaults to undefined + **min** | [**string**] | An order-size filter, not a bound on the result. Only returns pairs whose own `min` field (the smallest base-asset amount the pair accepts) is at most this value, i.e. pairs that can serve an order of this size. For example, `min=10` returns pairs with a `min` of 10 or less. | (optional) defaults to undefined + **max** | [**string**] | An order-size filter, not a bound on the result. Only returns pairs whose own `max` field (the largest base-asset amount the pair accepts) is at least this value. For example, `max=1000` returns pairs with a `max` of 1000 or more. | (optional) defaults to undefined + **pageSize** | [**number**] | Page size for pagination. | (optional) defaults to 100 + **pageCursor** | [**string**] | Page cursor for pagination. | (optional) defaults to undefined + + +### Return type + +**[TradingPairsListPage](../models/TradingPairsListPage.md)** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trading pairs response | * X-Request-ID -
| +**400** | Bad request: invalid input parameters, malformed request body, or validation failure. | * X-Request-ID -
| +**401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| +**403** | Forbidden: insufficient permissions, disabled feature, or restricted access. | * X-Request-ID -
| +**429** | Rate limit exceeded: slow down and retry later. | * X-Request-ID -
| +**5XX** | Internal error while processing the request. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **getTradingProviderById** > TradingProvider getTradingProviderById() diff --git a/docs/apis/UTXOManagementBetaApi.md b/docs/apis/UTXOManagementApi.md similarity index 86% rename from docs/apis/UTXOManagementBetaApi.md rename to docs/apis/UTXOManagementApi.md index cb4ca99..b6b171a 100644 --- a/docs/apis/UTXOManagementBetaApi.md +++ b/docs/apis/UTXOManagementApi.md @@ -1,4 +1,4 @@ -# UTXOManagementBetaApi +# UTXOManagementApi All URIs are relative to https://developers.fireblocks.com/reference/ @@ -15,7 +15,7 @@ Method | HTTP request | Description # **getUtxoSelectionConfig** > UtxoSelectionConfigResponse getUtxoSelectionConfig() -Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -34,7 +34,7 @@ const fireblocks = new Fireblocks(); let body:any = {}; -fireblocks.utxoManagementBeta.getUtxoSelectionConfig(body).then((res: FireblocksResponse) => { +fireblocks.utxoManagement.getUtxoSelectionConfig(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` @@ -69,7 +69,7 @@ No authorization required # **getUtxos** > ListUtxosResponse getUtxos() -Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -77,7 +77,7 @@ Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; -import type { FireblocksResponse, UTXOManagementBetaApiGetUtxosRequest, ListUtxosResponse } from '@fireblocks/ts-sdk'; +import type { FireblocksResponse, UTXOManagementApiGetUtxosRequest, ListUtxosResponse } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" @@ -86,7 +86,7 @@ process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf const fireblocks = new Fireblocks(); -let body: UTXOManagementBetaApiGetUtxosRequest = { +let body: UTXOManagementApiGetUtxosRequest = { // string | The ID of the vault account vaultAccountId: vaultAccountId_example, // string | The ID of the asset @@ -119,7 +119,7 @@ let body: UTXOManagementBetaApiGetUtxosRequest = { maxAmount: 1.0, }; -fireblocks.utxoManagementBeta.getUtxos(body).then((res: FireblocksResponse) => { +fireblocks.utxoManagement.getUtxos(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` @@ -171,7 +171,7 @@ No authorization required # **getVaultAssetUtxoSelectionConfig** > UtxoSelectionConfigResponse getVaultAssetUtxoSelectionConfig() -Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -179,7 +179,7 @@ Returns the config stored at this vault-and-asset scope, if any, and the effecti ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; -import type { FireblocksResponse, UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest, UtxoSelectionConfigResponse } from '@fireblocks/ts-sdk'; +import type { FireblocksResponse, UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest, UtxoSelectionConfigResponse } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" @@ -188,14 +188,14 @@ process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf const fireblocks = new Fireblocks(); -let body: UTXOManagementBetaApiGetVaultAssetUtxoSelectionConfigRequest = { +let body: UTXOManagementApiGetVaultAssetUtxoSelectionConfigRequest = { // string | The ID of the vault account. vaultAccountId: vaultAccountId_example, // string | The ID of the asset assetId: assetId_example, }; -fireblocks.utxoManagementBeta.getVaultAssetUtxoSelectionConfig(body).then((res: FireblocksResponse) => { +fireblocks.utxoManagement.getVaultAssetUtxoSelectionConfig(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` @@ -234,7 +234,7 @@ No authorization required # **updateUtxoLabels** > AttachDetachUtxoLabelsResponse updateUtxoLabels(attachDetachUtxoLabelsRequest, ) -Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. ### Example @@ -242,7 +242,7 @@ Attach or detach labels to/from UTXOs in a vault account. Labels can be used for ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; -import type { FireblocksResponse, UTXOManagementBetaApiUpdateUtxoLabelsRequest, AttachDetachUtxoLabelsResponse } from '@fireblocks/ts-sdk'; +import type { FireblocksResponse, UTXOManagementApiUpdateUtxoLabelsRequest, AttachDetachUtxoLabelsResponse } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" @@ -251,7 +251,7 @@ process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf const fireblocks = new Fireblocks(); -let body: UTXOManagementBetaApiUpdateUtxoLabelsRequest = { +let body: UTXOManagementApiUpdateUtxoLabelsRequest = { // AttachDetachUtxoLabelsRequest attachDetachUtxoLabelsRequest: param_value, // string | The ID of the vault account @@ -262,7 +262,7 @@ let body: UTXOManagementBetaApiUpdateUtxoLabelsRequest = { idempotencyKey: idempotencyKey_example, }; -fireblocks.utxoManagementBeta.updateUtxoLabels(body).then((res: FireblocksResponse) => { +fireblocks.utxoManagement.updateUtxoLabels(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` @@ -304,7 +304,7 @@ No authorization required # **upsertUtxoSelectionConfig** > UtxoSelectionConfigResponse upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest) -Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. +Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. ### Example @@ -312,7 +312,7 @@ Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is re ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; -import type { FireblocksResponse, UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest, UtxoSelectionConfigResponse } from '@fireblocks/ts-sdk'; +import type { FireblocksResponse, UTXOManagementApiUpsertUtxoSelectionConfigRequest, UtxoSelectionConfigResponse } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" @@ -321,14 +321,14 @@ process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf const fireblocks = new Fireblocks(); -let body: UTXOManagementBetaApiUpsertUtxoSelectionConfigRequest = { +let body: UTXOManagementApiUpsertUtxoSelectionConfigRequest = { // UpsertUtxoSelectionConfigRequest upsertUtxoSelectionConfigRequest: param_value, // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) idempotencyKey: idempotencyKey_example, }; -fireblocks.utxoManagementBeta.upsertUtxoSelectionConfig(body).then((res: FireblocksResponse) => { +fireblocks.utxoManagement.upsertUtxoSelectionConfig(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` @@ -367,7 +367,7 @@ No authorization required # **upsertVaultAssetUtxoSelectionConfig** > UtxoSelectionConfigResponse upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest, ) -Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. +Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. ### Example @@ -375,7 +375,7 @@ Creates or updates the UTXO selection strategy for this vault account and asset. ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; -import type { FireblocksResponse, UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest, UtxoSelectionConfigResponse } from '@fireblocks/ts-sdk'; +import type { FireblocksResponse, UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest, UtxoSelectionConfigResponse } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" @@ -384,7 +384,7 @@ process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf const fireblocks = new Fireblocks(); -let body: UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest = { +let body: UTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest = { // UpsertUtxoSelectionConfigRequest upsertUtxoSelectionConfigRequest: param_value, // string | The ID of the vault account. @@ -395,7 +395,7 @@ let body: UTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest = { idempotencyKey: idempotencyKey_example, }; -fireblocks.utxoManagementBeta.upsertVaultAssetUtxoSelectionConfig(body).then((res: FireblocksResponse) => { +fireblocks.utxoManagement.upsertVaultAssetUtxoSelectionConfig(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` diff --git a/docs/apis/VaultsApi.md b/docs/apis/VaultsApi.md index fe7f721..60680f4 100644 --- a/docs/apis/VaultsApi.md +++ b/docs/apis/VaultsApi.md @@ -1049,17 +1049,17 @@ let body: VaultsApiGetMaxSpendableAmountRequest = { assetId: assetId_example, // boolean | False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. (optional) manualSignging: true, - // Array | Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. (optional) + // Array | Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. (optional) includeAllLabels: param_value, - // Array | Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. (optional) + // Array | Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. (optional) includeAnyLabels: param_value, - // Array | Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. (optional) + // Array | Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. (optional) excludeAnyLabels: param_value, - // string | Only include UTXOs from this specific address. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. (optional) + // string | Only include UTXOs from this specific address. Requires the UTXO Manager. (optional) address: address_example, - // string | Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. (optional) + // string | Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. (optional) minAmount: minAmount_example, - // string | Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. (optional) + // string | Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. (optional) maxAmount: maxAmount_example, }; @@ -1076,12 +1076,12 @@ Name | Type | Description | Notes **vaultAccountId** | [**string**] | The ID of the vault account | defaults to undefined **assetId** | [**string**] | The ID of the asset | defaults to undefined **manualSignging** | [**boolean**] | False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. | (optional) defaults to undefined - **includeAllLabels** | **Array<string>** | Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | (optional) defaults to undefined - **includeAnyLabels** | **Array<string>** | Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | (optional) defaults to undefined - **excludeAnyLabels** | **Array<string>** | Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | (optional) defaults to undefined - **address** | [**string**] | Only include UTXOs from this specific address. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | (optional) defaults to undefined - **minAmount** | [**string**] | Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | (optional) defaults to undefined - **maxAmount** | [**string**] | Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | (optional) defaults to undefined + **includeAllLabels** | **Array<string>** | Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. | (optional) defaults to undefined + **includeAnyLabels** | **Array<string>** | Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. | (optional) defaults to undefined + **excludeAnyLabels** | **Array<string>** | Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. | (optional) defaults to undefined + **address** | [**string**] | Only include UTXOs from this specific address. Requires the UTXO Manager. | (optional) defaults to undefined + **minAmount** | [**string**] | Minimum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. | (optional) defaults to undefined + **maxAmount** | [**string**] | Maximum UTXO amount in the asset\'s base unit. Requires the UTXO Manager. | (optional) defaults to undefined ### Return type diff --git a/docs/models/FeeInfo.md b/docs/models/FeeInfo.md index d8b777f..681cbe0 100644 --- a/docs/models/FeeInfo.md +++ b/docs/models/FeeInfo.md @@ -14,6 +14,8 @@ |**relayId** | **string** | The vault account ID of the relay | [optional] [default to undefined]| |**relayName** | **string** | The name of the tenant, only for THIRD_PARTY relays | [optional] [default to undefined]| |**feeUSD** | **string** | The USD value of the fee | [optional] [default to undefined]| +|**sender** | [**RoleFeeInfo**](RoleFeeInfo.md) | | [optional] [default to undefined]| +|**recipient** | [**RoleFeeInfo**](RoleFeeInfo.md) | | [optional] [default to undefined]| ## Enum: FeeInfoRelayTypeEnum diff --git a/docs/models/RoleFeeInfo.md b/docs/models/RoleFeeInfo.md new file mode 100644 index 0000000..a955a21 --- /dev/null +++ b/docs/models/RoleFeeInfo.md @@ -0,0 +1,13 @@ +# RoleFeeInfo + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**feesDeducted** | **string** | The total amount of TON deducted from the wallet because of the transfer, in TON, as a decimal string with nine decimals (like `networkFee`). - `sender` of a native TON transfer: the wallet\'s own fees plus the forwarding fees of the messages it sent. - `sender` of a Jetton (token) transfer: what the wallet actually lost. This is its own fees plus the TON it attached to cover the token wallets, minus any excess returned to it. If the excess is returned to the sender, the fee of receiving it is included. If the excess goes to any other wallet, the full attached TON is counted. When one external message carries several Jetton transfers (a multi-send), the loss is that of the whole message: every excess that came back to the wallet is subtracted. - `recipient` of a native TON transfer: the fees of the transaction that received the transfer, including gas. - `recipient` of a Jetton transfer: the fees of the notification transaction, usually a few nanoTON of storage fees. `\"0.000000000\"` when the transfer carried no forward amount, because the wallet then has no transaction of its own and pays nothing. | [optional] [default to undefined]| +|**valueCredited** | **string** | The gross amount of TON that arrived at the wallet together with the token notification (the forward amount), in TON, as a decimal string with nine decimals. Set only for the `recipient` of a Jetton (token) transfer, and omitted when the amount is zero or the notification bounced. `valueCredited` is not subtracted from `feesDeducted`. The net change of the wallet\'s TON balance caused by the transfer is `valueCredited` minus `feesDeducted`. | [optional] [default to undefined]| + + + + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/docs/models/TradeClass.md b/docs/models/TradeClass.md new file mode 100644 index 0000000..87d873d --- /dev/null +++ b/docs/models/TradeClass.md @@ -0,0 +1,28 @@ +# TradeClass + +## Enum + + +* `SwapDefi` (value: `'SWAP_DEFI'`) + +* `SwapCefi` (value: `'SWAP_CEFI'`) + +* `BridgeDefi` (value: `'BRIDGE_DEFI'`) + +* `BridgeCefi` (value: `'BRIDGE_CEFI'`) + +* `InternalLedger` (value: `'INTERNAL_LEDGER'`) + +* `OnRamp` (value: `'ON_RAMP'`) + +* `OffRamp` (value: `'OFF_RAMP'`) + +* `Fx` (value: `'FX'`) + +* `Otc` (value: `'OTC'`) + +* `Unknown` (value: `'UNKNOWN'`) + + + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/docs/models/TradingPair.md b/docs/models/TradingPair.md new file mode 100644 index 0000000..f35ac45 --- /dev/null +++ b/docs/models/TradingPair.md @@ -0,0 +1,24 @@ +# TradingPair + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**providerId** | **string** | The provider that supports this pair. | [default to undefined]| +|**baseAssetId** | **string** | Fireblocks asset ID of the base asset, or `*` for any asset on `baseChain`. A `*` value always comes with `baseChain` set. | [default to undefined]| +|**quoteAssetId** | **string** | Fireblocks asset ID of the quote asset, or `*` for any asset on `quoteChain`. A `*` value always comes with `quoteChain` set. | [default to undefined]| +|**side** | [**TradingPairSide**](TradingPairSide.md) | | [default to undefined]| +|**tradeClass** | [**TradeClass**](TradeClass.md) | | [default to undefined]| +|**accountId** | **string** | The connected account the pair is scoped to. Absent for direct-access providers, and for provider-level pairs that describe what a provider supports before any account is connected. Its absence therefore does not imply the provider is direct-access. | [optional] [default to undefined]| +|**baseChain** | **string** | Blockchain `legacyId` of the base asset (e.g. `ETH`, `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and virtual assets. | [optional] [default to undefined]| +|**quoteChain** | **string** | Blockchain `legacyId` of the quote asset (e.g. `ETH`, `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and virtual assets. | [optional] [default to undefined]| +|**baseAssetRail** | [**TransferRail**](TransferRail.md) | | [optional] [default to undefined]| +|**quoteAssetRail** | [**TransferRail**](TransferRail.md) | | [optional] [default to undefined]| +|**prefunded** | **boolean** | Whether the provider requires the funds to be prefunded on the provider account before the order can execute. | [optional] [default to undefined]| +|**min** | **string** | Minimum amount of the base asset for this pair/side, as a decimal string. | [optional] [default to undefined]| +|**max** | **string** | Maximum amount of the base asset for this pair/side, as a decimal string. | [optional] [default to undefined]| + + + + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/docs/models/TradingPairSide.md b/docs/models/TradingPairSide.md new file mode 100644 index 0000000..11f3ce2 --- /dev/null +++ b/docs/models/TradingPairSide.md @@ -0,0 +1,14 @@ +# TradingPairSide + +## Enum + + +* `Buy` (value: `'BUY'`) + +* `Sell` (value: `'SELL'`) + +* `Both` (value: `'BOTH'`) + + + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/docs/models/TradingPairsListPage.md b/docs/models/TradingPairsListPage.md new file mode 100644 index 0000000..62a2473 --- /dev/null +++ b/docs/models/TradingPairsListPage.md @@ -0,0 +1,14 @@ +# TradingPairsListPage + +## Properties + +|Name | Type | Description | Notes| +|------------ | ------------- | ------------- | -------------| +|**data** | [**Array<TradingPair>**](TradingPair.md) | List of trading pairs. | [default to undefined]| +|**total** | **number** | Total number of trading pairs matching the query. Best-effort count; may be absent when results are aggregated across multiple providers. | [optional] [default to undefined]| +|**next** | **string** | A cursor for the next page of results, if available. | [optional] [default to undefined]| + + + + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/docs/models/TransactionResponse.md b/docs/models/TransactionResponse.md index ae8b3da..891a8e8 100644 --- a/docs/models/TransactionResponse.md +++ b/docs/models/TransactionResponse.md @@ -67,7 +67,7 @@ |**errorDescription** | **string** | The transaction\'s revert reason. This field will be returned when `subStatus` = \'SMART_CONTRACT_EXECUTION_FAILED\'. | [optional] [default to undefined]| |**replacedTxHash** | **string** | if the transaction is a replace by fee (RBF) transaction, this is the hash of the transsaction that was replaced | [optional] [default to undefined]| |**nonce** | **string** | blockchain nonce for the transaction | [optional] [default to undefined]| -|**blockchainInfo** | **object** | A JSON used to store additional data that is blockchain-specific. | [optional] [default to undefined]| +|**blockchainInfo** | **object** | A JSON used to store additional data that is blockchain-specific. **TON (Early Access).** For TON transfers the object contains: | Field | Description | | --- | --- | | `tonTransferType` | `NATIVE` for a TON transfer, `JETTON` for a token transfer. | | `hashes` | Hex hashes of the transfer: `externalIncoming`, and either `tonTransfer` (native) or `jettonTransfer` (Jetton). | | `messageContent` | The message body (comment) of the transfer, as a base64 string. | | `isFeeExcess` | `true` only on the transaction that records the excess TON returned by a Jetton transfer to one of your wallets other than the sender. That transaction is a plain native transfer to the wallet, its top-level `feeInfo` has only a `recipient` struct, like any regular recipient. Omitted otherwise. | | `feeBreakdowns` | The fee details of the wallets of your workspace in the transfer: one entry per wallet. Available when the feature is enabled for your workspace. The totals of each wallet are in the top-level `feeInfo` of the transaction, in its `sender` and `recipient` structs (`feesDeducted`, `valueCredited`). | All amounts inside `feeBreakdowns` are integer strings in **nanoTON** (1 TON = 1,000,000,000 nanoTON), unlike the top-level `feeInfo`, which is in TON. Each entry of `feeBreakdowns` contains: | Field | Description | | --- | --- | | `role` | `SENDER` or `RECIPIENT`: the role of the wallet in the transfer. | | `address` | The wallet, as `raw` and `userFriendly` addresses. | | `txHash` | The hash of the wallet\'s own on-chain transaction. Omitted for a Jetton `recipient` with no transaction of its own (see below). | | `feeBreakdown.totalOutMsgsForwardFees` | The sum of the forwarding fees of the messages sent by the wallet\'s transaction. | | `feeBreakdown.chainReported` | The fee components reported by the blockchain for the wallet\'s transaction: `totalFees`, `storageFees`, `gasFees`, `actionFees` and `forwardFees`, and, when applicable, `importFee`, `bounceFees` and `actionFine`. `totalFees` is the sum of `storageFees`, `importFee`, `gasFees`, `actionFees` and `bounceFees`. | | `feeBreakdown.fundingSpent` | The rest of the sender\'s loss beyond the fees in this entry: for a Jetton `sender`, the TON the wallet attached to fund the token wallets and did not get back; for a wallet that sends through a second transaction of its own (a Highload wallet), also the fees of that transaction. For the same wallet, `feeInfo.<role>.feesDeducted` = `totalFees` + `totalOutMsgsForwardFees` + `fundingSpent` (`fundingSpent` is 0 when absent), converted from nanoTON to TON. | A Jetton transfer sent without a forward amount sends the recipient no notification, so the recipient wallet has no transaction and pays nothing: its entry has no `txHash`, all its figures are `\"0\"` and `feeInfo.recipient.feesDeducted` is `\"0.000000000\"`. An amount that could not be established from on-chain data is reported as no entry and no struct in `feeInfo` for that role. Only the wallets that belong to the notified workspace appear in `feeBreakdowns`. A transfer between two wallets of your own workspace is a single transaction and carries an entry for each wallet (tell them apart by `role`), and the top-level `feeInfo` has both a `sender` and a `recipient` struct. `blockchainInfo` is kept to 2,048 characters. When a very long message pushes a TON transfer over that, the optional details are dropped to make it fit: `feeBreakdowns` go first when the message fits without them, `messageContent` goes when the breakdowns fit without it, and both go when neither does. The `hashes`, `tonTransferType`, `isFeeExcess` and the top-level `feeInfo` are always kept. Example of a Jetton transfer sent from one of your wallets (addresses and hashes are placeholders): ```json { \"tonTransferType\": \"JETTON\", \"hashes\": { \"externalIncoming\": \"0000000000000000000000000000000000000000000000000000000000000001\", \"jettonTransfer\": \"0000000000000000000000000000000000000000000000000000000000000002\" }, \"messageContent\": \"te6cckEBAQEAAgAAAEysuc0=\", \"feeBreakdowns\": [ { \"address\": { \"raw\": \"0:0000000000000000000000000000000000000000000000000000000000000003\", \"userFriendly\": \"0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" }, \"txHash\": \"0000000000000000000000000000000000000000000000000000000000000004\", \"feeBreakdown\": { \"totalOutMsgsForwardFees\": \"86046\", \"chainReported\": { \"totalFees\": \"475291\", \"storageFees\": \"1\", \"gasFees\": \"220534\", \"actionFees\": \"43022\", \"forwardFees\": \"129068\", \"importFee\": \"211734\" }, \"fundingSpent\": \"17125078\" } } ] } ``` | [optional] [default to undefined]| ## Enum: TransactionResponseAddressTypeEnum diff --git a/models/fee-info.ts b/models/fee-info.ts index d5f01ec..4161311 100644 --- a/models/fee-info.ts +++ b/models/fee-info.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { RoleFeeInfo } from './role-fee-info'; /** * Details of the transaction\'s fee. @@ -80,6 +83,18 @@ export interface FeeInfo { * @memberof FeeInfo */ 'feeUSD'?: string; + /** + * + * @type {RoleFeeInfo} + * @memberof FeeInfo + */ + 'sender'?: RoleFeeInfo; + /** + * + * @type {RoleFeeInfo} + * @memberof FeeInfo + */ + 'recipient'?: RoleFeeInfo; } export const FeeInfoRelayTypeEnum = { diff --git a/models/index.ts b/models/index.ts index 94751c3..b20d46b 100644 --- a/models/index.ts +++ b/models/index.ts @@ -896,6 +896,7 @@ export * from './rewards-info'; export * from './risk-level-enum'; export * from './role-details'; export * from './role-details2'; +export * from './role-fee-info'; export * from './role-grantee'; export * from './rule'; export * from './rule-action-enum'; @@ -1177,8 +1178,12 @@ export * from './tokens-paginated-response'; export * from './total-supply-item-dto'; export * from './total-supply-paged-response'; export * from './total-supply-paged-response2'; +export * from './trade-class'; export * from './trading-account-type'; export * from './trading-error-schema'; +export * from './trading-pair'; +export * from './trading-pair-side'; +export * from './trading-pairs-list-page'; export * from './trading-provider'; export * from './transaction'; export * from './transaction-configurations'; diff --git a/models/role-fee-info.ts b/models/role-fee-info.ts new file mode 100644 index 0000000..3c5347a --- /dev/null +++ b/models/role-fee-info.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * **Early Access.** What the transfer cost the Fireblocks wallet of one role (`sender` or `recipient`). Currently reported for TON only. Unlike `networkFee`, which describes the transfer as a whole, these amounts are always the cost to the wallet of that role, so the two can differ, for example for a `recipient`. + * @export + * @interface RoleFeeInfo + */ +export interface RoleFeeInfo { + /** + * The total amount of TON deducted from the wallet because of the transfer, in TON, as a decimal string with nine decimals (like `networkFee`). - `sender` of a native TON transfer: the wallet\'s own fees plus the forwarding fees of the messages it sent. - `sender` of a Jetton (token) transfer: what the wallet actually lost. This is its own fees plus the TON it attached to cover the token wallets, minus any excess returned to it. If the excess is returned to the sender, the fee of receiving it is included. If the excess goes to any other wallet, the full attached TON is counted. When one external message carries several Jetton transfers (a multi-send), the loss is that of the whole message: every excess that came back to the wallet is subtracted. - `recipient` of a native TON transfer: the fees of the transaction that received the transfer, including gas. - `recipient` of a Jetton transfer: the fees of the notification transaction, usually a few nanoTON of storage fees. `\"0.000000000\"` when the transfer carried no forward amount, because the wallet then has no transaction of its own and pays nothing. + * @type {string} + * @memberof RoleFeeInfo + */ + 'feesDeducted'?: string; + /** + * The gross amount of TON that arrived at the wallet together with the token notification (the forward amount), in TON, as a decimal string with nine decimals. Set only for the `recipient` of a Jetton (token) transfer, and omitted when the amount is zero or the notification bounced. `valueCredited` is not subtracted from `feesDeducted`. The net change of the wallet\'s TON balance caused by the transfer is `valueCredited` minus `feesDeducted`. + * @type {string} + * @memberof RoleFeeInfo + */ + 'valueCredited'?: string; +} + diff --git a/models/trade-class.ts b/models/trade-class.ts new file mode 100644 index 0000000..d480598 --- /dev/null +++ b/models/trade-class.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * The class of trade a pair represents, derived from the asset class of each leg, the chains those assets settle on, where the trade executes, and the trading side: * **SWAP_DEFI** - Exchange between two crypto assets on the same chain, executed on-chain * **SWAP_CEFI** - Exchange between two crypto assets on the same chain, executed through a provider account * **BRIDGE_DEFI** - Exchange between two crypto assets on different chains, executed on-chain * **BRIDGE_CEFI** - Exchange between two crypto assets on different chains, executed through a provider account * **INTERNAL_LEDGER** - Exchange between two crypto assets settled on a provider\'s internal ledger, within a single provider account. Not split by chain, because neither leg settles on-chain while the trade executes * **ON_RAMP** - Buying a crypto asset with a fiat asset * **OFF_RAMP** - Selling a crypto asset for a fiat asset * **FX** - Exchange between two fiat assets * **OTC** - A pair quoted by an OTC desk: firm, short-lived RFQ commitments against a dealer, executed on credit rather than against an order book. Takes precedence over the asset-class values, so an OTC desk selling USDC for USD is `OTC`, not `OFF_RAMP` * **UNKNOWN** - The class could not be resolved, e.g. when the chain of an asset could not be determined. Callers should not route on a pair with this class + * @export + * @enum {string} + */ + +export const TradeClass = { + SwapDefi: 'SWAP_DEFI', + SwapCefi: 'SWAP_CEFI', + BridgeDefi: 'BRIDGE_DEFI', + BridgeCefi: 'BRIDGE_CEFI', + InternalLedger: 'INTERNAL_LEDGER', + OnRamp: 'ON_RAMP', + OffRamp: 'OFF_RAMP', + Fx: 'FX', + Otc: 'OTC', + Unknown: 'UNKNOWN' +} as const; + +export type TradeClass = typeof TradeClass[keyof typeof TradeClass]; + + + diff --git a/models/trading-pair-side.ts b/models/trading-pair-side.ts new file mode 100644 index 0000000..443aeba --- /dev/null +++ b/models/trading-pair-side.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Side of a trading pair. Same as `Side`, plus `BOTH`, meaning the pair applies to both BUY and SELL. + * @export + * @enum {string} + */ + +export const TradingPairSide = { + Buy: 'BUY', + Sell: 'SELL', + Both: 'BOTH' +} as const; + +export type TradingPairSide = typeof TradingPairSide[keyof typeof TradingPairSide]; + + + diff --git a/models/trading-pair.ts b/models/trading-pair.ts new file mode 100644 index 0000000..0d1a259 --- /dev/null +++ b/models/trading-pair.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TradeClass } from './trade-class'; +// May contain unused imports in some cases +// @ts-ignore +import { TradingPairSide } from './trading-pair-side'; +// May contain unused imports in some cases +// @ts-ignore +import { TransferRail } from './transfer-rail'; + +/** + * A supported base/quote asset pair for a provider, optionally scoped to a specific connected account, for a given trading side (BUY/SELL, or `BOTH`), with the transfer rails and amount limits that apply to it. `baseAssetId` / `quoteAssetId` may be the wildcard `*`, meaning any asset on `baseChain` / `quoteChain`; such a row is not expanded. + * @export + * @interface TradingPair + */ +export interface TradingPair { + /** + * The provider that supports this pair. + * @type {string} + * @memberof TradingPair + */ + 'providerId': string; + /** + * Fireblocks asset ID of the base asset, or `*` for any asset on `baseChain`. A `*` value always comes with `baseChain` set. + * @type {string} + * @memberof TradingPair + */ + 'baseAssetId': string; + /** + * Fireblocks asset ID of the quote asset, or `*` for any asset on `quoteChain`. A `*` value always comes with `quoteChain` set. + * @type {string} + * @memberof TradingPair + */ + 'quoteAssetId': string; + /** + * + * @type {TradingPairSide} + * @memberof TradingPair + */ + 'side': TradingPairSide; + /** + * + * @type {TradeClass} + * @memberof TradingPair + */ + 'tradeClass': TradeClass; + /** + * The connected account the pair is scoped to. Absent for direct-access providers, and for provider-level pairs that describe what a provider supports before any account is connected. Its absence therefore does not imply the provider is direct-access. + * @type {string} + * @memberof TradingPair + */ + 'accountId'?: string; + /** + * Blockchain `legacyId` of the base asset (e.g. `ETH`, `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and virtual assets. + * @type {string} + * @memberof TradingPair + */ + 'baseChain'?: string; + /** + * Blockchain `legacyId` of the quote asset (e.g. `ETH`, `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and virtual assets. + * @type {string} + * @memberof TradingPair + */ + 'quoteChain'?: string; + /** + * + * @type {TransferRail} + * @memberof TradingPair + */ + 'baseAssetRail'?: TransferRail; + /** + * + * @type {TransferRail} + * @memberof TradingPair + */ + 'quoteAssetRail'?: TransferRail; + /** + * Whether the provider requires the funds to be prefunded on the provider account before the order can execute. + * @type {boolean} + * @memberof TradingPair + */ + 'prefunded'?: boolean; + /** + * Minimum amount of the base asset for this pair/side, as a decimal string. + * @type {string} + * @memberof TradingPair + */ + 'min'?: string; + /** + * Maximum amount of the base asset for this pair/side, as a decimal string. + * @type {string} + * @memberof TradingPair + */ + 'max'?: string; +} + + + diff --git a/models/trading-pairs-list-page.ts b/models/trading-pairs-list-page.ts new file mode 100644 index 0000000..da48ab1 --- /dev/null +++ b/models/trading-pairs-list-page.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { TradingPair } from './trading-pair'; + +/** + * + * @export + * @interface TradingPairsListPage + */ +export interface TradingPairsListPage { + /** + * List of trading pairs. + * @type {Array} + * @memberof TradingPairsListPage + */ + 'data': Array; + /** + * Total number of trading pairs matching the query. Best-effort count; may be absent when results are aggregated across multiple providers. + * @type {number} + * @memberof TradingPairsListPage + */ + 'total'?: number; + /** + * A cursor for the next page of results, if available. + * @type {string} + * @memberof TradingPairsListPage + */ + 'next'?: string | null; +} + diff --git a/models/transaction-response.ts b/models/transaction-response.ts index a52fb6b..c7ec7db 100644 --- a/models/transaction-response.ts +++ b/models/transaction-response.ts @@ -466,7 +466,7 @@ export interface TransactionResponse { */ 'nonce'?: string; /** - * A JSON used to store additional data that is blockchain-specific. + * A JSON used to store additional data that is blockchain-specific. **TON (Early Access).** For TON transfers the object contains: | Field | Description | | --- | --- | | `tonTransferType` | `NATIVE` for a TON transfer, `JETTON` for a token transfer. | | `hashes` | Hex hashes of the transfer: `externalIncoming`, and either `tonTransfer` (native) or `jettonTransfer` (Jetton). | | `messageContent` | The message body (comment) of the transfer, as a base64 string. | | `isFeeExcess` | `true` only on the transaction that records the excess TON returned by a Jetton transfer to one of your wallets other than the sender. That transaction is a plain native transfer to the wallet, its top-level `feeInfo` has only a `recipient` struct, like any regular recipient. Omitted otherwise. | | `feeBreakdowns` | The fee details of the wallets of your workspace in the transfer: one entry per wallet. Available when the feature is enabled for your workspace. The totals of each wallet are in the top-level `feeInfo` of the transaction, in its `sender` and `recipient` structs (`feesDeducted`, `valueCredited`). | All amounts inside `feeBreakdowns` are integer strings in **nanoTON** (1 TON = 1,000,000,000 nanoTON), unlike the top-level `feeInfo`, which is in TON. Each entry of `feeBreakdowns` contains: | Field | Description | | --- | --- | | `role` | `SENDER` or `RECIPIENT`: the role of the wallet in the transfer. | | `address` | The wallet, as `raw` and `userFriendly` addresses. | | `txHash` | The hash of the wallet\'s own on-chain transaction. Omitted for a Jetton `recipient` with no transaction of its own (see below). | | `feeBreakdown.totalOutMsgsForwardFees` | The sum of the forwarding fees of the messages sent by the wallet\'s transaction. | | `feeBreakdown.chainReported` | The fee components reported by the blockchain for the wallet\'s transaction: `totalFees`, `storageFees`, `gasFees`, `actionFees` and `forwardFees`, and, when applicable, `importFee`, `bounceFees` and `actionFine`. `totalFees` is the sum of `storageFees`, `importFee`, `gasFees`, `actionFees` and `bounceFees`. | | `feeBreakdown.fundingSpent` | The rest of the sender\'s loss beyond the fees in this entry: for a Jetton `sender`, the TON the wallet attached to fund the token wallets and did not get back; for a wallet that sends through a second transaction of its own (a Highload wallet), also the fees of that transaction. For the same wallet, `feeInfo..feesDeducted` = `totalFees` + `totalOutMsgsForwardFees` + `fundingSpent` (`fundingSpent` is 0 when absent), converted from nanoTON to TON. | A Jetton transfer sent without a forward amount sends the recipient no notification, so the recipient wallet has no transaction and pays nothing: its entry has no `txHash`, all its figures are `\"0\"` and `feeInfo.recipient.feesDeducted` is `\"0.000000000\"`. An amount that could not be established from on-chain data is reported as no entry and no struct in `feeInfo` for that role. Only the wallets that belong to the notified workspace appear in `feeBreakdowns`. A transfer between two wallets of your own workspace is a single transaction and carries an entry for each wallet (tell them apart by `role`), and the top-level `feeInfo` has both a `sender` and a `recipient` struct. `blockchainInfo` is kept to 2,048 characters. When a very long message pushes a TON transfer over that, the optional details are dropped to make it fit: `feeBreakdowns` go first when the message fits without them, `messageContent` goes when the breakdowns fit without it, and both go when neither does. The `hashes`, `tonTransferType`, `isFeeExcess` and the top-level `feeInfo` are always kept. Example of a Jetton transfer sent from one of your wallets (addresses and hashes are placeholders): ```json { \"tonTransferType\": \"JETTON\", \"hashes\": { \"externalIncoming\": \"0000000000000000000000000000000000000000000000000000000000000001\", \"jettonTransfer\": \"0000000000000000000000000000000000000000000000000000000000000002\" }, \"messageContent\": \"te6cckEBAQEAAgAAAEysuc0=\", \"feeBreakdowns\": [ { \"address\": { \"raw\": \"0:0000000000000000000000000000000000000000000000000000000000000003\", \"userFriendly\": \"0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" }, \"txHash\": \"0000000000000000000000000000000000000000000000000000000000000004\", \"feeBreakdown\": { \"totalOutMsgsForwardFees\": \"86046\", \"chainReported\": { \"totalFees\": \"475291\", \"storageFees\": \"1\", \"gasFees\": \"220534\", \"actionFees\": \"43022\", \"forwardFees\": \"129068\", \"importFee\": \"211734\" }, \"fundingSpent\": \"17125078\" } } ] } ``` * @type {object} * @memberof TransactionResponse */ diff --git a/models/utxo-input-selection.ts b/models/utxo-input-selection.ts index 42427f9..22d1ed1 100644 --- a/models/utxo-input-selection.ts +++ b/models/utxo-input-selection.ts @@ -18,7 +18,7 @@ import { UtxoInput } from './utxo-input'; /** - * Explicitly control which UTXOs to include or exclude. This feature is currently in beta and might be subject to changes. + * Explicitly control which UTXOs to include or exclude. * @export * @interface UtxoInputSelection */ diff --git a/models/utxo-selection-filters.ts b/models/utxo-selection-filters.ts index 9096400..bf97aab 100644 --- a/models/utxo-selection-filters.ts +++ b/models/utxo-selection-filters.ts @@ -15,7 +15,7 @@ /** - * Narrow the UTXO candidate pool. All specified filters are AND-ed together. This feature is currently in beta and might be subject to changes. + * Narrow the UTXO candidate pool. All specified filters are AND-ed together. * @export * @interface UtxoSelectionFilters */ diff --git a/models/utxo-selection-params.ts b/models/utxo-selection-params.ts index dedea8d..27fc3f0 100644 --- a/models/utxo-selection-params.ts +++ b/models/utxo-selection-params.ts @@ -21,7 +21,7 @@ import { UtxoInputSelection } from './utxo-input-selection'; import { UtxoSelectionFilters } from './utxo-selection-filters'; /** - * For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be used together with extraParameters.inputsSelection. This feature is currently in beta and might be subject to changes. + * For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be used together with extraParameters.inputsSelection. * @export * @interface UtxoSelectionParams */ diff --git a/package-lock.json b/package-lock.json index 5c0d611..542a22a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fireblocks/ts-sdk", - "version": "36.0.0", + "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@fireblocks/ts-sdk", - "version": "36.0.0", + "version": "0.0.0", "license": "MIT License", "dependencies": { "axios": "^1.15.2", @@ -1294,9 +1294,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.11.28", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.28.tgz", - "integrity": "sha512-br0LOmjJqr6Rt4AEkadbcNf67Zpo7EPwKsWbjnRrJIa1QYFHQBqM4C7F2WTbV8ahTEcg1Eo+Y0aWjjORInYFyA==", + "version": "2.11.30", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.30.tgz", + "integrity": "sha512-YJs6Pz17RMNv8HoyKREtCY38E3BV1nPkWVmIb+XN1uHC1Vqt3KZCH/uJH9ZKRoiKb/icZ6tvehyee6RZNbFfRA==", "dev": true, "license": "Apache-2.0", "bin": { @@ -1331,9 +1331,9 @@ } }, "node_modules/browserslist": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.3.tgz", - "integrity": "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==", + "version": "4.29.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.4.tgz", + "integrity": "sha512-2TcbbiwXEq+N0kD36tykpCfyyQigUXmuwNQbnPp4Xk4PX9JOqVIKjJlIDjpH7uY6tmRGoAd+apeT1p60T8wsdA==", "dev": true, "funding": [ { @@ -1351,11 +1351,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.11.26", - "caniuse-lite": "^1.0.30001813", - "electron-to-chromium": "^1.5.439", - "node-releases": "^2.0.57", - "update-browserslist-db": "^1.3.3" + "baseline-browser-mapping": "^2.11.29", + "caniuse-lite": "^1.0.30001816", + "electron-to-chromium": "^1.5.459", + "node-releases": "^2.0.59", + "update-browserslist-db": "^1.3.4" }, "bin": { "browserslist": "cli.js" @@ -1434,9 +1434,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001816", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001816.tgz", - "integrity": "sha512-+8Yx7BXCoqk6IF8yTicjfUR6D/ldJzdlsodlEOiOSPmhK844WIgk67/zIQaGAOxNkZyyvBlrRFnLvqKIoqbAFw==", + "version": "1.0.30001817", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001817.tgz", + "integrity": "sha512-uZ1JG80BwhtMalIAGPxPfmNhHyd/B/nTdr3hITWlRamSyAdUStP1Gop01e7SD5q6J90ixJvWDbvmiFVfDgn4bw==", "dev": true, "funding": [ { @@ -1715,9 +1715,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.456", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.456.tgz", - "integrity": "sha512-8hboqI6xesozteFb8aa7OGknvxUtTeRJLz0FoePysUEh/oWbddykIGdgpEJRbPRg/nIMfBf2DFos+H2MtvJl2A==", + "version": "1.5.462", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.462.tgz", + "integrity": "sha512-9qpCBlXPy5v7n1Q7WTO5rW2StI4WNQhl96HpgXRZLPlNoXAD0LbsQUflovQYAO44Yia073ISusqohncvGSMbGA==", "dev": true, "license": "ISC" }, @@ -1925,9 +1925,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", - "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.2.tgz", + "integrity": "sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==", "funding": [ { "type": "individual", @@ -3371,9 +3371,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.58", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.58.tgz", - "integrity": "sha512-BdiKAgbfRlvfMq/XzO/AF9NPmaA8a+YpLAyAFTVFBj3gARrAIfWvNq7Q7NE4se3KgFu0KkrvQMxTS0XVnsGzHg==", + "version": "2.0.59", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.59.tgz", + "integrity": "sha512-5qr2okC4ItAI0hG5SaV0HoYMpnM/Y6+Oqr7AmPYy/2uEoGvS+GbSKLeRxSS1uAdu59yz0ouzcuXievSgg///WA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 3d12f91..584251d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fireblocks/ts-sdk", - "version": "36.0.0", + "version": "0.0.0", "description": "OpenAPI client for @fireblocks/ts-sdk", "author": "Fireblocks SDK Generator", "repository": { diff --git a/tests/client.spec.ts b/tests/client.spec.ts index 2444dd5..db25d41 100644 --- a/tests/client.spec.ts +++ b/tests/client.spec.ts @@ -59,7 +59,7 @@ TokenizationApi, TradingApi, TransactionsApi, TravelRuleApi, -UTXOManagementBetaApi, +UTXOManagementApi, UserGroupsBetaApi, UsersApi, VaultsApi, @@ -122,7 +122,7 @@ let mockTokenizationApi: jest.Mock; let mockTradingApi: jest.Mock; let mockTransactionsApi: jest.Mock; let mockTravelRuleApi: jest.Mock; -let mockUTXOManagementBetaApi: jest.Mock; +let mockUTXOManagementApi: jest.Mock; let mockUserGroupsBetaApi: jest.Mock; let mockUsersApi: jest.Mock; let mockVaultsApi: jest.Mock; @@ -182,7 +182,7 @@ jest.mock('../api', () => { mockTradingApi = jest.fn(); mockTransactionsApi = jest.fn(); mockTravelRuleApi = jest.fn(); - mockUTXOManagementBetaApi = jest.fn(); + mockUTXOManagementApi = jest.fn(); mockUserGroupsBetaApi = jest.fn(); mockUsersApi = jest.fn(); mockVaultsApi = jest.fn(); @@ -243,7 +243,7 @@ jest.mock('../api', () => { TradingApi: mockTradingApi, TransactionsApi: mockTransactionsApi, TravelRuleApi: mockTravelRuleApi, - UTXOManagementBetaApi: mockUTXOManagementBetaApi, + UTXOManagementApi: mockUTXOManagementApi, UserGroupsBetaApi: mockUserGroupsBetaApi, UsersApi: mockUsersApi, VaultsApi: mockVaultsApi, @@ -524,9 +524,9 @@ describe("Fireblocks Client Tests", () => { expect(fireblocks.travelRule).toBeInstanceOf(TravelRuleApi); expect(mockTravelRuleApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); - it('Should return UTXOManagementBetaApi', async () => { - expect(fireblocks.utxoManagementBeta).toBeInstanceOf(UTXOManagementBetaApi); - expect(mockUTXOManagementBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); + it('Should return UTXOManagementApi', async () => { + expect(fireblocks.utxoManagement).toBeInstanceOf(UTXOManagementApi); + expect(mockUTXOManagementApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return UserGroupsBetaApi', async () => { expect(fireblocks.userGroupsBeta).toBeInstanceOf(UserGroupsBetaApi);