@bulletxyz/bullet-sdk 0.26.2-rc.2 → 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 +52 -5
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +52 -5
- package/dist/node/index.js.map +2 -2
- package/dist/types/client.d.ts +3 -2
- package/dist/types/rollupTypes.d.ts +22 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -9790,7 +9790,7 @@ var Client = class _Client {
|
|
|
9790
9790
|
}
|
|
9791
9791
|
});
|
|
9792
9792
|
}
|
|
9793
|
-
async initAssetMetadata(asset_id, assetName, tokenId, decimals) {
|
|
9793
|
+
async initAssetMetadata(asset_id, assetName, tokenId, decimals, withdrawFee) {
|
|
9794
9794
|
return await this.submitTransaction({
|
|
9795
9795
|
exchange: {
|
|
9796
9796
|
init_asset_metadata: {
|
|
@@ -9798,17 +9798,63 @@ var Client = class _Client {
|
|
|
9798
9798
|
asset_id,
|
|
9799
9799
|
asset_name: assetName,
|
|
9800
9800
|
token_id: tokenId,
|
|
9801
|
-
decimals
|
|
9801
|
+
decimals,
|
|
9802
|
+
withdraw_fee: BulletWasm.convert_rust_decimal_to_json(
|
|
9803
|
+
withdrawFee.toFixed()
|
|
9804
|
+
)
|
|
9802
9805
|
}
|
|
9803
9806
|
}
|
|
9804
9807
|
}
|
|
9805
9808
|
});
|
|
9806
9809
|
}
|
|
9807
|
-
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) {
|
|
9808
9854
|
const assetId = this.exchange.getAssetId(asset);
|
|
9809
9855
|
return await this.submitTransaction({
|
|
9810
9856
|
exchange: {
|
|
9811
|
-
|
|
9857
|
+
init_borrow_lend_pool: {
|
|
9812
9858
|
args: {
|
|
9813
9859
|
asset_id: assetId,
|
|
9814
9860
|
optimal_utilisation_rate: BulletWasm.convert_rust_decimal_to_json(
|
|
@@ -9843,7 +9889,8 @@ var Client = class _Client {
|
|
|
9843
9889
|
),
|
|
9844
9890
|
liability_liquidation_limit_ratio: BulletWasm.convert_rust_decimal_to_json(
|
|
9845
9891
|
liabilityLiquidationLimitRatio.toFixed()
|
|
9846
|
-
)
|
|
9892
|
+
),
|
|
9893
|
+
interest_fee_tenth_bps: interestFeeTenthBps
|
|
9847
9894
|
}
|
|
9848
9895
|
}
|
|
9849
9896
|
}
|