zo-sdk 0.1.49 → 0.1.51

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.
Files changed (38) hide show
  1. package/dist/consts/deployments-shared-mainnet.json +1 -1
  2. package/dist/consts/deployments-usdz-mainnet.json +1 -1
  3. package/dist/implementations/SLPAPI.cjs +129 -3
  4. package/dist/implementations/SLPAPI.cjs.map +1 -1
  5. package/dist/implementations/SLPAPI.d.cts +5 -0
  6. package/dist/implementations/SLPAPI.d.cts.map +1 -1
  7. package/dist/implementations/SLPAPI.d.mts +5 -0
  8. package/dist/implementations/SLPAPI.d.mts.map +1 -1
  9. package/dist/implementations/SLPAPI.mjs +129 -3
  10. package/dist/implementations/SLPAPI.mjs.map +1 -1
  11. package/dist/implementations/USDZAPI.cjs +130 -4
  12. package/dist/implementations/USDZAPI.cjs.map +1 -1
  13. package/dist/implementations/USDZAPI.d.cts +5 -0
  14. package/dist/implementations/USDZAPI.d.cts.map +1 -1
  15. package/dist/implementations/USDZAPI.d.mts +5 -0
  16. package/dist/implementations/USDZAPI.d.mts.map +1 -1
  17. package/dist/implementations/USDZAPI.mjs +130 -4
  18. package/dist/implementations/USDZAPI.mjs.map +1 -1
  19. package/dist/implementations/ZLPAPI.cjs +130 -4
  20. package/dist/implementations/ZLPAPI.cjs.map +1 -1
  21. package/dist/implementations/ZLPAPI.d.cts +5 -0
  22. package/dist/implementations/ZLPAPI.d.cts.map +1 -1
  23. package/dist/implementations/ZLPAPI.d.mts +5 -0
  24. package/dist/implementations/ZLPAPI.d.mts.map +1 -1
  25. package/dist/implementations/ZLPAPI.mjs +130 -4
  26. package/dist/implementations/ZLPAPI.mjs.map +1 -1
  27. package/dist/interfaces/base.d.cts +3 -1
  28. package/dist/interfaces/base.d.cts.map +1 -1
  29. package/dist/interfaces/base.d.mts +3 -1
  30. package/dist/interfaces/base.d.mts.map +1 -1
  31. package/package.json +2 -2
  32. package/src/consts/deployments-shared-mainnet.json +1 -1
  33. package/src/consts/deployments-usdz-mainnet.json +1 -1
  34. package/src/implementations/SLPAPI.ts +188 -4
  35. package/src/implementations/USDZAPI.ts +186 -4
  36. package/src/implementations/ZLPAPI.ts +188 -4
  37. package/src/interfaces/base.ts +48 -1
  38. package/src/consts/deployments-mainnet.json +0 -644
@@ -5,7 +5,7 @@
5
5
 
6
6
  import type { KioskClient, KioskOwnerCap } from '@mysten/kiosk'
7
7
  import type { SuiClient } from '@mysten/sui/client'
8
- import type { Transaction } from '@mysten/sui/transactions'
8
+ import type { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions'
9
9
  import type { PriceFeed } from '@pythnetwork/pyth-sui-js'
10
10
 
11
11
  import type { IConsts, LPToken, Network } from '../consts'
@@ -328,6 +328,28 @@ export interface IBaseAPI {
328
328
  suiCoinObjectsForPythUpdate?: string[],
329
329
  ) => Promise<Transaction>
330
330
 
331
+ // Trading operations
332
+ openPositionWithCoin?: (
333
+ collateralToken: string,
334
+ indexToken: string,
335
+ size: bigint,
336
+ coinObj: TransactionObjectArgument,
337
+ long: boolean,
338
+ reserveAmount: bigint,
339
+ indexPrice: number,
340
+ collateralPrice: number,
341
+ isLimitOrder?: boolean,
342
+ isIocOrder?: boolean,
343
+ pricesSlippage?: number,
344
+ collateralSlippage?: number,
345
+ relayerFee?: bigint,
346
+ referralAddress?: string,
347
+ sender?: string,
348
+ tx?: Transaction,
349
+ sponsoredTx?: boolean,
350
+ suiCoinObjectsForPythUpdate?: string[],
351
+ ) => Promise<Transaction>
352
+
331
353
  decreasePosition: (
332
354
  pcpId: string,
333
355
  collateralToken: string,
@@ -462,6 +484,31 @@ export interface IBaseAPI {
462
484
  suiCoinObjectsForPythUpdate?: string[],
463
485
  ) => Promise<Transaction>
464
486
 
487
+ // S Card operations
488
+ openPositionWithCoinAndSCard?: (
489
+ collateralToken: string,
490
+ indexToken: string,
491
+ size: bigint,
492
+ coinObj: TransactionObjectArgument,
493
+ long: boolean,
494
+ reserveAmount: bigint,
495
+ indexPrice: number,
496
+ collateralPrice: number,
497
+ kioskClient: KioskClient,
498
+ kioskCap: KioskOwnerCap,
499
+ scard: string,
500
+ isLimitOrder?: boolean,
501
+ isIocOrder?: boolean,
502
+ pricesSlippage?: number,
503
+ collateralSlippage?: number,
504
+ relayerFee?: bigint,
505
+ referralAddress?: string,
506
+ sender?: string,
507
+ tx?: Transaction,
508
+ sponsoredTx?: boolean,
509
+ suiCoinObjectsForPythUpdate?: string[],
510
+ ) => Promise<Transaction>
511
+
465
512
  decreasePositionWithSCard: (
466
513
  pcpId: string,
467
514
  collateralToken: string,