UNPKG

escrow-market-sdk

Version:
62 lines (61 loc) 1.48 kB
import { PublicKey } from '@solana/web3.js'; import { ConfirmOptions } from '@solana/web3.js'; /** * Options cho Initialize instruction */ export interface InitializeOpts { admin: PublicKey; operator: PublicKey; confirmOptions?: ConfirmOptions; } /** * Options cho InitializeVault instruction */ export interface InitializeVaultOpts { mint: PublicKey; confirmOptions?: ConfirmOptions; } /** * Options cho Deposit instruction */ export interface DepositOpts { mint: PublicKey; amount: number | bigint; userTokenAccount?: PublicKey; vaultTokenAccount?: PublicKey; confirmOptions?: ConfirmOptions; } /** * Options cho Withdraw instruction */ export interface WithdrawOpts { mint: PublicKey; amount: number | bigint; userTokenAccount?: PublicKey; vaultTokenAccount?: PublicKey; confirmOptions?: ConfirmOptions; } /** * Options cho Settle instruction */ export interface SettleOpts { dealId: string; buyer?: PublicKey; operatorKeypair?: any; sellerTokenAccount?: PublicKey; buyerTokenAccount?: PublicKey; sellerWithdrawAccount?: PublicKey; vaultTokenAccount?: PublicKey; confirmOptions?: ConfirmOptions; } /** * Options cho OperatorCancel instruction */ export interface OperatorCancelOpts { dealId: string; amount: number | bigint; operatorKeypair?: any; buyerWithdrawAccount?: PublicKey; vaultTokenAccount?: PublicKey; confirmOptions?: ConfirmOptions; }