@circle-fin/app-kit 1.15.2 → 1.15.3
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/CHANGELOG.md +6 -0
- package/bridge.cjs +58 -15
- package/bridge.d.cts +71 -0
- package/bridge.d.mts +71 -0
- package/bridge.d.ts +71 -0
- package/bridge.mjs +58 -15
- package/context.d.cts +71 -0
- package/context.d.mts +71 -0
- package/context.d.ts +71 -0
- package/earn.cjs +382 -42
- package/earn.d.cts +19 -26
- package/earn.d.mts +19 -26
- package/earn.d.ts +19 -26
- package/earn.mjs +382 -42
- package/estimateBridge.cjs +58 -15
- package/estimateBridge.d.cts +71 -0
- package/estimateBridge.d.mts +71 -0
- package/estimateBridge.d.ts +71 -0
- package/estimateBridge.mjs +58 -15
- package/estimateSwap.cjs +58 -15
- package/estimateSwap.d.cts +71 -0
- package/estimateSwap.d.mts +71 -0
- package/estimateSwap.d.ts +71 -0
- package/estimateSwap.mjs +58 -15
- package/index.cjs +288 -60
- package/index.d.cts +184 -91
- package/index.d.mts +184 -91
- package/index.d.ts +184 -91
- package/index.mjs +288 -60
- package/package.json +3 -3
- package/server.cjs +13 -17
- package/server.d.cts +10 -9
- package/server.d.mts +10 -9
- package/server.d.ts +10 -9
- package/server.mjs +13 -17
- package/swap.cjs +58 -15
- package/swap.d.cts +71 -0
- package/swap.d.mts +71 -0
- package/swap.d.ts +71 -0
- package/swap.mjs +58 -15
package/earn.d.cts
CHANGED
|
@@ -6872,12 +6872,9 @@ interface CollateralInfo {
|
|
|
6872
6872
|
* (e.g., 0.6 = 60%).
|
|
6873
6873
|
*
|
|
6874
6874
|
* Populated for Morpho V1 vaults; `null` when the underlying product
|
|
6875
|
-
* exposes no per-market allocation (e.g. Morpho V2).
|
|
6876
|
-
* backend that predates this field omits it entirely, matching the other
|
|
6877
|
-
* optional facets on {@link EarnOpportunityBase}; a future release makes it
|
|
6878
|
-
* required once every backend emits it.
|
|
6875
|
+
* exposes no per-market allocation (e.g. Morpho V2).
|
|
6879
6876
|
*/
|
|
6880
|
-
readonly allocationPct
|
|
6877
|
+
readonly allocationPct: number | null;
|
|
6881
6878
|
}
|
|
6882
6879
|
/**
|
|
6883
6880
|
* Vault warning from the underlying earn protocol.
|
|
@@ -7047,19 +7044,19 @@ interface EarnOpportunityBase {
|
|
|
7047
7044
|
/** Reward tokens distributed by this opportunity. */
|
|
7048
7045
|
readonly rewards: readonly VaultRewardInfo[];
|
|
7049
7046
|
/** Primary on-chain address (protocol-neutral; replaces vaultAddress). */
|
|
7050
|
-
readonly address
|
|
7047
|
+
readonly address: string;
|
|
7051
7048
|
/** RFC3339 freshness timestamp: provider state ts, else cache sync time. */
|
|
7052
|
-
readonly asOf
|
|
7049
|
+
readonly asOf: string;
|
|
7053
7050
|
/** Manager/curator identity; `null` when the product has no manager. */
|
|
7054
|
-
readonly manager
|
|
7051
|
+
readonly manager: ManagerInfo | null;
|
|
7055
7052
|
/** Yield profile including trailing averages. */
|
|
7056
|
-
readonly apyProfile
|
|
7053
|
+
readonly apyProfile: ApyProfile;
|
|
7057
7054
|
/** Fee split. */
|
|
7058
|
-
readonly fee
|
|
7055
|
+
readonly fee: FeeInfo;
|
|
7059
7056
|
/** Liquidity profile. */
|
|
7060
|
-
readonly liquidityProfile
|
|
7057
|
+
readonly liquidityProfile: LiquidityProfile;
|
|
7061
7058
|
/** Risk signals. */
|
|
7062
|
-
readonly riskSignals
|
|
7059
|
+
readonly riskSignals: RiskSignals;
|
|
7063
7060
|
/** @deprecated use {@link EarnOpportunityBase.address} */
|
|
7064
7061
|
readonly vaultAddress: string;
|
|
7065
7062
|
/** @deprecated use {@link ApyProfile.current} via apyProfile */
|
|
@@ -7126,13 +7123,9 @@ interface VaultOpportunity extends EarnOpportunityBase {
|
|
|
7126
7123
|
/**
|
|
7127
7124
|
* Universal discriminator identifying the opportunity shape.
|
|
7128
7125
|
*
|
|
7129
|
-
*
|
|
7130
|
-
* the other optional facets — so this release stays source-compatible for
|
|
7131
|
-
* code that constructs the type. A future release makes it required once
|
|
7132
|
-
* every backend emits it. Always present on responses from an emitting
|
|
7133
|
-
* backend; narrow on it before reading product-specific fields.
|
|
7126
|
+
* Narrow on `productType` before reading product-specific fields.
|
|
7134
7127
|
*/
|
|
7135
|
-
readonly productType
|
|
7128
|
+
readonly productType: 'vault';
|
|
7136
7129
|
/** Collateral markets backing this vault. */
|
|
7137
7130
|
readonly collateral: readonly CollateralInfo[];
|
|
7138
7131
|
}
|
|
@@ -8158,6 +8151,12 @@ interface SameChainDepositParams<TFromAdapterCapabilities extends AdapterCapabil
|
|
|
8158
8151
|
* @example '100.50' for 100.50 USDC
|
|
8159
8152
|
*/
|
|
8160
8153
|
readonly amount: string;
|
|
8154
|
+
/**
|
|
8155
|
+
* Gas fee estimates from a prior {@link getDepositQuote} call. When provided,
|
|
8156
|
+
* the pre-broadcast gas reserve check uses the actual estimated cost instead
|
|
8157
|
+
* of the conservative fallback reserve.
|
|
8158
|
+
*/
|
|
8159
|
+
readonly gasFees?: readonly EarnGasFeeEstimate[] | undefined;
|
|
8161
8160
|
/** Optional earn configuration. */
|
|
8162
8161
|
readonly config?: EarnConfig | undefined;
|
|
8163
8162
|
}
|
|
@@ -8488,14 +8487,8 @@ type EarnVaultInfo = DistributiveOmit<EarnOpportunity, 'totalDeposits' | 'liquid
|
|
|
8488
8487
|
readonly totalDeposits: string;
|
|
8489
8488
|
/** Available liquidity in the vault in human-readable decimal format. */
|
|
8490
8489
|
readonly liquidity: string;
|
|
8491
|
-
/**
|
|
8492
|
-
|
|
8493
|
-
*
|
|
8494
|
-
* Optional during the expand/contract migration window: a backend that
|
|
8495
|
-
* predates the nested facets omits it, so it is absent until the response
|
|
8496
|
-
* carries it.
|
|
8497
|
-
*/
|
|
8498
|
-
readonly liquidityProfile?: EarnLiquidityProfile;
|
|
8490
|
+
/** Liquidity profile with amounts as human-readable decimal strings. */
|
|
8491
|
+
readonly liquidityProfile: EarnLiquidityProfile;
|
|
8499
8492
|
};
|
|
8500
8493
|
/** Result of a batch vault lookup. */
|
|
8501
8494
|
type EarnGetVaultsResult = Omit<GetVaultsResult, 'vaults'> & {
|
package/earn.d.mts
CHANGED
|
@@ -6872,12 +6872,9 @@ interface CollateralInfo {
|
|
|
6872
6872
|
* (e.g., 0.6 = 60%).
|
|
6873
6873
|
*
|
|
6874
6874
|
* Populated for Morpho V1 vaults; `null` when the underlying product
|
|
6875
|
-
* exposes no per-market allocation (e.g. Morpho V2).
|
|
6876
|
-
* backend that predates this field omits it entirely, matching the other
|
|
6877
|
-
* optional facets on {@link EarnOpportunityBase}; a future release makes it
|
|
6878
|
-
* required once every backend emits it.
|
|
6875
|
+
* exposes no per-market allocation (e.g. Morpho V2).
|
|
6879
6876
|
*/
|
|
6880
|
-
readonly allocationPct
|
|
6877
|
+
readonly allocationPct: number | null;
|
|
6881
6878
|
}
|
|
6882
6879
|
/**
|
|
6883
6880
|
* Vault warning from the underlying earn protocol.
|
|
@@ -7047,19 +7044,19 @@ interface EarnOpportunityBase {
|
|
|
7047
7044
|
/** Reward tokens distributed by this opportunity. */
|
|
7048
7045
|
readonly rewards: readonly VaultRewardInfo[];
|
|
7049
7046
|
/** Primary on-chain address (protocol-neutral; replaces vaultAddress). */
|
|
7050
|
-
readonly address
|
|
7047
|
+
readonly address: string;
|
|
7051
7048
|
/** RFC3339 freshness timestamp: provider state ts, else cache sync time. */
|
|
7052
|
-
readonly asOf
|
|
7049
|
+
readonly asOf: string;
|
|
7053
7050
|
/** Manager/curator identity; `null` when the product has no manager. */
|
|
7054
|
-
readonly manager
|
|
7051
|
+
readonly manager: ManagerInfo | null;
|
|
7055
7052
|
/** Yield profile including trailing averages. */
|
|
7056
|
-
readonly apyProfile
|
|
7053
|
+
readonly apyProfile: ApyProfile;
|
|
7057
7054
|
/** Fee split. */
|
|
7058
|
-
readonly fee
|
|
7055
|
+
readonly fee: FeeInfo;
|
|
7059
7056
|
/** Liquidity profile. */
|
|
7060
|
-
readonly liquidityProfile
|
|
7057
|
+
readonly liquidityProfile: LiquidityProfile;
|
|
7061
7058
|
/** Risk signals. */
|
|
7062
|
-
readonly riskSignals
|
|
7059
|
+
readonly riskSignals: RiskSignals;
|
|
7063
7060
|
/** @deprecated use {@link EarnOpportunityBase.address} */
|
|
7064
7061
|
readonly vaultAddress: string;
|
|
7065
7062
|
/** @deprecated use {@link ApyProfile.current} via apyProfile */
|
|
@@ -7126,13 +7123,9 @@ interface VaultOpportunity extends EarnOpportunityBase {
|
|
|
7126
7123
|
/**
|
|
7127
7124
|
* Universal discriminator identifying the opportunity shape.
|
|
7128
7125
|
*
|
|
7129
|
-
*
|
|
7130
|
-
* the other optional facets — so this release stays source-compatible for
|
|
7131
|
-
* code that constructs the type. A future release makes it required once
|
|
7132
|
-
* every backend emits it. Always present on responses from an emitting
|
|
7133
|
-
* backend; narrow on it before reading product-specific fields.
|
|
7126
|
+
* Narrow on `productType` before reading product-specific fields.
|
|
7134
7127
|
*/
|
|
7135
|
-
readonly productType
|
|
7128
|
+
readonly productType: 'vault';
|
|
7136
7129
|
/** Collateral markets backing this vault. */
|
|
7137
7130
|
readonly collateral: readonly CollateralInfo[];
|
|
7138
7131
|
}
|
|
@@ -8158,6 +8151,12 @@ interface SameChainDepositParams<TFromAdapterCapabilities extends AdapterCapabil
|
|
|
8158
8151
|
* @example '100.50' for 100.50 USDC
|
|
8159
8152
|
*/
|
|
8160
8153
|
readonly amount: string;
|
|
8154
|
+
/**
|
|
8155
|
+
* Gas fee estimates from a prior {@link getDepositQuote} call. When provided,
|
|
8156
|
+
* the pre-broadcast gas reserve check uses the actual estimated cost instead
|
|
8157
|
+
* of the conservative fallback reserve.
|
|
8158
|
+
*/
|
|
8159
|
+
readonly gasFees?: readonly EarnGasFeeEstimate[] | undefined;
|
|
8161
8160
|
/** Optional earn configuration. */
|
|
8162
8161
|
readonly config?: EarnConfig | undefined;
|
|
8163
8162
|
}
|
|
@@ -8488,14 +8487,8 @@ type EarnVaultInfo = DistributiveOmit<EarnOpportunity, 'totalDeposits' | 'liquid
|
|
|
8488
8487
|
readonly totalDeposits: string;
|
|
8489
8488
|
/** Available liquidity in the vault in human-readable decimal format. */
|
|
8490
8489
|
readonly liquidity: string;
|
|
8491
|
-
/**
|
|
8492
|
-
|
|
8493
|
-
*
|
|
8494
|
-
* Optional during the expand/contract migration window: a backend that
|
|
8495
|
-
* predates the nested facets omits it, so it is absent until the response
|
|
8496
|
-
* carries it.
|
|
8497
|
-
*/
|
|
8498
|
-
readonly liquidityProfile?: EarnLiquidityProfile;
|
|
8490
|
+
/** Liquidity profile with amounts as human-readable decimal strings. */
|
|
8491
|
+
readonly liquidityProfile: EarnLiquidityProfile;
|
|
8499
8492
|
};
|
|
8500
8493
|
/** Result of a batch vault lookup. */
|
|
8501
8494
|
type EarnGetVaultsResult = Omit<GetVaultsResult, 'vaults'> & {
|
package/earn.d.ts
CHANGED
|
@@ -6872,12 +6872,9 @@ interface CollateralInfo {
|
|
|
6872
6872
|
* (e.g., 0.6 = 60%).
|
|
6873
6873
|
*
|
|
6874
6874
|
* Populated for Morpho V1 vaults; `null` when the underlying product
|
|
6875
|
-
* exposes no per-market allocation (e.g. Morpho V2).
|
|
6876
|
-
* backend that predates this field omits it entirely, matching the other
|
|
6877
|
-
* optional facets on {@link EarnOpportunityBase}; a future release makes it
|
|
6878
|
-
* required once every backend emits it.
|
|
6875
|
+
* exposes no per-market allocation (e.g. Morpho V2).
|
|
6879
6876
|
*/
|
|
6880
|
-
readonly allocationPct
|
|
6877
|
+
readonly allocationPct: number | null;
|
|
6881
6878
|
}
|
|
6882
6879
|
/**
|
|
6883
6880
|
* Vault warning from the underlying earn protocol.
|
|
@@ -7047,19 +7044,19 @@ interface EarnOpportunityBase {
|
|
|
7047
7044
|
/** Reward tokens distributed by this opportunity. */
|
|
7048
7045
|
readonly rewards: readonly VaultRewardInfo[];
|
|
7049
7046
|
/** Primary on-chain address (protocol-neutral; replaces vaultAddress). */
|
|
7050
|
-
readonly address
|
|
7047
|
+
readonly address: string;
|
|
7051
7048
|
/** RFC3339 freshness timestamp: provider state ts, else cache sync time. */
|
|
7052
|
-
readonly asOf
|
|
7049
|
+
readonly asOf: string;
|
|
7053
7050
|
/** Manager/curator identity; `null` when the product has no manager. */
|
|
7054
|
-
readonly manager
|
|
7051
|
+
readonly manager: ManagerInfo | null;
|
|
7055
7052
|
/** Yield profile including trailing averages. */
|
|
7056
|
-
readonly apyProfile
|
|
7053
|
+
readonly apyProfile: ApyProfile;
|
|
7057
7054
|
/** Fee split. */
|
|
7058
|
-
readonly fee
|
|
7055
|
+
readonly fee: FeeInfo;
|
|
7059
7056
|
/** Liquidity profile. */
|
|
7060
|
-
readonly liquidityProfile
|
|
7057
|
+
readonly liquidityProfile: LiquidityProfile;
|
|
7061
7058
|
/** Risk signals. */
|
|
7062
|
-
readonly riskSignals
|
|
7059
|
+
readonly riskSignals: RiskSignals;
|
|
7063
7060
|
/** @deprecated use {@link EarnOpportunityBase.address} */
|
|
7064
7061
|
readonly vaultAddress: string;
|
|
7065
7062
|
/** @deprecated use {@link ApyProfile.current} via apyProfile */
|
|
@@ -7126,13 +7123,9 @@ interface VaultOpportunity extends EarnOpportunityBase {
|
|
|
7126
7123
|
/**
|
|
7127
7124
|
* Universal discriminator identifying the opportunity shape.
|
|
7128
7125
|
*
|
|
7129
|
-
*
|
|
7130
|
-
* the other optional facets — so this release stays source-compatible for
|
|
7131
|
-
* code that constructs the type. A future release makes it required once
|
|
7132
|
-
* every backend emits it. Always present on responses from an emitting
|
|
7133
|
-
* backend; narrow on it before reading product-specific fields.
|
|
7126
|
+
* Narrow on `productType` before reading product-specific fields.
|
|
7134
7127
|
*/
|
|
7135
|
-
readonly productType
|
|
7128
|
+
readonly productType: 'vault';
|
|
7136
7129
|
/** Collateral markets backing this vault. */
|
|
7137
7130
|
readonly collateral: readonly CollateralInfo[];
|
|
7138
7131
|
}
|
|
@@ -8158,6 +8151,12 @@ interface SameChainDepositParams<TFromAdapterCapabilities extends AdapterCapabil
|
|
|
8158
8151
|
* @example '100.50' for 100.50 USDC
|
|
8159
8152
|
*/
|
|
8160
8153
|
readonly amount: string;
|
|
8154
|
+
/**
|
|
8155
|
+
* Gas fee estimates from a prior {@link getDepositQuote} call. When provided,
|
|
8156
|
+
* the pre-broadcast gas reserve check uses the actual estimated cost instead
|
|
8157
|
+
* of the conservative fallback reserve.
|
|
8158
|
+
*/
|
|
8159
|
+
readonly gasFees?: readonly EarnGasFeeEstimate[] | undefined;
|
|
8161
8160
|
/** Optional earn configuration. */
|
|
8162
8161
|
readonly config?: EarnConfig | undefined;
|
|
8163
8162
|
}
|
|
@@ -8488,14 +8487,8 @@ type EarnVaultInfo = DistributiveOmit<EarnOpportunity, 'totalDeposits' | 'liquid
|
|
|
8488
8487
|
readonly totalDeposits: string;
|
|
8489
8488
|
/** Available liquidity in the vault in human-readable decimal format. */
|
|
8490
8489
|
readonly liquidity: string;
|
|
8491
|
-
/**
|
|
8492
|
-
|
|
8493
|
-
*
|
|
8494
|
-
* Optional during the expand/contract migration window: a backend that
|
|
8495
|
-
* predates the nested facets omits it, so it is absent until the response
|
|
8496
|
-
* carries it.
|
|
8497
|
-
*/
|
|
8498
|
-
readonly liquidityProfile?: EarnLiquidityProfile;
|
|
8490
|
+
/** Liquidity profile with amounts as human-readable decimal strings. */
|
|
8491
|
+
readonly liquidityProfile: EarnLiquidityProfile;
|
|
8499
8492
|
};
|
|
8500
8493
|
/** Result of a batch vault lookup. */
|
|
8501
8494
|
type EarnGetVaultsResult = Omit<GetVaultsResult, 'vaults'> & {
|