@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/node/index.js
CHANGED
|
@@ -9821,11 +9821,54 @@ var Client = class _Client {
|
|
|
9821
9821
|
}
|
|
9822
9822
|
});
|
|
9823
9823
|
}
|
|
9824
|
-
async
|
|
9824
|
+
async initPerpMarket(market, baseAsset, name, minTickSize, minLotSize, maxOrdersPerSide, minInterestRateClamp, maxInterestRateClamp, minFundingRateClamp, maxFundingRateClamp, impactMargin, interestRate, initLeverageTableArgs, takerFeesTenthBps, makerFeesTenthBps) {
|
|
9825
|
+
const marketId = this.exchange.getMarketId(market);
|
|
9826
|
+
const baseAssetId = this.exchange.getAssetId(baseAsset);
|
|
9827
|
+
return await this.submitTransaction({
|
|
9828
|
+
exchange: {
|
|
9829
|
+
init_perp_market: {
|
|
9830
|
+
args: {
|
|
9831
|
+
market_id: marketId,
|
|
9832
|
+
base_asset_id: baseAssetId,
|
|
9833
|
+
name,
|
|
9834
|
+
min_tick_size: BulletWasm.convert_rust_decimal_to_json(
|
|
9835
|
+
minTickSize.toFixed()
|
|
9836
|
+
),
|
|
9837
|
+
min_lot_size: BulletWasm.convert_rust_decimal_to_json(
|
|
9838
|
+
minLotSize.toFixed()
|
|
9839
|
+
),
|
|
9840
|
+
max_orders_per_side: maxOrdersPerSide,
|
|
9841
|
+
min_interest_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9842
|
+
minInterestRateClamp.toFixed()
|
|
9843
|
+
),
|
|
9844
|
+
max_interest_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9845
|
+
maxInterestRateClamp.toFixed()
|
|
9846
|
+
),
|
|
9847
|
+
min_funding_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9848
|
+
minFundingRateClamp.toFixed()
|
|
9849
|
+
),
|
|
9850
|
+
max_funding_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
|
|
9851
|
+
maxFundingRateClamp.toFixed()
|
|
9852
|
+
),
|
|
9853
|
+
impact_margin: BulletWasm.convert_rust_decimal_to_json(
|
|
9854
|
+
impactMargin.toFixed()
|
|
9855
|
+
),
|
|
9856
|
+
interest_rate: BulletWasm.convert_rust_decimal_to_json(
|
|
9857
|
+
interestRate.toFixed()
|
|
9858
|
+
),
|
|
9859
|
+
init_leverage_table_args: initLeverageTableArgs,
|
|
9860
|
+
taker_fees_tenth_bps: takerFeesTenthBps,
|
|
9861
|
+
maker_fees_tenth_bps: makerFeesTenthBps
|
|
9862
|
+
}
|
|
9863
|
+
}
|
|
9864
|
+
}
|
|
9865
|
+
});
|
|
9866
|
+
}
|
|
9867
|
+
async initBorrowLendPool(asset, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationRewardRatio, liabilityLiquidationLimitRatio, interestFeeTenthBps) {
|
|
9825
9868
|
const assetId = this.exchange.getAssetId(asset);
|
|
9826
9869
|
return await this.submitTransaction({
|
|
9827
9870
|
exchange: {
|
|
9828
|
-
|
|
9871
|
+
init_borrow_lend_pool: {
|
|
9829
9872
|
args: {
|
|
9830
9873
|
asset_id: assetId,
|
|
9831
9874
|
optimal_utilisation_rate: BulletWasm.convert_rust_decimal_to_json(
|
|
@@ -9860,7 +9903,8 @@ var Client = class _Client {
|
|
|
9860
9903
|
),
|
|
9861
9904
|
liability_liquidation_limit_ratio: BulletWasm.convert_rust_decimal_to_json(
|
|
9862
9905
|
liabilityLiquidationLimitRatio.toFixed()
|
|
9863
|
-
)
|
|
9906
|
+
),
|
|
9907
|
+
interest_fee_tenth_bps: interestFeeTenthBps
|
|
9864
9908
|
}
|
|
9865
9909
|
}
|
|
9866
9910
|
}
|