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.
- package/dist/consts/deployments-shared-mainnet.json +1 -1
- package/dist/consts/deployments-usdz-mainnet.json +1 -1
- package/dist/implementations/SLPAPI.cjs +129 -3
- package/dist/implementations/SLPAPI.cjs.map +1 -1
- package/dist/implementations/SLPAPI.d.cts +5 -0
- package/dist/implementations/SLPAPI.d.cts.map +1 -1
- package/dist/implementations/SLPAPI.d.mts +5 -0
- package/dist/implementations/SLPAPI.d.mts.map +1 -1
- package/dist/implementations/SLPAPI.mjs +129 -3
- package/dist/implementations/SLPAPI.mjs.map +1 -1
- package/dist/implementations/USDZAPI.cjs +130 -4
- package/dist/implementations/USDZAPI.cjs.map +1 -1
- package/dist/implementations/USDZAPI.d.cts +5 -0
- package/dist/implementations/USDZAPI.d.cts.map +1 -1
- package/dist/implementations/USDZAPI.d.mts +5 -0
- package/dist/implementations/USDZAPI.d.mts.map +1 -1
- package/dist/implementations/USDZAPI.mjs +130 -4
- package/dist/implementations/USDZAPI.mjs.map +1 -1
- package/dist/implementations/ZLPAPI.cjs +130 -4
- package/dist/implementations/ZLPAPI.cjs.map +1 -1
- package/dist/implementations/ZLPAPI.d.cts +5 -0
- package/dist/implementations/ZLPAPI.d.cts.map +1 -1
- package/dist/implementations/ZLPAPI.d.mts +5 -0
- package/dist/implementations/ZLPAPI.d.mts.map +1 -1
- package/dist/implementations/ZLPAPI.mjs +130 -4
- package/dist/implementations/ZLPAPI.mjs.map +1 -1
- package/dist/interfaces/base.d.cts +3 -1
- package/dist/interfaces/base.d.cts.map +1 -1
- package/dist/interfaces/base.d.mts +3 -1
- package/dist/interfaces/base.d.mts.map +1 -1
- package/package.json +2 -2
- package/src/consts/deployments-shared-mainnet.json +1 -1
- package/src/consts/deployments-usdz-mainnet.json +1 -1
- package/src/implementations/SLPAPI.ts +188 -4
- package/src/implementations/USDZAPI.ts +186 -4
- package/src/implementations/ZLPAPI.ts +188 -4
- package/src/interfaces/base.ts +48 -1
- package/src/consts/deployments-mainnet.json +0 -644
package/src/interfaces/base.ts
CHANGED
|
@@ -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,
|