@bulletxyz/bullet-sdk 0.26.2-rc.3 → 0.26.2-rc.4
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/browser/index.js +47 -3
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +47 -3
- package/dist/node/index.js.map +2 -2
- package/dist/types/client.d.ts +2 -1
- package/dist/types/rollupTypes.d.ts +21 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -9807,11 +9807,54 @@ var Client = class _Client {
|
|
|
9807
9807
|
}
|
|
9808
9808
|
});
|
|
9809
9809
|
}
|
|
9810
|
-
async
|
|
9810
|
+
async initPerpMarket(market, baseAsset, name, minTickSize, minLotSize, maxOrdersPerSide, minInterestRateClamp, maxInterestRateClamp, minFundingRateClamp, maxFundingRateClamp, impactMargin, interestRate, initLeverageTableArgs, takerFeesTenthBps, makerFeesTenthBps) {
|
|
9811
|
+
const marketId = this.exchange.getMarketId(market);
|
|
9812
|
+
const baseAssetId = this.exchange.getAssetId(baseAsset);
|
|
9813
|
+
return await this.submitTransaction({
|
|
9814
|
+
exchange: {
|
|
9815
|
+
init_perp_market: {
|
|
9816
|
+
args: {
|
|
9817
|
+
market_id: marketId,
|
|
9818
|
+
base_asset_id: baseAssetId,
|
|
9819
|
+
name,
|
|
9820
|
+
min_tick_size: BulletWasm.convert_rust_decimal_to_json(
|
|
9821
|
+
minTickSize.toFixed()
|
|
9822
|
+
),
|
|
9823
|
+
min_lot_size: BulletWasm.convert_rust_decimal_to_json(
|
|
9824
|
+
minLotSize.toFixed()
|
|
9825
|
+
),
|
|
9826
|
+
max_orders_per_side: maxOrdersPerSide,
|
|
9827
|
+
min_interest_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9828
|
+
minInterestRateClamp.toFixed()
|
|
9829
|
+
),
|
|
9830
|
+
max_interest_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9831
|
+
maxInterestRateClamp.toFixed()
|
|
9832
|
+
),
|
|
9833
|
+
min_funding_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9834
|
+
minFundingRateClamp.toFixed()
|
|
9835
|
+
),
|
|
9836
|
+
max_funding_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9837
|
+
maxFundingRateClamp.toFixed()
|
|
9838
|
+
),
|
|
9839
|
+
impact_margin: BulletWasm.convert_rust_decimal_to_json(
|
|
9840
|
+
impactMargin.toFixed()
|
|
9841
|
+
),
|
|
9842
|
+
interest_rate: BulletWasm.convert_rust_decimal_to_json(
|
|
9843
|
+
interestRate.toFixed()
|
|
9844
|
+
),
|
|
9845
|
+
init_leverage_table_args: initLeverageTableArgs,
|
|
9846
|
+
taker_fees_tenth_bps: takerFeesTenthBps,
|
|
9847
|
+
maker_fees_tenth_bps: makerFeesTenthBps
|
|
9848
|
+
}
|
|
9849
|
+
}
|
|
9850
|
+
}
|
|
9851
|
+
});
|
|
9852
|
+
}
|
|
9853
|
+
async initBorrowLendPool(asset, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationRewardRatio, liabilityLiquidationLimitRatio, interestFeeTenthBps) {
|
|
9811
9854
|
const assetId = this.exchange.getAssetId(asset);
|
|
9812
9855
|
return await this.submitTransaction({
|
|
9813
9856
|
exchange: {
|
|
9814
|
-
|
|
9857
|
+
init_borrow_lend_pool: {
|
|
9815
9858
|
args: {
|
|
9816
9859
|
asset_id: assetId,
|
|
9817
9860
|
optimal_utilisation_rate: BulletWasm.convert_rust_decimal_to_json(
|
|
@@ -9846,7 +9889,8 @@ var Client = class _Client {
|
|
|
9846
9889
|
),
|
|
9847
9890
|
liability_liquidation_limit_ratio: BulletWasm.convert_rust_decimal_to_json(
|
|
9848
9891
|
liabilityLiquidationLimitRatio.toFixed()
|
|
9849
|
-
)
|
|
9892
|
+
),
|
|
9893
|
+
interest_fee_tenth_bps: interestFeeTenthBps
|
|
9850
9894
|
}
|
|
9851
9895
|
}
|
|
9852
9896
|
}
|