1.0.0 • Published 2 years ago
kettle-core v1.0.0
Kettle Core
Model Definitions
Token
interface Token: {
tokenId: String,
address: Address,
schema?: ERC721 | ERC1155,
size?: Integer
}Price
interface Price {
currency: {
address: Address,
symbol: USDC | WETH,
decimals: Integer
},
amount: {
raw: String,
usd: Float,
native: Float,
decimal: Float
}
}Fee
interface Fee {
rate: String,
recipient: Address | "0x"
}Lien
interface Lien {
id: String,
borrower: Address,
lender: Address,
size: Integer,
loanAmount: Price,
repayAmount: Price,
fees: Fee[],
duration: String,
rate: String,
startTime: String,
endTime: String,
isDefaulted: Boolean
}Listing (Borrow Offer)
interface Listing {
hash: Bytes32,
borrower: Address,
loanAmount: Price,
netLoanAmount: Price,
repayAmount: Price,
rate: String,
duration: String,
expiration: String,
salt: String,
fees: Fee[],
created: Integer
}Offer
interface Offer {
hash: Bytes32,
lender: Address,
loanAmount: Price,
netLoanAmount: Price,
repayAmount: Price,
rate: String,
duration: String,
expiration: String,
salt: String,
fees: Fee[],
created: Integer
}API
All Listings
GET allListingsResponse
{
token: Token,
listing: Listing
}1.0.0
2 years ago