@gearbox-protocol/sdk 14.12.0-next.80 → 14.12.0-next.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/model/filters.js +0 -4
- package/dist/cjs/model/filters.schema.js +10 -1
- package/dist/cjs/model/index.js +11 -0
- package/dist/cjs/model/liquidations.js +1 -1
- package/dist/cjs/model/liquidations.schema.js +1 -1
- package/dist/cjs/model/opportunities.js +1 -1
- package/dist/cjs/model/opportunities.schema.js +6 -13
- package/dist/cjs/model/positions.js +1 -1
- package/dist/cjs/model/positions.schema.js +33 -1
- package/dist/cjs/model/response.js +1 -0
- package/dist/cjs/model/response.schema.js +64 -0
- package/dist/cjs/new-sdk/AbstractNamespace.js +46 -128
- package/dist/cjs/new-sdk/GearboxSDK.js +55 -42
- package/dist/cjs/new-sdk/errors/AllSourcesFailedError.js +20 -0
- package/dist/cjs/new-sdk/errors/MissingSourceError.js +25 -0
- package/dist/cjs/new-sdk/errors/NoSourceServedError.js +20 -0
- package/dist/cjs/new-sdk/errors/SourceChainMismatchError.js +34 -0
- package/dist/cjs/new-sdk/errors/SourceUnavailableError.js +25 -0
- package/dist/cjs/new-sdk/errors/assertSameChains.js +12 -0
- package/dist/cjs/new-sdk/errors/everyChainFailed.js +11 -0
- package/dist/cjs/new-sdk/errors/index.js +15 -0
- package/dist/cjs/new-sdk/index.js +23 -3
- package/dist/cjs/new-sdk/opportunities/OpportunitiesNamespace.js +37 -89
- package/dist/cjs/new-sdk/positions/PositionsNamespace.js +27 -94
- package/dist/cjs/new-sdk/types.js +0 -21
- package/dist/cjs/new-sdk/utils/filterResponse.js +21 -0
- package/dist/cjs/new-sdk/utils/index.js +6 -0
- package/dist/cjs/new-sdk/utils/mergeChains.js +81 -0
- package/dist/cjs/new-sdk/utils/types.js +1 -0
- package/dist/cjs/offchain/AbstractOffchainNamespace.js +42 -65
- package/dist/cjs/offchain/GearboxAPI.js +12 -8
- package/dist/cjs/offchain/errors/OffchainInvalidJsonError.js +19 -0
- package/dist/cjs/offchain/errors/OffchainNotConfiguredError.js +20 -0
- package/dist/cjs/offchain/errors/OffchainNotImplementedError.js +19 -0
- package/dist/cjs/offchain/errors/OffchainRequestFailedError.js +24 -0
- package/dist/cjs/offchain/errors/OffchainStatusError.js +20 -0
- package/dist/cjs/offchain/errors/OffchainTransportError.js +31 -0
- package/dist/cjs/offchain/errors/OffchainValidationError.js +26 -0
- package/dist/cjs/offchain/errors/backendMessage.js +28 -0
- package/dist/cjs/offchain/errors/errorCause.js +12 -0
- package/dist/cjs/offchain/errors/index.js +21 -0
- package/dist/cjs/offchain/errors/readResponseBody.js +15 -0
- package/dist/cjs/offchain/index.js +22 -5
- package/dist/cjs/offchain/opportunities/OffchainOpportunities.js +6 -3
- package/dist/cjs/offchain/positions/OffchainPositions.js +15 -21
- package/dist/cjs/offchain/types.js +0 -75
- package/dist/cjs/sdk/MultichainSDK.js +1 -1
- package/dist/cjs/sdk/OnchainSDK.js +1 -1
- package/dist/cjs/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +6 -6
- package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +26 -20
- package/dist/cjs/sdk/accounts/liquidations/MultichainLiquidationsService.js +38 -14
- package/dist/cjs/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +7 -5
- package/dist/cjs/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +3 -2
- package/dist/cjs/sdk/base/MultichainConstruct.js +73 -34
- package/dist/cjs/sdk/chain/chains.js +11 -0
- package/dist/cjs/sdk/chain/index.js +1 -0
- package/dist/cjs/sdk/core/index.js +1 -1
- package/dist/cjs/sdk/index.js +2 -1
- package/dist/cjs/sdk/market/rwa/RWARegistry.js +4 -2
- package/dist/cjs/sdk/opportunities/MultichainOpportunitiesService.js +18 -32
- package/dist/cjs/sdk/opportunities/OpportunitiesService.js +1 -4
- package/dist/cjs/sdk/pools/PoolService.js +2 -1
- package/dist/cjs/sdk/positions/MultichainPositionsService.js +6 -29
- package/dist/cjs/sdk/positions/PositionsService.js +12 -6
- package/dist/esm/dev/AccountOpener.js +1 -1
- package/dist/esm/dev/withdrawalUtils.js +1 -1
- package/dist/esm/model/filters.js +0 -4
- package/dist/esm/model/filters.schema.js +10 -2
- package/dist/esm/model/index.js +5 -3
- package/dist/esm/model/liquidations.js +1 -1
- package/dist/esm/model/liquidations.schema.js +1 -1
- package/dist/esm/model/opportunities.js +1 -1
- package/dist/esm/model/opportunities.schema.js +4 -11
- package/dist/esm/model/positions.js +1 -1
- package/dist/esm/model/positions.schema.js +33 -3
- package/dist/esm/model/response.js +1 -0
- package/dist/esm/model/response.schema.js +58 -0
- package/dist/esm/new-sdk/AbstractNamespace.js +46 -128
- package/dist/esm/new-sdk/GearboxSDK.js +55 -42
- package/dist/esm/new-sdk/errors/AllSourcesFailedError.js +19 -0
- package/dist/esm/new-sdk/errors/MissingSourceError.js +24 -0
- package/dist/esm/new-sdk/errors/NoSourceServedError.js +19 -0
- package/dist/esm/new-sdk/errors/SourceChainMismatchError.js +33 -0
- package/dist/esm/new-sdk/errors/SourceUnavailableError.js +24 -0
- package/dist/esm/new-sdk/errors/assertSameChains.js +11 -0
- package/dist/esm/new-sdk/errors/everyChainFailed.js +10 -0
- package/dist/esm/new-sdk/errors/index.js +8 -0
- package/dist/esm/new-sdk/index.js +13 -3
- package/dist/esm/new-sdk/opportunities/OpportunitiesNamespace.js +38 -90
- package/dist/esm/new-sdk/positions/PositionsNamespace.js +28 -95
- package/dist/esm/new-sdk/types.js +1 -21
- package/dist/esm/new-sdk/utils/filterResponse.js +20 -0
- package/dist/esm/new-sdk/utils/index.js +3 -1
- package/dist/esm/new-sdk/utils/mergeChains.js +78 -0
- package/dist/esm/new-sdk/utils/types.js +1 -0
- package/dist/esm/offchain/AbstractOffchainNamespace.js +41 -64
- package/dist/esm/offchain/GearboxAPI.js +12 -8
- package/dist/esm/offchain/errors/OffchainInvalidJsonError.js +18 -0
- package/dist/esm/offchain/errors/OffchainNotConfiguredError.js +19 -0
- package/dist/esm/offchain/errors/OffchainNotImplementedError.js +18 -0
- package/dist/esm/offchain/errors/OffchainRequestFailedError.js +23 -0
- package/dist/esm/offchain/errors/OffchainStatusError.js +19 -0
- package/dist/esm/offchain/errors/OffchainTransportError.js +30 -0
- package/dist/esm/offchain/errors/OffchainValidationError.js +25 -0
- package/dist/esm/offchain/errors/backendMessage.js +27 -0
- package/dist/esm/offchain/errors/errorCause.js +11 -0
- package/dist/esm/offchain/errors/index.js +11 -0
- package/dist/esm/offchain/errors/readResponseBody.js +14 -0
- package/dist/esm/offchain/index.js +13 -2
- package/dist/esm/offchain/opportunities/OffchainOpportunities.js +6 -3
- package/dist/esm/offchain/positions/OffchainPositions.js +15 -21
- package/dist/esm/offchain/types.js +1 -72
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
- package/dist/esm/preview/trace/extractTransfers.js +1 -1
- package/dist/esm/sdk/MultichainSDK.js +1 -1
- package/dist/esm/sdk/OnchainSDK.js +1 -1
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +2 -2
- package/dist/esm/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +6 -6
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +27 -21
- package/dist/esm/sdk/accounts/liquidations/MultichainLiquidationsService.js +38 -14
- package/dist/esm/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +7 -5
- package/dist/esm/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +4 -3
- package/dist/esm/sdk/base/MultichainConstruct.js +73 -34
- package/dist/esm/sdk/base/TokensMeta.js +2 -2
- package/dist/esm/sdk/chain/chains.js +11 -1
- package/dist/esm/sdk/chain/detectNetwork.js +1 -1
- package/dist/esm/sdk/chain/index.js +2 -2
- package/dist/esm/sdk/core/createAddressProvider.js +1 -1
- package/dist/esm/sdk/core/index.js +1 -1
- package/dist/esm/sdk/index.js +3 -3
- package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +1 -1
- package/dist/esm/sdk/market/rwa/RWARegistry.js +4 -2
- package/dist/esm/sdk/market/zapper/IETHZapperContract.js +1 -1
- package/dist/esm/sdk/market/zapper/ZapperContract.js +1 -1
- package/dist/esm/sdk/opportunities/MultichainOpportunitiesService.js +18 -32
- package/dist/esm/sdk/opportunities/OpportunitiesService.js +1 -4
- package/dist/esm/sdk/pools/PoolService.js +3 -2
- package/dist/esm/sdk/positions/MultichainPositionsService.js +6 -29
- package/dist/esm/sdk/positions/PositionsService.js +12 -6
- package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/types/model/filters.d.ts +9 -3
- package/dist/types/model/filters.schema.d.ts +7 -1
- package/dist/types/model/index.d.ts +7 -5
- package/dist/types/model/liquidations.d.ts +2 -6
- package/dist/types/model/liquidations.schema.d.ts +1 -1
- package/dist/types/model/opportunities.d.ts +3 -7
- package/dist/types/model/opportunities.schema.d.ts +2 -2
- package/dist/types/model/positions.d.ts +2 -6
- package/dist/types/model/positions.schema.d.ts +32 -2
- package/dist/types/model/response.d.ts +105 -0
- package/dist/types/model/response.schema.d.ts +98 -0
- package/dist/types/new-sdk/AbstractNamespace.d.ts +33 -98
- package/dist/types/new-sdk/GearboxSDK.d.ts +10 -25
- package/dist/types/new-sdk/errors/AllSourcesFailedError.d.ts +11 -0
- package/dist/types/new-sdk/errors/MissingSourceError.d.ts +23 -0
- package/dist/types/new-sdk/errors/NoSourceServedError.d.ts +17 -0
- package/dist/types/new-sdk/errors/SourceChainMismatchError.d.ts +35 -0
- package/dist/types/new-sdk/errors/SourceUnavailableError.d.ts +22 -0
- package/dist/types/new-sdk/errors/assertSameChains.d.ts +11 -0
- package/dist/types/new-sdk/errors/everyChainFailed.d.ts +10 -0
- package/dist/types/new-sdk/errors/index.d.ts +8 -0
- package/dist/types/new-sdk/index.d.ts +17 -6
- package/dist/types/new-sdk/opportunities/OpportunitiesNamespace.d.ts +19 -40
- package/dist/types/new-sdk/opportunities/index.d.ts +2 -2
- package/dist/types/new-sdk/opportunities/types.d.ts +80 -26
- package/dist/types/new-sdk/positions/PositionsNamespace.d.ts +17 -38
- package/dist/types/new-sdk/positions/index.d.ts +2 -2
- package/dist/types/new-sdk/positions/types.d.ts +74 -24
- package/dist/types/new-sdk/types.d.ts +24 -77
- package/dist/types/new-sdk/utils/filterResponse.d.ts +16 -0
- package/dist/types/new-sdk/utils/history.d.ts +6 -36
- package/dist/types/new-sdk/utils/index.d.ts +5 -2
- package/dist/types/new-sdk/utils/mergeChains.d.ts +20 -0
- package/dist/types/new-sdk/utils/types.d.ts +11 -0
- package/dist/types/offchain/AbstractOffchainNamespace.d.ts +21 -28
- package/dist/types/offchain/GearboxAPI.d.ts +13 -9
- package/dist/types/offchain/errors/OffchainInvalidJsonError.d.ts +16 -0
- package/dist/types/offchain/errors/OffchainNotConfiguredError.d.ts +16 -0
- package/dist/types/offchain/errors/OffchainNotImplementedError.d.ts +15 -0
- package/dist/types/offchain/errors/OffchainRequestFailedError.d.ts +12 -0
- package/dist/types/offchain/errors/OffchainStatusError.d.ts +16 -0
- package/dist/types/offchain/errors/OffchainTransportError.d.ts +43 -0
- package/dist/types/offchain/errors/OffchainValidationError.d.ts +21 -0
- package/dist/types/offchain/errors/backendMessage.d.ts +9 -0
- package/dist/types/offchain/errors/errorCause.d.ts +22 -0
- package/dist/types/offchain/errors/index.d.ts +11 -0
- package/dist/types/offchain/errors/readResponseBody.d.ts +8 -0
- package/dist/types/offchain/index.d.ts +13 -2
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +9 -8
- package/dist/types/offchain/positions/OffchainPositions.d.ts +9 -15
- package/dist/types/offchain/types.d.ts +7 -88
- package/dist/types/sdk/accounts/credit-account-compressor/types.d.ts +4 -0
- package/dist/types/sdk/accounts/index.d.ts +3 -3
- package/dist/types/sdk/accounts/liquidations/LiquidationsService.d.ts +2 -2
- package/dist/types/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts +15 -14
- package/dist/types/sdk/accounts/liquidations/index.d.ts +2 -2
- package/dist/types/sdk/accounts/liquidations/types.d.ts +32 -16
- package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +4 -4
- package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +2 -2
- package/dist/types/sdk/accounts/withdrawal-compressor/index.d.ts +2 -2
- package/dist/types/sdk/accounts/withdrawal-compressor/types.d.ts +26 -4
- package/dist/types/sdk/base/MultichainConstruct.d.ts +63 -14
- package/dist/types/sdk/base/index.d.ts +2 -2
- package/dist/types/sdk/chain/chains.d.ts +10 -2
- package/dist/types/sdk/chain/index.d.ts +2 -2
- package/dist/types/sdk/index.d.ts +7 -7
- package/dist/types/sdk/market/MarketSuite.d.ts +1 -1
- package/dist/types/sdk/market/rwa/RWARegistry.d.ts +2 -1
- package/dist/types/sdk/opportunities/MultichainOpportunitiesService.d.ts +13 -16
- package/dist/types/sdk/pools/types.d.ts +4 -0
- package/dist/types/sdk/positions/MultichainPositionsService.d.ts +2 -12
- package/dist/types/sdk/positions/index.d.ts +2 -2
- package/dist/types/sdk/positions/types.d.ts +14 -5
- package/dist/types/sdk/types/index.d.ts +2 -2
- package/dist/types/sdk/types/multichain.d.ts +16 -36
- package/package.json +1 -1
|
@@ -1,119 +1,54 @@
|
|
|
1
1
|
import { ILogger } from "../sdk/types/logger.js";
|
|
2
|
-
import {
|
|
3
|
-
import { NetworkType } from "../sdk/chain/chains.js";
|
|
4
|
-
import { MultichainNetworkMeta } from "../sdk/types/multichain.js";
|
|
2
|
+
import { DataResponse } from "../model/response.js";
|
|
5
3
|
import "../model/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import "
|
|
8
|
-
import
|
|
9
|
-
import { GearboxAPI } from "../offchain/GearboxAPI.js";
|
|
10
|
-
import "../offchain/index.js";
|
|
11
|
-
import { OffchainSourceStatus, ReadResult, SourceMeta } from "./types.js";
|
|
4
|
+
import { NamespaceOptions } from "./types.js";
|
|
5
|
+
import { SourceMerger } from "./utils/types.js";
|
|
6
|
+
import "./utils/index.js";
|
|
12
7
|
//#region src/new-sdk/AbstractNamespace.d.ts
|
|
13
8
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
9
|
+
* One read of a combined namespace: the same query against each source, plus
|
|
10
|
+
* the policy that turns the two answers into one.
|
|
16
11
|
*
|
|
17
|
-
* @
|
|
12
|
+
* @typeParam Onchain - On-chain source namespace.
|
|
13
|
+
* @typeParam Offchain - Backend source namespace.
|
|
14
|
+
* @typeParam T - Payload type of the read.
|
|
18
15
|
**/
|
|
19
|
-
interface
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
interface MergedQuery<Onchain, Offchain, T> {
|
|
17
|
+
fromChain: (source: Onchain) => Promise<DataResponse<T>>;
|
|
18
|
+
fromBackend: (source: Offchain) => Promise<DataResponse<T>>;
|
|
19
|
+
merge: SourceMerger<T>;
|
|
22
20
|
}
|
|
23
21
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* Base class of every {@link GearboxSDK} namespace: holds the two source
|
|
23
|
+
* namespaces, exposes each on its own, and runs merged reads over both.
|
|
26
24
|
*
|
|
27
|
-
* @
|
|
25
|
+
* @typeParam Onchain - On-chain source namespace, e.g.
|
|
26
|
+
* `MultichainOpportunitiesService`.
|
|
27
|
+
* @typeParam Offchain - Backend source namespace, e.g. `OffchainOpportunities`.
|
|
28
28
|
**/
|
|
29
|
-
|
|
30
|
-
value?: T;
|
|
31
|
-
status?: OffchainSourceStatus;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* How a read turns the two contributions into one payload. Either side is
|
|
35
|
-
* absent when its source was not asked, or was asked and failed.
|
|
36
|
-
*
|
|
37
|
-
* @internal
|
|
38
|
-
**/
|
|
39
|
-
type CombineSources<T> = (onchain: T | undefined, offchain: T | undefined) => T;
|
|
40
|
-
/**
|
|
41
|
-
* Shared machinery of every {@link GearboxSDK} namespace.
|
|
42
|
-
*
|
|
43
|
-
* A namespace is a stateless router: it asks the sources its mode allows, in
|
|
44
|
-
* parallel, merges what came back and reports what did not. This class owns
|
|
45
|
-
* that routing — per-chain failure capture, backend degradation, the response
|
|
46
|
-
* envelope and the all-sources-failed rule — so a namespace holds nothing but
|
|
47
|
-
* its reads and its merge policy.
|
|
48
|
-
*
|
|
49
|
-
* The sources are whatever it was handed, and their readiness is their owner's
|
|
50
|
-
* business: a source that is not ready to answer fails the read it was given,
|
|
51
|
-
* and that failure is reported like any other.
|
|
52
|
-
*
|
|
53
|
-
* All protocol knowledge lives in the sources: `MultichainSDK` for the chain,
|
|
54
|
-
* `GearboxAPI` for the backend. None of it is repeated here or in a subclass.
|
|
55
|
-
*
|
|
56
|
-
* @typeParam ListRow - Row type of the namespace's list read.
|
|
57
|
-
**/
|
|
58
|
-
declare abstract class AbstractNamespace<ListRow extends object> {
|
|
29
|
+
declare abstract class AbstractNamespace<Onchain, Offchain> {
|
|
59
30
|
#private;
|
|
60
|
-
protected readonly logger?: ILogger;
|
|
61
|
-
protected constructor(name: string, onchain: MultichainSDK | undefined, offchain: GearboxAPI | undefined, logger?: ILogger);
|
|
62
|
-
/**
|
|
63
|
-
* Per-field source policy for one row of this namespace.
|
|
64
|
-
**/
|
|
65
|
-
protected abstract mergeOne<T extends object>(onchain: T, offchain: T): T;
|
|
66
|
-
/**
|
|
67
|
-
* Union policy for this namespace's list read.
|
|
68
|
-
**/
|
|
69
|
-
protected abstract mergeList(onchain: ListRow[], offchain: ListRow[]): ListRow[];
|
|
70
|
-
/**
|
|
71
|
-
* Asks both sources in parallel and combines whatever answered.
|
|
72
|
-
*
|
|
73
|
-
* The action name is only used in diagnostics and in the error raised when
|
|
74
|
-
* every source the read had failed.
|
|
75
|
-
**/
|
|
76
|
-
protected read<T>(action: string, fromChain: (sdk: MultichainSDK) => Promise<OnchainContribution<T>>, fromBackend: (api: GearboxAPI) => Promise<OffchainResult<T>>, combine: CombineSources<T>): Promise<ReadResult<T>>;
|
|
77
|
-
/**
|
|
78
|
-
* Reads the namespace's list from both sources, unioned by
|
|
79
|
-
* {@link AbstractNamespace.mergeList}.
|
|
80
|
-
**/
|
|
81
|
-
protected readList(action: string, fromChain: (sdk: MultichainSDK) => Promise<OnchainContribution<ListRow[]>>, fromBackend: (api: GearboxAPI) => Promise<OffchainResult<ListRow[]>>): Promise<ReadResult<ListRow[]>>;
|
|
82
|
-
/**
|
|
83
|
-
* Reads one row from both sources and merges them under
|
|
84
|
-
* {@link AbstractNamespace.mergeOne}. The key names the chain, so the
|
|
85
|
-
* on-chain leg queries exactly one.
|
|
86
|
-
**/
|
|
87
|
-
protected readOne<T extends object>(action: string, chainId: ChainId, fromChain: (sdk: MultichainSDK) => Promise<T>, fromBackend: (api: GearboxAPI) => Promise<OffchainResult<T>>): Promise<ReadResult<T>>;
|
|
88
31
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* The fallback stands in for a backend that answered with nothing, which is
|
|
92
|
-
* a different thing from a backend that failed and was dropped.
|
|
32
|
+
* How far the backend may lag the chain and still serve a chain.
|
|
93
33
|
**/
|
|
94
|
-
protected
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
* namespace has no on-chain source at all.
|
|
98
|
-
**/
|
|
99
|
-
protected fromChain<T>(run: (sdk: MultichainSDK) => Promise<OnchainContribution<T>>): Promise<OnchainContribution<T>>;
|
|
34
|
+
protected readonly maxOffchainLagSeconds: number;
|
|
35
|
+
protected readonly logger?: ILogger;
|
|
36
|
+
protected constructor(name: string, onchain: Onchain | undefined, offchain: Offchain | undefined, options: NamespaceOptions);
|
|
100
37
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
38
|
+
* The on-chain source namespace on its own. Throws
|
|
39
|
+
* {@link SourceUnavailableError} in `offchain` mode.
|
|
103
40
|
**/
|
|
104
|
-
|
|
41
|
+
get onchain(): Onchain;
|
|
105
42
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
43
|
+
* The backend source namespace on its own. Throws
|
|
44
|
+
* {@link SourceUnavailableError} in `onchain` mode.
|
|
108
45
|
**/
|
|
109
|
-
|
|
46
|
+
get offchain(): Offchain;
|
|
110
47
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* be indistinguishable from "there is nothing here".
|
|
48
|
+
* Asks both sources at once and merges what came back, failing only when no
|
|
49
|
+
* chain was served at all.
|
|
114
50
|
**/
|
|
115
|
-
protected
|
|
116
|
-
protected networkOf(chainId: ChainId): NetworkType | undefined;
|
|
51
|
+
protected merged<T>(action: string, query: MergedQuery<Onchain, Offchain, T>): Promise<DataResponse<T>>;
|
|
117
52
|
}
|
|
118
53
|
//#endregion
|
|
119
|
-
export { AbstractNamespace,
|
|
54
|
+
export { AbstractNamespace, MergedQuery };
|
|
@@ -7,12 +7,9 @@ import { Positions } from "./positions/types.js";
|
|
|
7
7
|
import "./positions/index.js";
|
|
8
8
|
//#region src/new-sdk/GearboxSDK.d.ts
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* The {@link Mode} is fixed at construction and decides which methods exist,
|
|
14
|
-
* not what they return, so a screen written against `both` cannot silently
|
|
15
|
-
* degrade to a subset when someone reconfigures the SDK:
|
|
10
|
+
* Entry point over both sources of Gearbox data: the chain and the Gearbox
|
|
11
|
+
* backend. The {@link Mode} is fixed at construction and decides which methods
|
|
12
|
+
* exist.
|
|
16
13
|
*
|
|
17
14
|
* ```ts
|
|
18
15
|
* const sdk = new GearboxSDK({
|
|
@@ -23,13 +20,9 @@ import "./positions/index.js";
|
|
|
23
20
|
* });
|
|
24
21
|
* await sdk.attach();
|
|
25
22
|
*
|
|
26
|
-
* const {
|
|
23
|
+
* const { data, meta } = await sdk.opportunities.list({ kind: "strategy" });
|
|
27
24
|
* ```
|
|
28
25
|
*
|
|
29
|
-
* Every read answers with `{ result, meta }`: `meta` says which chains and
|
|
30
|
-
* which backend answered, because a partial answer is the normal case for a
|
|
31
|
-
* multi-chain read.
|
|
32
|
-
*
|
|
33
26
|
* @typeParam M - Mode the instance was built in.
|
|
34
27
|
**/
|
|
35
28
|
declare class GearboxSDK<const M extends Mode = Mode> {
|
|
@@ -39,8 +32,7 @@ declare class GearboxSDK<const M extends Mode = Mode> {
|
|
|
39
32
|
**/
|
|
40
33
|
readonly mode: M;
|
|
41
34
|
/**
|
|
42
|
-
* Chains this instance covers
|
|
43
|
-
* SDK covers a different set.
|
|
35
|
+
* Chains this instance covers, which every read is scoped to.
|
|
44
36
|
**/
|
|
45
37
|
readonly networks: readonly NetworkType[];
|
|
46
38
|
/**
|
|
@@ -53,26 +45,19 @@ declare class GearboxSDK<const M extends Mode = Mode> {
|
|
|
53
45
|
readonly positions: Positions<M>;
|
|
54
46
|
constructor(options: GearboxSDKOptions<M>);
|
|
55
47
|
/**
|
|
56
|
-
* Attaches the on-chain SDK when this instance owns one
|
|
57
|
-
*
|
|
58
|
-
* Reads issued before this resolves still reach the chain and fail there, so
|
|
59
|
-
* in `both` mode they are served from the backend alone and report the chain
|
|
60
|
-
* as failed in their meta, rather than blocking.
|
|
61
|
-
*
|
|
62
|
-
* A no-op in `offchain` mode and when an already-attached SDK was injected.
|
|
48
|
+
* Attaches the on-chain SDK when this instance owns one; a no-op in `offchain`
|
|
49
|
+
* mode and when an already-attached SDK was injected.
|
|
63
50
|
**/
|
|
64
51
|
attach(): Promise<void>;
|
|
65
52
|
/**
|
|
66
53
|
* Whether the on-chain source is ready to be read from. Always `true` in
|
|
67
|
-
* `offchain` mode
|
|
54
|
+
* `offchain` mode.
|
|
68
55
|
**/
|
|
69
56
|
get attached(): boolean;
|
|
70
57
|
/**
|
|
71
58
|
* The underlying on-chain SDK, for everything this facade does not expose
|
|
72
|
-
* yet: markets, credit accounts, transaction building.
|
|
73
|
-
*
|
|
74
|
-
* `undefined` in `offchain` mode. Otherwise it exists from construction on,
|
|
75
|
-
* but only answers reads once {@link attach} has resolved.
|
|
59
|
+
* yet: markets, credit accounts, transaction building. `undefined` in
|
|
60
|
+
* `offchain` mode, and only answers reads once {@link attach} has resolved.
|
|
76
61
|
**/
|
|
77
62
|
get onchain(): OnchainByMode[M];
|
|
78
63
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ResponseMetadata } from "../../model/response.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
//#region src/new-sdk/errors/AllSourcesFailedError.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Thrown when a read had sources to ask and none of them served a single chain.
|
|
6
|
+
**/
|
|
7
|
+
declare class AllSourcesFailedError extends AggregateError {
|
|
8
|
+
constructor(action: string, sourceErrors: unknown[], meta?: ResponseMetadata);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AllSourcesFailedError };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DataSource } from "../../model/response.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
import { Mode } from "../types.js";
|
|
4
|
+
import { BaseError } from "viem";
|
|
5
|
+
//#region src/new-sdk/errors/MissingSourceError.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Thrown at construction when a {@link GearboxSDK} was not given a source its
|
|
8
|
+
* {@link Mode} reads from.
|
|
9
|
+
**/
|
|
10
|
+
declare class MissingSourceError extends BaseError {
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Mode the SDK was built in.
|
|
14
|
+
**/
|
|
15
|
+
readonly mode: Mode;
|
|
16
|
+
/**
|
|
17
|
+
* Source that mode needs and did not get.
|
|
18
|
+
**/
|
|
19
|
+
readonly source: DataSource;
|
|
20
|
+
constructor(mode: Mode, source: DataSource);
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { MissingSourceError };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChainId } from "../../model/primitives.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
//#region src/new-sdk/errors/NoSourceServedError.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The failure of a chain no source served. It is reported in that chain's
|
|
6
|
+
* metadata entry rather than thrown: the other chains of the same read may
|
|
7
|
+
* still have been served.
|
|
8
|
+
**/
|
|
9
|
+
declare class NoSourceServedError extends AggregateError {
|
|
10
|
+
/**
|
|
11
|
+
* Chain no source served.
|
|
12
|
+
**/
|
|
13
|
+
readonly chainId: ChainId;
|
|
14
|
+
constructor(chainId: ChainId, reasons: unknown[]);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { NoSourceServedError };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChainId } from "../../model/primitives.js";
|
|
2
|
+
import { NetworkType } from "../../sdk/chain/chains.js";
|
|
3
|
+
import { DataSource } from "../../model/response.js";
|
|
4
|
+
import "../../model/index.js";
|
|
5
|
+
import "../../sdk/index.js";
|
|
6
|
+
import { BaseError } from "viem";
|
|
7
|
+
//#region src/new-sdk/errors/SourceChainMismatchError.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* How a source names the chains it covers: by label or by id, depending on which
|
|
10
|
+
* of the two it was configured with.
|
|
11
|
+
**/
|
|
12
|
+
type ChainRef = NetworkType | ChainId;
|
|
13
|
+
/**
|
|
14
|
+
* Thrown at construction when a source covers anything other than exactly the
|
|
15
|
+
* chains a {@link GearboxSDK} was built for, see
|
|
16
|
+
* {@link GearboxSDKOptions.networks}.
|
|
17
|
+
**/
|
|
18
|
+
declare class SourceChainMismatchError extends BaseError {
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Source whose coverage does not match.
|
|
22
|
+
**/
|
|
23
|
+
readonly source: DataSource;
|
|
24
|
+
/**
|
|
25
|
+
* Chains the SDK covers.
|
|
26
|
+
**/
|
|
27
|
+
readonly expected: readonly ChainRef[];
|
|
28
|
+
/**
|
|
29
|
+
* Chains the source covers.
|
|
30
|
+
**/
|
|
31
|
+
readonly covered: readonly ChainRef[];
|
|
32
|
+
constructor(source: DataSource, expected: readonly ChainRef[], covered: readonly ChainRef[]);
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { ChainRef, SourceChainMismatchError };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DataSource } from "../../model/response.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
import { BaseError } from "viem";
|
|
4
|
+
//#region src/new-sdk/errors/SourceUnavailableError.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Thrown when a source branch of a namespace is read in a mode that has no such
|
|
7
|
+
* source, e.g. `sdk.opportunities.onchain` in `offchain` mode.
|
|
8
|
+
**/
|
|
9
|
+
declare class SourceUnavailableError extends BaseError {
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Namespace whose branch was read.
|
|
13
|
+
**/
|
|
14
|
+
readonly namespace: string;
|
|
15
|
+
/**
|
|
16
|
+
* Source this mode does not read.
|
|
17
|
+
**/
|
|
18
|
+
readonly source: DataSource;
|
|
19
|
+
constructor(namespace: string, source: DataSource);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { SourceUnavailableError };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataSource } from "../../model/response.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
import { ChainRef } from "./SourceChainMismatchError.js";
|
|
4
|
+
//#region src/new-sdk/errors/assertSameChains.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Rejects a source covering anything other than exactly the chains the SDK was
|
|
7
|
+
* built for. A source is not narrowed to them: it has to name them.
|
|
8
|
+
**/
|
|
9
|
+
declare function assertSameChains<T extends ChainRef>(source: DataSource, expected: readonly T[], covered: readonly T[]): void;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { assertSameChains };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResponseMetadata } from "../../model/response.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
//#region src/new-sdk/errors/everyChainFailed.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Whether a merged envelope covered chains and lost every one of them, which is
|
|
6
|
+
* what makes a read a failure rather than a partial result.
|
|
7
|
+
**/
|
|
8
|
+
declare function everyChainFailed(meta: ResponseMetadata): boolean;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { everyChainFailed };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AllSourcesFailedError } from "./AllSourcesFailedError.js";
|
|
2
|
+
import { MissingSourceError } from "./MissingSourceError.js";
|
|
3
|
+
import { NoSourceServedError } from "./NoSourceServedError.js";
|
|
4
|
+
import { ChainRef, SourceChainMismatchError } from "./SourceChainMismatchError.js";
|
|
5
|
+
import { SourceUnavailableError } from "./SourceUnavailableError.js";
|
|
6
|
+
import { assertSameChains } from "./assertSameChains.js";
|
|
7
|
+
import { everyChainFailed } from "./everyChainFailed.js";
|
|
8
|
+
export { AllSourcesFailedError, ChainRef, MissingSourceError, NoSourceServedError, SourceChainMismatchError, SourceUnavailableError, assertSameChains, everyChainFailed };
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { GearboxSDKOptions, Mode, NamespaceOptions, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, PlainMultichainSDKOptions } from "./types.js";
|
|
2
|
+
import { filterResponse } from "./utils/filterResponse.js";
|
|
3
|
+
import { HistoryReader } from "./utils/history.js";
|
|
4
|
+
import { DEFAULT_MAX_OFFCHAIN_LAG, mergeChainList, mergeChainOne } from "./utils/mergeChains.js";
|
|
5
|
+
import { SourceMerger } from "./utils/types.js";
|
|
4
6
|
import "./utils/index.js";
|
|
5
|
-
import {
|
|
7
|
+
import { AbstractNamespace, MergedQuery } from "./AbstractNamespace.js";
|
|
8
|
+
import { Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesMerged, OpportunitiesOffchainBranch, OpportunitiesOffchainOnly, OpportunitiesOnchainBranch, OpportunitiesOnchainOnly, OpportunityMergers } from "./opportunities/types.js";
|
|
6
9
|
import { OpportunitiesNamespace } from "./opportunities/OpportunitiesNamespace.js";
|
|
7
10
|
import "./opportunities/index.js";
|
|
8
|
-
import { Positions, PositionsBase, PositionsByMode, PositionsOffchainOnly, PositionsOnchainOnly } from "./positions/types.js";
|
|
11
|
+
import { PositionMergers, Positions, PositionsBase, PositionsByMode, PositionsMerged, PositionsOffchainBranch, PositionsOffchainOnly, PositionsOnchainBranch, PositionsOnchainOnly } from "./positions/types.js";
|
|
9
12
|
import { PositionsNamespace } from "./positions/PositionsNamespace.js";
|
|
10
13
|
import "./positions/index.js";
|
|
11
14
|
import { GearboxSDK } from "./GearboxSDK.js";
|
|
12
|
-
|
|
15
|
+
import { AllSourcesFailedError } from "./errors/AllSourcesFailedError.js";
|
|
16
|
+
import { MissingSourceError } from "./errors/MissingSourceError.js";
|
|
17
|
+
import { NoSourceServedError } from "./errors/NoSourceServedError.js";
|
|
18
|
+
import { ChainRef, SourceChainMismatchError } from "./errors/SourceChainMismatchError.js";
|
|
19
|
+
import { SourceUnavailableError } from "./errors/SourceUnavailableError.js";
|
|
20
|
+
import { assertSameChains } from "./errors/assertSameChains.js";
|
|
21
|
+
import { everyChainFailed } from "./errors/everyChainFailed.js";
|
|
22
|
+
import "./errors/index.js";
|
|
23
|
+
export { AbstractNamespace, AllSourcesFailedError, ChainRef, DEFAULT_MAX_OFFCHAIN_LAG, GearboxSDK, GearboxSDKOptions, HistoryReader, MergedQuery, MissingSourceError, Mode, NamespaceOptions, NoSourceServedError, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesMerged, OpportunitiesNamespace, OpportunitiesOffchainBranch, OpportunitiesOffchainOnly, OpportunitiesOnchainBranch, OpportunitiesOnchainOnly, OpportunityMergers, PlainMultichainSDKOptions, PositionMergers, Positions, PositionsBase, PositionsByMode, PositionsMerged, PositionsNamespace, PositionsOffchainBranch, PositionsOffchainOnly, PositionsOnchainBranch, PositionsOnchainOnly, SourceChainMismatchError, type SourceMerger, SourceUnavailableError, assertSameChains, everyChainFailed, filterResponse, mergeChainList, mergeChainOne };
|
|
@@ -1,69 +1,48 @@
|
|
|
1
|
-
import { ILogger } from "../../sdk/types/logger.js";
|
|
2
1
|
import { Opportunity, OpportunityFilter, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef } from "../../model/opportunities.js";
|
|
3
2
|
import { PoolHistoryMetric, StrategyHistoryMetric } from "../../model/history.js";
|
|
3
|
+
import { DataResponse } from "../../model/response.js";
|
|
4
4
|
import "../../model/index.js";
|
|
5
5
|
import { MultichainSDK } from "../../sdk/MultichainSDK.js";
|
|
6
6
|
import "../../sdk/index.js";
|
|
7
7
|
import { GearboxAPI } from "../../offchain/GearboxAPI.js";
|
|
8
8
|
import "../../offchain/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { AbstractNamespace } from "../AbstractNamespace.js";
|
|
9
|
+
import { NamespaceOptions } from "../types.js";
|
|
11
10
|
import { HistoryReader } from "../utils/history.js";
|
|
12
11
|
import "../utils/index.js";
|
|
13
|
-
import {
|
|
12
|
+
import { AbstractNamespace } from "../AbstractNamespace.js";
|
|
13
|
+
import { OpportunitiesBase, OpportunitiesOffchainOnly, OpportunityMergers } from "./types.js";
|
|
14
14
|
//#region src/new-sdk/opportunities/OpportunitiesNamespace.d.ts
|
|
15
15
|
/**
|
|
16
|
-
* The `opportunities` namespace of
|
|
17
|
-
*
|
|
18
|
-
* A stateless router over the two sources, see {@link AbstractNamespace} for
|
|
19
|
-
* the routing itself. What is specific to opportunities is the reads below and
|
|
20
|
-
* the merge policy at the bottom of the class.
|
|
21
|
-
*
|
|
22
|
-
* The class implements the methods of every mode; {@link GearboxSDK} exposes it
|
|
23
|
-
* as its mode's slice of {@link OpportunitiesByMode}, so calling a method the
|
|
24
|
-
* mode does not have is a compile error rather than a runtime one.
|
|
16
|
+
* The `opportunities` namespace of a {@link GearboxSDK}, see
|
|
17
|
+
* {@link OpportunitiesByMode} for what each mode offers.
|
|
25
18
|
**/
|
|
26
|
-
declare class OpportunitiesNamespace extends AbstractNamespace<
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
declare class OpportunitiesNamespace extends AbstractNamespace<MultichainSDK["opportunities"], GearboxAPI["opportunities"]> implements OpportunitiesBase, OpportunitiesOffchainOnly {
|
|
20
|
+
/**
|
|
21
|
+
* {@inheritDoc OpportunitiesBase.merge}
|
|
22
|
+
**/
|
|
23
|
+
readonly merge: OpportunityMergers;
|
|
24
|
+
constructor(onchain: MultichainSDK | undefined, offchain: GearboxAPI | undefined, options: NamespaceOptions);
|
|
29
25
|
/**
|
|
30
26
|
* {@inheritDoc OpportunitiesBase.list}
|
|
31
27
|
**/
|
|
32
|
-
list(filter?: OpportunityFilter): Promise<
|
|
28
|
+
list(filter?: OpportunityFilter): Promise<DataResponse<Opportunity[]>>;
|
|
33
29
|
/**
|
|
34
30
|
* {@inheritDoc OpportunitiesBase.getPool}
|
|
35
31
|
**/
|
|
36
|
-
getPool(key: PoolOpportunityKey): Promise<
|
|
32
|
+
getPool(key: PoolOpportunityKey): Promise<DataResponse<PoolOpportunityDetail>>;
|
|
37
33
|
/**
|
|
38
34
|
* {@inheritDoc OpportunitiesBase.getStrategy}
|
|
39
35
|
**/
|
|
40
|
-
getStrategy(key: StrategyOpportunityKey): Promise<
|
|
36
|
+
getStrategy(key: StrategyOpportunityKey): Promise<DataResponse<StrategyOpportunityDetail>>;
|
|
37
|
+
/**
|
|
38
|
+
* {@inheritDoc OpportunitiesBase.filter}
|
|
39
|
+
**/
|
|
40
|
+
filter(response: DataResponse<Opportunity[]> | undefined, filter?: OpportunityFilter): DataResponse<Opportunity[]> | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* {@inheritDoc OpportunitiesOffchainOnly.history}
|
|
43
43
|
**/
|
|
44
44
|
history(key: PoolOpportunityRef): HistoryReader<PoolHistoryMetric>;
|
|
45
45
|
history(key: StrategyOpportunityRef): HistoryReader<StrategyHistoryMetric>;
|
|
46
|
-
/**
|
|
47
|
-
* Merges the two versions of one opportunity.
|
|
48
|
-
*
|
|
49
|
-
* The chain wins every field it fills; the backend fills the rest and owns
|
|
50
|
-
* {@link OFFCHAIN_OWNED_FIELDS}.
|
|
51
|
-
*
|
|
52
|
-
* The rule is onchain-first, field-wise, and never deeper than one level: a
|
|
53
|
-
* group like `totalSupply` or `supplyApy` is taken whole from one source, so
|
|
54
|
-
* a row never mixes an on-chain token amount with a backend dollar value
|
|
55
|
-
* derived from a different block.
|
|
56
|
-
**/
|
|
57
|
-
protected mergeOne<T extends object>(onchain: T, offchain: T): T;
|
|
58
|
-
/**
|
|
59
|
-
* Unions the two lists by canonical opportunity id.
|
|
60
|
-
*
|
|
61
|
-
* Rows present in both are merged by {@link OpportunitiesNamespace.mergeOne}.
|
|
62
|
-
* Rows only the backend knows are appended: a chain the SDK does not cover,
|
|
63
|
-
* or a market it has not loaded, is a reason to show more rather than fewer
|
|
64
|
-
* opportunities.
|
|
65
|
-
**/
|
|
66
|
-
protected mergeList(onchain: Opportunity[], offchain: Opportunity[]): Opportunity[];
|
|
67
46
|
}
|
|
68
47
|
//#endregion
|
|
69
48
|
export { OpportunitiesNamespace };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesOffchainOnly, OpportunitiesOnchainOnly } from "./types.js";
|
|
1
|
+
import { Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesMerged, OpportunitiesOffchainBranch, OpportunitiesOffchainOnly, OpportunitiesOnchainBranch, OpportunitiesOnchainOnly, OpportunityMergers } from "./types.js";
|
|
2
2
|
import { OpportunitiesNamespace } from "./OpportunitiesNamespace.js";
|
|
3
|
-
export { Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesNamespace, OpportunitiesOffchainOnly, OpportunitiesOnchainOnly };
|
|
3
|
+
export { Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesMerged, OpportunitiesNamespace, OpportunitiesOffchainBranch, OpportunitiesOffchainOnly, OpportunitiesOnchainBranch, OpportunitiesOnchainOnly, OpportunityMergers };
|