zkEVM orderbook SDK

Configuration for Immutable services.

Constructors

Methods

  • Returns Date

  • Get a listing by ID

    Parameters

    • listingId: string

      The listingId to find.

    Returns Promise<ListingResult>

    The returned listing result.

  • Get a bid by ID

    Parameters

    • bidId: string

      The bidId to find.

    Returns Promise<BidResult>

    The returned bid result.

  • Get a collection bid by ID

    Parameters

    • collectionBidId: string

      The collectionBidId to find.

    Returns Promise<CollectionBidResult>

    The returned collection bid result.

  • Get a trade by ID

    Parameters

    • tradeId: string

      The tradeId to find.

    Returns Promise<TradeResult>

    The returned trade result.

  • List listings. This method is used to get a list of listings filtered by conditions specified in the params object.

    Parameters

    Returns Promise<ListListingsResult>

    The paged listings.

  • List bids. This method is used to get a list of bids filtered by conditions specified in the params object.

    Parameters

    • listOrderParams: ListBidsParams

      Filtering, ordering and page parameters.

    Returns Promise<ListBidsResult>

    The paged bids.

  • List collection bids. This method is used to get a list of collection bids filtered by conditions specified in the params object.

    Parameters

    Returns Promise<ListCollectionBidsResult>

    The paged collection bids.

  • List trades. This method is used to get a list of trades filtered by conditions specified in the params object

    Parameters

    Returns Promise<ListTradesResult>

    The paged trades.

  • Get required transactions and messages for signing to facilitate creating bulk listings. Once the transactions are submitted and the message signed, call the PrepareBulkListingsResponse.completeListings method provided in the return type with the signature. This method supports up to 20 listing creations at a time. It can also be used for individual listings to simplify integration code paths.

    Bulk listings created using an EOA (Metamask) will require a single listing confirmation signature. Bulk listings creating using a smart contract wallet will require multiple listing confirmation signatures (as many as the number of orders).

    Parameters

    Returns Promise<PrepareBulkListingsResponse>

    PrepareBulkListingsResponse includes any unsigned approval transactions, the typed bulk order message for signing and the PrepareBulkListingsResponse.completeListings method that can be called with the signature(s) to create the listings.

  • Get required transactions and messages for signing prior to creating a listing through the createListing method

    Parameters

    Returns Promise<PrepareOrderResponse>

    PrepareListingResponse includes the unsigned approval transaction, the typed order message for signing and the order components that can be submitted to createListing with a signature.

  • Create a listing

    Parameters

    Returns Promise<ListingResult>

    The result of the listing created in the Immutable services.

  • Get required transactions and messages for signing prior to creating a bid through the createBid method

    Parameters

    Returns Promise<PrepareOrderResponse>

    PrepareBidResponse includes the unsigned approval transaction, the typed order message for signing and the order components that can be submitted to createBid with a signature.

  • Create a bid

    Parameters

    Returns Promise<BidResult>

    The result of the bid created in the Immutable services.

  • Get required transactions and messages for signing prior to creating a collection bid through the createCollectionBid method

    Parameters

    Returns Promise<PrepareOrderResponse>

    PrepareCollectionBidResponse includes the unsigned approval transaction, the typed order message for signing and the order components that can be submitted to createCollectionBid with a signature.

  • Create a collection bid

    Parameters

    Returns Promise<CollectionBidResult>

    The result of the collection bid created in the Immutable services.

  • Get unsigned transactions that can be submitted to fulfil an open order. If the approval transaction exists it must be signed and submitted to the chain before the fulfilment transaction can be submitted or it will be reverted.

    Parameters

    • orderId: string

      The orderId to fulfil.

    • takerAddress: string

      The address of the account fulfilling the order.

    • takerFees: FeeValue[]

      Taker ecosystem fees to be paid.

    • OptionalamountToFill: string

      Amount of the order to fill, defaults to sell item amount. Only applies to ERC1155 orders

    • OptionaltokenId: string

    Returns Promise<FulfillOrderResponse>

    Approval and fulfilment transactions.

  • Get unsigned transactions that can be submitted to fulfil multiple open orders. If approval transactions exist, they must be signed and submitted to the chain before the fulfilment transaction can be submitted or it will be reverted.

    Parameters

    • orders: FulfillmentOrder[] | FulfillmentListing[]

      The details of the orders to fulfil, amounts to fill and taker ecosystem fees to be paid.

    • takerAddress: string

      The address of the account fulfilling the order.

    Returns Promise<FulfillBulkOrdersResponse>

    Approval and fulfilment transactions.

  • Cancelling orders is a gasless alternative to on-chain cancellation exposed with cancelOrdersOnChain. For the orderbook to authenticate the cancellation, the creator of the orders must sign an EIP712 message containing the orderIds.

    Parameters

    • orderIds: string[]

      The orderIds to attempt to cancel.

    Returns Promise<PrepareCancelOrdersResponse>

    The signable action to cancel the orders.

  • Cancelling orders is a gasless alternative to on-chain cancellation exposed with cancelOrdersOnChain. Orders cancelled this way cannot be fulfilled and will be removed from the orderbook. If there is pending fulfillment data outstanding for the order, its cancellation will be pending until the fulfillment window has passed. prepareOrderCancellations can be used to get the signable action that is signed to get the signature required for this call.

    Parameters

    • orderIds: string[]

      The orderIds to attempt to cancel.

    • accountAddress: string

      The address of the account cancelling the orders.

    • signature: string

      The signature obtained by signing the message obtained from prepareOrderCancellations.

    Returns Promise<CancelOrdersResult>

    The result of the off-chain cancellation request

  • Get an unsigned order cancellation transaction. Orders can only be cancelled by the account that created them. All of the orders must be from the same seaport contract. If trying to cancel orders from multiple seaport contracts, group the orderIds by seaport contract and call this method for each group.

    Parameters

    • orderIds: string[]

      The orderIds to cancel.

    • accountAddress: string

      The address of the account cancelling the order.

    Returns Promise<CancelOrdersOnChainResponse>

    The unsigned cancel order action