Class Gondi

Hierarchy

  • Gondi

Constructors

Methods

Properties

Constructors

Methods

  • Signs and saves an item offer. A lenderRefinanceDisabled offer signs for MultiSourceLoan v3.2, the only version that signs the flag; any other offer signs for v3.1.

    Parameters

    • offer: Types.SingleNftOfferInput
    • Optional publication: LoanOfferPublicationInput

      Optional unsigned admission metadata. Previews before signing and throws the backend rejection reason. Identical retries after failed saves reuse the signature; a successful save clears it. Throws Offer expired once expirationTime has passed, before asking for a signature.

    Returns Promise<{
        aprBps: bigint;
        borrowerAddress: `0x${string}`;
        capacity: bigint;
        contractAddress: `0x${string}`;
        duration: bigint;
        expirationTime: bigint;
        fee: bigint;
        lenderAddress: `0x${string}`;
        lenderRefinanceDisabled?: boolean;
        maxSeniorRepayment?: InputMaybe<bigint>;
        maxTrancheFloor?: InputMaybe<bigint>;
        nftId: number;
        offerHash: `0x${string}`;
        offerId: bigint;
        offerValidators: OfferValidatorInput[];
        principalAddress: `0x${string}`;
        principalAmount: bigint;
        requiresLiquidation?: InputMaybe<boolean>;
        signature: `0x${string}`;
        signerAddress?: InputMaybe<`0x${string}`>;
        id: string;
        nftCollateralAddress: `0x${string}`;
        nftCollateralTokenId: bigint;
    }>

  • Signs and saves a collection offer without an item preview. A lenderRefinanceDisabled offer signs for MultiSourceLoan v3.2, the only version that signs the flag; any other offer signs for v3.1.

    Parameters

    • offer: Types.CollectionOfferInput
    • Optional publication: LoanOfferPublicationInput

      Optional unsigned admission metadata. Identical retries after failed saves reuse the signature; a successful save clears it. Throws Offer expired once expirationTime has passed, before asking for a signature. The backend evaluates collection offers independently for each item.

    Returns Promise<{
        aprBps: bigint;
        borrowerAddress: `0x${string}`;
        capacity: bigint;
        collectionId: number;
        contractAddress: `0x${string}`;
        duration: bigint;
        expirationTime: bigint;
        fee: bigint;
        lenderAddress: `0x${string}`;
        lenderRefinanceDisabled?: boolean;
        maxSeniorRepayment?: InputMaybe<bigint>;
        maxTrancheFloor?: InputMaybe<bigint>;
        offerHash: `0x${string}`;
        offerId: bigint;
        offerValidators: OfferValidatorInput[];
        principalAddress: `0x${string}`;
        principalAmount: bigint;
        requiresLiquidation?: InputMaybe<boolean>;
        signature: `0x${string}`;
        signerAddress?: InputMaybe<`0x${string}`>;
        id: string;
        nftCollateralAddress: `0x${string}`;
        nftCollateralTokenId: bigint;
    }>

  • A loan offer any NFT of the collection carrying every one of offer.traitIds can borrow against. A lenderRefinanceDisabled offer signs for MultiSourceLoan v3.2, the only version that signs the flag; any other offer signs for v3.1.

    Parameters

    Returns Promise<{
        aprBps: bigint;
        borrowerAddress: `0x${string}`;
        capacity: bigint;
        contractAddress: `0x${string}`;
        duration: bigint;
        expirationTime: bigint;
        fee: bigint;
        lenderAddress: `0x${string}`;
        lenderRefinanceDisabled?: boolean;
        maxSeniorRepayment?: InputMaybe<bigint>;
        maxTrancheFloor?: InputMaybe<bigint>;
        offerHash: `0x${string}`;
        offerId: bigint;
        offerValidators: OfferValidatorInput[];
        principalAddress: `0x${string}`;
        principalAmount: bigint;
        requiresLiquidation?: InputMaybe<boolean>;
        signature: `0x${string}`;
        signerAddress?: InputMaybe<`0x${string}`>;
        traitIds: number[];
        id: string;
        nftCollateralAddress: `0x${string}`;
        nftCollateralTokenId: bigint;
    }>

  • Publishes a bid or listing, signing the order when the API asks for it.

    The input picks the kind: tokenId for one NFT, traitIds for a trait bid, nftIds for a set bid that fills with any of the listed NFTs of collectionId (2 to 1,000), condition.anyTraitIds for an OR trait bid that fills with any NFT of collectionId carrying one of those values of a trait key, condition.expression for a condition bid that fills with any NFT of collectionId an all/any/not tree of traits and NFTs matches, and collectionId alone for a collection bid. A trait, set or collection bid fills up to maxExecutions times.

    Parameters

    Returns Promise<{
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        contractAddress: `0x${string}`;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        endPrice?: InputMaybe<bigint>;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        openSeaPrice?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        tokenId: bigint;
        __typename?: "MultipleTraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "MultipleTraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        traitIds: number[];
        __typename?: "MultipleTraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        condition?: InputMaybe<NftSetConditionInput>;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        nftIds?: InputMaybe<number[]>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "MultipleTraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        contractAddress: `0x${string}`;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        endPrice?: InputMaybe<bigint>;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        openSeaPrice?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        tokenId: bigint;
        __typename?: "TraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "TraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        traitIds: number[];
        __typename?: "TraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        condition?: InputMaybe<NftSetConditionInput>;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        nftIds?: InputMaybe<number[]>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "TraitOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        contractAddress: `0x${string}`;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        endPrice?: InputMaybe<bigint>;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        openSeaPrice?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        tokenId: bigint;
        __typename?: "SingleNFTOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "SingleNFTOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        traitIds: number[];
        __typename?: "SingleNFTOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        condition?: InputMaybe<NftSetConditionInput>;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        nftIds?: InputMaybe<number[]>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "SingleNFTOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        contractAddress: `0x${string}`;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        endPrice?: InputMaybe<bigint>;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        openSeaPrice?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        tokenId: bigint;
        __typename?: "SetBidOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "SetBidOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        traitIds: number[];
        __typename?: "SetBidOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        condition?: InputMaybe<NftSetConditionInput>;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        nftIds?: InputMaybe<number[]>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "SetBidOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        contractAddress: `0x${string}`;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        endPrice?: InputMaybe<bigint>;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        openSeaPrice?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        tokenId: bigint;
        __typename?: "CollectionOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "CollectionOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        traitIds: number[];
        __typename?: "CollectionOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    } | {
        amount?: InputMaybe<bigint>;
        budgetId?: any;
        collectionId: number;
        condition?: InputMaybe<NftSetConditionInput>;
        counter?: InputMaybe<bigint>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        fees?: InputMaybe<OrderFee[]>;
        isAsk?: InputMaybe<boolean>;
        maxExecutions?: InputMaybe<bigint>;
        nftIds?: InputMaybe<number[]>;
        price?: InputMaybe<bigint>;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        __typename?: "CollectionOrder";
        id: string;
        status: string;
        marketPlaceAddress: `0x${string}`;
    }>

  • Parameters

    Returns Promise<{
        __typename?: "SingleNFTOrder";
        id: string;
        price: bigint;
        fees: bigint;
        currencyAddress: `0x${string}`;
        marketPlace: string;
        status: string;
        startTime: Date;
        expiration: Date;
        maker: `0x${string}`;
        isAsk: boolean;
        nonce: bigint;
        taker: `0x${string}`;
        signature: `0x${string}`;
        marketPlaceAddress: `0x${string}`;
        evmOrder?: null | object;
        nft: {
            __typename?: "NFT";
            id: string;
        };
    }[]>

  • Publishes orders like makeOrders and lists each one on OpenSea too, under the same signature. Public asks on Ethereum only; the owner must have approved OpenSea's conduit for each collection. A refusal never touches the GONDI ask: openSeaListings holds one entry per ask with its status. PENDING means the listing waits to be posted to OpenSea: follow it with openSeaListingResults. POSTED carries its orderHash, and FAILED the error saying why OpenSea did not take it, with a failureReason when the caller can act on it: relistOrdersOnOpenSea signs a failed listing again. An order's openSeaPrice, at least its price, prices its OpenSea listing on its own, so the seller can receive there what they do on GONDI after OpenSea's higher fees.

    Parameters

    Returns Promise<{
        __typename?: "BulkNFTOrdersResult";
        orders: {
            __typename?: "SingleNFTOrder";
            id: string;
            price: bigint;
            fees: bigint;
            currencyAddress: `0x${string}`;
            marketPlace: string;
            status: string;
            startTime: Date;
            expiration: Date;
            maker: `0x${string}`;
            isAsk: boolean;
            nonce: bigint;
            taker: `0x${string}`;
            signature: `0x${string}`;
            marketPlaceAddress: `0x${string}`;
            evmOrder?: null | object;
            nft: {
                __typename?: "NFT";
                id: string;
            };
        }[];
        openSeaListings: {
            __typename?: "OpenSeaListingResult";
            contractAddress: `0x${string}`;
            tokenId: bigint;
            orderHash?: null | `0x${string}`;
            error?: null | string;
            failureReason?: null | TermsChanged;
            status: OpenSeaListingStatus;
        }[];
    }>

  • Signs again the OpenSea listings of the wallet's asks orderIds that failed, for example because OpenSea's fees for the collection changed after makeOrdersOnOpenSea signed them (failureReason: TERMS_CHANGED). The GONDI asks are not touched: same orders, same ids. Each listing is rebuilt on OpenSea's current terms at the OpenSea price it was first signed at, and one signature covers them all.

    A listing that cannot be signed again, because its ask ended or OpenSea no longer lists the collection, is left out of the signature and returned as FAILED with its error; when none can be, the wallet is not asked to sign.

    Parameters

    • orderIds: number[]

      The ids of the GONDI asks whose OpenSea listing is FAILED, 1 to 50.

    Returns Promise<{
        __typename?: "OpenSeaListingResult";
        contractAddress: `0x${string}`;
        tokenId: bigint;
        orderHash?: null | `0x${string}`;
        error?: null | string;
        failureReason?: null | TermsChanged;
        status: OpenSeaListingStatus;
    }[]>

    One entry per order: PENDING once its newly signed listing waits to be posted to OpenSea, or FAILED with the error. Follow the pending ones with openSeaListingResults.

    Throws

    When the API refuses the whole call: an order has no failed OpenSea listing (NOT_FAILED), or the signature did not match the current listings, usually because the terms changed again while signing (STALE_SIGNATURE: call the method again, a bounded number of times). Any other failure, such as the wallet rejecting the signature, is thrown as it is.

  • What became of the OpenSea listing of each of the wallet's asks among orderIds, as signed by makeOrdersOnOpenSea or relistOrdersOnOpenSea: PENDING until it is POSTED to OpenSea or FAILED, then with its error and, when the caller can act on it, its failureReason. An order with no OpenSea listing has no entry.

    Parameters

    • orderIds: number[]

    Returns Promise<{
        __typename?: "OpenSeaListingResult";
        contractAddress: `0x${string}`;
        tokenId: bigint;
        orderHash?: null | `0x${string}`;
        error?: null | string;
        failureReason?: null | TermsChanged;
        status: OpenSeaListingStatus;
    }[]>

  • Parameters

    Returns Promise<{
        blockchain: BlockchainEnum;
        counterOfferForId?: InputMaybe<number>;
        expiration: bigint;
        makerErc20s: `0x${string}`[];
        makerErc20sAmounts: bigint[];
        makerNfts: number[];
        makerNftsAmounts: bigint[];
        signature?: InputMaybe<`0x${string}`>;
        startTime: bigint;
        taker: `0x${string}`;
        takerErc20s: `0x${string}`[];
        takerErc20sAmounts: bigint[];
        takerNfts: number[];
        takerNftsAmounts: bigint[];
        __typename?: "Deal";
        id: string;
        status: string;
    }>

  • Parameters

    Returns Promise<{
        amount?: InputMaybe<bigint>;
        contractAddress: `0x${string}`;
        criteriaProof?: InputMaybe<`0x${string}`[]>;
        currencyAddress: `0x${string}`;
        expirationTime: bigint;
        extraSeaportData?: InputMaybe<`0x${string}`>;
        fees?: InputMaybe<OrderFee[]>;
        isAsk: boolean;
        orderToFill?: InputMaybe<number>;
        orderToFillInt64?: any;
        price?: InputMaybe<bigint>;
        repaymentSignature?: InputMaybe<`0x${string}`>;
        replaceOrderId?: InputMaybe<number>;
        replaceOrderIdInt64?: any;
        signature: InputMaybe<`0x${string}`>;
        startTime: bigint;
        stealth?: InputMaybe<boolean>;
        taker?: InputMaybe<`0x${string}`>;
        tokenId: bigint;
        __typename?: "SellAndRepayOrder";
        id: string;
        status: string;
        repaymentCalldata: `0x${string}`;
        marketPlaceAddress: `0x${string}`;
    }>

  • Parameters

    • __namedParameters: {
          amounts: bigint[];
          purchaseBundlerAddress?: `0x${string}`;
          contractAddress: `0x${string}`;
          loanDuration: bigint;
          offers: OfferFromExecutionOffer[];
          tokenId: bigint;
          creditPurchaseQuote?: Readonly<{
              orderId: number;
              price: bigint;
              buyer: `0x${string}`;
              sellerContract: `0x${string}`;
              sellerBundler: `0x${string}`;
              buyerBundler: `0x${string}`;
              loanCurrency: `0x${string}`;
              purchaseCurrency: `0x${string}`;
              netPrincipal: bigint;
              inputAmount: bigint;
              initialPayment: bigint;
              deadline: bigint;
              loanId: bigint;
              nftCollateralAddress: `0x${string}`;
              tokenId: bigint;
              loanHash: `0x${string}`;
              repaymentHash: `0x${string}`;
              repaymentSwapData: `0x${string}`;
              loanSwapData: `0x${string}`;
              callbackData: `0x${string}`;
          }>;
          buyWithLoanQuote?: BuyWithLoanQuote;
          repaymentCalldata?: null | `0x${string}`;
          sellAndRepaySwapData?: Maybe<`0x${string}`>;
          repayFlashLoanSwapParams?: Maybe<{
              inputCurrency: `0x${string}`;
              inputAmount: bigint;
              swapData: `0x${string}`;
          }>;
      }
      • amounts: bigint[]
      • Optional purchaseBundlerAddress?: `0x${string}`
      • contractAddress: `0x${string}`
      • loanDuration: bigint
      • offers: OfferFromExecutionOffer[]
      • tokenId: bigint
      • Optional creditPurchaseQuote?: Readonly<{
            orderId: number;
            price: bigint;
            buyer: `0x${string}`;
            sellerContract: `0x${string}`;
            sellerBundler: `0x${string}`;
            buyerBundler: `0x${string}`;
            loanCurrency: `0x${string}`;
            purchaseCurrency: `0x${string}`;
            netPrincipal: bigint;
            inputAmount: bigint;
            initialPayment: bigint;
            deadline: bigint;
            loanId: bigint;
            nftCollateralAddress: `0x${string}`;
            tokenId: bigint;
            loanHash: `0x${string}`;
            repaymentHash: `0x${string}`;
            repaymentSwapData: `0x${string}`;
            loanSwapData: `0x${string}`;
            callbackData: `0x${string}`;
        }>
      • Optional buyWithLoanQuote?: BuyWithLoanQuote
      • Optional repaymentCalldata?: null | `0x${string}`
      • Optional sellAndRepaySwapData?: Maybe<`0x${string}`>
      • Optional repayFlashLoanSwapParams?: Maybe<{
            inputCurrency: `0x${string}`;
            inputAmount: bigint;
            swapData: `0x${string}`;
        }>

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Quotes capped buyer funding for v3.1 credit against an Ethereum v3.2 seller.

    Parameters

    Returns Promise<Readonly<{
        orderId: number;
        price: bigint;
        buyer: `0x${string}`;
        sellerContract: `0x${string}`;
        sellerBundler: `0x${string}`;
        buyerBundler: `0x${string}`;
        loanCurrency: `0x${string}`;
        purchaseCurrency: `0x${string}`;
        netPrincipal: bigint;
        inputAmount: bigint;
        initialPayment: bigint;
        deadline: bigint;
        loanId: bigint;
        nftCollateralAddress: `0x${string}`;
        tokenId: bigint;
        loanHash: `0x${string}`;
        repaymentHash: `0x${string}`;
        repaymentSwapData: `0x${string}`;
        loanSwapData: `0x${string}`;
        callbackData: `0x${string}`;
    }>>

  • Parameters

    • order: {
          cancelCalldata: `0x${string}`;
          marketPlaceAddress: `0x${string}`;
      }
      • cancelCalldata: `0x${string}`
      • marketPlaceAddress: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Cancels the wallet's trade orders by id, at most 100 per call, with one API call. Every order ends up unfillable: the default only skips the transaction for the bids no one can fill without the API, and cancels every other order on-chain.

    cancelTradeOrders cancels the bids that cancelsOffChain (restricted to the GONDI signed zone, so they only fill with a signature the API issues) without a transaction, and returns the Seaport cancel calldata of the rest. Each calldata entry is sent as its own transaction, one after another: usually one per marketplace, and more when the API splits a marketplace's cancel because it would not fit in one transaction. So the number of transactions is only known from the result, and a later one can fail after an earlier one was sent.

    An off-chain cancel is final once the last fill signature already issued for the bid expires, a few minutes at most. Pass onChain: true to cancel every order on-chain instead, final as soon as the transaction is mined.

    Parameters

    • __namedParameters: {
          orderIds: number[];
          onChain?: boolean;
      }
      • orderIds: number[]
      • Optional onChain?: boolean

    Returns Promise<{
        offChainOrderIds: number[];
        transactions: {
            txHash: `0x${string}`;
            waitTxInBlock: (() => Promise<TransactionReceipt>);
        }[];
    }>

    The ids cancelled off-chain, and one { txHash, waitTxInBlock } per transaction sent, in the order they were sent.

  • Parameters

    • __namedParameters: {
          id: bigint;
          contractAddress: `0x${string}`;
      }
      • id: bigint
      • contractAddress: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            lender: `0x${string}`;
            offerId: bigint;
        } | {
            lender: `0x${string}`;
            offerId: bigint;
        } | {
            lender: `0x${string}`;
            offerId: bigint;
        }>);
    }>

  • Parameters

    • __namedParameters: {
          ids: bigint[];
          contractAddress: `0x${string}`;
      }
      • ids: bigint[]
      • contractAddress: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            events: ({
                lender: `0x${string}`;
                offerId: bigint;
            } | {
                lender: `0x${string}`;
                offerId: bigint;
            } | {
                lender: `0x${string}`;
                offerId: bigint;
            })[];
        }>);
    }>

  • Parameters

    • __namedParameters: {
          minId: bigint;
          contractAddress: `0x${string}`;
      }
      • minId: bigint
      • contractAddress: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            lender: `0x${string}`;
            minOfferId: bigint;
        }>);
    }>

  • Hides a loan offer from the GONDI API's listings. Off-chain only: the lender's signature stays valid, so anyone already holding it can still start a loan with the offer. Use cancelOffer to make it unexecutable on-chain.

    Parameters

    • __namedParameters: {
          id: bigint;
          contractAddress: `0x${string}`;
      }
      • id: bigint
      • contractAddress: `0x${string}`

    Returns Promise<HideOfferMutation>

  • Hides several loan offers from the GONDI API's listings. Off-chain only, like hideOffer: use cancelOffers to make them unexecutable on-chain.

    Parameters

    • __namedParameters: {
          ids: bigint[];
          contractAddress: `0x${string}`;
      }
      • ids: bigint[]
      • contractAddress: `0x${string}`

    Returns Promise<HideOffersMutation>

  • Lists a loan offer hidden with hideOffer in the GONDI API again.

    Parameters

    • __namedParameters: {
          id: bigint;
          contractAddress: `0x${string}`;
      }
      • id: bigint
      • contractAddress: `0x${string}`

    Returns Promise<UnhideOfferMutation>

  • Signs and saves a refinance offer, optionally with a matching fallback.

    Parameters

    Returns Promise<{
        id: string;
        loanId: string;
        duration: bigint;
        principalAmount: bigint;
        aprBps: bigint;
        renegotiationId: bigint;
        expirationTime: bigint;
        targetPrincipal?: InputMaybe<bigint[]>;
        requiresLiquidation?: InputMaybe<boolean>;
        strictImprovement?: InputMaybe<boolean>;
        trancheIndex?: InputMaybe<bigint[]>;
        lenderAddress: `0x${string}`;
        signerAddress?: InputMaybe<`0x${string}`>;
        offerHash: `0x${string}`;
        feeAmount: bigint;
        isAddNewTranche?: InputMaybe<boolean>;
        private?: boolean;
        signature: `0x${string}`;
    } | {
        offerHash: `0x${string}`;
        signature: `0x${string}`;
        renegotiationId: bigint;
        targetPrincipal: bigint[];
        trancheIndex: bigint[];
        lenderAddress: `0x${string}`;
        signerAddress: InputMaybe<`0x${string}`>;
        loanId: string;
        duration: bigint;
        principalAmount: bigint;
        aprBps: bigint;
        expirationTime: bigint;
        requiresLiquidation?: InputMaybe<boolean>;
        strictImprovement?: InputMaybe<boolean>;
        feeAmount: bigint;
        isAddNewTranche?: InputMaybe<boolean>;
    }>

  • Parameters

    • __namedParameters: {
          id: bigint;
          contractAddress: `0x${string}`;
      }
      • id: bigint
      • contractAddress: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            lender: `0x${string}`;
            renegotiationId: bigint;
        } | {
            lender: `0x${string}`;
            renegotiationId: bigint;
        } | {
            lender: `0x${string}`;
            renegotiationId: bigint;
        }>);
    }>

  • Hides a renegotiation offer from the GONDI API's listings. Off-chain only: the lender's signature stays valid, so anyone already holding it can still refinance with the offer. Use cancelRefinanceOffer to make it unexecutable on-chain.

    Parameters

    • __namedParameters: {
          id: bigint;
          contractAddress: `0x${string}`;
      }
      • id: bigint
      • contractAddress: `0x${string}`

    Returns Promise<HideRenegotiationOfferMutation>

  • Hides a bid. isAsk is required so a listing is rejected here rather than by the API, which refuses it either way.

    Parameters

    • __namedParameters: {
          id: number;
          isAsk: boolean;
      }
      • id: number
      • isAsk: boolean

    Returns Promise<HideOrderMutation>

    Deprecated

    Listings can no longer be hidden — cancel one on-chain instead. Still hides bids.

  • Unhides a bid. isAsk is required so a listing is rejected here rather than by the API, which refuses it either way.

    Parameters

    • __namedParameters: {
          id: number;
          isAsk: boolean;
      }
      • id: number
      • isAsk: boolean

    Returns Promise<ShowOrderMutation>

    Deprecated

    Listings can no longer be hidden — a listing hidden before that change stays hidden and is cancelled on-chain. Still unhides bids.

  • Parameters

    • __namedParameters: {
          minId: bigint;
          contractAddress: `0x${string}`;
      }
      • minId: bigint
      • contractAddress: `0x${string}`

    Returns Promise<void | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            lender: `0x${string}`;
            minRenegotiationId: bigint;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                lenderRefinanceDisabled: boolean;
                id: string;
            };
            loanId: bigint;
            offerIds: string[];
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                source: readonly {
                    loanId: bigint;
                    lender: `0x${string}`;
                    principalAmount: bigint;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                id: string;
            };
            loanId: bigint;
            offerId: string;
        }>);
    }>

  • Emits several loans in one transaction: either every loan is emitted or none is.

    Every offer of every loan must belong to the same MultiSourceLoan contract, of version 3 or later, and each NFT goes through the flagged-NFT check emitLoan runs before anything is sent. waitTxInBlock resolves to loans, one per item and in the same order, each shaped as emitLoan returns it.

    IMPLEMENTATION NOTE: each loan is an encoded emitLoan call inside the contract's multicall(bytes[]), which MultiSourceLoan inherits from Multicall (florida-contracts src/lib/loans/MultiSourceLoan.sol, src/lib/Multicall.sol). It delegatecalls the calls in order, so msg.sender stays the borrower, and reverts the whole transaction with MulticallFailed(index, reason) as soon as one of them fails.

    Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loans: {
                loan: {
                    contractAddress: `0x${string}`;
                    borrower: `0x${string}`;
                    nftCollateralTokenId: bigint;
                    nftCollateralAddress: `0x${string}`;
                    principalAddress: `0x${string}`;
                    principalAmount: bigint;
                    startTime: bigint;
                    duration: bigint;
                    tranche: readonly {
                        loanId: bigint;
                        floor: bigint;
                        principalAmount: bigint;
                        lender: `0x${string}`;
                        accruedInterest: bigint;
                        startTime: bigint;
                        aprBps: bigint;
                    }[];
                    protocolFee: bigint;
                    id: string;
                } | {
                    contractAddress: `0x${string}`;
                    borrower: `0x${string}`;
                    nftCollateralTokenId: bigint;
                    nftCollateralAddress: `0x${string}`;
                    principalAddress: `0x${string}`;
                    principalAmount: bigint;
                    startTime: bigint;
                    duration: bigint;
                    tranche: readonly {
                        loanId: bigint;
                        floor: bigint;
                        principalAmount: bigint;
                        lender: `0x${string}`;
                        accruedInterest: bigint;
                        startTime: bigint;
                        aprBps: bigint;
                    }[];
                    protocolFee: bigint;
                    id: string;
                } | {
                    contractAddress: `0x${string}`;
                    borrower: `0x${string}`;
                    nftCollateralTokenId: bigint;
                    nftCollateralAddress: `0x${string}`;
                    principalAddress: `0x${string}`;
                    principalAmount: bigint;
                    startTime: bigint;
                    duration: bigint;
                    tranche: readonly {
                        loanId: bigint;
                        floor: bigint;
                        principalAmount: bigint;
                        lender: `0x${string}`;
                        accruedInterest: bigint;
                        startTime: bigint;
                        aprBps: bigint;
                    }[];
                    protocolFee: bigint;
                    lenderRefinanceDisabled: boolean;
                    id: string;
                };
                loanId: bigint;
                offerIds: string[];
            }[];
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                lenderRefinanceDisabled: boolean;
                id: string;
            };
            loanId: bigint;
            offerIds: string[];
        }>);
    }>

  • Repays loan and emits its replacement from executionData in one flash-loan backed transaction. The borrower signs the expiring execution data first and the repayment data, which carries no nonce or expiry, last, so declining an earlier prompt never leaves a repayment signature behind. Every read, the migrator nonce included, finishes before the first prompt, so a failed read cannot strand a signature either.

    Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Quotes atomic USDC/WETH loan replacement, including capped borrower spending.

    Returns Promise<Readonly<{
        borrower: `0x${string}`;
        previousContract: `0x${string}`;
        replacementContract: `0x${string}`;
        purchaseBundler: `0x${string}`;
        positionMigrator: `0x${string}`;
        loanId: bigint;
        loanHash: `0x${string}`;
        executionHash: `0x${string}`;
        oldCurrency: `0x${string}`;
        newCurrency: `0x${string}`;
        repaymentAmount: bigint;
        oldCurrencyApprovalAmount: bigint;
        quotedInput: bigint;
        maximumInput: bigint;
        premiumBps: bigint;
        premium: bigint;
        maximumFlashRepayment: bigint;
        newPrincipal: bigint;
        originationFee: bigint;
        replacementProtocolFeeBps: bigint;
        netNewPrincipal: bigint;
        maximumTopUp: bigint;
        minimumSurplus: bigint;
        slippageBps: bigint;
        deadline: bigint;
        blockNumber: bigint;
    }>>

  • Prepare old-currency repayment and NFT approvals before obtaining the final quote. Approve its exact maximumFlashRepayment, then execute that same quote before expiry.

    Parameters

    • input: CrossCurrencyRenegotiationInput & {
          quote: Readonly<{
              borrower: `0x${string}`;
              previousContract: `0x${string}`;
              replacementContract: `0x${string}`;
              purchaseBundler: `0x${string}`;
              positionMigrator: `0x${string}`;
              loanId: bigint;
              loanHash: `0x${string}`;
              executionHash: `0x${string}`;
              oldCurrency: `0x${string}`;
              newCurrency: `0x${string}`;
              repaymentAmount: bigint;
              oldCurrencyApprovalAmount: bigint;
              quotedInput: bigint;
              maximumInput: bigint;
              premiumBps: bigint;
              premium: bigint;
              maximumFlashRepayment: bigint;
              newPrincipal: bigint;
              originationFee: bigint;
              replacementProtocolFeeBps: bigint;
              netNewPrincipal: bigint;
              maximumTopUp: bigint;
              minimumSurplus: bigint;
              slippageBps: bigint;
              deadline: bigint;
              blockNumber: bigint;
          }>;
      }

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            previousLoanId: bigint;
            loanId: bigint;
            loan: {
                id: string;
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
            } | {
                id: string;
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
            } | {
                id: string;
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                lenderRefinanceDisabled: boolean;
            };
        }>);
    }>

  • Parameters

    • __namedParameters: {
          loan: LoanToMslLoanType;
          loanId: bigint;
          nftReceiver?: `0x${string}`;
      }

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loanId: bigint;
            totalRepayment: bigint;
            fee: bigint;
        } | {
            loanId: bigint;
            totalRepayment: bigint;
            fee: bigint;
        } | {
            loanId: bigint;
            totalRepayment: bigint;
            fee: bigint;
        }>);
    }>

  • Parameters

    Returns Promise<{
        offers: ({
            type: undefined | "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer";
            lender: undefined | null | `0x${string}`;
            borrower: undefined | null | `0x${string}`;
            signer: undefined | null | `0x${string}`;
            offerValidators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
            nftCollateralAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            id: string;
            offerId: bigint;
            lenderAddress?: null | `0x${string}`;
            borrowerAddress?: null | `0x${string}`;
            signerAddress?: null | `0x${string}`;
            contractAddress: `0x${string}`;
            requiresLiquidation?: null | boolean;
            principalAddress: `0x${string}`;
            principalAmount: bigint;
            aprBps: bigint;
            fee: bigint;
            capacity: bigint;
            expirationTime: bigint;
            duration: bigint;
            status: string;
            offerHash?: null | `0x${string}`;
            signature?: null | `0x${string}`;
            createdDate?: null | Date;
            repayment: bigint;
            hidden?: null | boolean;
            maxSeniorRepayment: bigint;
            lenderRefinanceDisabled: boolean;
            collection: {
                __typename?: "Collection";
                id: string;
                slug: string;
                contractData: {
                    __typename?: "ContractData";
                    contractAddress: `0x${string}`;
                };
            };
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            validators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
        } | {
            type: undefined | "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer";
            lender: undefined | null | `0x${string}`;
            borrower: undefined | null | `0x${string}`;
            signer: undefined | null | `0x${string}`;
            offerValidators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
            nftCollateralAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            id: string;
            offerId: bigint;
            lenderAddress?: null | `0x${string}`;
            borrowerAddress?: null | `0x${string}`;
            signerAddress?: null | `0x${string}`;
            contractAddress: `0x${string}`;
            requiresLiquidation?: null | boolean;
            principalAddress: `0x${string}`;
            principalAmount: bigint;
            aprBps: bigint;
            fee: bigint;
            capacity: bigint;
            expirationTime: bigint;
            duration: bigint;
            status: string;
            offerHash?: null | `0x${string}`;
            signature?: null | `0x${string}`;
            createdDate?: null | Date;
            repayment: bigint;
            hidden?: null | boolean;
            maxSeniorRepayment: bigint;
            lenderRefinanceDisabled: boolean;
            nft: {
                __typename?: "NFT";
                id: string;
                tokenId: bigint;
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                    slug: string;
                    contractData: {
                        __typename?: "ContractData";
                        contractAddress: `0x${string}`;
                    };
                };
            };
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            validators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
        } | {
            type: undefined | "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer";
            lender: undefined | null | `0x${string}`;
            borrower: undefined | null | `0x${string}`;
            signer: undefined | null | `0x${string}`;
            offerValidators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
            nftCollateralAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            id: string;
            offerId: bigint;
            lenderAddress?: null | `0x${string}`;
            borrowerAddress?: null | `0x${string}`;
            signerAddress?: null | `0x${string}`;
            contractAddress: `0x${string}`;
            requiresLiquidation?: null | boolean;
            principalAddress: `0x${string}`;
            principalAmount: bigint;
            aprBps: bigint;
            fee: bigint;
            capacity: bigint;
            expirationTime: bigint;
            duration: bigint;
            status: string;
            offerHash?: null | `0x${string}`;
            signature?: null | `0x${string}`;
            createdDate?: null | Date;
            repayment: bigint;
            hidden?: null | boolean;
            maxSeniorRepayment: bigint;
            lenderRefinanceDisabled: boolean;
            collection: {
                __typename?: "Collection";
                id: string;
                slug: string;
                contractData: {
                    __typename?: "ContractData";
                    contractAddress: `0x${string}`;
                };
            };
            traits: {
                __typename?: "Trait";
                id: string;
                type: string;
                value: string;
            }[];
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            validators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
        })[];
        hasNextPage: true;
        cursor: string;
    } | {
        offers: ({
            type: undefined | "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer";
            lender: undefined | null | `0x${string}`;
            borrower: undefined | null | `0x${string}`;
            signer: undefined | null | `0x${string}`;
            offerValidators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
            nftCollateralAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            id: string;
            offerId: bigint;
            lenderAddress?: null | `0x${string}`;
            borrowerAddress?: null | `0x${string}`;
            signerAddress?: null | `0x${string}`;
            contractAddress: `0x${string}`;
            requiresLiquidation?: null | boolean;
            principalAddress: `0x${string}`;
            principalAmount: bigint;
            aprBps: bigint;
            fee: bigint;
            capacity: bigint;
            expirationTime: bigint;
            duration: bigint;
            status: string;
            offerHash?: null | `0x${string}`;
            signature?: null | `0x${string}`;
            createdDate?: null | Date;
            repayment: bigint;
            hidden?: null | boolean;
            maxSeniorRepayment: bigint;
            lenderRefinanceDisabled: boolean;
            collection: {
                __typename?: "Collection";
                id: string;
                slug: string;
                contractData: {
                    __typename?: "ContractData";
                    contractAddress: `0x${string}`;
                };
            };
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            validators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
        } | {
            type: undefined | "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer";
            lender: undefined | null | `0x${string}`;
            borrower: undefined | null | `0x${string}`;
            signer: undefined | null | `0x${string}`;
            offerValidators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
            nftCollateralAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            id: string;
            offerId: bigint;
            lenderAddress?: null | `0x${string}`;
            borrowerAddress?: null | `0x${string}`;
            signerAddress?: null | `0x${string}`;
            contractAddress: `0x${string}`;
            requiresLiquidation?: null | boolean;
            principalAddress: `0x${string}`;
            principalAmount: bigint;
            aprBps: bigint;
            fee: bigint;
            capacity: bigint;
            expirationTime: bigint;
            duration: bigint;
            status: string;
            offerHash?: null | `0x${string}`;
            signature?: null | `0x${string}`;
            createdDate?: null | Date;
            repayment: bigint;
            hidden?: null | boolean;
            maxSeniorRepayment: bigint;
            lenderRefinanceDisabled: boolean;
            nft: {
                __typename?: "NFT";
                id: string;
                tokenId: bigint;
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                    slug: string;
                    contractData: {
                        __typename?: "ContractData";
                        contractAddress: `0x${string}`;
                    };
                };
            };
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            validators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
        } | {
            type: undefined | "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer";
            lender: undefined | null | `0x${string}`;
            borrower: undefined | null | `0x${string}`;
            signer: undefined | null | `0x${string}`;
            offerValidators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[] | {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
            nftCollateralAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            id: string;
            offerId: bigint;
            lenderAddress?: null | `0x${string}`;
            borrowerAddress?: null | `0x${string}`;
            signerAddress?: null | `0x${string}`;
            contractAddress: `0x${string}`;
            requiresLiquidation?: null | boolean;
            principalAddress: `0x${string}`;
            principalAmount: bigint;
            aprBps: bigint;
            fee: bigint;
            capacity: bigint;
            expirationTime: bigint;
            duration: bigint;
            status: string;
            offerHash?: null | `0x${string}`;
            signature?: null | `0x${string}`;
            createdDate?: null | Date;
            repayment: bigint;
            hidden?: null | boolean;
            maxSeniorRepayment: bigint;
            lenderRefinanceDisabled: boolean;
            collection: {
                __typename?: "Collection";
                id: string;
                slug: string;
                contractData: {
                    __typename?: "ContractData";
                    contractAddress: `0x${string}`;
                };
            };
            traits: {
                __typename?: "Trait";
                id: string;
                type: string;
                value: string;
            }[];
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            validators: {
                __typename?: "OfferValidator";
                arguments: `0x${string}`;
                validator: `0x${string}`;
            }[];
        })[];
        hasNextPage: false;
        cursor: null;
    }>

  • Parameters

    Returns Promise<{
        loans: {
            type: undefined | "MultiSourceLoan";
            contractAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            nftCollateralAddress: undefined | `0x${string}`;
            borrower: `0x${string}`;
            startTime: bigint;
            source: {
                lender: `0x${string}`;
                loanId: bigint;
                startTime: bigint;
                __typename?: "Source";
                id: string;
                originationFee: bigint;
                principalAmount: bigint;
                lenderAddress: string;
                accruedInterest: bigint;
                aprBps: bigint;
            }[];
            id: string;
            address: `0x${string}`;
            loanId: number;
            timestamp: Date;
            txHash: `0x${string}`;
            indexInBlock: number;
            borrowerAddress: `0x${string}`;
            principalAddress: `0x${string}`;
            duration: bigint;
            status: string;
            principalAmount: bigint;
            blendedAprBps: number;
            totalOriginationFee: bigint;
            protocolFee: bigint;
            lenderRefinanceDisabled: boolean;
            offer: {
                __typename?: "CollectionOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "SetOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "SingleNFTOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "TraitOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            };
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            repaidActivity?: null | {
                __typename?: "LoanRepaid";
                totalInterest: bigint;
                timestamp: Date;
            };
            nft: {
                __typename?: "NFT";
                id: string;
                name?: null | string;
                tokenId: bigint;
                nftId: string;
                owner?: null | `0x${string}`;
                image?: null | {
                    __typename?: "Asset";
                    data: string;
                    cacheUrl?: null | string;
                    contentTypeMime: string;
                    accessTypeName: string;
                };
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                    slug: string;
                    name?: null | string;
                    nftsCount?: null | number;
                    contractData: {
                        __typename?: "ContractData";
                        contractAddress: `0x${string}`;
                    };
                };
            };
            sources: {
                __typename?: "Source";
                id: string;
                loanId: string;
                originationFee: bigint;
                principalAmount: bigint;
                lenderAddress: string;
                accruedInterest: bigint;
                aprBps: bigint;
                startTime: Date;
            }[];
        }[];
        hasNextPage: true;
        cursor: string;
    } | {
        loans: {
            type: undefined | "MultiSourceLoan";
            contractAddress: `0x${string}`;
            nftCollateralTokenId: bigint;
            nftCollateralAddress: undefined | `0x${string}`;
            borrower: `0x${string}`;
            startTime: bigint;
            source: {
                lender: `0x${string}`;
                loanId: bigint;
                startTime: bigint;
                __typename?: "Source";
                id: string;
                originationFee: bigint;
                principalAmount: bigint;
                lenderAddress: string;
                accruedInterest: bigint;
                aprBps: bigint;
            }[];
            id: string;
            address: `0x${string}`;
            loanId: number;
            timestamp: Date;
            txHash: `0x${string}`;
            indexInBlock: number;
            borrowerAddress: `0x${string}`;
            principalAddress: `0x${string}`;
            duration: bigint;
            status: string;
            principalAmount: bigint;
            blendedAprBps: number;
            totalOriginationFee: bigint;
            protocolFee: bigint;
            lenderRefinanceDisabled: boolean;
            offer: {
                __typename?: "CollectionOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "SetOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "SingleNFTOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "TraitOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            };
            currency: {
                __typename?: "Currency";
                symbol: string;
                decimals: number;
                address: `0x${string}`;
            };
            repaidActivity?: null | {
                __typename?: "LoanRepaid";
                totalInterest: bigint;
                timestamp: Date;
            };
            nft: {
                __typename?: "NFT";
                id: string;
                name?: null | string;
                tokenId: bigint;
                nftId: string;
                owner?: null | `0x${string}`;
                image?: null | {
                    __typename?: "Asset";
                    data: string;
                    cacheUrl?: null | string;
                    contentTypeMime: string;
                    accessTypeName: string;
                };
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                    slug: string;
                    name?: null | string;
                    nftsCount?: null | number;
                    contractData: {
                        __typename?: "ContractData";
                        contractAddress: `0x${string}`;
                    };
                };
            };
            sources: {
                __typename?: "Source";
                id: string;
                loanId: string;
                originationFee: bigint;
                principalAmount: bigint;
                lenderAddress: string;
                accruedInterest: bigint;
                aprBps: bigint;
                startTime: Date;
            }[];
        }[];
        hasNextPage: false;
        cursor: null;
    }>

  • Parameters

    Returns Promise<{
        listings: {
            __typename?: "Listing";
            id: string;
            marketplaceName: MarketplaceEnum;
            createdDate: Date;
            desiredDuration?: null | number;
            desiredPrincipalAddress?: null | `0x${string}`;
            user: {
                __typename?: "User";
                walletAddress: `0x${string}`;
            };
            nft: {
                __typename?: "NFT";
                id: string;
                tokenId: bigint;
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                    slug: string;
                    contractData: {
                        __typename?: "ContractData";
                        contractAddress: `0x${string}`;
                    };
                };
            };
        }[];
        hasNextPage: true;
        cursor: string;
    } | {
        listings: {
            __typename?: "Listing";
            id: string;
            marketplaceName: MarketplaceEnum;
            createdDate: Date;
            desiredDuration?: null | number;
            desiredPrincipalAddress?: null | `0x${string}`;
            user: {
                __typename?: "User";
                walletAddress: `0x${string}`;
            };
            nft: {
                __typename?: "NFT";
                id: string;
                tokenId: bigint;
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                    slug: string;
                    contractData: {
                        __typename?: "ContractData";
                        contractAddress: `0x${string}`;
                    };
                };
            };
        }[];
        hasNextPage: false;
        cursor: null;
    }>

  • Parameters

    • props: Object

    Returns Promise<number>

  • Parameters

    • props: {
          statsCurrency?: `0x${string}`;
          standards?: TokenStandardType[];
          collections?: number[];
          cursor?: string;
      }
      • Optional statsCurrency?: `0x${string}`
      • Optional standards?: TokenStandardType[]
      • Optional collections?: number[]
      • Optional cursor?: string

    Returns Promise<{
        collections: {
            __typename?: "Collection";
            id: string;
            name?: null | string;
            slug: string;
            description?: null | string;
            discordUrl?: null | string;
            twitterUsername?: null | string;
            externalUrl?: null | string;
            collectionUrl?: null | string;
            verified: boolean;
            wrapperCollections: {
                __typename?: "Collection";
                contractData: {
                    __typename?: "ContractData";
                    contractAddress: `0x${string}`;
                };
            }[];
            image?: null | {
                __typename?: "Asset";
                cacheUrl?: null | string;
            };
            bannerImage?: null | {
                __typename?: "Asset";
                cacheUrl?: null | string;
            };
            contractData: {
                __typename?: "ContractData";
                blockchain: string;
                contractAddress: `0x${string}`;
                createdDate: Date;
                creatorAddress?: null | `0x${string}`;
            };
            statistics: {
                __typename?: "CollectionStatistics";
                floorPrice7d?: null | number;
                floorPrice30d?: null | number;
                totalVolume?: null | number;
                totalVolume1y?: null | number;
                totalVolume3m?: null | number;
                totalVolume1m?: null | number;
                totalVolume1w?: null | number;
                totalLoanVolume: bigint;
                totalLoanVolume1w: bigint;
                totalLoanVolume1m: bigint;
                totalLoanVolume3m: bigint;
                totalLoanVolume1y: bigint;
                numberOfPricedNfts: number;
                nftsCount?: null | number;
                percentageInOutstandingLoans: number;
                repaymentRate: number;
                floorPrice?: null | {
                    __typename?: "CurrencyAmount";
                    amount: number;
                    currency: {
                        __typename?: "Currency";
                        address: `0x${string}`;
                        decimals: number;
                    };
                };
                bestOffer?: null | {
                    __typename?: "CurrencyAmount";
                    amount: number;
                    currency: {
                        __typename?: "Currency";
                        address: `0x${string}`;
                        decimals: number;
                    };
                };
            };
        }[];
        pageInfo: {
            __typename?: "PageInfo";
            endCursor?: null | string;
            hasNextPage: boolean;
        };
    }>

  • Parameters

    • props: {
          slug: string;
          contractAddress?: undefined;
      }
      • slug: string
      • Optional contractAddress?: undefined

    Returns Promise<number>

  • Parameters

    • props: {
          slug?: undefined;
          contractAddress: `0x${string}`;
      }
      • Optional slug?: undefined
      • contractAddress: `0x${string}`

    Returns Promise<number[]>

  • Lists trade orders — bids and listings — across the marketplaces GONDI indexes, newest first unless sortBy says otherwise. Only active orders unless statuses is given.

    Parameters

    Returns Promise<{
        orders: ({
            __typename: "BuyNowPayLaterOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "CollectionOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "MultipleTraitOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SellAndRepayOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SetBidOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SingleNFTOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
            nft: {
                __typename?: "NFT";
                id: string;
                tokenId: bigint;
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                };
            };
        } | {
            __typename: "StealthMaskedOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "TraitOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        })[];
        hasNextPage: true;
        cursor: string;
    } | {
        orders: ({
            __typename: "BuyNowPayLaterOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "CollectionOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "MultipleTraitOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SellAndRepayOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SetBidOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SingleNFTOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
            nft: {
                __typename?: "NFT";
                id: string;
                tokenId: bigint;
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                };
            };
        } | {
            __typename: "StealthMaskedOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "TraitOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        })[];
        hasNextPage: false;
        cursor: null;
    }>

    One page of orders, with the cursor of the next one.

  • Reads what pricing and placing a bid or a listing on a collection needs: its id and contract address, the Seaport conduit key its listings are approved through (zero for Seaport itself), its floor (the cheapest active listing in currencies, any currency when omitted), its highest bid that any item can fill, and its royalties (required ones must be paid as listing fees).

    Looks the collection up by slug, the lookup the API answers fastest.

    Parameters

    • __namedParameters: {
          slug: string;
          currencies?: `0x${string}`[];
      }
      • slug: string
      • Optional currencies?: `0x${string}`[]

    Returns Promise<{
        collectionId: number;
        contractAddress: `0x${string}`;
        seaportConduitKey: `0x${string}`;
        floorPrice: null | {
            __typename?: "BigIntCurrencyAmount";
            amount: bigint;
            currency: {
                __typename?: "Currency";
                address: `0x${string}`;
            };
        };
        highestBid: null | {
            __typename: "BuyNowPayLaterOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "CollectionOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "MultipleTraitOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SellAndRepayOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SetBidOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "SingleNFTOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
            nft: {
                __typename?: "NFT";
                id: string;
                tokenId: bigint;
                collection?: null | {
                    __typename?: "Collection";
                    id: string;
                };
            };
        } | {
            __typename: "StealthMaskedOrder";
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        } | {
            __typename: "TraitOrder";
            collectionId: number;
            id: string;
            price: bigint;
            steppedPrice?: null | bigint;
            currencyAddress: `0x${string}`;
            maker: `0x${string}`;
            isAsk: boolean;
            status: string;
            startTime: Date;
            expiration: Date;
            executions: number;
            maxExecutions: number;
            cancelsOffChain: boolean;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
        };
        royalties: {
            __typename?: "Royalty";
            beneficiary: `0x${string}`;
            percentage: number;
            required: boolean;
        }[];
    }>

    Throws

    Error when no collection has slug.

  • Parameters

    • props: {
          collectionId: number;
      }
      • collectionId: number

    Returns Promise<{
        __typename?: "OfferSteps";
        aprBpsStep: bigint;
        origFeeBpsStep: bigint;
        usdcStep: bigint;
        wethStep: bigint;
    }>

  • Lists the NFTs the wallet holds, one page at a time.

    Parameters

    Returns Promise<{
        ownedNfts: {
            __typename?: "NFT";
            id: string;
            tokenId: bigint;
            collection?: null | {
                __typename?: "Collection";
                id: string;
                contractData: {
                    __typename?: "ContractData";
                    contractAddress: `0x${string}`;
                };
                wrapperCollections: {
                    __typename?: "Collection";
                    contractData: {
                        __typename?: "ContractData";
                        contractAddress: `0x${string}`;
                    };
                }[];
            };
            activeLoan?: null | {
                __typename?: "MultiSourceLoan";
                id: string;
            };
            statistics: {
                __typename?: "NftStatistics";
                lastSale?: null | {
                    __typename?: "Sale";
                    order?: null | {
                        __typename?: "BuyNowPayLaterOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "CollectionOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "MultipleTraitOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "SellAndRepayOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "SetBidOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "SingleNFTOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "StealthMaskedOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "TraitOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    };
                };
                topTraitFloorPrice?: null | {
                    __typename?: "CurrencyAmount";
                    amount: number;
                    currency: {
                        __typename?: "Currency";
                        address: `0x${string}`;
                        decimals: number;
                    };
                };
            };
        }[];
        pageInfo: {
            __typename?: "PageInfo";
            endCursor?: null | string;
            hasNextPage: boolean;
        };
    }>

    The page's NFTs, newest NFT id first, and its pageInfo.

  • Parameters

    • __namedParameters: {
          loan: Object;
      }
      • loan: Object

    Returns Promise<boolean>

  • The MultiSourceLoan address makeSingleNftOffer, makeCollectionOffer and makeTraitOffer sign for on the wallet's chain when the caller names none: the to a lender approves the principal for before publishing those offers. v3.2 is the only version whose signed LoanOffer carries lenderRefinanceDisabled, so a flagged offer signs for it and throws on a chain without a v3.2 deployment; any other offer, or no offer, signs for the default contract.

    Parameters

    • __namedParameters: {
          lenderRefinanceDisabled?: null | boolean;
      } = {}
      • Optional lenderRefinanceDisabled?: null | boolean

    Returns `0x${string}`

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                lenderRefinanceDisabled: boolean;
                id: string;
            };
            loanId: bigint;
            renegotiationId: string;
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                source: readonly {
                    loanId: bigint;
                    lender: `0x${string}`;
                    principalAmount: bigint;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                id: string;
            };
            loanId: bigint;
            renegotiationId: string;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                lenderRefinanceDisabled: boolean;
                id: string;
            };
            loanId: bigint;
            renegotiationId: string;
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                source: readonly {
                    loanId: bigint;
                    lender: `0x${string}`;
                    principalAmount: bigint;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                id: string;
            };
            loanId: bigint;
            renegotiationId: string;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                lenderRefinanceDisabled: boolean;
                id: string;
            };
            loanId: bigint;
            renegotiationId: string;
        }>);
    }>

  • Delegate Multicall should be used when token is used as collateral for an active loan. Multicall will be performed to the contract address of the first delegation.

    Parameters

    • delegations: {
          loan: LoanToMslLoanType;
          loanId: bigint;
          to: `0x${string}`;
          enable: boolean;
          rights?: `0x${string}`;
      }[]

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            results: {
                loanId: bigint;
                delegate: `0x${string}`;
                value: boolean;
            }[];
        }>);
    }>

  • Delegate should be used when token is used as collateral for an active loan.

    Parameters

    • __namedParameters: {
          loan: LoanToMslLoanType;
          loanId: bigint;
          to: `0x${string}`;
          enable: boolean;
          rights?: `0x${string}`;
      }
      • loan: LoanToMslLoanType
      • loanId: bigint
      • to: `0x${string}`
      • enable: boolean
      • Optional rights?: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                loanId: bigint;
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint | bigint & Date;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                contractStartTime: bigint | Date;
            };
            value: boolean;
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loan: {
                loanId: bigint;
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint | bigint & Date;
                duration: bigint;
                source: readonly {
                    loanId: bigint;
                    lender: `0x${string}`;
                    principalAmount: bigint;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
            };
            value: boolean;
        }>);
    }>

  • RevokeDelegate should be used when token is not being used as collateral.

    Parameters

    • __namedParameters: {
          to: `0x${string}`;
          collection: `0x${string}`;
          tokenId: bigint;
          contract?: `0x${string}`;
      }
      • to: `0x${string}`
      • collection: `0x${string}`
      • tokenId: bigint
      • Optional contract?: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            delegate: `0x${string}`;
            collection: `0x${string}`;
            tokenId: bigint;
        }>);
    }>

  • RevokeDelegationsAndEmitLoan should be used when token has been delegated without being revoked, and a new loan wants to be emitted, erasing the delegations provided as argument in the same transaction as the emit.

    Parameters

    • delegations: {
          delegations: readonly LoanDelegation[];
          emit: EmitLoanArgs;
      }

      The token's delegations, as the API's Delegation.delegateTo and Delegation.rights report them: each { to, rights } is revoked with every rights value it lists, and a bare address with the full-rights zeroHash.

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            results: ({
                loanId: bigint;
                offerId: readonly bigint[];
                loan: {
                    borrower: `0x${string}`;
                    nftCollateralTokenId: bigint;
                    nftCollateralAddress: `0x${string}`;
                    principalAddress: `0x${string}`;
                    principalAmount: bigint;
                    startTime: bigint;
                    duration: bigint;
                    tranche: readonly ({ loanId: bigint; floor: bigint; principalAmount: bigint; lender: `0x${string}`; accruedInterest: bigint; startTime: bigint; aprBps: bigint; })[];
                    protocolFee: bigint;
                };
                fee: bigint;
            } | {
                delegate: `0x${string}`;
                collection: `0x${string}`;
                tokenId: bigint;
                _rights: `0x${string}`;
            })[];
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                id: string;
            } | {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                lenderRefinanceDisabled: boolean;
                id: string;
            };
            loanId: bigint;
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            results: ({
                loanId: bigint;
                offerId: bigint;
                loan: {
                    borrower: `0x${string}`;
                    nftCollateralTokenId: bigint;
                    nftCollateralAddress: `0x${string}`;
                    principalAddress: `0x${string}`;
                    principalAmount: bigint;
                    startTime: bigint;
                    duration: bigint;
                    source: readonly ({ loanId: bigint; lender: `0x${string}`; principalAmount: bigint; accruedInterest: bigint; startTime: bigint; aprBps: bigint; })[];
                };
                lender: `0x${string}`;
                borrower: `0x${string}`;
                fee: bigint;
            } | {
                delegate: `0x${string}`;
                collection: `0x${string}`;
                tokenId: bigint;
            })[];
            loan: {
                contractAddress: `0x${string}`;
                borrower: `0x${string}`;
                nftCollateralTokenId: bigint;
                nftCollateralAddress: `0x${string}`;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                startTime: bigint;
                duration: bigint;
                source: readonly {
                    loanId: bigint;
                    lender: `0x${string}`;
                    principalAmount: bigint;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                id: string;
            };
            loanId: bigint;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loanId: bigint;
        }>);
    }>

  • Parameters

    • __namedParameters: {
          collectionContractAddress: `0x${string}`;
          tokenId: bigint;
          bid: bigint;
          auction: Auction;
      }
      • collectionContractAddress: `0x${string}`
      • tokenId: bigint
      • bid: bigint
      • auction: Auction

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            auctionContract: `0x${string}`;
            tokenId: bigint;
            newBidder: `0x${string}`;
            bid: bigint;
            loanAddress: `0x${string}`;
            loanId: bigint;
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            collection: `0x${string}`;
            tokenId: bigint;
            newBidder: `0x${string}`;
            bid: bigint;
            loanAddress: `0x${string}`;
            loanId: bigint;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loanContract: `0x${string}`;
            loanId: bigint;
            collection: `0x${string}`;
            tokenId: bigint;
            asset: `0x${string}`;
            proceeds: bigint;
            settler: `0x${string}`;
            triggerFee: bigint;
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loanContract: `0x${string}`;
            loanId: bigint;
            auctionContract: `0x${string}`;
            tokenId: bigint;
            asset: `0x${string}`;
            proceeds: bigint;
            settler: `0x${string}`;
            triggerFee: bigint;
        }>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loanContract: `0x${string}`;
            loanId: bigint;
            auctionContract: `0x${string}`;
            tokenId: bigint;
            asset: `0x${string}`;
            highestBid: bigint;
            settler: `0x${string}`;
            triggerFee: bigint;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            loanAddress: `0x${string}`;
            loanId: bigint;
            nftAddress: `0x${string}`;
            tokenId: bigint;
            largestTrancheIdx: bigint;
        }>);
    }>

  • Parameters

    • __namedParameters: {
          auction: Pick<Auction, "loanId" | "loanAddress" | "startTime"> & Partial<Pick<{
              loanAddress: `0x${string}`;
              loanId: bigint;
              highestBid: bigint;
              triggerFee: bigint;
              minBid: bigint;
              highestBidder: `0x${string}`;
              duration: bigint;
              asset: `0x${string}`;
              startTime: bigint;
              originator: `0x${string}`;
              lastBidTime: bigint;
              loanHash: `0x${string}`;
              buyoutWindow: bigint;
          }, "buyoutWindow">>;
      }
      • auction: Pick<Auction, "loanId" | "loanAddress" | "startTime"> & Partial<Pick<{
            loanAddress: `0x${string}`;
            loanId: bigint;
            highestBid: bigint;
            triggerFee: bigint;
            minBid: bigint;
            highestBidder: `0x${string}`;
            duration: bigint;
            asset: `0x${string}`;
            startTime: bigint;
            originator: `0x${string}`;
            lastBidTime: bigint;
            loanHash: `0x${string}`;
            buyoutWindow: bigint;
        }, "buyoutWindow">>

    Returns Promise<number>

  • The bid refund in token that the auction liquidator of the loan contract at loanAddress holds for bidder (the wallet by default) because returning it on an outbid failed. Only contract version 3.2 holds refunds; older versions always read 0.

    Parameters

    • __namedParameters: {
          loanAddress: `0x${string}`;
          token: `0x${string}`;
          bidder?: `0x${string}`;
      }
      • loanAddress: `0x${string}`
      • token: `0x${string}`
      • Optional bidder?: `0x${string}`

    Returns Promise<bigint>

  • Claims the wallet's bid refund in token from the auction liquidator of the loan contract at loanAddress. Only contract version 3.2 holds refunds.

    Parameters

    • __namedParameters: {
          loanAddress: `0x${string}`;
          token: `0x${string}`;
      }
      • loanAddress: `0x${string}`
      • token: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            bidder: `0x${string}`;
            asset: `0x${string}`;
            amount: bigint;
        }>);
    }>

  • Get the owner of an ERC 721 token.

    Parameters

    • __namedParameters: {
          nftAddress: `0x${string}`;
          tokenId: bigint;
      }
      • nftAddress: `0x${string}`
      • tokenId: bigint

    Returns Promise<`0x${string}`>

  • Get the balance of an ERC 1155 token id.

    Parameters

    • __namedParameters: {
          nftAddress: `0x${string}`;
          tokenId: bigint;
      }
      • nftAddress: `0x${string}`
      • tokenId: bigint

    Returns Promise<bigint>

  • Whether the wallet has approved to as operator for every NFT of nftAddress.

    Parameters

    • __namedParameters: {
          nftAddress: `0x${string}`;
          standard: NftStandard;
          to: `0x${string}`;
      }
      • nftAddress: `0x${string}`
      • standard: NftStandard
      • to: `0x${string}`

    Returns Promise<boolean>

  • Approves to, the contract that will pull the NFT, as operator for all of nftAddress.

    Parameters

    • __namedParameters: {
          nftAddress: `0x${string}`;
          standard: NftStandard;
          to: `0x${string}`;
      }
      • nftAddress: `0x${string}`
      • standard: NftStandard
      • to: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            owner: `0x${string}`;
            operator: `0x${string}`;
            approved: boolean;
        } | {
            owner: `0x${string}`;
            operator: `0x${string}`;
            approved: boolean;
        }>);
    }>

  • Transfer an NFT to another wallet. The sender is the connected wallet account. Supports ERC721 (default), ERC1155, naked CryptoPunks and old (pre-ERC721) collections. amount only applies to ERC1155 transfers.

    Parameters

    • __namedParameters: {
          to: `0x${string}`;
          nftAddress: `0x${string}`;
          tokenId: bigint;
          standard?: TransferNftStandard;
          amount?: bigint;
      }
      • to: `0x${string}`
      • nftAddress: `0x${string}`
      • tokenId: bigint
      • Optional standard?: TransferNftStandard
      • Optional amount?: bigint

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            from: `0x${string}`;
            to: `0x${string}`;
            punkIndex: bigint;
        } & TransactionReceipt>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            _from: `0x${string}`;
            _to: `0x${string}`;
            _tokenId: bigint;
        } & TransactionReceipt>);
    } | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            from: `0x${string}`;
            to: `0x${string}`;
            id: bigint;
        } & TransactionReceipt>);
    }>

  • Whether the wallet's allowance of tokenAddress to to covers amount.

    Parameters

    • __namedParameters: {
          tokenAddress: `0x${string}`;
          amount: bigint;
          to: `0x${string}`;
      }
      • tokenAddress: `0x${string}`
      • amount: bigint
      • to: `0x${string}`

    Returns Promise<boolean>

  • Approves to, the contract that will pull it, to spend amount (default unlimited).

    Parameters

    • __namedParameters: {
          tokenAddress: `0x${string}`;
          amount?: bigint;
          to: `0x${string}`;
      }
      • tokenAddress: `0x${string}`
      • Optional amount?: bigint
      • to: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            owner: `0x${string}`;
            spender: `0x${string}`;
            amount: bigint;
        }>);
    }>

  • The wallet's allowance of tokenAddress to to.

    Parameters

    • __namedParameters: {
          tokenAddress: `0x${string}`;
          to: `0x${string}`;
      }
      • tokenAddress: `0x${string}`
      • to: `0x${string}`

    Returns Promise<bigint>

  • Parameters

    • __namedParameters: {
          tokenAddress: `0x${string}`;
      }
      • tokenAddress: `0x${string}`

    Returns Promise<bigint>

  • Parameters

    Returns Promise<{
        vaultId: bigint;
        receipts: ({
            vaultId: bigint;
            collection: `0x${string}`;
            tokenId: bigint;
        } | {
            vaultId: bigint;
            token: `0x${string}`;
            amount: bigint;
        })[];
    }>

  • Parameters

    Returns Promise<{
        vaultId: bigint;
        receipts: ({
            vaultId: bigint;
            collection: `0x${string}`;
            tokenId: bigint;
        } | {
            vaultId: bigint;
            token: `0x${string}`;
            amount: bigint;
        })[];
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            vaultId: bigint;
            collection: `0x${string}`;
            tokenId: bigint;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            vaultId: bigint;
            token: `0x${string}`;
            tokenId: bigint;
            amount: bigint;
        }>);
    }>

  • Parameters

    • __namedParameters: {
          userVaultAddress?: `0x${string}`;
      } & DepositERC20Args

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            vaultId: bigint;
            token: `0x${string}`;
            amount: bigint;
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            events: {
                vaultId: bigint;
                collection: `0x${string}`;
                tokenId: bigint;
            }[];
            oldEvents: {
                vaultId: bigint;
                collection: `0x${string}`;
                tokenId: bigint;
            }[];
        }>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitMined: (() => Promise<TransactionReceipt>);
    }>

  • Parameters

    Returns Promise<{
        txHash: `0x${string}`;
        waitMined: (() => Promise<TransactionReceipt>);
    }>

  • Where the wallet's CryptoPunk tokenId stands on its way into CryptoPunks 721, read from chain: 'wallet' while the wallet holds it naked, 'stash' once it sits in the wallet's Stash waiting for wrapPunk721, 'wrapped' once the wallet holds its 721 token, and 'other' when none of these holds.

    IMPLEMENTATION NOTE: the punks market's punkIndexToAddress names the punk's holder and CryptoPunks721.punkProxyForUser the wallet's Stash, deployed or not yet; a wrapped punk is held by the 721 contract, which mints its token to the wallet (https://721.cryptopunks.app, https://etherscan.io/address/0x000000000000003607fce1ac9e043a86675c5c2f#code).

    Parameters

    • __namedParameters: {
          tokenId: bigint;
      }
      • tokenId: bigint

    Returns Promise<Punk721WrapState>

  • Moves the wallet's naked CryptoPunk tokenId into its Stash, the first of the two transactions that wrap it into CryptoPunks 721. Refuses a punk the wallet does not hold.

    Parameters

    • __namedParameters: {
          tokenId: bigint;
      }
      • tokenId: bigint

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Wraps the CryptoPunk tokenId waiting in the wallet's Stash into CryptoPunks 721, minting its 721 token to the wallet. Refuses a punk that is not in the Stash: move it there first with transferPunkToStash721.

    Parameters

    • __namedParameters: {
          tokenId: bigint;
      }
      • tokenId: bigint

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Unwraps the wallet's CryptoPunks 721 token tokenId back into a naked CryptoPunk: the 721 contract burns the token and hands the punk to the wallet, in one transaction with no approval. Refuses unless the wallet holds the 721 token, so a token held by a loan, a vault or someone else is never sent.

    Parameters

    • __namedParameters: {
          tokenId: bigint;
      }
      • tokenId: bigint

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Parameters

    • __namedParameters: {
          repaymentCalldata: `0x${string}`;
          purchaseBundlerAddress?: `0x${string}`;
          mslContractAddress: `0x${string}`;
          price: bigint;
          swapData?: Maybe<`0x${string}`>;
      }
      • repaymentCalldata: `0x${string}`
      • Optional purchaseBundlerAddress?: `0x${string}`
      • mslContractAddress: `0x${string}`
      • price: bigint
      • Optional swapData?: Maybe<`0x${string}`>

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Parameters

    • __namedParameters: {
          purchaseBundlerAddress?: `0x${string}`;
          mslContractAddress: `0x${string}`;
          repaymentCalldata: `0x${string}`;
          swapData?: `0x${string}`;
      }
      • Optional purchaseBundlerAddress?: `0x${string}`
      • mslContractAddress: `0x${string}`
      • repaymentCalldata: `0x${string}`
      • Optional swapData?: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Sells nft into order, a Native or OpenSea bid. The Gondi API builds the sale calldata for both marketplaces, so OpenSea bids need no client-side OpenSea credentials and no approval beyond the collateral's.

    Parameters

    • __namedParameters: {
          order: {
              id: string;
              currencyAddress: `0x${string}`;
              originalId: string;
              marketPlace: string;
              marketPlaceAddress: `0x${string}`;
              price: bigint;
          };
          nft: {
              id: string;
              tokenId: bigint;
              collectionAddress: `0x${string}`;
          };
      }
      • order: {
            id: string;
            currencyAddress: `0x${string}`;
            originalId: string;
            marketPlace: string;
            marketPlaceAddress: `0x${string}`;
            price: bigint;
        }
        • id: string
        • currencyAddress: `0x${string}`

          The order's currency as reported by the Gondi API. A native-currency order carries the zero address on Ethereum, but a synthetic sentinel on other chains (__HYPE_ADDRESS on HyperEVM, __RETH_ADDRESS on Robinhood) — check it with isNativeCurrency.

        • originalId: string
        • marketPlace: string
        • marketPlaceAddress: `0x${string}`
        • price: bigint
      • nft: {
            id: string;
            tokenId: bigint;
            collectionAddress: `0x${string}`;
        }
        • id: string
        • tokenId: bigint
        • collectionAddress: `0x${string}`

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<TransactionReceipt>);
    }>

  • Parameters

    • __namedParameters: {
          mslContractAddress: `0x${string}`;
      }
      • mslContractAddress: `0x${string}`

    Returns Promise<{
        recipient: `0x${string}`;
        fraction: bigint;
    } | {
        recipient: `0x${string}`;
        fraction: bigint;
    } | {
        recipient: `0x${string}`;
        fraction: bigint;
    }>

