diff --git a/package.json b/package.json index 34b64c4..31dd984 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@compolabs/spark-orderbook-ts-sdk", - "version": "1.3.6", + "version": "1.3.7", "type": "module", "main": "./dist/index.сjs", "module": "./dist/index.js", diff --git a/src/SparkOrderbook.ts b/src/SparkOrderbook.ts index 0a33b6c..ff68927 100644 --- a/src/SparkOrderbook.ts +++ b/src/SparkOrderbook.ts @@ -27,6 +27,7 @@ import { SparkParams, SpotOrderWithoutTimestamp, TradeOrderEvent, + UserMarketBalance, Volume, WithdrawParams, WriteTransactionResponse, @@ -155,6 +156,14 @@ export class SparkOrderbook { return this.read.fetchOrderIdsByAddress(trader, options); }; + fetchUserMarketBalance = async ( + trader: Bech32Address, + ): Promise => { + const options = await this.getFetchOptions(); + + return this.read.fetchUserMarketBalance(trader, options); + }; + getProviderWallet = async () => { const provider = await this.providerPromise; return Wallet.generate({ provider });