zkEVM orderbook SDK

Param

Configuration for Immutable services.

Hierarchy

  • Orderbook

Constructors

Properties

apiClient: any
seaport: any
orderbookConfig: any

Methods

  • Get an order by ID

    Parameters

    • listingId: string

      The listingId to find.

    Returns Promise<orderbook.ListingResult>

    The returned order result.

  • Get a trade by ID

    Parameters

    • tradeId: string

      The tradeId to find.

    Returns Promise<orderbook.TradeResult>

    The returned order result.

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

    Parameters

    Returns Promise<orderbook.ListTradesResult>

    The paged trades.

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

    Parameters

    Returns Promise<orderbook.PrepareListingResponse>

    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.

  • 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

    • listingId: string

      The listingId to fulfil.

    • takerAddress: string

      The address of the account fulfilling the order.

    • takerFees: orderbook.FeeValue[]

      Taker ecosystem fees to be paid.

    Returns Promise<orderbook.FulfillOrderResponse>

    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<orderbook.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. prepareOffchainOrderCancellations 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

    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<orderbook.CancelOrdersOnChainResponse>

    The unsigned cancel order action

Generated using TypeDoc