Properties

calculateProratedOriginationFee: ((__namedParameters) => {
    fee: bigint;
    actualEaprBps: bigint;
}) = calculateProratedOriginationFee

Type declaration

    • (__namedParameters): {
          fee: bigint;
          actualEaprBps: bigint;
      }
    • Parameters

      • __namedParameters: {
            principal: bigint;
            aprBps: bigint;
            duration: bigint;
            effectiveApr: number;
        }
        • principal: bigint
        • aprBps: bigint
        • duration: bigint
        • effectiveApr: number

      Returns {
          fee: bigint;
          actualEaprBps: bigint;
      }

      • fee: bigint
      • actualEaprBps: bigint
buildSiweMessage: ((__namedParameters) => string) = buildSiweMessage

Type declaration

    • (__namedParameters): string
    • Parameters

      • __namedParameters: {
            domain: string;
            address: string;
            statement: string;
            uri: string;
            version: string;
            chainId: number;
            nonce: string;
            issuedAt?: string;
        }
        • domain: string
        • address: string
        • statement: string
        • uri: string
        • version: string
        • chainId: number
        • nonce: string
        • Optional issuedAt?: string

      Returns string

contracts: Contracts
wallet: {}

Type declaration

    account: Account
    bcClient: {}

    Type declaration

      apiClient: Api
      skipFlaggedNftCheck: boolean