Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into develop #1736

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Next version

# 2.0.3

- fix: Fix various issues in TypeDoc comments wrt @see vs @link.

# 2.0.2

- feat: Updated exports in index.ts to export all referenced types.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mangrovedao/mangrove.js",
"version": "2.0.2",
"version": "2.0.3",
"author": "Mangrove DAO",
"description": "A Typescript SDK for the Mangrove Protocol.",
"license": "MIT",
Expand Down
12 changes: 6 additions & 6 deletions src/kandel/coreKandelInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export type KandelParameters = {

/**
* @notice Parameters for a Kandel instance where provided properties override current values. baseQuoteTickOffset takes precedence over priceRatio. Note that baseQuoteTickOffset and pricePoints are normally provided via the KandelDistribution.
* @see KandelParameters for more information.
* @remarks Cannot simply be Partial<KandelParameters> due to Big vs Bigish.
* @see{@link KandelParameters} for more information.
* @remarks Cannot simply be `Partial<KandelParameters>` due to Big vs Bigish.
*/
export type KandelParameterOverrides = {
gasprice?: number;
Expand Down Expand Up @@ -113,7 +113,7 @@ class CoreKandelInstance {
};
}

/** Constructor. @see create */
/** Constructor. See {@link createCoreParams} */
protected constructor(params: {
address: string;
kandel: typechain.CoreKandel;
Expand Down Expand Up @@ -372,7 +372,7 @@ class CoreKandelInstance {
* @param offerType The offer type to get the minimum volume for.
* @param offerType The offer type to get the minimum volume for.
* @returns The minimum volume for the given offer type.
* @dev @see seeder.getMinimumVolumeForGasreq for parameterized function.
* @see {@link KandelSeeder.getMinimumVolumeForGasreq} for parameterized function.
*/
public async getMinimumVolume(offerType: Market.BA) {
return this.seeder.getMinimumVolumeForGasreq({
Expand Down Expand Up @@ -656,7 +656,7 @@ class CoreKandelInstance {
* @param params.parameters The parameters to set leave out values to keep their current value. If gasprice is not set, the current gasprice and cover factor is used.
* @param params.depositBaseAmount The amount of base to deposit. If not provided, then no base is deposited.
* @param params.depositQuoteAmount The amount of quote to deposit. If not provided, then no quote is deposited.
* @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to @see getRequiredProvision.
* @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to {@link getRequiredProvision}.
* @param overrides The ethers overrides to use when calling the populate and populateChunk functions.
* @returns The raw parameters.
*/
Expand Down Expand Up @@ -710,7 +710,7 @@ class CoreKandelInstance {
* @param params.parameters The parameters to set leave out values to keep their current value. If gasprice is not set, the current gasprice and cover factor is used.
* @param params.depositBaseAmount The amount of base to deposit. If not provided, then no base is deposited.
* @param params.depositQuoteAmount The amount of quote to deposit. If not provided, then no quote is deposited.
* @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to @see getRequiredProvision. (if a distribution is provided)
* @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to {@link getRequiredProvision}. (if a distribution is provided)
* @param params.maxOffersInChunk The maximum number of offers to include in a single populate transaction. If not provided, then KandelConfiguration is used.
* @param overrides The ethers overrides to use when calling the populate and populateChunk functions.
* @returns The transaction(s) used to populate the offers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class GeometricKandelDistributionHelper {
}

/** Gets tick based parameters for a distribution based on tick or price params.
* @param params The distribution parameters, @see DistributionParams
* @returns The tick based parameters, @see TickDistributionParams
* @param params The distribution parameters, see {@link DistributionParams}
* @returns The tick based parameters, see {@link TickDistributionParams}
*/
public getTickDistributionParams(
params: Omit<DistributionParams, "generateFromMid">,
Expand Down
8 changes: 4 additions & 4 deletions src/kandel/geometricKandel/geometricKandelInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type GeometricKandelParameters = {
/**
* @notice Parameters specific to a geometric Kandel instance where provided properties override current values. baseQuoteTickOffset takes precedence over priceRatio. Note that baseQuoteTickOffset and pricePoints are normally provided via the KandelDistribution.
* @see GeometricKandelParameters for more information.
* @remarks Cannot simply be Partial<GeometricKandelParameters> due to Big vs Bigish.
* @remarks Cannot simply be `Partial<GeometricKandelParameters>` due to Big vs Bigish.
*/
export type GeometricKandelParameterOverrides = {
baseQuoteTickOffset?: number;
Expand Down Expand Up @@ -91,7 +91,7 @@ class GeometricKandelInstance extends CoreKandelInstance {
});
}

/** Constructor. @see create */
/** Constructor. See {@link create} */
protected constructor(params: {
address: string;
kandel: typechain.CoreKandel;
Expand Down Expand Up @@ -239,7 +239,7 @@ class GeometricKandelInstance extends CoreKandelInstance {
/** Calculates a new uniform distribution based on the available base and quote balance and min price and mid price.
* @param params The parameters for the new distribution.
* @param params.midPrice The current mid price of the market used to discern expected bids from asks.
* @param params.minPrice The minimum price to generate the distribution from; can be retrieved from the status from @see getOfferStatus or @see getOfferStatusFromOffers .
* @param params.minPrice The minimum price to generate the distribution from; can be retrieved from the status from {@link getOfferStatuses} or {@link getOfferStatusFromOffers} .
* @param params.generateFromMid Whether to generate the distribution outwards from the midPrice or upwards from the minPrice.
* @param params.minimumBasePerOffer The minimum base token volume per offer. If not provided, then the minimum base token volume is used.
* @param params.minimumQuotePerOffer The minimum quote token volume per offer. If not provided, then the minimum quote token volume is used.
Expand Down Expand Up @@ -289,7 +289,7 @@ class GeometricKandelInstance extends CoreKandelInstance {
* @param params.geometricParameters The geometric parameters to set leave out values to keep their current value.
* @param params.depositBaseAmount The amount of base to deposit. If not provided, then no base is deposited.
* @param params.depositQuoteAmount The amount of quote to deposit. If not provided, then no quote is deposited.
* @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to @see getRequiredProvision.
* @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to {@link getRequiredProvision}.
* @param params.maxOffersInChunk The maximum number of offers to include in a single populate transaction. If not provided, then KandelConfiguration is used.
* @param params.populateMode The mode to use when populating the offers. If not provided, then "reduceCallData" is used - it computes offers on-chain but reduces the amount of call data; "saveGas" computes offers off-chain and sends them as call data, but saves gas.
* @param overrides The ethers overrides to use when calling the populate and populateChunk functions.
Expand Down
4 changes: 2 additions & 2 deletions src/liquidityProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ class LiquidityProvider {
}
}

/** Gets the missing provision in ethers for a bid using @see computeOfferProvision. */
/** Gets the missing provision in ethers for a bid using {@link computeOfferProvision}. */
computeBidProvision(
opts: { id?: number; gasreq?: number; gasprice?: number } = {},
): Promise<Big> {
return this.computeOfferProvision("bids", opts);
}

/** Gets the missing provision in ethers for an ask using @see computeOfferProvision. */
/** Gets the missing provision in ethers for an ask using {@link computeOfferProvision}. */
computeAskProvision(
opts: { id?: number; gasreq?: number; gasprice?: number } = {},
): Promise<Big> {
Expand Down
2 changes: 1 addition & 1 deletion src/util/trade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ class Trade {
}

/** Determines the parameters for a resting order which can be provided via default configuration value.
* @param params The resting order params. @see Market.RestingOrderParams.
* @param params The resting order params. See {@link Market.RestingOrderParams}.
* @param market The market.
* @param ba The BA of the taker order; the resting order will be the opposite.
* @returns The resting order parameters.
Expand Down
Loading