Documentation
    Preparing search index...

    Class SuinsMarketplaceTransaction

    Index

    Constructors

    Properties

    suinsClient: SuinsClient
    transaction: Transaction

    Methods

    • Accepts a counter offer by topping up the payment.

      The payment coin must equal counter_offer_value - original_offer_value. Only the original offer maker can accept the counter offer.

      Parameters

      Returns void

    • Accepts an offer on a domain the caller owns.

      Transfers the SuinsRegistration NFT to the buyer, deducts the service fee, and returns the remaining payment to the domain owner.

      Parameters

      • params: AcceptOfferParams
        • buyerAddress: string

          The address of the offer maker (buyer)

        • coinType: string

          The coin type of the offer being accepted

        • suinsRegistration: TransactionObjectInput

          The SuinsRegistration NFT to transfer to the buyer

      Returns TransactionObjectArgument

      The payment coin (minus service fee) as a TransactionObjectArgument

    • Buys a listed domain at the fixed listing price.

      The payment coin must match the listing price exactly. The domain NFT is transferred to the buyer, and the payment (minus service fee) goes to the listing owner.

      Parameters

      • params: BuyListingParams

        The buy parameters

        • coinType: string

          The coin type the listing is priced in

        • domainName: string

          The domain name (e.g. 'example.sui')

        • payment: TransactionObjectInput

          The payment coin (must match the listing price exactly)

      Returns TransactionObjectArgument

      The SuinsRegistration NFT as a TransactionObjectArgument

    • Cancels an auction before any bids are placed.

      Only the original auction owner can cancel. Returns the SuinsRegistration NFT.

      Parameters

      • params: CancelAuctionParams
        • coinType: string

          The coin type the auction is denominated in

        • domainName: string

          The domain name to cancel the auction for

      Returns TransactionObjectArgument

      The SuinsRegistration NFT as a TransactionObjectArgument

    • Cancels an active listing and returns the domain NFT to the owner.

      Only the original listing owner can cancel a listing.

      Parameters

      • params: CancelListingParams

        The cancel parameters

        • coinType: string

          The coin type the listing was created with

        • domainName: string

          The domain name to cancel the listing for

      Returns TransactionObjectArgument

      The SuinsRegistration NFT as a TransactionObjectArgument

    • Cancels an offer and returns the payment coin to the caller.

      Only the original offer maker can cancel their offer.

      Parameters

      • params: CancelOfferParams
        • coinType: string

          The coin type of the offer

        • domainName: string

          The domain name the offer was placed on

      Returns TransactionObjectArgument

      The refunded coin as a TransactionObjectArgument

    • Creates a timed auction for a SuiNS domain.

      The caller must own the SuinsRegistration NFT. The domain must not expire before the auction ends. An optional encrypted reserve price can be set using Seal encryption.

      Parameters

      • params: CreateAuctionParams
        • coinType: string

          The coin type for the auction (e.g. '0x2::sui::SUI')

        • OptionalencryptedReservePrice?: number[] | Uint8Array

          Optional encrypted reserve price as a byte array (pre-encrypted using Seal). If not provided, the auction will have no reserve price.

        • endTime: number

          Auction end time as a Unix timestamp in seconds

        • minBid: bigint

          Minimum bid amount in base units of the coin

        • startTime: number

          Auction start time as a Unix timestamp in seconds

        • suinsRegistration: TransactionObjectInput

          The SuinsRegistration NFT to auction

      Returns void

    • Creates a fixed-price listing for a SuiNS domain.

      The caller must own the SuinsRegistration NFT being listed. The domain must not be expired, and if an expiry is set, the domain must not expire before the listing does.

      Parameters

      • params: CreateListingParams

        The listing parameters

        • coinType: string

          The coin type to list in (e.g. '0x2::sui::SUI')

        • OptionalexpiresAt?: number

          Optional expiration timestamp in seconds

        • price: bigint

          The fixed price for the listing (in base units of the coin)

        • suinsRegistration: TransactionObjectInput

          The SuinsRegistration NFT to list

      Returns void

    • Declines an offer on a domain the caller owns.

      Refunds the payment coin to the offer maker.

      Parameters

      • params: DeclineOfferParams
        • buyerAddress: string

          The address of the offer maker to refund

        • coinType: string

          The coin type of the offer being declined

        • suinsRegistration: TransactionObjectInput

          The SuinsRegistration NFT (read-only reference)

      Returns void

    • Finalizes an auction after its end time has passed.

      If the auction has an encrypted reserve price, derived keys and key server addresses must be provided for on-chain decryption. If the highest bid meets the reserve (or there is no reserve), the domain is transferred to the winner and payment to the owner.

      Parameters

      • params: FinalizeAuctionParams
        • coinType: string

          The coin type the auction is denominated in

        • OptionalderivedKeys?: number[][]

          Optional derived keys from Seal key servers for decrypting the reserve price. Required only if the auction has an encrypted reserve price.

        • domainName: string

          The domain name to finalize (e.g. 'example.sui')

        • OptionalkeyServers?: string[]

          Optional key server addresses corresponding to the derived keys. Required only if the auction has an encrypted reserve price.

      Returns void

    • Makes a counter offer on an existing offer.

      The counter offer value must be higher than the current offer. Only the domain owner can make a counter offer.

      Parameters

      • params: MakeCounterOfferParams
        • buyerAddress: string

          The address of the original offer maker

        • coinType: string

          The coin type of the original offer

        • counterOfferValue: bigint

          The counter offer value (must be higher than original offer)

        • suinsRegistration: TransactionObjectInput

          The SuinsRegistration NFT (read-only reference)

      Returns void

    • Places a bid on an active auction.

      The bid must be at least 5% higher than the current highest bid. If the bid is placed within the last 5 minutes, the auction is automatically extended.

      Parameters

      • params: PlaceBidParams
        • bid: TransactionObjectInput

          The bid payment coin

        • coinType: string

          The coin type the auction is denominated in

        • domainName: string

          The domain name being auctioned (e.g. 'example.sui')

      Returns void

    • Places an offer on a registered domain.

      The domain must exist and not be expired. The caller attaches a payment coin as the offer value. An optional expiration timestamp can be set.

      Parameters

      • params: PlaceOfferParams
        • coin: TransactionObjectInput

          The payment coin for the offer

        • coinType: string

          The coin type for the offer (e.g. '0x2::sui::SUI')

        • domainName: string

          The domain name to make an offer on (e.g. 'example.sui')

        • OptionalexpiresAt?: number

          Optional expiration timestamp in seconds

      Returns void

    • Builds the seal_approve moveCall used for Seal key derivation.

      This is needed when finalizing an auction that has an encrypted reserve price. The caller builds a transaction containing this moveCall, then passes the transaction bytes to SealClient.getDerivedKeys() to obtain the derived keys needed for finalizeAuction.

      The encryption ID is constructed as: BCS(start_time as u64) ++ domain_name_bytes, matching the format in decryption.move::get_encryption_id.

      Parameters

      • params: SealApproveParams
        • coinType: string

          The coin type the auction is denominated in

        • domainName: string

          The domain name being auctioned

        • startTime: number

          The auction start time in seconds (must match the on-chain auction)

      Returns void