@1stdex/first-sdk 1.0.92-beta.4 → 1.0.92-beta.5

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.
@@ -1,5 +1,5 @@
1
1
  import { CHAIN_IDS } from '../constants/chain-configs/chain';
2
- import { Currency } from '../entities/currency/types';
2
+ import { CurrencyAmount } from '../entities/currency/types';
3
3
  /**
4
4
  * Gets trade information for a specific book, tick and quote units.
5
5
  *
@@ -8,11 +8,9 @@ import { Currency } from '../entities/currency/types';
8
8
  * @param {bigint} tick - The tick for the trade
9
9
  * @param {bigint} quoteUnits - The number of quote units
10
10
  *
11
- * @returns {Promise<{ quoteCurrency: Currency; quoteAmount: bigint; baseCurrency: Currency; baseAmount: bigint }>} An object containing:
12
- * - quoteCurrency: The quote currency information
13
- * - quoteAmount: The raw quote token amount
14
- * - baseCurrency: The base currency information
15
- * - baseAmount: The raw base token amount
11
+ * @returns {Promise<{ quote: CurrencyAmount; base: CurrencyAmount }>} An object containing:
12
+ * - quote: The quote currency and formatted amount
13
+ * - base: The base currency and formatted amount
16
14
  *
17
15
  * @example
18
16
  * import { getTradeInfo } from '@1stdex/first-sdk'
@@ -23,7 +21,8 @@ import { Currency } from '../entities/currency/types';
23
21
  * tick: 1000n,
24
22
  * quoteUnits: 5n,
25
23
  * })
26
- * // returns { quoteCurrency, quoteAmount, baseCurrency, baseAmount }
24
+ * console.log(`Quote: ${result.quote.value} ${result.quote.currency.symbol}`)
25
+ * console.log(`Base: ${result.base.value} ${result.base.currency.symbol}`)
27
26
  */
28
27
  export declare const getTradeInfo: ({ chainId, bookId, tick, quoteUnits, }: {
29
28
  chainId: CHAIN_IDS;
@@ -31,9 +30,7 @@ export declare const getTradeInfo: ({ chainId, bookId, tick, quoteUnits, }: {
31
30
  tick: bigint;
32
31
  quoteUnits: bigint;
33
32
  }) => Promise<{
34
- quoteCurrency: Currency;
35
- quoteAmount: bigint;
36
- baseCurrency: Currency;
37
- baseAmount: bigint;
33
+ quote: CurrencyAmount;
34
+ base: CurrencyAmount;
38
35
  }>;
39
36
  //# sourceMappingURL=book.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"book.d.ts","sourceRoot":"","sources":["../../../src/views/book.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY,2CAKtB;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,KAAG,QAAQ;IACV,aAAa,EAAE,QAAQ,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,QAAQ,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,CA+DA,CAAC"}
1
+ {"version":3,"file":"book.d.ts","sourceRoot":"","sources":["../../../src/views/book.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAY,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,YAAY,2CAKtB;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,KAAG,QAAQ;IACV,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,cAAc,CAAC;CACtB,CAiEA,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1stdex/first-sdk",
3
- "version": "1.0.92-beta.4",
3
+ "version": "1.0.92-beta.5",
4
4
  "description": "🛠 An SDK for building applications on top of 1st V2",
5
5
  "files": [
6
6
  "dist"