Class Gondi

Hierarchy

  • Gondi

Constructors

Methods

  • Parameters

    Returns Promise<{
        aprBps: bigint;
        borrowerAddress: `0x${string}`;
        capacity: bigint;
        contractAddress: `0x${string}`;
        duration: bigint;
        expirationTime: bigint;
        fee: bigint;
        lenderAddress: `0x${string}`;
        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;
    }>

  • Parameters

    Returns Promise<{
        aprBps: bigint;
        borrowerAddress: `0x${string}`;
        capacity: bigint;
        collectionId: number;
        contractAddress: `0x${string}`;
        duration: bigint;
        expirationTime: bigint;
        fee: bigint;
        lenderAddress: `0x${string}`;
        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;
    }>

  • Parameters

    • __namedParameters: {
          collectionContractAddress: `0x${string}`;
          tokenId: bigint;
          price: bigint;
          expirationTime: bigint;
      }
      • collectionContractAddress: `0x${string}`
      • tokenId: bigint
      • price: bigint
      • expirationTime: bigint

    Returns Promise<SaveSignedSaleOfferMutation>

  • Parameters

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

  • Parameters

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

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            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;
        }>);
    }>

  • Parameters

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

    Returns Promise<HideOfferMutation>

  • Parameters

    • __namedParameters: {
          renegotiation: RenegotiationInput;
          contractAddress: `0x${string}`;
          skipSignature?: boolean;
      }
      • renegotiation: RenegotiationInput
      • contractAddress: `0x${string}`
      • Optional skipSignature?: boolean

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

  • 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;
                source: readonly {
                    loanId: bigint;
                    lender: `0x${string}`;
                    principalAmount: bigint;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                id: string;
            };
            loanId: bigint;
            offerId: 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;
                tranche: readonly {
                    loanId: bigint;
                    floor: bigint;
                    principalAmount: bigint;
                    lender: `0x${string}`;
                    accruedInterest: bigint;
                    startTime: bigint;
                    aprBps: bigint;
                }[];
                protocolFee: bigint;
                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;
            };
            loanId: bigint;
            offerIds: string[];
        }>);
    }>

  • Parameters

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

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

  • Parameters

    Returns Promise<{
        offers: ({
            type: undefined | "CollectionOffer" | "SingleNFTOffer";
            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}`;
            }[];
            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;
            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" | "SingleNFTOffer";
            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}`;
            }[];
            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;
            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}`;
            }[];
        })[];
        hasNextPage: true;
        cursor: string;
    } | {
        offers: ({
            type: undefined | "CollectionOffer" | "SingleNFTOffer";
            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}`;
            }[];
            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;
            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" | "SingleNFTOffer";
            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}`;
            }[];
            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;
            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}`;
            }[];
        })[];
        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;
            offer: {
                __typename?: "CollectionOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "SingleNFTOffer";
                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;
            offer: {
                __typename?: "CollectionOffer";
                offerId: bigint;
                signerAddress?: null | `0x${string}`;
            } | {
                __typename?: "SingleNFTOffer";
                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[];
      }
      • Optional statsCurrency?: `0x${string}`
      • Optional standards?: TokenStandardType[]
      • Optional collections?: number[]

    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;
                numberOfOffers: 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[]>

  • Parameters

    Returns Promise<{
        ownedNfts: {
            __typename?: "NFT";
            id: string;
            tokenId: bigint;
            price?: null | bigint;
            priceCurrencyAddress?: null | string;
            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: {
                        __typename?: "CollectionOrder";
                        price: bigint;
                        currency: {
                            __typename?: "Currency";
                            address: `0x${string}`;
                            decimals: number;
                        };
                    } | {
                        __typename?: "SingleNFTOrder";
                        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;
        };
    }>

  • Parameters

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

    Returns Promise<null | {
        __typename?: "CollectionOrder";
        id: string;
        netAmount: bigint;
        status: string;
        marketPlace: string;
        fees: bigint;
        maker: `0x${string}`;
        expiration?: null | Date;
        createdDate: Date;
        hidden: boolean;
        signature: `0x${string}`;
        currencyAddress: `0x${string}`;
        startTime: Date;
        nonce: bigint;
    } | {
        __typename?: "SingleNFTOrder";
        id: string;
        netAmount: bigint;
        status: string;
        marketPlace: string;
        fees: bigint;
        maker: `0x${string}`;
        expiration?: null | Date;
        createdDate: Date;
        hidden: boolean;
        signature: `0x${string}`;
        currencyAddress: `0x${string}`;
        startTime: Date;
        nonce: bigint;
    }>

  • Parameters

    • __namedParameters: {
          aprBpsImprovementPercentage: number;
          refinancings: {
              loan: Object;
              source: {
                  loanId: bigint;
                  floor: bigint;
                  principalAmount: bigint;
                  lender: `0x${string}`;
                  accruedInterest: bigint;
                  startTime: bigint;
                  aprBps: bigint;
              } & {
                  loanIndex: number;
              };
              refinancingPrincipal: bigint;
          }[];
      }
      • aprBpsImprovementPercentage: number
      • refinancings: {
            loan: Object;
            source: {
                loanId: bigint;
                floor: bigint;
                principalAmount: bigint;
                lender: `0x${string}`;
                accruedInterest: bigint;
                startTime: bigint;
                aprBps: bigint;
            } & {
                loanIndex: number;
            };
            refinancingPrincipal: bigint;
        }[]

    Returns Promise<({
        status: "fulfilled";
        value: {
            txHash: `0x${string}`;
            waitTxInBlock: (() => Promise<{
                results: {
                    renegotiationId: bigint;
                    oldLoanId: bigint;
                    newLoanId: 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; })[];
                    };
                    fee: bigint;
                }[];
            }>);
        } | {
            txHash: `0x${string}`;
            waitTxInBlock: (() => Promise<{
                results: {
                    renegotiationId: bigint;
                    oldLoanId: bigint;
                    newLoanId: 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;
                }[];
            }>);
        };
        reason: undefined;
    } | {
        status: "rejected";
        reason: unknown;
        value: any[];
    })[]>

  • 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;
            };
            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;
            };
            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;
            };
            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.

    Parameters

    • __namedParameters: {
          delegations: `0x${string}`[];
          emit: EmitLoanArgs;
      }

    Returns Promise<{
        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;
        }>);
    } | {
        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;
            })[];
            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;
            };
            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;
            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;
        }>);
    } | {
        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;
        }>);
    }>

  • Parameters

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

  • Parameters

    Returns Promise<number>

  • Parameters

    • tokensToBuy: {
          collectionContractAddress: `0x${string}`;
          tokenId: bigint;
          price: bigint;
          orderSource: string;
      }[]

    Returns Promise<true | Execute>

  • Parameters

    • __namedParameters: {
          leverageBuyData: {
              offer: {
                  offerId: bigint;
                  lender: `0x${string}`;
                  fee: bigint;
                  borrower: `0x${string}`;
                  capacity: bigint;
                  nftCollateralAddress: `0x${string}`;
                  nftCollateralTokenId: bigint;
                  principalAddress: `0x${string}`;
                  principalAmount: bigint;
                  aprBps: bigint;
                  expirationTime: bigint;
                  duration: bigint;
                  validators: readonly ({ validator: `0x${string}`; arguments: `0x${string}`; })[];
              } & {
                  signature: `0x${string}`;
              };
              expirationTime: bigint;
              amount: bigint;
              nft: {
                  collectionContractAddress: `0x${string}`;
                  tokenId: bigint;
                  price: bigint;
                  orderSource: string;
              };
          }[];
      }
      • leverageBuyData: {
            offer: {
                offerId: bigint;
                lender: `0x${string}`;
                fee: bigint;
                borrower: `0x${string}`;
                capacity: bigint;
                nftCollateralAddress: `0x${string}`;
                nftCollateralTokenId: bigint;
                principalAddress: `0x${string}`;
                principalAmount: bigint;
                aprBps: bigint;
                expirationTime: bigint;
                duration: bigint;
                validators: readonly ({ validator: `0x${string}`; arguments: `0x${string}`; })[];
            } & {
                signature: `0x${string}`;
            };
            expirationTime: bigint;
            amount: bigint;
            nft: {
                collectionContractAddress: `0x${string}`;
                tokenId: bigint;
                price: bigint;
                orderSource: string;
            };
        }[]

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            _loanIds: readonly bigint[];
        }>);
    }>

  • Parameters

    • __namedParameters: {
          loan: LoanV5;
          loanId: bigint;
          price: bigint;
          orderSource: string;
      }
      • loan: LoanV5
      • loanId: bigint
      • price: bigint
      • orderSource: string

    Returns Promise<{
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            _loanIds: readonly 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>

  • Parameters

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

    Returns Promise<boolean>

  • Parameters

    • __namedParameters: {
          nftAddress: `0x${string}`;
          standard: NftStandard;
          to?: `0x${string}`;
      }
      • nftAddress: `0x${string}`
      • standard: NftStandard
      • Optional 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;
        }>);
    }>

  • Parameters

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

    Returns Promise<boolean>

  • Parameters

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

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

  • Parameters

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

  • Parameters

    • __namedParameters: {
          nfts: CreateVaultArgs;
          userVaultAddress?: `0x${string}`;
      }

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

  • Parameters

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

  • Parameters

    Returns Promise<void | {
        txHash: `0x${string}`;
        waitTxInBlock: (() => Promise<{
            vaultId: bigint;
            token: `0x${string}`;
            tokenId: bigint;
            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>);
    }>

Properties

contracts: Contracts
wallet: {}

Type declaration

    account: Account
    bcClient: {}

    Type declaration

      api: Api
      reservoir: Reservoir
      defaults: {
          Msl: `0x${string}`;
          UserVault: `0x${string}`;
      }

      Type declaration

      • Msl: `0x${string}`
      • UserVault: `0x${string}`