@bulletxyz/bullet-sdk 0.26.2-rc.5 → 0.26.2-rc.6
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 +37 -5
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +37 -5
- package/dist/node/index.js.map +2 -2
- package/dist/types/client.d.ts +4 -3
- package/dist/types/rollupTypes.d.ts +16 -2
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -9821,6 +9821,29 @@ var Client = class _Client {
|
|
|
9821
9821
|
}
|
|
9822
9822
|
});
|
|
9823
9823
|
}
|
|
9824
|
+
async initSpotMarket(marketId, baseAssetId, quoteAssetId, baseMinLotSize, quoteMinLotSize, maxOrdersPerSide, takerFeesTenthBps, makerFeesTenthBps, name) {
|
|
9825
|
+
return await this.submitTransaction({
|
|
9826
|
+
exchange: {
|
|
9827
|
+
init_spot_market: {
|
|
9828
|
+
args: {
|
|
9829
|
+
market_id: marketId,
|
|
9830
|
+
base_asset_id: baseAssetId,
|
|
9831
|
+
quote_asset_id: quoteAssetId,
|
|
9832
|
+
base_min_lot_size: BulletWasm.convert_rust_decimal_to_json(
|
|
9833
|
+
baseMinLotSize.toFixed()
|
|
9834
|
+
),
|
|
9835
|
+
quote_min_lot_size: BulletWasm.convert_rust_decimal_to_json(
|
|
9836
|
+
quoteMinLotSize.toFixed()
|
|
9837
|
+
),
|
|
9838
|
+
max_orders_per_side: maxOrdersPerSide,
|
|
9839
|
+
taker_fees_tenth_bps: takerFeesTenthBps,
|
|
9840
|
+
maker_fees_tenth_bps: makerFeesTenthBps,
|
|
9841
|
+
name
|
|
9842
|
+
}
|
|
9843
|
+
}
|
|
9844
|
+
}
|
|
9845
|
+
});
|
|
9846
|
+
}
|
|
9824
9847
|
async initPerpMarket(marketId, baseAssetId, name, minTickSize, minLotSize, maxOrdersPerSide, minInterestRateClamp, maxInterestRateClamp, minFundingRateClamp, maxFundingRateClamp, impactMargin, interestRate, initLeverageTableArgs, takerFeesTenthBps, makerFeesTenthBps) {
|
|
9825
9848
|
return await this.submitTransaction({
|
|
9826
9849
|
exchange: {
|
|
@@ -9854,7 +9877,14 @@ var Client = class _Client {
|
|
|
9854
9877
|
interest_rate: BulletWasm.convert_rust_decimal_to_json(
|
|
9855
9878
|
interestRate.toFixed()
|
|
9856
9879
|
),
|
|
9857
|
-
init_leverage_table_args:
|
|
9880
|
+
init_leverage_table_args: new Map(
|
|
9881
|
+
Array.from(initLeverageTableArgs.entries()).map(
|
|
9882
|
+
([decimalKey, value]) => [
|
|
9883
|
+
BulletWasm.convert_rust_decimal_to_json(decimalKey.toFixed()),
|
|
9884
|
+
value
|
|
9885
|
+
]
|
|
9886
|
+
)
|
|
9887
|
+
),
|
|
9858
9888
|
taker_fees_tenth_bps: takerFeesTenthBps,
|
|
9859
9889
|
maker_fees_tenth_bps: makerFeesTenthBps
|
|
9860
9890
|
}
|
|
@@ -9862,8 +9892,7 @@ var Client = class _Client {
|
|
|
9862
9892
|
}
|
|
9863
9893
|
});
|
|
9864
9894
|
}
|
|
9865
|
-
async initBorrowLendPool(
|
|
9866
|
-
const assetId = this.exchange.getAssetId(asset);
|
|
9895
|
+
async initBorrowLendPool(assetId, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationTotalRewardRatio, protocolRewardRatio, liabilityLiquidationLimitRatio, interestFeeTenthBps) {
|
|
9867
9896
|
return await this.submitTransaction({
|
|
9868
9897
|
exchange: {
|
|
9869
9898
|
init_borrow_lend_pool: {
|
|
@@ -9896,8 +9925,11 @@ var Client = class _Client {
|
|
|
9896
9925
|
borrow_limit: BulletWasm.convert_rust_decimal_to_json(
|
|
9897
9926
|
borrowLimit.toFixed()
|
|
9898
9927
|
),
|
|
9899
|
-
|
|
9900
|
-
|
|
9928
|
+
liquidation_total_reward_ratio: BulletWasm.convert_rust_decimal_to_json(
|
|
9929
|
+
liquidationTotalRewardRatio.toFixed()
|
|
9930
|
+
),
|
|
9931
|
+
protocol_reward_ratio: BulletWasm.convert_rust_decimal_to_json(
|
|
9932
|
+
protocolRewardRatio.toFixed()
|
|
9901
9933
|
),
|
|
9902
9934
|
liability_liquidation_limit_ratio: BulletWasm.convert_rust_decimal_to_json(
|
|
9903
9935
|
liabilityLiquidationLimitRatio.toFixed()
|