@bulletxyz/bullet-sdk 0.26.2-rc.4 → 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 +38 -8
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +38 -8
- 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,9 +9821,30 @@ var Client = class _Client {
|
|
|
9821
9821
|
}
|
|
9822
9822
|
});
|
|
9823
9823
|
}
|
|
9824
|
-
async
|
|
9825
|
-
|
|
9826
|
-
|
|
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
|
+
}
|
|
9847
|
+
async initPerpMarket(marketId, baseAssetId, name, minTickSize, minLotSize, maxOrdersPerSide, minInterestRateClamp, maxInterestRateClamp, minFundingRateClamp, maxFundingRateClamp, impactMargin, interestRate, initLeverageTableArgs, takerFeesTenthBps, makerFeesTenthBps) {
|
|
9827
9848
|
return await this.submitTransaction({
|
|
9828
9849
|
exchange: {
|
|
9829
9850
|
init_perp_market: {
|
|
@@ -9856,7 +9877,14 @@ var Client = class _Client {
|
|
|
9856
9877
|
interest_rate: BulletWasm.convert_rust_decimal_to_json(
|
|
9857
9878
|
interestRate.toFixed()
|
|
9858
9879
|
),
|
|
9859
|
-
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
|
+
),
|
|
9860
9888
|
taker_fees_tenth_bps: takerFeesTenthBps,
|
|
9861
9889
|
maker_fees_tenth_bps: makerFeesTenthBps
|
|
9862
9890
|
}
|
|
@@ -9864,8 +9892,7 @@ var Client = class _Client {
|
|
|
9864
9892
|
}
|
|
9865
9893
|
});
|
|
9866
9894
|
}
|
|
9867
|
-
async initBorrowLendPool(
|
|
9868
|
-
const assetId = this.exchange.getAssetId(asset);
|
|
9895
|
+
async initBorrowLendPool(assetId, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationTotalRewardRatio, protocolRewardRatio, liabilityLiquidationLimitRatio, interestFeeTenthBps) {
|
|
9869
9896
|
return await this.submitTransaction({
|
|
9870
9897
|
exchange: {
|
|
9871
9898
|
init_borrow_lend_pool: {
|
|
@@ -9898,8 +9925,11 @@ var Client = class _Client {
|
|
|
9898
9925
|
borrow_limit: BulletWasm.convert_rust_decimal_to_json(
|
|
9899
9926
|
borrowLimit.toFixed()
|
|
9900
9927
|
),
|
|
9901
|
-
|
|
9902
|
-
|
|
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()
|
|
9903
9933
|
),
|
|
9904
9934
|
liability_liquidation_limit_ratio: BulletWasm.convert_rust_decimal_to_json(
|
|
9905
9935
|
liabilityLiquidationLimitRatio.toFixed()
|